Wednesday 1 February 2017

Ramp Generator: Inverse Ramp

Introduction

Last time we saw how one opamp (IC3A) would take a voltage from the 555 timer circuit and then level shift it. Using a gain of 3, it also amplified it so that the ramp would proceed range from  0V to +5V.  Finally, I noted that I had discovered that I needed an inverted ramp for the Topward 8110 Function Generator because it generates high frequencies at low ramp voltages and low frequencies at the high end of the ramp. It is highly desirable that frequency response shows from low to high on the scope, as left to right.

Figure 1 shows an inverting opamp amplifier added to the circuit to invert the ramp signal generated by IC3A.

Figure 1. Inverting amplifier IC3B
The resistor divider R6 and R7 simply provide a 2.5V middle point of reference for IC3B, since we are operating the opamp from a single ended power supply. This reference is fed into the (+) input on pin 5, so that when the (-) goes above it, the output voltages will go below, producing an inverted signal.

Notice that the gain calculation and resistor values of R9 and R10 are trivial. Gain for the inverting amplifier is simply:

Av = Rf / Rin
Av = R10 / R9

which is obviously 1.  If you're building this circuit, you might choose a 10k trimpot for R6 and R7, so that you can more accurately center the output of this stage. For my purposes, these levels didn't need to be exact, so some shift was tolerable. I also found that by playing with R15 and adjusting the IC3A stage, it would adjust IC3B also and allow me to arrive at a comfortable compromise for both.

Figure 2 illustrates the inverted ramp output of IC3B from pin 7.

Figure 2. Inverted ramp from IC3B output on pin 7
Figure 3 illustrates the same inverted ramp combined with the sync signal.

Figure 3. Inverted ramp signal shown with the NE555 generated sync signal.

From these scope shots you can see that the output does not go all the way down to 0V as intended. If that is critical for you, then substitute a trimpot in place of R6 and R7 and adjust for that.

Full Circuit

I have included the full circuit in Figure 4 (you should be able to click on the image for the full sized view).

Figure 4. Ramp generator schematic
Resistor R11 at the output of IC3B is provided to provide a load to the opamp in case the signal is capacitively coupled. Resistors R12, R13 and R14 provide some opamp and NE555 output protection, if the outputs should be shorted for any reason.

Figure 5 illustrates my breadboard setup for testing this circuit.

Figure 5. Ramp generator breadboarded

Topward Test

Figure 6 shows the function generator output with the ramp signal fed into the VCF input of the Topward 8110. The frequency range was selected to be at the high end of 1 kHz for this example, which is low enough that you can see the frequency modulation.

Figure 6. Ramp generator with Topward FG generated sine wave signal
It is plain to see that for the Topward 8110, the frequency (channel 3, purple) is lowest when the VCF input ramp (channel 1, yellow) was at its highest voltage. Frequency increased as the ramp proceeded toward 0V.

Summary

The next step here is to create a pcb and build it into some permanent case (I'm not sure if I will blog that). However, this is a low frequency circuit, which will tolerate prototyping of almost any kind. So don't feel that you must use a pcb for this project. 

I used the MC33202 opamp which supports low voltage and rail-to-rail at modest prices. If you try to use LM358/LM324 type devices, be aware that these will only output up to 3.5V. These will go to ground but need 1.5V headroom at the top end. If you insist on using these, then you may need to downgrade the gain in IC3A to 2 or raise the regulated power voltage.

Thanks for reading.

1 comment: