LM358 voltage cut-off.

Thread Starter

Jon Sam

Joined Apr 6, 2016
42
Hi everyone,

I have 18650 cells and i like to cut-off the cells at 3V.
I have 18650 circuit protection but they stop at 2.5V, it's too low for my boost modules who will be at the output.

I have build a LM358 circuit and tried with a led and works great. It uses a simple bc547 transistor.

Here is the shematic :


I'm finding a mosfet who can handle 5A or more max.
I ordered some MTP50P03HDLG mosfet for other stuff, maybe they might work.

The circuit might oscillate because the battery voltage will rise when the load is disconnected then the circuit will connect the load again so i don't know how to fix that.

I have some LM311 too if this coudn't be done with a LM358

Thanks

Regards
 

#12

Joined Nov 30, 2010
18,224
The oscillation can be fixed with a resistor from the output of the chip to the positive input pin.
You might consider a TL431 for your goal.
 

MrAl

Joined Jun 17, 2014
11,389
Hi everyone,

I have 18650 cells and i like to cut-off the cells at 3V.
I have 18650 circuit protection but they stop at 2.5V, it's too low for my boost modules who will be at the output.

I have build a LM358 circuit and tried with a led and works great. It uses a simple bc547 transistor.

Here is the shematic :


I'm finding a mosfet who can handle 5A or more max.
I ordered some MTP50P03HDLG mosfet for other stuff, maybe they might work.

The circuit might oscillate because the battery voltage will rise when the load is disconnected then the circuit will connect the load again so i don't know how to fix that.

I have some LM311 too if this coudn't be done with a LM358

Thanks

Regards
Hello,

What you have there is a comparator circuit. They compare two voltage levels and switch the output depending on what input is the highest. They are notorious for oscillation near the set point because the set point usually varies a little, and can vary a lot if the load changes one of the voltages being compared.

The typical fix is to add hysteresis. This usually means connecting a resistor from output to the non inverting input terminal. However, when there is an adjustment pot connected to the non inverting terminal it creates a little more difficulty because the amount of hysteresis then varies with the pot setting as well as the trip point. This can be corrected by flipping the logic of the circuit so that the pot can be connected to the inverting terminal and then the hysteresis resistor can connect from output to non inverting input and the amount of hysteresis will be the same then.

I dont know if you got lucky or what, but because you ordered P channel MOSFETs this is what you will actually have to do anyway. You'll have to flip the circuit logic by connecting the non inverting terminal to the zener and the inverting terminal to the pot to get it to work. That's because the circuit the way it is now is set to turn on when the output goes positive, but with the P channel device you'll have to have it go to ground to turn on.

You might have to play around with the value for the hysteresis resistor, but if you like we can go over some equations to help pick the right value. A measurement of the supply voltage would help there too, both with the load connected and with the load not connected. We can calculate a resistor value then that is not too big or too small. We dont want too much or too little hysteresis.

Another addition to the above circuit is an extra resistor from the zener to the non inverting terminal. This gives the hysteresis resistor some impedance to play with. Without that it may have a hard time changing the zener voltage, which is what it would have to do without the resistor. With the resistor, the feedback resistor can change the input much more easily and consistently.
The value of this resistor could be about 10k, and for example if the hysteresis resistor is 100k then the amount of hysteresis will be about 10 percent (very roughly). If that is not enough then the hysteresis resistor can be brought down lower. 50k would mean about 20 percent (very roughly). The right value depends how much the supply (battery) voltage changes with load.

It's hard to say how well the logic level MOSFET will work at 3.5v (the lowest you intend to go).
Also, a voltage reference diode works much better than a zener.
 

MrAl

Joined Jun 17, 2014
11,389
So does a TL431 with worst case accuracy of 2% and a built in amplifier which would eliminate the need for the op-amp.
Hi there,

Maybe you could draw up a quick circuit to show how you would handle adding hysteresis.

It's been a while since i worked with that IC, but i liked it a lot when i was able to use it for something.
I had to use it once for an RS232 port thing when there was no other power source and so it worked great for a 5v regulator off one of the RS232 pins. Also once for a linear LED current regulator.
It's basically like an op amp with built in reference diode with only the inverting input terminal available.

Another interesting part that is an LM358 with built in 2.5v reference diode is the LM432. Used it a few times already, pretty nice if 2.5v is ok for the app. One op amp and one reference with internally connected op amp. So there's two op amps but one is dedicated to the voltage reference so only one other one totally free.
 

Dodgydave

Joined Jun 22, 2012
11,284
You need hysteresis on the op amp, put a 470k resistor between pins 1,3 ( from the pot wiper to the op amp output), and change the pot to 100k.

For precision cut off use a TL431 zener.
 
Last edited:

dl324

Joined Mar 30, 2015
16,841
I have build a LM358 circuit and tried with a led and works great. It uses a simple bc547 transistor.
LM358 will not function well with a 3.7V supply. Output won't be able to saturate the transistor.

Zener current is too low for a stable voltage reference.

The battery is backwards.

What is the purpose of the circuit?
 

AnalogKid

Joined Aug 1, 2013
10,986
If the circuit in post #1 "works great", then the only issue is the oscillation. May posts have suggested adding hysteresis to the circuit. Since the trip point is adjustable, adding hysteresis that has approximately the same performance across most of the pot adjustment range requires two resistors, one input resistor between the pot wiper and the 358 + input, and one feedback resistor from the 358 + input to its output. The ratio of these two resistors sets the hysteresis window.

It would help greatly to know the battery voltage peak values when the circuit is oscillating. For example, if the battery voltage varies between 3.0 V and 3.3 V, that is a 10% change. To make the circuit immune to this, the ratio of the two resistors has to be greater than 10% as a starting point. In reality it is more complex than this, because the output of the 358 cannot swing all the way up to the battery voltage or down to ground, and the pot setpoint probably is not exactly in the middle of the 358's actual output voltage swing range. So start with an input resistor greater than 25K and a feedback resistor less than 250K. For example, 33K input and 270K feedback. If it still oscillates, decrease the feedback resistor until it doesn't.

Note that without scope shots of the battery, pot wiper, and 358 output voltage waveforms during oscillation, all of this advice is based on the general concepts involved. Your mileage absolutely will vary.

ak
 

MrAl

Joined Jun 17, 2014
11,389
You need hysteresis on the op amp, put a 470k resistor between pins 1,3 ( from the pot wiper to the op amp output), and change the pot to 100k.

For precision cut off use a TL431 zener.

Hello there,

Connecting the hysteresis resistor to the pot arm causes a change in hysteresis with pot setting, something we usually dont want. It might be ok if the pot is always set near the middle, if that can be guaranteed.

Here's a quick graph of how the total hysteresis changes with rotation of the pot from max to min.

Also, using a TL431 means we need a different way to get the hysteresis to work. Show your idea for this if you would like to use the TL431.
 

Attachments

Thread Starter

Jon Sam

Joined Apr 6, 2016
42
Thanks alot everyone.

Wow, that looks complicated so i don't know what path to take.

Or an comparator or with a tl431. What do you think for the easiest way ?

Doesn't it exist logic level MOSFET who will work less than 3V ?

I appreciate your helps.
 
Top