LM393 battery level circuit

Thread Starter

Akrasiel

Joined Nov 17, 2016
10
Hi all and thanks for your attention...
I tried everything before posting and i couldn't come to any solution for the problem, so i beg you to give me an hand.

I'm trying to realize a circuit that lights up a LED (orange 3mm) when battery voltage is below the 3.4v threeshold. I would like to use the circuit inside of another project where my 4.2v li-ion battery is connected to a boost module in order to obtain 6.2v (to power up a small amplifier).

I used the module output (6.2v) to obtain a reference voltage through a voltage divider (10k-12k -> 3,37v) and i fed this reference v to the inverting input.
I connected the + battery to the non inverting input.
I'm powering the LM393 directly from the battery (4v~3v).

All i can get is an always ON led (even using a pullup resistor between output and VCC pin... I tried both 1k and 10k values...). I'm loosing any hope and my brain :D ... Please help me. Thanks in advance!

PS. Right now i don't have a schematic for the circuit i'm using since i'm only trying it on a perfboard (without the amplifier to make things easier) but it's just like i described it above
 

GopherT

Joined Nov 23, 2012
8,009
Hi all and thanks for your attention...
I tried everything before posting and i couldn't come to any solution for the problem, so i beg you to give me an hand.

I'm trying to realize a circuit that lights up a LED (orange 3mm) when battery voltage is below the 3.4v threeshold. I would like to use the circuit inside of another project where my 4.2v li-ion battery is connected to a boost module in order to obtain 6.2v (to power up a small amplifier).

I used the module output (6.2v) to obtain a reference voltage through a voltage divider (10k-12k -> 3,37v) and i fed this reference v to the inverting input.
I connected the + battery to the non inverting input.
I'm powering the LM393 directly from the battery (4v~3v).

All i can get is an always ON led (even using a pullup resistor between output and VCC pin... I tried both 1k and 10k values...). I'm loosing any hope and my brain :D ... Please help me. Thanks in advance!

PS. Right now i don't have a schematic for the circuit i'm using since i'm only trying it on a perfboard (without the amplifier to make things easier) but it's just like i described it above

image.png
 

crutschow

Joined Mar 14, 2008
34,427
You should connect the LED and resistor in series with the comparator as GopherT shows, (except reverse the LED polarity).
Connect the voltage reference divider to the minus (inverting) input.
Connect the battery to the plus (non-inverting) input.

That will make the output high (LED off) when the battery is above the reference voltage and the output low (LED on) when the battery is below the reference voltage.
 

GopherT

Joined Nov 23, 2012
8,009
You should connect the LED and resistor in series with the comparator as GopherT shows, (except reverse the LED polarity).
Connect the voltage reference divider to the minus (inverting) input.
Connect the battery to the plus (non-inverting) input.

That will make the output high (LED off) when the battery is above the reference voltage and the output low (LED on) when the battery is below the reference voltage.
Argh! Thanks Zapper!

Corrected version...

(Note, use a voltage reference instead of a simple Zener.)

image.png
 

Thread Starter

Akrasiel

Joined Nov 17, 2016
10
Thanks a lot for the help! I finally solved the problem changing the power supply for the LM393 from 4.2v (coming from the battery) to 6.5v (coming from the boost module)... maybe something i was ignoring (and i'm still doing) was wrong in the comparator' configuration.
 
Top