Pwm comparitor circuit


On the datasheet for the TLC3704 comparitor there’s an example circuit for a pwm motor speed controller. I’ve attempted to recreate this circuit in falstad and it doesn’t seem to work. In a blog post I read that the diagram is incorrect and one of the comparitors need their inputs swapped.
circuit-20211213-0853.circuitjs.txt (904 Bytes)
Attached is the circuit in falstad. at the second comparitor the positive leg reads 2.5V and the negative leg reads 965.5mV. To my knowledge that means it should allow 2.5V at the output but it doesn’t seem to have any output. Will this circuit work outside of a simulator and the sim is just messed up?

1 Like

Try a different simulator. LTspice for example is available at no charge and works pretty well.

Yes, the inputs on the first comparator need to be swapped from what is shown above. The positive input then toggles between ~1/3 and 2/3rds of the supply voltage, while the negative input (delayed by the RC time constant) follows with a sort of triangle/shark fin waveform.

1 Like

Very well described!
One little correction (but that’s really just nitpicking):

This would be true if we had a symmetrical power supply and no offset resistor to +5V at the input.

If the output of the comparator is zero, we have 2 10k resistors in parallel on zero and one to +5V which leads to about 1.66V at the positive input.
If the output of the comparator is +12V we get around 5.67V at the positive input (voltage divider between +12V and 0V with a load towards 5V).

I’m wondering why they did not just connected the lower end of the voltage divider to +5V. This would have saved one resistor and made it easier to understand the system.

1 Like