Blog Archives

This Old Phone part 3: Ring my bell.

I have the Bluetooth solution and verified operation of the candlestick handset. What was missing was an old timey ringer. Back in a day, a wall mounted ringer assemble was usually installed next to the handset.  This would require a 90V AC to ring the bell.  I want to have an old style ringer but I didn’t want to hassle with the 90 Volt requirements.   I found a surplus bell from an old phone parts supplier.  I removed the larger coil and installed a 5 volt relay with tie-wraps and wire.  I made it work.

20160320_173039_resized

The ringing is from a 15 to 20 Hz pulse that duty cycles on for 2 seconds and off for a couple seconds.  I piecemealed this circuit to be triggered from the incoming signal from the speaker. It sets the first 555 for the on off duty cycle while the second 555 is for the 20Hz ringing.

bellRingger

In order to make this a desktop application and something that doesn’t have to be anchored to a wall, I decided to create a “ringer base” which will also act as a charging station.  I found a nice small black cigar box that will serve just right for the ringer base.  The candlestick phone will sit on top and when a call comes in, lifting it off the base will cause the ringer to stop and answer the call.

20160320_172528_resized

I created 3 small PCBs from proto material I had hanging around my lab.  The larger one holds the ringer and charger circuit assembly.  I have a single transistor amplifier to act as a simple Schmitt trigger on a smaller PCB ( similar circuit I used for the condenser microphone from last time).  In the center is my connector board which will interface to the phone, charging power, “answer” signal, and speaker from the receiver.

20160320_172509_resized

The lid of the cigar box slides out. I cut out an access point to this molex connector, again from my spare parts bin, where at one point I got this assortment of connectors.  I routed out the underside so that the connector can stick up enough to mate with the base of the phone.

So far all things are in place. Next time I will put it all together with the interconnections from the phone.

This old ( Bluetooth connected) phone Part 2:

Since the old carbon microphone was not operational anymore, I needed to up grade to a more modern approach for the BC127 module. I found an inexpensive electret condenser microphone. Working with these can be a little tricky and not quite straightforward depending on the gain of target application  and how much voltage you intend to run it off. Given that I am trying to run this all off of a 3 V source, I didn’t have enough amplification to directly drive the microphone into the input of the BC127.

This this little circuit came in handy:

12-27-2015 4-10-23 PM

I built the circuit on a solder-able  breadboard and tested it with an oscilloscope first.  I verified the circuit by  testing it on the prototype platform, currently resembling a mad scientist’s tangled mess of wires.

Success! A call made from my land-line to my cell phone paired to the purpletooth jamboree board connected to this kluge of wires, iron and alligator clips was rather exciting for a geek. I was able to test the microphone’s ability to pick up my voice from about 3 feet away before dropping off.

 

Next step: In part 3, I really want to ring an old time ringer which I purchased. This will requiring hacking into the code a little bit to set a GPIO active to engage the bell. The problem is that the bell will require a higher voltage too and may defeat my dream of being somewhat rechargeable and running off of a single battery and voltage source.  At the very least, I will test the connection to the switch which will engage the “answer” mechanism ( play button on the Jamboree board).

Halloween prop 2015

It was early September when a friend approached me about a Halloween costume project. “I heard you could augment a gun prop with LEDs!”  Intrigued, I encouraged her to elaborate more. She wanted to recreate the character, Rocket, from Guardians of the Galaxy to rest on her shoulder while she was dressed as something else.  Then she mentioned using a puppet for the raccoon and the project took a life of it’s own.

12037972_10153864714065769_7599203634393871716_n

I had 6 short weeks to augment a Nerf Blaster with a sequence of LEDs, animate the head of a raccoon puppet, and make an industrial backpack to go along with the gun.  I drafted an overall plan for this attempt:

The Gun:

3 bright White LEDs ( 80mA each) for inside the barrel.

2 Purple LEDs for the tip of the muzzle

