2
\$\begingroup\$

I am designing my own circuit to switch on / off a 9V motor via solar panel. I am connecting 2 sets of 3.7V 18650 batteries in series, that means the circuit runs on 7.4V. I am also using a generic battery charger, so the battery protection part is solved.

generic 7.4v battery charger

My question is, how do I design a circuit (without a microcontroller) so that

  1. It switches ON from OFF state only if the voltage is above 7V
  2. It switches OFF from ON state only if the voltage is below 6V
  3. When it's switched ON due to (1) above, it'll hold it's ON state until (2) happens
  4. When it's switched OFF due to (2) above, it'll hold it's OFF state until (1) happens

When you combine (1) - (4), it means I want a kind of "latching" behavior where, when it's charging, it'll charge until at least 7V before switching on the motor, and when it's discharging (motor running,) it'll discharge until 6V at which point we'll stop the motor so that it can go back to charging mode again.

As mentioned earlier, I am not planning to use a microcontroller here. I have BJTs, MOSFETs and comparators (LM393) on hand, so I thought I would go try to go fully analog.

\$\endgroup\$
4
  • 2
    \$\begingroup\$ You're looking for a low-voltage cutoff with a 1 V hysteresis, right? \$\endgroup\$ Commented Sep 16, 2021 at 18:11
  • 2
    \$\begingroup\$ This is referred to as "hysteresis." You will need a reasonably precise voltage reference in addition to the comparator. Plus various caps and resistors, including a divider for VBAT. It can be done without the microcontroller. \$\endgroup\$
    – user57037
    Commented Sep 16, 2021 at 18:21
  • 1
    \$\begingroup\$ You are looking for a comparator with hysteresis. The LM393 datasheet has example circuits for that. \$\endgroup\$
    – Janka
    Commented Sep 16, 2021 at 23:21
  • \$\begingroup\$ Thanks for all the suggestion guys. I actually did not know the terms "hysteresis" until now. You all have been very helpful! :) \$\endgroup\$
    – wooncherk
    Commented Sep 17, 2021 at 4:27

4 Answers 4

2
\$\begingroup\$

You can use two comparators and one SR flop to achieve this function. Make a 5v power supply from battery using some 5v LDO to supply comparators and for 2.5v reference also(2x 10k devider). R3 and R6 make from 22k pots for precise setting of upper and lower limits.

SR flop holds the motor state until battery voltage mets some boundary (upper or lower).

enter image description here

enter image description here

Red is battery voltage, green is low level comparator output, blue is high level comparator output.

Edit:

If you dont have an oportunity to buy a latching IC you can build one from BJTs and connect it according circuit below:

enter image description here

enter image description here

Blue is battery voltage, green is motor current.

\$\endgroup\$
5
  • \$\begingroup\$ Thanks for the answer! Do you have any idea of the exact SR Latch model to be used here? I have never used SR Latch, so I do not know what are the common models available on the market, nor do I know which model to select. \$\endgroup\$
    – wooncherk
    Commented Sep 17, 2021 at 4:43
  • 1
    \$\begingroup\$ You can use 74LS279 circuit, build it from two NAND gates (7400 ic) or build it from two transistors (monostable circuit). Even old 555 can do the job. \$\endgroup\$
    – user208862
    Commented Sep 17, 2021 at 5:00
  • \$\begingroup\$ Also 4043 ic is ready solution. \$\endgroup\$
    – user208862
    Commented Sep 17, 2021 at 5:09
  • 1
    \$\begingroup\$ I recommend 4043 due to active high control. \$\endgroup\$
    – user208862
    Commented Sep 17, 2021 at 5:19
  • \$\begingroup\$ Wow, thanks for the input and the alternative implementation! It's definitely very helpful! :) \$\endgroup\$
    – wooncherk
    Commented Sep 17, 2021 at 18:05
3
\$\begingroup\$

Here's a lttle circuit to do that, using the components you have:

schematic

simulate this circuit – Schematic created using CircuitLab

A simulation shows this output (orange), given a rising and falling input voltage (blue):

enter image description here

R3 provides positive feedback, for about 1V hysteresis. R1, R2 and VR1 set a potential at some point between the thresholds, to be modulated by R3. Since the values necessary to obtain the required switching thresholds depend on D1's breakdown voltage, and other component tolerances, VR1 is there to be able to fine tune the center point.

In this CircuitLab simulation, there's no LM393, and I've actually used an LM358 instead. Using a real LM393 comparator will result in slightly different thresholds, due to its open collector output, but VR1 will allow for center correction, and changing R3 will permit you modify the voltage interval between switching thresholds.

