Author Options:

Determining values for zener diode Answered

Hi guys,

I am quite noob in electronics.

I would like to know how to determine resistors and zener diodes values for a battery life indicator similar to this :https://www.instructables.com/id/9v-battery-status-indicator-circuit/

And if I want to use a battery source of 1.5V, how will the values change?



The problem is, that you need around 1.5-1.6V for your LED alone... So if your battery dies @ 0.7V, you cannot light the LED at all...
Also most transistors have a voltage-drop (Since they also are a diode) of around 0.5-0.6V, leaving only 0.1V or so for your LED.
IF you, however, go for a double-sourced circuit (Where the Measuring and lighting is provided by a 9V-Battery and the AA-Battery does NOT have to supply the "Batteryindicator") then it is totaly doable with some massive mods.

See, the basic prinziple of the circuit you linked is the question of the voltage is enough to cross the zener-level or not.
But with normal zener-diodes only going down to 1.8V (like the MMSZ4678 or DDZ9678) you have to do something with the voltage to being able to compare with a zener-diode. Like double it to have a switchlevel of 1.8V which becomes 0.9V at the AA-Battery-Side.

Attention: At this point it becomes purely educational since the introduced mods are WAY more complicated than if we do it directly with an operational amplifier.

Looking at http://www.elexp.com/t_gain.htm gives you a simple non-inverting amplifier. Most OpAmps run with 9V quite well... Since the Gain is 1+(R1/R2) and you want a result of 2, you have to choose your 2 resistors that same value:
Gain = 1+(10k/10k)=1+1=2 if i would take 10k... But you can take whatever you want... But in the kilo-region you are good... And you already have those 10k's around... so... :)

So you simple replace the original 6.2V-Zener with a 1.8V one. Now you "split" the supplys: The AA-Battery + goes over the amplifier (factor 2) to the Zener diode. The 9V + goes to the two LEDs.
Presto. Your circuit should work.

However, here is what i would do: and save some parts:
First, i want to use it as less energy as possible thus eliminating the green LED.

Part1: Theory
Every diode has a forward-voltage. Normal silicone is around 0.6V, Shottky around 0.2V.
If we could COMPARE those added voltages (0.6+0.2=0.8V) to the voltage of the battery, we would be golden!

Part2: The making
we follow the basic principle of 2-part: One part is the Measuring and signaling and one part is the thing to be measured. Thus we need the 9V-battery in our measuring-equipment and only look at the AA-Battery without taking any (well... a few pico-Amps are to be forgotten. Your battery has a higher selfdischarge than that!) energy from the 1.5V-AA-Battery.
Both grounds from both battery have to be connected together also.

First we create the voltage to compare it against:
We wire up a (from +9V) 10k-Resistor followed by a 1N4148 (Silicone-diode) followed by a shottky diode like a BAT85 to ground. Both diodes have to conduct. They have to face downwards to Ground...
Now you can measure 0.8V across the two diodes. --> Thats what we compare against.

Now to the measuring-part:
We use a simple OperationalAmplifier to create a comperator to compare the 2 voltages:
The upper resistor would be the 10k and the lower resistor would be the 2 diodes in series.
Now if the voltage drops below the voltage we created with the diodes, the output goes... Hm... DOWN. Darn. Not what er wanted... But luckily, thats very easy fixed!
We simply switch the 2 inputs of the opAmp in the circuit. Our Reference goes to the inverting input of the opAmp and the voltage from the AA-Battery goes to the non-inverting.
Now the question goes like this:
If the reference-voltage is higher than the Voltage from the battery (like when the battery dies), the output goes HIGH.
THATS what we wanted! :)
Now add the LED and 330Ohms at the output of the Opamp and you are ready to Rumble...

Hey thanks for your time for the detailed explanation.

After much thought, I have decided to do away with the 1.5V battery source and instead, use a 9V battery source to monitor its own battery life. So the schematic I posted in the main topic should work right?

But I want to make a few changes:

1) As you said, I want to do away with the green LED. So I would only need 1 red LED which lights up when the Voltage becomes low

2) And the Voltage when the red LED lights up I want to be at 7.5V.

So with these 2 changes in mind, what changes do I need to make with the original schematics. As in how many diodes/resistors/transistors would I need and at what values?