10 orange LED’s distributed to the chambers and butt of the stock.

20150925_183052

The Backpack:

1  Blue Circular Bar-graph LED (with 16 LEDs)

1 tri-color LED

Racoon Puppet:

2 Red LED’s for the eyes

1 mini position servo 180 degrees for head movement

2 condenser microphones for the ears

I wanted a firing sequence that would start at the backpack with the tri-color LED cycling through it’s rainbow while the circular Bar graph started up. At about halfway around the circular bar-graph, a few of the orange LEDs will start to light up ( flames). At full circle, the bright white LED’s in the barrel would fire a sequence of 3 pulse with the purple LED’s as an effect on the muzzle. Then the rest of the Orange LED’s would all be lit ( after burn) while the Circular LED cycles down.

20150925_193900_resized 20150925_191526_resized

For the Raccoon, his eyes would stay lit. The intention was to have him noise activated. If the left ear picked up a noise  louder than the right ear, move head to the left. The same for the right and if the sound was loud ( a clap or shout) the firing sequence for the gun would start. That was the intent anyway. The problem was the sampling rate for the analog input was not what was desired with all the other functions happening and no time allowed for optimization.  It will be a follow-up feature. Instead I used it for randomization of the head and firing sequence which made it less like an automaton from cheesy restaurant.

20150925_193921_resized

Due to limited time, I decided to basically use an Arduino DUE because it had 54 GPIOs to cover the 32 LEDs I wanted to sequence and still have room for the servo and the condenser Microphone pickup. I spent a considerable amount of time soldering current limiting resistors for the LED’s as well as a transistor driver for the larger and brighter white LED’s which would be too much for an Arduino’s GPIO.

Each LED had heat shrink and wire run all down to the base of the NERF Blaster and came together in a ribbon cable that fed back into the backpack.  On the Backpack ( sorry limited pictures before I handed off to the owner), I had to carefully solder the resistors and feed them through holes. I took apart a Dewalt large capacity chalk line to create the industrial pack for Rocket. The wind-up hole was perfect for the color LED and the Circular LED fit perfect around it.  All of this was thread through the outer casing and then soldered them onto  a board on the inside and another ribbon cable mated with the Arduino.12108962_10153921607450769_6901125894117860820_n

I only had a mini servo. To maximize the movement, I created a metal frame from a robotic’s mechanical assembly kit and mounted it on the spindle of the servo. I tested the proper placement inside the puppet and found the ideal placement was inside the nose of the raccoon to get the most movement.

I coded up the arduino and ran several tests with 3 AA batteries.  I was able to get about 4 to 6 hours of life before the batteries needed to be changed

.12046641_10203580578275355_8069776584775420743_n

I had a working Halloween prop for my friend in time for her to do some last minute augmentations ( she made is jump suit). She took it up to Salem MA to join in the fun. She got a lot of strange looks and wonderment from her little animated Rocket.

1891115_10203604274587748_8765457587115577213_n

Solving a Pesky PLL tuning issue for an RF transceiver

As a debut article, I’d like to share about one of the problems solved on a PLL circuit and problems when the product transferred to production calibration. Without revealing too many details due to sensitivities of trade secrets and all, I still would like to share how I  worked through this  problem on  a medical telemetry transceiver.

Let me first set the stage.  Let’s say a product is to be deployed worldwide but each geographical region has different frequency channel  allocations for the ISM band you are trying to meet.  In an effort to save design costs, a single PCB was fabricated in trying to meet all the 8 different operating bands. Each option had a modified BOM to and a programmable PLL  and DAC that allowed for tuning each of the options.

PLL1

4th order Loop Filter basic representation.

On the production floor we had a coarse tune adjustment and fine tune adjustment used the same PLL  and VCO.  Finding the sweet spot for all frequency ranges ( 400- 900MHz) AND gain variations for course versus fine meant having a challenging design constrained  to changing a few passive components for a 4th order loop filter for the PLL.