Q1 is switched on or off by the comparator output, to connect or disconnect the output load from the input voltage source, V1, which represents your battery of course.

The load RL is just there to provide a current sink for Q1 in the simulation, representing whatever you intend to connect to the output. Don't put it in the final design.

\$\endgroup\$
4
  • \$\begingroup\$ Thanks for the answer. What if I do not have a Zener diode on hand? Any idea how can we replace D1 and still have the same result? I am open to buying Zener diodes, but I thought I would like to use this opportunity to learn. \$\endgroup\$
    – wooncherk
    Commented Sep 17, 2021 at 4:39
  • 1
    \$\begingroup\$ @wooncherk You need some sort of voltage reference, to compare with. In a pinch, you can use a few regular silicon diodes in series (and forward biased, not reversed like the zener). Each one will give you a bit less than 0.7V, so a few in series can yield a relatively constant voltage drop. Let me think on it. Maybe others have an idea of how to derive a stable voltage drop without a zener. \$\endgroup\$ Commented Sep 17, 2021 at 4:46
  • 1
    \$\begingroup\$ @wooncherk the base-emitter junction of a BJT is a zener diode (a bit noisy, but the hysteresis will take care of that). If you can find one that breaks down at 5V, you have a usable zener diode without even knowing it. \$\endgroup\$ Commented Sep 17, 2021 at 4:48
  • \$\begingroup\$ Okay, it seems the most sensible idea is to stick to the original design, buying a Zener is not particularly hard, so I don't find why should I not buy it. :) \$\endgroup\$
    – wooncherk
    Commented Sep 17, 2021 at 18:10
3
\$\begingroup\$

Check out this 555 timer low-voltage disconnect.

555 low voltage disconnect circuit

The relevant notes you need to see are:

When the voltage on the trigger input is less than 1/3 of Vcc, the NE555 output pin 3 goes and stays HIGH.
When the voltage on the threshold input is greater than 2/3 of Vcc, the NE555 output pin 3 goes and stays LOW.

To repeat:
threshold pin HI, output LO
trigger pin LO, output HI

So the function is inverted, but inverting the output pin is not so hard. (use the inverting output of a relay, for example).
By replacing R1/R2 and R3/R4 with pots, you can fine-tune the trigger voltages, and the circuit will stay in its previous state while the voltage remains in between.

One thing you may have to be careful of is that the voltage of the circuit should not vary wildly, or it may cause the timer circuit to oscillate. But I suspect it should work fine. You WILL need a solid voltage reference, however, like a 3.3v or 5v regulator or similar. Do not try to run it from the battery directly as its trigger and threshold voltages will swing as the battery voltage changes.

\$\endgroup\$
2
  • \$\begingroup\$ I don't have 555 on hand, but thank you for the info (and the resource link). I did learn a lot from your info, especially about the versatility of 555. I reckon I should start stocking some of these 555 chips! :) \$\endgroup\$
    – wooncherk
    Commented Sep 17, 2021 at 18:06
  • 1
    \$\begingroup\$ @wooncherk The 555 is an incredibly simple but powerful IC considering it's been virtually unchanged for like 50 years. Example: paleotechnologist.net/?p=548. I daresay it's the cheapest way to build your battery cut-off circuit. Plenty of 555-timer projects to be found online! \$\endgroup\$
    – Boloar
    Commented Sep 24, 2021 at 4:06
2
\$\begingroup\$

I answered before you edited your question, so I had to rewrite my answer.

I did a search for "low voltage cutoff with hysteresis" and found this circuit: enter image description here

EDIT: link to the article.

It has two adjustments, one for turn on voltage, and one for turn off voltage. It uses a standard IC, the 555.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Unfortunately this circuit has no reference voltage, the trigger points for the 555 being 1/3 and 2/3 VCC. You'd have to run it from a regulated supply to get any precision. \$\endgroup\$ Commented Sep 16, 2021 at 19:22
  • \$\begingroup\$ Thanks for the answer, I don't have 555 on hand, but I'll keep this design in mind! One thing I did learn though, that 555 can be a very versatile chip, so i should stock up on it! :) \$\endgroup\$
    – wooncherk
    Commented Sep 17, 2021 at 4:40
  • 1
    \$\begingroup\$ @jack creasey there is a 7.5V zener regulating Vcc \$\endgroup\$ Commented Sep 17, 2021 at 13:30

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.