Sorry if the qn is too basic but as I said, I am noob to electronics.

Would greatly appreciate your help : )

No question is noobish if you keep in mind that it is better to aim for a simpler target and not for a high-tech-one you probably never will reach.

To 1):
Wise. Cuts the discharge by factor 44! :)

To 2):
The trigger-voltage is around 7.8V already with a 6.2V-Zener if we make some changes. The trigger-voltage will be zenervoltage+LEDvoltage which equals in 6.2V+1.6V=7.8V
If you want you can go for a 1N5233B with 6.0V zener-voltage which will end in 7.6V

Now to the changing-parts-game... :
I now could explain how to rebuild the complete circuit and make a new one for this simpler tasks since the original circuit is a bit overkill for the tasks at hand now and also quite nonflexible in terms of trigger-level... Or i could simply link to a schematic i made just for you... 

This circuit uses a cascade of 2 transistors to switch and a simple voltage-divider to adjust when (@ what voltage) to switch.

With the given values and a normal LED it will NOT light the led till around 7.48V (Thats when the LED gets a dim 1mA of current) and will be bright @ 10mA when it reaches 7.2V.
You can adjust those values yourself by replacing the 2 R_adjust with a potentiometer of 520k or so and turn till you have the exact triggerlevel you want.
But i choose common resistor-values you can use and which will land in the ballpark you are looking for (7.5V).

In "waiting-mode" (No LED is lit) the circuit consumes around 107uA which is 0.107mA which is really lower than the self-discharge of the battery itself... :)

The highes current-use will be @ around 6.5V when the LED will be supplied with around 14.8mA.
So no current-limiting-resistor in series to the LED is needed here... Saves a part. :)

Edit: Oh: And if you want to fiddle around with the simulation yourself, get LTSpice (It is free) and go for it. :)

All you've done there is a kind of cascaded common emitter amplifier. Its not a comparator. You could knock one up, for this voltage supply, with a CMOS schmitt trigger

Thats true and the whole point: with a comfigurable amplifier like we have here, we can adjust the voltage of switching very precisely and simple without the need to rely on zener-voltages.

Also you are right: A schmitttrigger would also work... And if you talk about that: It may even work better since it has a really sharp toggle-point.
I was simply too focused on the 2-transistor-type-circuit when i whipped up the circuit above.
Mea culpa maxima! :)

Here is what steveastrouk suggested:
We use an inverting schmitt-trigger (74HC14) a "sensor" and simply adjust the input (The battery-voltage) to trigger it at the correct voltage.
Since i wanted to keep it simple, i used only single resistors and took those from the E12-series which are normally common.
Because of that, we miss our 7.5V-Target a little and go for 7.37V

Here it is...
Freshly drawn for you:

Have fun!

Edit: Oh: Dont forget to connect the 74HC14 to the supply of the battery as well. Thats not shown in the schematics because it is internally wired for this symbol...

Oh... Just forgot: If you want to cut down on the power used by the circuit, replace the 10k with a 1meg and the 5.6k with a 560k.
This cuts down the current in standby to a few microamps...

Thats really helpful guys, appreciate it..

Just two more doubts:

I am connecting the circuit on a breadboard and need one which uses the minimum number of tie points (As I am using the same breadboard for other circuits). So of the 2 schematics, which one takes up lesser space?

And as this is for a school project, cost is also considered. So which is the cheaper circuit?

If i click the items used for the 6V-version with the 74HC14 i end up with 0.33 swiss francs a piece if i take material for 10 pieces. Add the cost of the breadboard to that.

Site? depends on how messy you want it... I could make the thing for sure fit in between the legs of the 74HC14. Doable with trough-hole-components and very easy with SMD-components (which would be a LOT cheaper by the way). So in theory no breadboard is needed at all. But the result wouldnt be pretty... :)
If you want to fit it on a breadboard, i would say the needed size is just the overlay-size:
5x7 holes should do: 4x7 for the 74HC14 and one line alongside with the 3 resistors (placed high-ways) and the LED.

Also you could (for the cost of maybe 2 cents) raise the 74HC14 on 2 connector-rows and fit the 4 parts underneath there. Letting the LED stick out on one end would look nice. :)
Also this would reduce the needed space to 4x7 holes.

