Very Slow Analog Sine Waves
I recently celebrated finishing an electronics project that has been years in the conceiving, but only months in the making. For a very long time I have wanted an oscillator that produces very low frequency sine waves. It would also be great if this circuit had features like PWM, gain, frequency control, and an indicator of some kind. On top of that, I wanted it to produce a standard ±5V output to work well with modular synthesizers. I was able to find a great IC (although it is obsolete so supply is finite), learn a ton about op-amps, purchased all the necessary parts, and build it.
Low frequency sine waves are surprisingly rare and difficult to produce with analog circuitry. Most oscillators depend on working with RC charging times and then “correct” them into ramps, triangles, saw tooth, or pulse waves. There are many high frequency sine wave oscillators partly due to the inductance and capacitance of parts and circuit boards. This will round off higher frequency components (like the hard edges of pulses and triangles) essentially filtering the wave into a more sinusoidal shape. Very low frequency sine waves (< 1Hz) depend on slow but accurate charging times, so ideal resistors and capacitors would work, but ideal components do not exist in the real world.
Thankfully, I stumbled upon a chip called the ICL8038 which is a voltage controlled function generator that can produce millihertz frequencies. My local supplier Jameco keeps some stock of this chip, however according to Wikipedia, it was discontinued 20 years ago. I also own the ancient 741 op-amp, and the now discontinued lm386, both became critical for the success of this project. This circuit ended up being many obsolete and discontinued components used together. I have no plans for mass production of any of my circuits so owning a handful of these chips is fine for me.
The 8038 chip requires several external components for optimal performance. Op-amps can be used in various ways to control the frequency and amplify the output signal. Two op-amps sum an input voltage with a linear fader and that is amplified with the lm386 to the voltage control range input of the 8038. The 741 op amp does not go rail to rail in its output, and the lowest frequencies are attained when the input of the 8038 is almost the positive rail voltage, but thankfully the lm386 does go to the positive rail when the output impedance is high, so I used that as the final input stage. The PWM of the wave can be controlled directly at the 8038 chip with a voltage divider, so another linear fader could be used here. Finally the output of the 8038 is only 1V peak to peak and set at 2/3 the supply voltage, so I used two more op-amps to center the sine wave around ground, and amplify it to ±5V, perfect for modular synthesizers. A third and final linear fader attenuates the signal from max gain at ±5V down to 0V.
An important aspect of any electronics project is not just the circuit and engineering, but the assembly, enclosure, and user interface. I took the time to completely map every connection and trace onto a scale drawing of my circuit board. I also measured and planned every hole I would need to drill in an enclosure, and make sure I left space for components and wires to fit. The user knows the device is functioning due to eight LEDs that act as a zero centered voltage indicator. Designing this indicator was a challenge as well. I ran into power supply issues and finally settled on using 8x darlington optocouplers and 8x comparators to measure the output voltage, but isolate it from the analog circuitry’s power supply. I have discovered the hard way that this is the biggest trap for analog circuits and op amps, everything depends on very stable supply voltages. If even a small number of LEDs causes dips in the supply voltage, this will be exacerbated enormously by the op-amps.
Now that it is complete, I can apply very slow and smooth sweeping control voltages to my Moog synth. I can also experiment with very slow servo movements. The biggest reason I have been chasing a very low frequency sine wave, is because nature uses sine waves. Biomimetic robots should use sine waves as well. Too often I see linear ramping signals or a binary high/low state, which causes robots to look jerky and awkward. Smooth sinusoidal movement is very possible with gearing and a single motor could be engineered to produce sine waves, but that doesn’t allow improvised position control. The motor either runs forward or backward. I needed a way to use servos, but the movement is smooth.
Of course, all of this could be done digitally with software. A proficient engineer could use a single Raspberry Pi to drive servos with rounded smooth movement. I just need to remind my readers (and myself a lot) that analog circuity is more interesting for me. It is more power efficient, it retains a degree of randomness and responsiveness that I love.
Next on my list? I purchased a THAT analog computer and it will hopefully arrive this summer. Analog computers are essentially patchable op-amp circuits to build physical analogs of differential equations. I hope I can discover new ways to produce low frequency smooth wave forms, because then I can recreate that “equation” with the bare minimum op-amps. This would then be implemented in an analog biomimetic robot.