Maker Pro
Maker Pro

low battery alarm

wingers

Nov 17, 2009
18
Joined
Nov 17, 2009
Messages
18
Hi,

I'm trying to create a low battery alarm and at the moment, the best I can come up with is a zener diode to turn off an LED when the voltage drops too low.
Really I'd rather it were the other way around but I'm not sure how to do this. I guess it's an op-amp job but I thought I'd ask on here as I'm sure it's been done a million times before.

For reference, I'd like two variants. One to activate at 7V and one to activate at 10.5V. Ideally, both with be low power as I don't want to further drain the battery and I don't want any drain whilst the battery is good as this will be connected permantly.
(It's al want, want, want with me isn't it lol)

Anyway if anyone can help I'd appreciate it.
Thanks,

Wingers
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Google is your friend, but here is a page that has a useful looking low voltage alert. Note that at very low currents the zener voltage is typically much lower than you expect.
 

wingers

Nov 17, 2009
18
Joined
Nov 17, 2009
Messages
18
OK, I’ve looked at that page and there’s nothing that quite fits the bill but it’s got me looking at transistors as a way to make this circuit work. I don’t need any extra functionality such as flashing etc. so I’ve come up with this circuit as one that I think will do the job:
LowbatCircuit.jpg


Bearing in mind that I’m using 7V as the voltage at which I want the LED to light, please could someone check my theory:
When V(source)>7
V(point A)>0.7
T1 is open
V(point B)<0.7
T2 is closed
LED is off

When V(source)<7V
V(point A)<0.7
T1 is closed
V(point B)>0.7
T2 is open
LED lights

I’ve worked out the resistor values based on the resistance of the transistor (base to emitter) being zero. I’ve also ignored the current going into the transistor when it comes to working out the voltage at point A. I don’t know if this is correct or not?
Please could you confirm if I'm on the right lines.

Thanks,

Wingers
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
That will probably work, but I would multiply all the resistors by 10 to 100 (the 200 ohm resistor perhaps only by 10).

As you have the circuit now, it will contribute a lot to the drain of the battery (about 9mA).
 

wingers

Nov 17, 2009
18
Joined
Nov 17, 2009
Messages
18
Ok thanks.

I’ll increase the resistors and give it a shot.

Cheers,

Wingers
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Instead of fixed resistors connected to the base of T1, you may be better off with a trimpot so you can adjust it. If you do use a trimpot, place a resistor in series with the upper end of it (say 10% of the value of the trimpot) so you can't connect the base to the +ve supply rail.

I'd use a trimpot with a resistance between say 100K and 500K. Use transistors with a fairly high gain (BC548 for example).

If you have a power supply where you can vary the voltage smoothly you will be able to see how the circuit works.

I would expect that the LED would turn on slowly over a range of voltages (maybe 1/2 to 1 volt between totally off and totally on -- but that's guessing).
 

wingers

Nov 17, 2009
18
Joined
Nov 17, 2009
Messages
18
That's a good idea. I'll do that.
Do you know of a way to get the LED to turn on more quickly? I'd rather it was as obvious as possible. Would different types of transistor be more suited to this use?

Wingers
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
To get the transistor to turn on more quickly you will need a circuit that has positive feedback so that as soon as the light starts to come on it is forced to come on even more.

The problem with that is that unless your circuit suddenly stops working at a particular voltage, it offers no warning that your batteries are getting flat.

The other option is to have a circuit with much greater gain. You can go part way by selecting the highest gain transistors you can find, or by using an op-amp. Using an op-amp is perhaps a little more difficult.

If you want the LED to turn on more quickly you'll also need to have some sort of voltage reference so that temperature variations do not cause the voltage where the LED turns on to vary with temperature and even selection of transistor.

All of which starts to make your simple circuit more complex.

With some rearrangement of the circuit you may be able to add some positive feedback. I'm a bit asleep at the moment to suggest a rearrangement that might work :)
 

wingers

Nov 17, 2009
18
Joined
Nov 17, 2009
Messages
18
haha ok thanks for the tips then. I'll have a bit of a look around for positive feedback circuit designs.

In this application I do want a sudden activation and not a slow warning. It's going to be in a remote control helicopter using lipo cells so the activation point will be at 3.25V/cell which should be safe. As soon as I hit that point, I'll land though so I don't need to constantly monitor the battery state but just need to know when it reaches a set point at which time I know I have to land immediately.

Wingers
 

wingers

Nov 17, 2009
18
Joined
Nov 17, 2009
Messages
18
OK so I thikn I've found a simple way to introduce a little positive feedback without going into any more components etc.

If I move the T1 emitter to the other side of the 200ohm resistor (basically connect the two emitters together) then as T2 opens, the current through the 200ohm resistor will drive up the voltage at the T1 emitter and help turn it off.
I think I'll give that a go and see how it works. If it's still not sharp enough then I'll try a new circuit with op amps.

I haven't got a scanner here at the moment but will post my final circuit tmrw.
It should be as before but with the T1 emitter conected to the T2 emitter and the resistors changed as follows:
9k -> 10k
(upper position) 1k -> 10k
(lower position) 1k -> 100k variable pot
200 -> 2k

I'll then test it and calibrate it using a constant voltage source and post back results of how it works.
Fingers crossed :)

