Forums :: Resources :: Features :: Photo Gallery :: Vintage Radio Shows :: Archives Support This Site: Contributors :: Advertise

It is currently Jan Mon 20, 2020 12:07 pm

 All times are UTC [ DST ]

Author Message
 Post subject: Exponential Voltage Generator controlled by linear pot or CV Posted: May Wed 30, 2018 4:02 am
 Member Joined: Jan Thu 01, 1970 1:00 am
Posts: 4223
I don't see that I ever posted this here, so here goes:

I needed a circuit that would take as input a linear voltage and output an exponential voltage. Typical uses would be linear tuning for radios, also musical instruments or audio generators where each octave is double the frequency of the previous. The idea is for all frequencies to be evenly spaced on the dial.

The traditional way of generating this kind of voltage is to use the base-emitter junction of a transistor, which is complicated and temperature dependent. Of course such a curve could be produced digitally with an EEPROM or PIC, but where's the fun in that?

I wondered if the exponential charging characteristics of a capacitor could be used to generate an exponential voltage, controlled by a linear pot or linear control voltage. It can.

First some review: A capacitor charged through a resistor charges at a gradually slowing rate as the source voltage and current through the resistor drops. The resulting charge curve is similar to the green line on the graph below.

However, if the capacitor is charged by a constant current source, the voltage rise is linear, as with the red line. Note that on the linear line, when the charge time is half done, the capacitor is half charged. Not so with the exponential line.

Attachment: image1.jpg [ 49.19 KiB | Viewed 776 times ]

On the green line, the cap is charge to 8 volts within the first 2.5 seconds. The next 2.5 seconds, it's charged another 4 volts, then the next 2.5 seconds another 2 volts, then 1 volt. So in this particular example, every 2.5 seconds, the voltage halves. The goal is to grab the voltage you want when you need it.

I figured out two ways to to this, describing the more complicated first. According to the diagram below, a 555 timer is used as a clock to feed a flip flop that alternately charges and discharges a pair of capacitors. One capacitor is charged through a resistor, the other with constant current source. Each is charged for the same amount of time, the first yielding an exponential curve, the other a linear ramp wave. When the CV input to the comparator is fed, say 4 volts, the comparator compares this voltage to what's on the ramp wave. At the precise moment the ramp wave exceeds 4 volts, it tells the sample and hold to sample the voltage on the exponential capacitor and hold it there. This voltage is held until another cycle starts and is the output voltage.

Attachment: image2.jpg [ 41.28 KiB | Viewed 776 times ]

The waveforms are shown synchronized in the diagram. Obviously, for this to be practical the charge times need to be much shorter than I've described in the graph. I've been running my clock at about 300 Hz.

Here are pictures of the actual waveforms:

Attachment: image3.jpg [ 94.55 KiB | Viewed 776 times ]
Attachment: Image4.jpg [ 21.44 KiB | Viewed 776 times ]

Interesting that the blooming of the trace indicates the speed at which the trace is drawn. The exponential trace is thin at the bottom and thick at the top where it slows down, while the ramp wave has uniform thickness as the voltage rises.

I've had success with a simpler version, which does away with the ramp wave and sample and hold, instead simply connecting one input of the comparator to the exponential capacitor and the other to the desired control voltage. The comparator's output is variable duty cycle square wave, proportional to the exponential waveform. It can be filtered directly by a small capacitor, and the resulting exponential voltage taken off that.

While experimenting, I also came up an even simpler circuit employing the same principle and using just one 555 timer. It's range is somewhat limited, but it works ok. The 555 timer is connected in astable mode with 50% duty cycle, with two modifications. First, pins 5 and 8 are shorted by a 100 ohm resistor, which causes the internal comparator to delay tripping until a much higher charge voltage is reached. This allows the timing capacitor to be charged higher, increasing the available range of exponential voltage. Second, pin 6 is normally connected to Vcc through Ra. In this case, Ra is fed not with Vcc, but with the control voltage. The resulting waveform is a variable duty cycle square wave that varies according to how much the timing capacitor is charged. Because the capacitor is charged through a resistor, Ra, the charge time is exponential, and so the output duty cycle is exponentially correlated. As in the second circuit above, this can be filtered and taken off as a DC voltage.