If i check the price at farnell.ch for those breadboards, i get 5.93 Euros for one with 2318 holes.
That makes 0.0026 Euros per hole.

So the price will be around 0.43 Swiss francs a piece. if you go for 5x7 (non-messy).

Thanks man!

I have bought the components. Now need to connect all of them to the breadboard.

So for the 74HC14 and CD40106, there are 14 pins,which ones do I need to connect to where?

For the connections of the 74HC14, see a datasheet like http://www.nxp.com/documents/data_sheet/74HC_HCT14.pdf on page 2.
So if you are building the 6V-one like i posted here @ http://www.bilderload.com/bild/276205/schmitt74hc146vVE1EU.png then you can use any of the following pairs:
where the first pin-# is always the imput and the second is output.

To save energy, you should tie the inputs of unused gates to a defined potential. So either GND or VCC. If not sone, the unused gates may pick up random noise and switch erratically --> Switching uses power.

Also here is the 3V-Clamped version with the CD40106 for the 6V-Battery which switches @ around 5.009V:
NOTE: The VDD is the supply for the CD40106! DONT supply the CD40106 with the 6V directly...
The Zenerdiode used for the supply of the CD40106 is a 4.7V-Type.
With only one resistor on each side the levels were too far off with E12-Series resistors... So i made them more exact with the circuit above.

Also the version for your 9V-Battery:

Hey, is this how the connection for the 6V 74HC14 schematic in a breadboard would look like?
PS: I am new to breadboard too


- 2xAA arent 6V but 3V max which is not enough for a 74HCxx. But i think this is just a standard-grafics and doesnt need to represent the current 6V-Battery?
- The supply for the 74HC14 is missing.
- Also you should tie the pins 3, 5, 9, 11 and 13 to either VDD or GND but dont leave them floating and wobbling... (see my post @ Dec 30, 2012. 4:53 PM)
- Apart from those 2 (or 3 if you count the battery) issues, it looks OK. :)

hey, I have connected all the components together as you have suggested.
However, I do not always get the LED light up when the voltage is lower than 5V.
At times, when it is higher than 5V, the LED lights up as well..any idea what is wrong? I have connected all inputs in the schmitt trigger to ground as well

Sorry... I dont quite understand the Problem...
whats the supply-voltage?Is the problem that the LED does not light if the measured voltage is lower than 5V or if the supply-voltage is below 5V? Those are 2 different things. Be sure your supply of the measurements is 9V.
what ic did you use now? 74hc14 or cd40106?

sorry... not 9v... i ment 6v! :-)

i think i have a 74hc14 at work. will test it tomorrow.

I am testing the 74HC14 for the 6V. The supply for the Schmitt trigger is 6V. The problem is that sometimes the led lights up above 5v and sometimes it does not light up below 5V (these 2 cases should not happen).. I have connected the circuit similar to the photo I posted, with the supply voltages and inputs grounded..

The 5V I am referring to is the measured Voltage

OK... The Chip i saw last week (and i knew it was a Schmitt-trigger-inverter) is in fact a TTL by the name MC14584B and not 74HC14.
So i couldnt test it in real.

Can you explain a bit more about when it doesnt work? Also: Does it work (sometimes?) correctly? If it doesnt trigger at 5V, does it at lower voltages? and this can be repeated?

See, i am a bit unsure about what does work how in your build... No offfense, but i am not really able to extract what does work how good. I know it doesnt work sometimes, but does it work sometimes? I dont know... Maybe it is just the english language which is a foreign language to me by the way...

Actually I did not test the battery such that the voltage goes down constantly from 6V to below 5V..

What I did was I used 4 batteries with a total voltage of 6V and tested the circuit.. The led does not on.. Which is good

Then, I replaced 1 battery to a dead battery where the total voltage is now ard 4.6V.. And the led turns on.. Which is good again.

So just to confirm again that the circuit is good, I kept replacing the batteries between the dead and a new one. Now, I get varying results where sometimes, the led remains on even when the total battery voltage is 6V and sometimes it is off. And at ard 4.6V, I get varying results as well..

