Wednesday, May 09, 2012

Triangle Wave Generator

The part of the saw-tooth wave generator has been played by an ideal voltage pulse source in my boost generator schematics and simulations. It's time to make a "real" one. 

Note that a saw-tooth wave generator can be replaced by a triangle wave generator operating at twice the frequency. Think of a triangle wave as two back-to-back saw-tooth waves. So I need a triangle wave generator operating at 200kHz. 

This little circuit took me longer than I thought it would. I've designed triangle wave oscillator on chips in the 100kHz to 1MHz range. Doing this from components and keeping the capacitors large enough that I'm not worried about stray capacitance swamping the real capacitance has been a bit of a mind-bender for me. 

Triangle Wave generator schematic

In the schematic shown above, the comparator has significant hysterisis. On an IC, I am used to implementing that circuit using two pass gates (an analog multiplexor) selecting which reference voltage to apply to the positive input of the comparator. This is a smaller, simpler solution on a CMOS chip.  Two resistors are the smaller, simpler solution on a PCB. 

The 10Ohm resistor R4 was needed to get the circuit to converge. 
I needed to select a very small minimum time step to get the circuit to simulate accurately. This will cause trouble if I integrate this circuit in with the boost simulation. 

Triangle wave generator simulation. The light blue signal third from the top is the output.


This is actually operating at 448kHz. once stray capacitance has its way on what will be a hand soldered board, I wouldn't be surprised at 400kHz. That's still twice as fast as I expected. I will gladly re-do my calculations in return for a smaller inductor. 

Bruce