Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

LM 358 Not Working as voltage comparator

Status
Not open for further replies.

nsguiamano

Junior Member level 1
Joined
Feb 5, 2014
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
170
I'm trying to use an LM358 as a voltage comparator to test the voltage of a battery connected at the output of my system.
(I know that I can use an actual comparator IC like LM339, but I'm trying to do it using the 358 so please bare with me)

I'm only using one of the opamps and left the +/- input pins and output pin of the other opamp not connected.

Shown below are picture of the connections.

Capture.JPG
Capture1.JPG
Capture2.JPG

AC_15V is just 15Vdc from a power supply.
For the battery terminal, I just connected a DC supply which I change from 0-12V to adjust the input 12V+ to the opamp.
Nothing else on the board is connected since I'm testing this part only.

Problem is, when I change the voltage at the battery terminal, the output of the opamp is not change from 0 to 5 (or vice versa) as expected.

Any thoughts? I'd like to keep my IC as LM358 cause I've been able to use it as a comparator before and can't figure out why it's not behaving the way I expected this time.

Thanks.
 

Despite of the misleading signal name, "+12V" is actually around 5V and compared with 5V regulator output. Unfortunately LM358 (as well as LM339) common mode range does not include the positive rail, it's up to 1.5V below the rail or so.

This could work with a input rail-to-rail comparator, more reasonably, you divide the batter yoltage down to e.g. 2.5V and the reference, too.

Maximum ratings should be also considered. The OP as substrate diodes clamping the inputs to Vcc. I presume that LM358 can tolerate some clamping current, but it should be limited to a low mA value. Vbat voltage divider should be made with resistors in a 10 kOhm range to assure this..
 
You should add voltage divider at both inputs, not only at the Battery voltage.
Moreover, you are comparing an input voltage equal to the power supply of the IC.
Keep in mind that it cannot work up to the full range voltage of its power supply.
 

Despite of the misleading signal name, "+12V" is actually around 5V and compared with 5V regulator output. Unfortunately LM358 (as well as LM339) common mode range does not include the positive rail, it's up to 1.5V below the rail or so.

This could work with a input rail-to-rail comparator, more reasonably, you divide the batter yoltage down to e.g. 2.5V and the reference, too.

Maximum ratings should be also considered. The OP as substrate diodes clamping the inputs to Vcc. I presume that LM358 can tolerate some clamping current, but it should be limited to a low mA value. Vbat voltage divider should be made with resistors in a 10 kOhm range to assure this..

I added a voltage divider a brought down the 5V reference to 2.5V and the comparator's working perfectly! I also change the batter voltage divider to bring it 12V+ to 2.5V at 10V (my lower battery limit). Thank you!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top