So basically, sometimes, the circuit works as needed, and sometimes, it doesn't.. Any idea why? Could it be due to some loose connections somewhere? I have tried connecting the setup twice anyway..

Best would be if you can hook it up to a small laboratory-supply and dial the voltage down from 6V to lets say 3V. Slowly.
See, a battery can have quite some voltage-fluctuations if it is empty or nearly empty.
I work for a company which makes Insulin pumps (With one AA-Battery inside) and belive me: We see a lot of dead batterys considered to be full since they give an unloaded voltage of almost 1.5V. But they go down like a dead goose if you want juice from them...

So: Test it with a lab-supply if possible.

The problems you describe sound like loose connections, yes. But also be really sure you have the two supplypins of the 74HC14 connected... A HCMOS-Chip can in theory be supplyed over a HIGH-Input. But it may not be really reliable.

Keep measuring the voltages of the pack and note the "result" of the circuit. Maybe we find a common term...

Hey thanks alot.

Will try to get my hands on a lab-supply.

Also, I would like to understand how the schmitt trigger actually works (at least for the circuit I am using). LIke how it triggers and stuffs. Tried looking online but I catch no balls : (

The explanation of a schmitt-trigger may either be quite simple or really complex depending on what level you want it explained...

The basic function of a schmitt-trigger is that he needs a certain voltage applied to it. Below that voltage, the amplification is 0 which results in 0V output. If the level is reached or crossed the amplification becomes unlimited and the output switches to high.
Now a speciality of ST's: Normally they have a hysteresis. Whats that? Simply said: It needs a higher voltage to switch ON than it needs to switch OFF.
So as an example: You have a sine-wave as input to a schmittrigger. It will switch ON if the voltage goes UP to lets say 3.1V and switches off if the voltage DROPS to around lets say 2.7V.
The output of the ST will be a square-wave.
ST's are often used in signal-conditioning: If you have a lot of noise and your original squarewave-signal is a bit de-shaped, you can "regenerate" the signal back to nice square-wave.

If you want a more detailed explanation, you can read the transistor-model-explanation here:

Hi, I have some doubts:

1) The "certain Voltage" you are referring to is the supply voltage of input voltage?

2) And for the 6V circuit:
How does the schmittrigger work? When the voltage is more than 5.002V, does it switch on or off? Don;t mind can explain to me how the schmittrigger works for this circuit?

Thanks for your help

1.: Both since the 74HC14 is supplied with the battery-voltage AND also used at the input of the schmitttrigger.

2.: Well... The Schmitttrigger alone would turn ON if the input is OVER the switch-level and switch OFF if the input is below.
BUT: Since it is an INVERTING schmitttrigger the Output goes HIGH (VCC thus Vbat) if the input is below the lower trigger-level.
If the input is above the high trigger-level the output should be LOW (GND)

"Don;t mind can explain to me how the schmittrigger works for this circuit?"
Eh... What you dont understand exactly? i tryed to explain it in my post above and posted a link to a schematics with the inner workings of a ST rebuilt with transistors... You cant go more basic than that...

Ok what I don't understand exactly is if lets say the input voltage is 6V, how does the current flow thru the schmitt trigger? Does it not flow through the Output but instead goes to ground and therefore the LED does not light up?
And when the input Voltage is about 5V, the current flows thru the LED and lights it up?

eh... The symbol does not show its own supply. There are GND and VDD connected (as with most chips).
The output is simply VDD or GND of the chip (in this case 74HC14).
It does not let anything thru... It has a HCMOS-Input which is high-ohm. No significant current flows in there.
The current of the output originates from the supply of the chip. The Chip-Output can be either VDD of the Chip or GND of the chip.

Hmm ok let me try to get it right:

So basically for our circuit, when the Voltage is above 5V, the chip output low, which is GND of the chip. So, there is no voltage difference and no current flows thru the LED.
But when the Voltage of the battery is below 5V, the chip output is high, which is VDD and there is a voltage difference between the LED and current passes thru it. So, it lights up..
Is this correct?

Yes. Thats correct.

It is basically an inverting switch.
OFF at the input --> ON at the output
ON at the input --> OFF at the output

ON & OFF of the input are in values:
ON is above 5V and OFF is below 5V

