<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>
<div>
<div>Hey there.<br/>
<br/>
I, a software guy dabbling in electronics, recently read a bit of how OTAs work and started to experiment.</div>

<div>From an inspiration of some years ago, on Tom Wiltshire's website describing how the Juno DCOs worked, I thought myself: Hey, why not do that with an OTA, which might even enable to do some more funny stuff...<br/>
 </div>

<div>Feeding a pulse wave from my microcontroller of choice...<br/>
So I first built the simplest of things, which works fine: a ramp DCO using an OTA to constant-current charge a capacitor and abruptly discharging it with an NPN for the last percent or so of the waveform period.<br/>
The amplitude compensation that's necessary to keep the wave at the same peak is done via the current input of the OTA with a signal from the MCU.</div>

<div><br/>
I then proceeded to do a triangle wave with pretty much the same setup, and a minor change:<br/>
I fed a 50:50 pulse to the OTA, swinging positive and negative. My thinking was, I first charge the capacitor with a certain current, then discharge it with the same current inverted, for the same time, and should thus land at zero voltage again. (no dedicated discharge transistor involved)</div>

<div><br/>
But this quickly wanders off towards one of the rails - I thought, ok, probably imperfections in parts, a slight bias towards one direction, so I just put a 10Meg resistor across the capacitor, large enough to not deform the wave.<br/>
This seemed to do it at first, but it's very frequency dependent, when it looks good at 200 Hz, it will have a large offset at 800 Hz or so. (this was actually breadboarded, not just in spice)</div>

<div><br/>
This is a bummer, as I thought I could even build something that morphs between saw and tri seamlessly by feeding a different duty cycle pulse, switching not only the polarity but also magnitude of (dis-)charging current for the rising (a) vs. falling (b = (-1) * (1 - a) = a - 1 : using the OTA also as subtractor) ramp parts of the period to get the same overall time. But given that the simpler scenario of a perfect triangle doesn't even work, I'm not so sure anymore :-)</div>

<div><br/>
Can someone give me some pointers here?</div>

<div><br/>
Regards,<br/>
Steve</div>
</div>
</div>
</div></div></body></html>