Sine to square wave using op-amp

Thread Starter

Tobias

Joined May 19, 2008
158
OK it looks like I was suffering from head up ass syndrome. I am still waiting for a pharmaceutical cos to come up with a cure. I took the voltage divider and sent the output to the In- pin and it appears to be working. Is there anything that I need to look for when doing something like this?
 

SgtWookie

Joined Jul 17, 2007
22,230
I tested the circuit on my bench and it worked great. I hooked it up to my vehicle and it worked great there too except for one thing. The output of the sensor when not moving is not stuck to ground, its a bit noisy. So I get a trigger from the output of the comparator output often while its not moving. It works pretty good when the vehicle is moving.
To me, this indicates that you need to increase hysteresis to decrease circuit sensitivity. In the original schematic I posted, the hysteresis feedback resistors are 220k Ohms; try decreasing them to 150k, then 100k.

I read up some more on comparators and thought I would try applying 0.400v to the GND pin.
Not good, as you now realize.

Do you have adequate bypassing across the comparators? Use a 100uF cap somewhere on the board for a general bypass, and 0.1uF (100nF) caps across the IC's power supply pins. This will help a good deal to keep things reasonably quiet.
 

SgtWookie

Joined Jul 17, 2007
22,230
I took the voltage divider and sent the output to the In- pin and it appears to be working. Is there anything that I need to look for when doing something like this?
OK, what do you mean when you said "I took the voltage divider..."?

If you connected the output of the comparator to the inverting (-) input, this would very likely cause the circuit to oscillate.
 
Top