The main purpose of the loop filter is to act as a low pass filter (LPF) for the DC adjustments to the VCO.  It needs to be responsive enough for the charge pump changes in the PLL, yet not too wide of a bandwidth  or it allows the VCO to track harmonics of the frequency.  Ideally, you are looking for a narrow bandwidth from DC to 1K Hz in this particular setup.

There was a corner case on one of the frequency options where we had fallout in terms of yield. The problem showed up on the production floor during course tuning  when the board would go into an unwanted 800Hz oscillation.  Prior attempts to duplicate this particular problem  on the bench failed. Accepting the challenge I rolled up my sleeves made the following steps:

STEP 1: Design a test jig that can control just the radio module and allows access to the R and N counter values of the PLL as well as make the DAC adjustments for the course tuning. The schematic below is a representative interface I worked with

TESTJIG1

Test jig to recreate problem in the lab.

.

I had a simple SW interface to change the register for N and R values of the divide-by-N PLL  values on the fly.

STEP 2: Duplicate the same process as on the production floor. Once I was able to control the PLL and tune the VCO, I wanted to make sure the same sequences on the production floor were followed.  With this setup in the lab,  I was able to duplicate the tuning sequence on the production floor on the radio module under test and recreate the problem. It was important to follow the same algorithm as on the floor which meant starting from a MAX setting on the course tuning. In doing so, I found the corner case where the unwanted 700-800 Hz  oscillation was taking place.

Step 3: Understand the stability over the different gain adjustment in the closed loop.  The loop filter was designed for a fine tuning VCO gain ( k factor) of 6 MHz/V.  However, with  the course adjustment used on the floor, the frequency of the VCO changes   at a rate of 15 Mhz/V.  This created a 2.5 Delta in the anticipated gain when the loop filter values were chosen.

Step 4: Closed loop versus open Loop transfer characteristics: In the lab, I inserted a Gaussian noise in the loop to see the response of the circuit over a range of Frequencies at different VCO gain settings.  I made do with what equipment was available in the lab. I use a very old HP 3562A Dynamic Signal Analyzer.  It plotted the dynamic response of the closed loop circuit with the odd gain setting. Low and behold, was a pole at the unwanted ringing frequency seen on the production floor.

Pole1

Screen capture of the unwanted Pole causing the ringing at 706Hz

 

Step 5: Finding a practical solution :  The loop filter values didn’t consider  the higher VCO gain k-factor when tuned on the production floor. Values needed to be considered  for dynamic gain adjustments. The problem is that the use case for  the course gain will not be used once production calibration is  complete. Could a middle ground be reached which allowed production to go ahead without changing the process and still not impact performance of the transceiver?

I found a mathematical model that broke down the time constants for the orders in the loop filter.

In order to look at the closed loop transfer function the open loop characteristics needed to be defined first. The impedance of the open loop filter can be expressed in terms of the time constants for each order of the filter .

Formula1

But the closed loop gain needs to be considered for the stability factor. From the impedance of the open loop gain is determined as a function of the gain of the charge pump(KΦ), the VCO gain (KVCO)  as follows;Formula2

The closed loop transfer function takes into account the N counter  of the PLL . The N counter value is the output frequency of the VCO divided by the reference comparison frequency from the VCTXO.  Generically this expression looks like:

Formula3

In order to find the stability of the circuit the following Routh criteria must be met

Formula4

During the High gain, R2 and R3 were picked such that the stability factor was <1 after everything was crunched.  I managed to find the a set of values that increased the stability with a moderate tradeoff in overall loop bandwidth which still met all our operational and regulatory specifications.

With a minor BOM change,  we went from a yield of less than 50% to one that was over 94% without doing a redesign or having to validate a new production calibration procedure.

Problem SOLVED!

I thought I’d share this. Hope you find it useful.

George Duval

RF Analog Engineer.

Design a site like this with WordPress.com
Get started