The only thing I'm not sure about is which transistors to use. I can go for high gain but what other properties should I target. Would you be able to suggest a part number to use?
Thanks again for your help with this.

Wingers
 

wingers

Nov 17, 2009
18
Joined
Nov 17, 2009
Messages
18
Latest (and hopefully final) circuit design:
LowbatCircuit-1.jpg


Well I pitched for using two BC549C transistors in the end.
http://www.nxp.com/documents/data_sheet/BC549_550.pdf
I'm not convinced I really know enough about transistors to spec them but I thinnk these will do the job.

I'll find out soon. Hopefully put the circuit together on wed and test it on thurs.
Wish me luck...

Wingers
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Interestingly enough, you've just added negative feedback.

Moving the bottom of the 100K resistor to the connection tot he emitters might do more like what you're after, but possibly uncontrollably.

Check out this.
 

wingers

Nov 17, 2009
18
Joined
Nov 17, 2009
Messages
18
looking at that I'm now a bit worried that the 2nd transistor wont turn on at all as the voltage at all as there is no compete circuit to allow a current into the base. The cicuit in the link you posted has a constant circuit to provide a voltage to the base but mine does not.
I got home earlier than expected today too so have already made the circuit now too.
Oh well I'll test it tmrw anyway and then get some more components if it doesn't work.

Wingers
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Breadboard is the way to go.

The base of the second transistor is biased on by the 10k resistor and the bas is at least the LED voltage below the +ve supply. it'll turn on :)
 

wingers

Nov 17, 2009
18
Joined
Nov 17, 2009
Messages
18
well the light came on but it wouldn't turn off.
If I got the pot to the right point then it would turn the LED off if the voltage dropped but it was all reversed over my intended use.

It certainly doesn't do what I wanted but I think I'll use the link that you sent and make that circuit as hopefully that one will do the job.

Wingers
 

wingers

Nov 17, 2009
18
Joined
Nov 17, 2009
Messages
18
I definitely don’t fully understand transistors...
I’ve gone back to the idea of nabbing an already completed design (can’t go wrong eh ;) ) but am now looking to fine tune it for my application.

Here seems to be a good starting point:
LowbatFlasherCircuit.jpg


Now to modify that I need to know exactly how the circuit works.
My understanding at the moment is as follows. Please could you confirm or correct anything I’ve said:
1) I think that the 100u capacitor is purely there to smooth the input voltage. If that’s the case then I don’t think I want that.

2) I think the 1u capacitor is only needed to create the flash. I’m happy to keep that.

3) A simple potential divider defines the activation point of the first (leftmost) transistor. Why is this 4V not 4.6V?
4.6*150k/(150k+1M)=0.6V at the transistor base.

4) When the 1st transistor is closed (C-E connected), I think that the current into the 2nd base is zero as all of the flow passes through the 1st transistor.

5) When the 1st transistor opens, the current then passes into the 1u capacitor (still nothing into the 2nd base as yet) until the capacitor is charged.


6) Once the 1u capacitor is charged, current flows into the base of the 2nd transistor. Now this transistor closes and allows the flow of current through the LED and 3rd transistor.

7) The current through the LED will be 4V (or 4.6V?) /33 = 121mA

8) I don’t know what the 1k resistor is for?

9) I can’t see when the 1u capacitor gets to discharge

10) I don’t know what causes the LED to turn off during the flashing phase?


Sorry for another load of questions but I think I understand part of this, just not enough that I’m happy to continue with a(nother) circuit design. At a guess I’d say that I could lose the two capacitors, increase the 33Ohm resistor and reduce the 150k resistor and end up with a functioning (but not flashing) circuit. Unfortunately I couldn’t say for sure that that would work and I’m also interested to understand exactly how the posted circuit does work.

For now I'll keep looking through circuits and reading up on transistors but if you could mark my answers as it were, that would be a great help!

Thanks,

Wingers
 

jackorocko

Apr 4, 2010
1,284
Joined
Apr 4, 2010
Messages
1,284
Well from what I can see when the first transistor turns off the voltage to the base of the second transistor goes high and turns that transistor on. This allows the base of the third transistor to go low which allows it to conduct, since it is a PNP type transistor.

