Maker Pro
Maker Pro

LM324N problem!

kpsg25690

Mar 26, 2011
4
Joined
Mar 26, 2011
Messages
4
[SOLVED]LM324N problem!

Hey all!
Since this is my first post i should introduce myself..
My name Karan and i am an engineering student.

I have been working on a project on a project that requires a comparator.
I am using LM324n as a comparator and the circuit is working correctly.

I am using a +5V supply power to the ic but when the output is high i get around 2.1V on the output pin,which is enough to drive an LED but i want to give this output to a PIC18F4520 which will not identify 2.1V as high.

What do i do?
I have tried using a 12V supply for the IC also without any change.

I've been at it for some time and need some help...
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Show us the circuit diagram...
 

kpsg25690

Mar 26, 2011
4
Joined
Mar 26, 2011
Messages
4
Here's the circuit.
The IC gets a +5V supply.

ldrnew.png


Thank you for the fast reply!!
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
OK, several things:

1) The lm324 can't pull the output right to the supply rail when sourcing current. The specs indicate that you can expect several volts difference (you're seeing 2.9) but this will be strongly influenced by the load you're driving.

2) You mention a LED on the output of the LM324 which is not shown on your circuit diagram. Do you only get a 2.1V swing with the LED removed? Do you have a series resistor with the LED (if not, this explains the low output voltage)
 

kpsg25690

Mar 26, 2011
4
Joined
Mar 26, 2011
Messages
4
sorry i forgot the LED,my bad....
The circuit is as follows

newldr2.png


i get around 2.1 V if i bypass the 2.2K resistor and use the LED directly..

I tried it without an LED and i get 3.6 Volts and i also get the same reading if i use the 2.2K resistor as shown in the circuit

I tried to use the o/p pin as a sink and i got 3.7V from the output pin..

which configuration should i use?

if i connect the output pin to the PIC18F4520 as input would the uC identify it as logic 1 (i think it should)

and thanks for the reply..
really helped me out man..
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Yes, 3.6 is probably as high as you can expect the output to go, especially with a load.

Remember that using a LED without a series resistor will essentially clamp the output voltage to Vf of the LED, with the current limited by the op-amp's output stage.

That output voltage is probably good enough to be seen as high by the uC -- the specs should tell you in any case.

If you use the output as a sink rather than a source, you may have problems getting a good low level. Test it and see.
 

kpsg25690

Mar 26, 2011
4
Joined
Mar 26, 2011
Messages
4
yeah when i use the o/p pin as sink the low level is not zero but something close to 0.8V

Thanks man! Solved my problem.
 
Top