LM339 Comparator

Thread Starter

Macabra

Joined May 31, 2008
49
Hi,

I have a question in regards to LM339. I know that the output is high whenever the voltage input is lower than the reference (+) voltage. Is there a way in which the opposite can be achieved using the same chip? My input reference would be 1V and if the input voltage through the other input is higher than that then the output would be high.

Much thanks
 

SgtWookie

Joined Jul 17, 2007
22,230
Like Thingmaker3 says, it really is just that easy :)

It can be confusing at times. Try it out in a simulator beforehand.

If you're using a resistive divider to set the reference level, be sure to use a cap to ground, somewhere between 10nF and 0.1uF. Otherwise, the comparator will switch unpredictably due to noise.
 

Thread Starter

Macabra

Joined May 31, 2008
49
oh my goodness. I tried that too but it didn't seem to be working and alas thank you very much SgtWookie for suggesting capacitors!! Much thanks! Yes, I was using resistor divider for voltage lol.
 

SgtWookie

Joined Jul 17, 2007
22,230
The reason for the noise is similar to water squirting from the nozzle of a hose.

You can quiet the noise from the nozzle by dunking it in a bucket.

That's about the same thing as a resistor limiting current, and a capacitor coupling the noise to ground.

Those are very rough analogies, and perhaps other members will protest - but bypass caps to ground will silence the noise from the resistors. If you don't use the caps, you will have problems.
 
Top