ON & OFF of the output are in values:
ON is VDD of the chip and therefore the batteryvoltage.
ON is GND of the chip and therefore 0V.

And since a LED needs some voltage to light up (Lets simply say, the voltage squeezes current thru the LED) it wont light up if you have GND (0V) at both ends. But it will light up if you have a higher voltage at the Anode than at the cathode.

Don't forget the whole point of a Schmitt is the hysteresis on the switch, so the DIRECTION of the change of input voltage affects the limits.

:) I didnt forget that, but i didnt wanted to make it more complex in the explanation than it is already. See, if someone needs such a uber-basic-explanation of how a circuit works (which in fact is a level-inverter with hysteresis) then i dont want do scratch stuf like hysteresis and the effect of inrush-currents and such... :)

Any help for the for the below qns?

And the voltage being input to the schmitt trigger is ard 3. sth V, using the resistor values in the circuit... What does this V signify?

Potential-difference: Volt = V
Current: Ampere = A
Resistance: Ohm = Greek capital Omega
Power: Watt = W

Erm I did not literally ask for the definition of V :)

The input value to the schmitt trigger is measured to be ard 3V. I know this value depends on the resistor values in the voltage divider circuit.

But why this value of 3V is chosen for the 6V battery life circuit? How is this value determined?

By the internal build of the schmittrigger.
Dig the datasheet.

Hey bro. I know it has been quite some time but I am still working on the 6V battery life indicator.

I still have the same problem as mentioned in my earlier posts about the LED lighting up when it is not supposed to. What I realise is that when I disconnect the wire that is going to the input of the schmitt trigger (pin 1 of the schmitt trigger), the LED still lights up! Isn't it suppose to not light up as it is supposed to be a open circuit?? Am very confused about this. I tried reconnecting the circuit from scratch again but the problem persist. Any idea what's the problem?

In our normal world, we (the human being) are under constant voltage from the mains induced by the wires around us.
Since the input of the IC is high-impedance, this voltage gets seen by the IC and therefore triggers the Schmitttrigger.

If you have the opportunity to use an Oscillator once, just touch the thing and see the nice sine-curve with the perfect frequency of your mains (60Hz or 50Hz respectively).
And there still are people who think cell-phone-radiation is bad... What about the CONSTANT mains-frequency out body picks up perfectly?

Hmm ok.
Is there a way I could solve this problem?

By a resistor (Like 10k) to GND would be a good try.

aye. The problem would be to find a good value however... It needs to be high-ohmic to not mess too much with the voltage-divider and cause a too large discharge of the battery over this path. Also it needs to be low enough to really pull it down if it is free floating.

Would using a comparator and zener diode(as shown in the pic) work properly as a battery life indicator for a 6V source?


Resistor connected to the input pin of Schmitt trigger?

yes. But the value needs to be choosen by the 2 factors written above...

Ok will work on it.

And if I want to turn things around and make the LED to light up when the Voltage is above 5V and switch off when the voltage is lower than 5V, how do I change the values of the resistors?

Sry for being too noob but I would like to understand how the circuit of the 6V battery life indicator.works instead of just using it straight away..

A few more qns regarding the 6V battery life circuit:
1) There are supposed to be a high threshold limit and a low threshold limit right? Am I right to say that the low threshold limit is 5V? therefore, when the Voltage reaches 3, the output becomes high...
Then, what is the high threshold voltage? :

2) And how is the 5V limit determined? is it from the resistor values of 240k and 270k?

Again, sry for the noob qns and thanks for the explanation so far.

Yup its supposed to be 6V but the software did not have a 6V source so used a 3V just for visualisation.

Can I just connect all 3,5,9,11,13 pins to ground or VDD? Doesn't matter which goes where right?

Yes: It doesnt matter.
It only matters that the inputs are defined and not left floating and wobbling. But it doesnt matter to WHAT they are defined (VCC or GND).

Oh... Add maybe 2 cents to that for wires and solder...

Another thing to point out: In your schmatic, the voltage source indicates 7.36..shoudn't it be 9V? Or am I missing something?

And just 1 more favour, how will the values for the resistors/transistors/schmit trigger change if it is for a 6V battery source instead? And say it is low at 5V?