1
\$\begingroup\$

I made this circuit:

enter image description here

I would like the following:

The LM1 opamp wathching the battery voltage and the output high while the battery voltage higher than 3V. When the voltage drops below 3V, the opamp output go low and turn off the N-channel mosfet, so no more current consuption from the battery (except the watching circuit which is only 1-2mA).

How can I modify this circuit to if once the battery voltage dropped below 3V, never turn off, or turn on olny when the voltage higher than 3.5V?

Now my problem is when turning off because the low voltage, immediately turning on again because the voltage higher than 3.00V.

\$\endgroup\$
  • 1
    \$\begingroup\$ See at en.wikipedia.org/wiki/Schmitt_trigger#Op-amp_implementations. \$\endgroup\$ – pasaba por aqui Jul 30 '17 at 8:47
  • \$\begingroup\$ I've not come across an LM1 op-amp - can you link the data sheet please? \$\endgroup\$ – Andy aka Jul 30 '17 at 9:09
  • 1
    \$\begingroup\$ See my comment on "Transistor"'s answer. | Add eg a 10k resistor from Battery+ to LM1_+ and a higher resistor - maybe around 200k- 500k from LM1_output to LM1_+.| When Batt+ is above Vdivider the LM1 output adds to B+ and increases V on LM1_+. When LM1 output goes low it also lowers voltage on LM1_+ and V_Bat+ needs to rise to a higher voltage to restart. \$\endgroup\$ – Russell McMahon Jul 30 '17 at 9:28
  • \$\begingroup\$ Thank you. It seems good. How can I calcutale when the LM1 go high again? Which voltage? | Once the LM1 output go low, will it go high again or never? \$\endgroup\$ – Lobi Jul 30 '17 at 9:50
  • \$\begingroup\$ Relation between resistors said in @RussellMcMahon comment-answer must follow the relation 10=R1/R2*0.5 where 10v is opamp power/output and 0.5v the target hysteresis margin. In this way you have thresholds near 3.15v (low->high) and 2.65v (high->low). A small modification in the resistor values of your base circuit can shift these thresholds. Additional note: why 7k/3k? better 70k/30k to save energy. \$\endgroup\$ – pasaba por aqui Jul 30 '17 at 11:06
3
\$\begingroup\$

It sounds like you need an under-voltage-lock-out (UVLO) circuit like this: -

enter image description here

You would select R5 to provide the right amount of positive feedback to ensure the switching points are at 3.0 volts and 3.5 volts. So, once the MOSFET is turned off, U1's output raises the target voltage at point B and this means the Li-ion cell has to "recover" a certain amount before the circuit reactivates the MOSFET and applies power to the load. Once power is re-applied, the op-amp output is low thus setting a lower target voltage at point B hence, the Li-ion has to drop to a lower threshold before the load is disconnected.

You might also be interested in the TLV3011/3012 - it has a voltage reference built in and can be "wired" to have hysteresis.

\$\endgroup\$
2
\$\begingroup\$

You are looking for a Schmitt-trigger action. This is accomplished by adding positive feedback to the comparitor.

enter image description here

Figure 1. Op-amp Schmitt trigger. Note that \$ R_{123} = R_1 || R_2 || R_3 \$. Source: HyperPhysics.

There's an online calculator in the link above.

It appears the output logic may need to be inverted for your application.

\$\endgroup\$
  • 1
    \$\begingroup\$ No logic inversion needed - just add hysteresis in battery ref lead. Add a resistor from Bat to OA+ and a suitable higher R from OA output. \$\endgroup\$ – Russell McMahon Jul 30 '17 at 9:25
1
\$\begingroup\$

Note that an LM1 is an opamp from before the beginning of time. If it ever existed knowledge about us is denied to us by the singularitry at the time of the big bang (or whatever really happened). You can substitute most modern opamps for it so I'll assume below that it actually exists.

For interest - here is a 469 page databook from near the beginning of time (1988 in this case) that knows about ICs like the LM1 but not about the LM1.
Fabulous Linear Technology Linear Data Book 'supplement' - 1988


The circuit below is like unto your one but Rf and Rb have been added to supply "hysteresis".

Add Rf and Rb
Rb maybe 10K
Rf probably in the 100k - 470k range.

Define ratio Rb/(Rb+Rf) = N