The 1u capacitor is what causes the LED to flash by turning on and off the second transistor. But what I do not understand is how the cap charges. From the orientation of the electrolytic cap, I would say it charges when BC557 conducts. The circuit is kind of confusing, in the simulation as that cap charges it holds the base to a neg voltage and I am not sure why thats happening. I like you need a little more explanation on this circuit too.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
1) I think that the 100u capacitor is purely there to smooth the input voltage. If that’s the case then I don’t think I want that.
Yep. In your case you may not need it.
2) I think the 1u capacitor is only needed to create the flash. I’m happy to keep that.
It essentially forms an RC circuit with one of the resistors and determines the speed of the flashing.
3) A simple potential divider defines the activation point of the first (leftmost) transistor. Why is this 4V not 4.6V?
4.6*150k/(150k+1M)=0.6V at the transistor base.
Build it and try it. Your calculation seems reasonable. 4*150/1000 = 0.6. That may be an error on the part of the designer.
4) When the 1st transistor is closed (C-E connected), I think that the current into the 2nd base is zero as all of the flow passes through the 1st transistor.
Don't think of transistors as open or closed. They allow more or less current through them depending on the base current and their gain. Essentially the collector current is the base current multiplied by the gain of the transistor. When more current *could* flow than the rest of the circuit allows, the transistor is effectively saturated.
5) When the 1st transistor opens, the current then passes into the 1u capacitor (still nothing into the 2nd base as yet) until the capacitor is charged.

Call the transistors Q1, Q2, and Q3 from left to right.

When the voltage is above 4.6V, Q1 is turned on, robbing base current from Q2, so Q2 remains off. With Q2 off, there is no base current to Q3, so it also remains off.

Because Q3 is off, the +ve end of C1 is effectively connected to ground via the 33ohm resistor. As soon as Q1 turns off, C1 begins to charge through the 330K resistor and the voltage at the base of Q2 rises toward 0.6V. As it does so, Q2 begins to turn on, providing current to Q3 which also begins to turn on.

As Q3 begins to turn on, the additional current across the 33R resistor pulls the +ve end of the capacitor up. The other end (which is actually more positive) then begins to discharge into the base of Q2 (which now sees a higher voltage) and gets turned on harder. This increases the base drive to Q3 which increases the current through the 33R resistor which causes more current to be available on the base of Q2... So Q2 and Q3 get turned on hard.

However, the charge in C1 is not limitless. As it begins to discharge, eventually the current available to the base of Q2 falls, which causes it to turn off a little. This turns off Q3 a little and the voltage across the 33R resistor falls a little. (By this time the +ve end of C1 is more positive) As the voltage across the 33R resistor falls, the voltage on the other end of C1 falls/ This robs more current from the base of Q2 (it gets diverted to C1) which causes Q2 to turn off some more, and Q3 to turn off some more, which causes the voltage across the 33R resistor to fall some more... Both transistors get turned off hard.

Then the 330K resistor starts charging C1 again, and the cycle starts again...

7) The current through the LED will be 4V (or 4.6V?) /33 = 121mA
Presuming the LED drops 2V, the max current is 2.6/33 = 78mA. It will be less than that because there is some voltage drop across Q3. This represents the peak current, but the LED is more often off than on, so the average current is much lower. Incidentally, this is the reason for the 100u capacitor. It is there to provide the current that the almost flat batteries could not. In your case this current is probably small compared to the load current so you could omit it.
8) I don’t know what the 1k resistor is for?
It is to limit the base current to Q3
Sorry for another load of questions but I think I understand part of this, just not enough that I’m happy to continue with another) circuit design. At a guess I’d say that I could lose the two capacitors, increase the 33Ohm resistor and reduce the 150k resistor and end up with a functioning (but not flashing) circuit. Unfortunately I couldn’t say for sure that that would work and I’m also interested to understand exactly how the posted circuit does work.
Keep the 1u capacitor. Increase the 33R resistor to limit the max LED current. You do have to consider the maximum reverse voltage applied to the BE junction of Q2. Ensure that your low voltage limit is no higher than a volt or two higher than the maximum reverse voltage allowed for this junction (it's often around 6 to 8 V, and it's 6V for a BC548).

Using a blue LED would be a good idea. Essentially the max trigger voltage should be less than 6V + LED voltage.
For now I'll keep looking through circuits and reading up on transistors but if you could mark my answers as it were, that would be a great help!

I hope that helps.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Actually the description of C1 is a little simplistic. It first allows Q2 to turn on, but as the voltage drop across the 33R resistor increases above 0.6V, the capacitor actually begins to charge via the BE junction of Q2, which continues to provide base current until the capacitor is almost charged in the reverse direction.
 

wingers

Nov 17, 2009
18
Joined
Nov 17, 2009
Messages
18
Thanks, that makes a lot more sense now. I can follow through each stage as you've explained it.

For one of my circuits the low voltage will be 7V so I should be ok for that one but the other will activate at 10.5V.

From what I can work out, the reason for being concerned about the BE voltage into Q2 is because the supply voltage (at some point in the cycle) drops across the LED and is then passed to the base of Q2 by the 1u capacitor.
If I were to add a resistor in seris with the LED that would provide an additional safety margin by further dropping the voltage and would also limit the LED current as required.
I think it would also slow down the flash rate by reducing the voltage on the +ve side of the capacitor but I think the circuit should still work. Is that right or have I missed something?

If I were to add a 30Ohm resistor to the LED and then up the 33Ohm resistor to about 70Ohms? Would that then retain the function of the circuit (albeit with a different flash rate) and allow me to have a switching voltage of 10.5V?

Wingers
 
Top