0
\$\begingroup\$

I have a low-voltage detection circuit which I use to trigger one of two LEDs (green, and red) that is powered off of a +9 V battery cell. As the battery discharges, its output voltage decreases, until when it finally hits the 6.9 V level. When the battery provides an output voltage greater than 6.9 V, the green LED is turned on, and currently flows from the source to the drain of the PMOS, Q4. If the voltage falls below 6.9 V, the green LED is turned off, the red LED is turned on, and the output of Q4 is turned off.

DUT

However, as another commenter mentioned in a separate question on part of this circuit, I should implement hysteresis in some form or another so that I don't have the circuit alternating between the two LEDs at the cutoff point due to the average load of the circuit changing when in the "green" mode of operation. What is the most straightforward way to approach this?

Do I have a comparator feeding into the gate of the PMOS? Since my voltage rail is expected to change, I can't really use a voltage divider across Vcc and Gnd for reference. My intent is to have the circuit stay in the "red" region (i.e. cutting off Q4) if it enters that region, with some noise tolerance for when the circuit is first turned on.

I simulated the circuit by Asmyldof below using a 100R resistor for the load, and a pair of AC power supplies with a shared 6V offset, and 0.5 V amplitude each (60 Hz and 120 Hz frequency sinusoids), and the simulation below it. This appears to just offset the output signal with respect to the input supply power. Is this actually hysteresis, or is my simulation just terrible?

Modified Circuit


Modified Circuit

Circuit Simulation - Light Blue:Power Rail, Orange:Output/Load Voltage


Circuit Simulation

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

Drawing only the PMOST bit of your schematic:

EDIT2: I completely forgot to add the 10k pull-up resistor. It's added now, R4. Sorry.

schematic

simulate this circuit – Schematic created using CircuitLab

Basically when the mosfet is turned on the R3 in my schematic puts a companion current into the transistor and the zener diode will have to conduct a little less current to shut off the transistor, reducing the shut-off voltage a tiny bit. When the MOST shuts off the support disappears and the circuit will have a much better chance to stay stable. Now, beware that R2 and R1 have to be able to pull the base of Q1 (in my schematic) below the 0.6V threshold, so R3 should not be too small and R1 and R2 not be too big. If it doesn't turn off at all I mis-estimated the transistor and you may have to increase R3, although I think it's close enough.


EDIT1: In response to your simulation: As I stated, I could be off with the transistor. What you see is the voltage drop across the diode, so maybe the system just doesn't shut off, or much too late.

Try simulating with a larger range of voltages to see what happens, then see if a larger R3 helps lifting the shut-off voltage. Other than that you can tweak the zener, though that will also tweak the LED trigger. Do keep in mind simulations aren't holy. I could model the whole transistor and do a full range calculation of the currents and cut-offs but that's something I haven't done in a very long time, so I'll probably only have time to really sit down for it in quite a few more days.

It's also possible a lower frequency may show different results, but that's quite unlikely, since from the perspective of discrete transistors and mosfets 120Hz is already pretty much DC.


EDIT3: When I wanted to do a calculation I looked at the schematic and saw I forgot the pull-up resistor in my schematic, R4. It's an absolute oversight on my part, but these things do happen. Now that it's added, I have run my own circuit lab simulation with the following schematic:

schematic

simulate this circuit

With these results:

Simulation output of circuit lab

You can see it switches off at about 5.5V, and back on at about 6.3V: Hysteresis! As said, you may have to change the zener a little, if the 9V battery is rechargeable, it may be pushing it a little, although that's still 0.92V per cell, so they should survive it well enough.

As you increase or decrease the R3, let's say between 90k and 330k the hysteresis window will change, with 90k being a quite large window and 330k being a tiny window.

\$\endgroup\$
3
  • \$\begingroup\$ I've edited my question to reflect your suggestion. Could you please take a look at what follows the Edit section? Thanks! \$\endgroup\$
    – Cloud
    Oct 10, 2014 at 5:34
  • 1
    \$\begingroup\$ @Dogbert Updated my answer. \$\endgroup\$
    – Asmyldof
    Oct 10, 2014 at 12:05
  • 1
    \$\begingroup\$ @Dogbert I'm so sorry, I forgot the R4 pull up resistor in my schematic. It should have been there. I have updated my post to reflect the change with another simulation. By the way, what's the reason for the diode? Wastes a lot of energy as you can see. \$\endgroup\$
    – Asmyldof
    Oct 10, 2014 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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