V_OA_+ = Vbat + (V_LM1_out - Vbat) x Rb/(Rf+Rb)
ie
When V_LM1_out is above Vbat it adds 1/Nth of difference in voltages to V_LM1_+
When V_LM1_out is below Vbat it subtracts 1/Nth of difference in voltages from V_LM1_+

As Vbat is about 0.5V (by the OP's stated requirement) at the circuit's turn off point, the op amp output will raise the voltage at V_LM1_+ by much more than it will lower it (as the opamp output hi is >> 0.5V but opamp output low is not much lower than 0.5V). Exact amounts depend on ratio N and on output V of LM1 when high and low.

To make calculations somewhat easier you can add a diode in series with Rf so it conducts only when V_LM1_out is HIGH. Then the circuit will raise V_LM1+ above Vbat when V_LM1_out is high BUT will leave it AT Vbat when V_LM_1 is low.

So if N = say 11 (10k, 100k) Then from above:
V_OA+ = Vbat + (V_LM1_out -Vdiode - Vbat) x Rb/(Rf+Rb)
and
When V_LM1_out is above Vbat it adds 1/Nth of difference in voltages to V_LM1_+
So Assume V_LM1_high = 10V.
Assume V_LM1_low = 0V.
Assume diode used and Vdiode = 0.6V.

V_OA+ = Vbat + (V_LM1_out -Vdiode - Vbat) x Rb/(Rf+Rb)
= 0.5+ (10 -0.5 -0.6) x 10k/ (100k + 10k)
= 0.5 + 8.9 /11 = 0.5 + 0.81 1.31V = too high

Change N to say about 100 adds about 0.08 V = 0.58V switching point

Try removing diode and seeing how V_OA_+ is affected by low voltage

V_OA+ = Vbat + (V_LM1_out - Vbat) x Rb/(Rf+Rb)
= 0.5 + (0 - 0.5) /11 = 0.5 - -0.045 = 0.45V
Vbat would need to rise by ABOUT 0.05V to restart the circuit.

The very low voltage of Vbat at turn off makes this arrangement hard but not impossible to use. Addition of an extra resistor and a diode would allow the OA to pull down V_)A_+ via a resistor but to pull it up via a diode and a much larger resistor so the variation are more symmetrical.

Example values:

With Rb = 10K, Rf = 1 megohm and Opamp output swinging 0/10V, when OA is high then OA_+ will rise by about 0.1V. So setting tyhe divider to 0.6V will allow cutoff at about Vbat 0.5V.
The schottky dide (and small schottky, BAT85, 1N414x, ...) causes the opamp to clamp the LM1_+ at about 0.3V. Vbatt will cause restart only for some quite high value of Vbat. To get a lower voltage restart add resistance in series with the diode.

ie the above is a good starting point - play and ask additional questions.

**_____________________________________**

Question: Do you actually have an LM1 ?

enter image description here

\$\endgroup\$
  • \$\begingroup\$ "To make calculations somewhat easier you can add a diode..." : could be all this part is unnecessary and contains the error of replace Vbat by 0.5v. Analysis of the base circuit is easy: V-=3v, V+ the one you describe, V-=V+ => Vbat=... when Vout=Vcc and Vbat=... when Vout=0v. \$\endgroup\$ – pasaba por aqui Aug 1 '17 at 7:48
  • \$\begingroup\$ @pasabaporaqui My diagram still showed the 3V limit whereas the OP has changed the limit to 0.5V. I have changed the text back to 0.5V and updated the diagram. I have added a Schottky diode to allow more certain shutdown - see text. \$\endgroup\$ – Russell McMahon Aug 1 '17 at 12:26
  • \$\begingroup\$ I think there are some misunderstood. In the question I read "output high while the battery voltage higher than 3V", "shutdown if < 3v", ... . Also, resistors 7k/3k are for 3v. 0.5 seems to be the hysteresis loop width. \$\endgroup\$ – pasaba por aqui Aug 1 '17 at 12:30
  • \$\begingroup\$ @pasabaporaqui BOTHER!!! - you are correct !!! :-). For some reason I latched onto the idea that he had changed the target to 0.5V. That may have related to another question of just been a brain storm. Hpow very annoying. My answer is of course essentially correct BUT with stupidly wrog values. Better - withy a 3.5V ish target the OA swing is much less troublesome. I need to stop for now as important things tomorrow need me to get some sleep soonb. I'll try and tidy the answer up 'sometime soon'. \$\endgroup\$ – Russell McMahon Aug 1 '17 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.