As of yesterday, we now have a “triangular wave generator”. Whee!
Except that I don’t want a voltage between 1.25V and 3.75V but slightly lower. One way to accomplish this is to lower the reference “1/2 Vcc” voltage used by the comparator and integrator circuits. So I added a 22 kΩ resistor in parallel on one half of the voltage divider:
+5V <=> 10 kΩ <=|=> (10 kΩ and 22 kΩ in parallel) <=> GND | TAP
This online calculator says that the parallel value is 6.875 kΩ. Here’s the resulting signal:
It’s now slightly asymmetric (we’re discharging faster than we’re charging), but more importantly, the signal now runs from about 0.6V to 3.0V, which is more in sync with what I need (more on that in an upcoming post).
Notice that on these screen shots, the waveforms look very nice and straight, although it’s hard to see just how linear those ramps really are.
This is where a scope with good math functions comes in. If you recall from mathematics, the derivative of a straight line is a constant. Or to put it differently: the straighter the line is, the closer its derivative should be to a constant value. Positive for upward slopes, and negative for downward slopes. Let’s zoom in a bit:
(the red line’s origin is centered vertically, the yellow line is at 1 division from the bottom)
That red line is the scope’s calculated derivative of the yellow line (it’s really just a matter of calculating differences between successive points). As you can see, the upward slope is pretty straight from 1.3V to 2.9V. The downward slope less so, IOW the capacitor discharge is not quite as linear. The signal was averaged over 128 samples in this last screen.
Excellent. I now have the signal I need to perform my experiment. Stay tuned.