Top Post subject: Re: Exponential Voltage Generator controlled by linear pot o Posted: May Thu 31, 2018 7:58 am
 Member Joined: Sep Mon 16, 2013 2:42 am
Posts: 3619
Location: Tucson, Arizona U.S.A.
The main problem with using an analog sample-hold is the limited hold time. If you run the circuit fast enough you can get the droop down to a reasonable level.

Instead of an analog sample-hold, you could measure the voltage with an A to D converter and store the result in a register. Then feed that through a D to A converter to get your output voltage.

All of this seems too complicated; why not just use an IC logarithmic converter? The data sheet should show how to connect it to give an exponential function.

_________________
Jim Mueller

Top Post subject: Re: Exponential Voltage Generator controlled by linear pot o Posted: May Thu 31, 2018 1:09 pm
 Member Joined: Jun Sun 22, 2008 2:03 am
Posts: 1447
Location: Burke, VA 22015
I think your second and third simplified circuits perform a logarithmic function rather than an exponential one.

The voltage across a capacitor C being charged through a resistor R from a DC voltage source Vs is:

vc = Vs - Vs*exp(-t/RC)

The above expression assumes that the capacitor is completely discharged before being charged. The time it takes for charging the capacitor to a voltage vc is obtained by taking the natural logarithm and solving for t:

t = RC*[ln(Vs) - ln(Vs - vc)]

In the second circuit, the charging voltage Vs is fixed and the output pulse width is equal to the time it takes for vc to reach a desired control voltage. In the third circuit, the capacitor always charges to a fixed voltage vc dictated by the resistive divider chain in the 555 timer and the charging voltage Vs varies with the desired control voltage. In either circuit, the output pulse width (or duty cycle) is proportional to the natural log of the control voltage.

_________________
Binh

Top Post subject: Re: Exponential Voltage Generator controlled by linear pot o Posted: May Thu 31, 2018 5:11 pm
 Member Joined: Jan Thu 01, 1970 1:00 am
Posts: 4223

Jim Mueller wrote:
The main problem with using an analog sample-hold is the limited hold time. If you run the circuit fast enough you can get the droop down to a reasonable level.

Astute observation, thanks. I'll just point out that droop isn't a problem in this implementation.
Jim Mueller wrote:
All of this seems too complicated; why not just use an IC logarithmic converter? The data sheet should show how to connect it to give an exponential function.

The answer lies in my design criteria and personal priorities. It's always been important to me to use easily available off-the-shelf parts, trying to avoid using specialty parts that have a higher chance of becoming unobtanium. Maybe log converter ICs are abundant, I don't know. And perhaps a logarithmic converter IC would require fewer parts, but where's the fun in that? The circuit was developed in the context of "there's more than one way to skin a cat" and "I wonder if this would work." It does work well.
bb.odin wrote:
I think your second and third simplified circuits perform a logarithmic function rather than an exponential one.

Can't argue with the math. On the other hand, we all know that practical circuits often don't accurately perform exactly according to the math. In practical use this particular response performed closely enough to an exponential curve that any difference was negligible. Nowadays, it's so easily to get things exact using digital techniques, but I still get a kick out of seeing what I can do without microprocessors.

Thanks for discussing. Love the input here.

Top Post subject: Re: Exponential Voltage Generator controlled by linear pot o Posted: May Thu 31, 2018 6:39 pm
 Member Joined: Jun Sun 22, 2008 2:03 am
Posts: 1447
Location: Burke, VA 22015
Macrohenry wrote:
On the other hand, we all know that practical circuits often don't accurately perform exactly according to the math.

My doubt was not whether a circuit performs accurately according to the math but whether it approximates the function you want. Your first circuit approximates an exponential (anti-log) function. However, I think that your last two circuits approximate a log function which is the inverse of what you want.

_________________
Binh

Top All times are UTC [ DST ]

#### Who is online

Users browsing this forum: kd2ww, pixellany and 5 guests

Search for:             --> 