Maker Pro
Maker Pro

Window comparator help (Battery monitor)

I'm new to using comparators, and I think I have an understanding as to how they work, but when I go from paper to real-world, I do not get the desired results. My goal is to use a 5v power bank booster board and a 1k and 2k7 resistor to drop the voltage to roughly 3.65v, such that when the battery (26650 Lithium) is above 3.65v a LED is on, and when the battery drops below 3.65v, the LED blinks using a reverse 2n2222a/capacitor blinker circuit. I have used a LM393P Comparator and a Texas Instruments 272 Opamp. I have had partial success with the 272, and no success with the LM393. I have included my circuit below. What about my circuit is wrong, what would be a better circuit, and/or what comparator or opamp would you all suggest using?
Note: The outputs as designated by my particular symbols are wired together, possible connections are denoted by broken lines.This statement is to clear up any misunderstandings.20170504_002434.jpg
 

Harald Kapp

Moderator
Moderator
Welcome to electronicspoint.

  1. The transistor at the lower right has no base connection - it will be permanently off. Frankly, I have no idea what the lower comparator circuit with transistor, resistor and capacitor is supposed to do. As I understand it, the capacitor will be charged or discharged depending on the comparator output. Nothing else.
  2. Why use a window comparator when you only want to detect undervoltage?
  3. Assuming the LED is the one next to the 100 Ω resistor (although the symbol is not hat of an LED), why do you think it should blink? When the output of the upper comparator is high, the LED will be on. When the output is low, the LED will be off. You could simply use a blinking LED instead.
  4. While the LM393 is suitable for 5 V operation, the input voltage is limited to Vcc-1.5 V = 3.5 V for nominal operation. A 3.65 V battery exceeds this limit.
  5. Furthermore, the LM393 has an open collector output. You will need an external pull-up resistor to achieve a high output signal. This is why the LM272 works (partly) in your circuit: it has a totem pole output which can actively pull the output up to high level.
I think you should reconsider your circuit in light of these points and come back with an improved circuit.
 
Welcome to electronicspoint.

  1. The transistor at the lower right has no base connection - it will be permanently off. Frankly, I have no idea what the lower comparator circuit with transistor, resistor and capacitor is supposed to do. As I understand it, the capacitor will be charged or discharged depending on the comparator output. Nothing else.
  2. Why use a window comparator when you only want to detect undervoltage?
  3. Assuming the LED is the one next to the 100 Ω resistor (although the symbol is not hat of an LED), why do you think it should blink? When the output of the upper comparator is high, the LED will be on. When the output is low, the LED will be off. You could simply use a blinking LED instead.
  4. While the LM393 is suitable for 5 V operation, the input voltage is limited to Vcc-1.5 V = 3.5 V for nominal operation. A 3.65 V battery exceeds this limit.
  5. Furthermore, the LM393 has an open collector output. You will need an external pull-up resistor to achieve a high output signal. This is why the LM272 works (partly) in your circuit: it has a totem pole output which can actively pull the output up to high level.
I think you should reconsider your circuit in light of these points and come back with an improved circuit.

I understand that the transistor has no base connection, and that is a circuit that I have seen in operation exactly as expressed, minus the 100 ohm current limiting resistor (actual LED has a hidden resistor in its housing, 100ohm is a place holder for that unknown value), and it should also be mentioned that the emitter is "inverted" according to standard design. I don't know why it works, just that it works.

All I need to know is how/that the output will be about +5, or whatever the battery voltage is at that moment to power the LED circuits, flasher below 3.65v and solid above 3.65v, and what IC to use besides the LM393 or LM272.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
You can get simple 3 terminal voltage detector chips which will output a signal when the voltage drops below some value.

This can be used to enable and disable an oscillator (perhaps one based on a single Schmitt trigger.

If I find the time I'll draw up a circuit and suggest some parts.
 
The LM393 comparator has an output transistor that drives the output to ground with a low current (6mA max) but has nothing to drive the output positive.

The 2N2222 reverse bias blinker needs at least 7V to work. Most circuits on the web use 12V.
 

Attachments

  • simple LED blinker.png
    simple LED blinker.png
    3.5 KB · Views: 110

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
OK, here's a circuit.

upload_2017-5-6_8-29-46.png

U1 is a S-1000N36-M5T1U available from Digikey for under $1.

U2/U3 are halves of a SN74LVC2G14DBVRG4 available from Digikey for under 50c.

The other components are non-critical.

LED L1 flashes at about 1.2Hz when the voltage detector triggers (under 3.6V) Reduce C1 for a faster flash rate. D1 should be a small signal diode. If you want this circuit to operate down to 1.6V (unlikely), replace D1 with a Schottky diode.

Oh, the voltage detector only has power supply connections and an output. The schematic symbol I used was the closest I could find. Ignore the input, it doesn't have one!
 
Top