I want to make an auto power cut off for my battery charger

I have a charger for a 12v battery but it is without auto power cut off.

I know I need a circuit consisting of a comparator and a relay and I drew the circuit but I don't know if there is something wrong with it because when I run the circuit the relay doesn't switch at all.

Is there something wrong with the circuit or is it the simulator that doesn't work right??

• What voltage does the simulation give at the '-' input to the op-amp? – Phil G Jan 17 '19 at 15:27
• it is a variable voltage source( which is the charged battery) and for all the values of voltage even more than the reference voltage at the inverting terminal of the op amp (12v) the relay doesn't switch – Gh-B Jan 17 '19 at 15:36
• Phil is asking about the inverting (negative) input; the one connected to the diode. – Hearth Jan 17 '19 at 15:39
• In case your 12V battery is a Lead-Acid battery: Did you know that you don't need an "auto power cut" if the charger supplies less than 13.6 V? To fully charge it, 12V isn't enough, you need around 13.6 V. My (self build) car battery charger outputs 13.6 V when no battery is connected, that means the charging stops when the battery is full. – Bimpelrekkie Jan 17 '19 at 15:45
• no it's not and the charger damaged the battery because it doesn't stop delivering power – Gh-B Jan 17 '19 at 15:59

A couple of things.

A 741 cannot source or sink very much current. Look up the resistance of the relay coil to determine how much current it needs to operate. It probably is more than a 741 can deliver. The solution is to have the 741 output drive a transistor, and the transistor drives the relay.

The input voltage range of a 741 is limited, and does not extend to either power rail. So if the chip is powered by 12 V, it will not operate properly with 12 V on either input. The input voltage range is specified on the datasheet.

To diagnose both problems, disconnect the relay from the 741 output and measure the output voltage as you change the input voltages.

• i did as u said and the relay now switches on as it is supposed to do but it doesn't switch off even if the voltage on the non inverting terminal exceeds the reference voltage – Gh-B Jan 17 '19 at 16:25
• and without the relay the output voltage is as supposed 11v when the non inverting voltage is less than the reference voltage and it is zero when it is higher – Gh-B Jan 17 '19 at 16:29

I asked about the negative input since that's the first issue - the Zener will do nothing at all until the supply rises above 12V, then it'll clamp the input and you'll have no sensitivity to further changes. Replace the Zener with a resistor to form a divider.

Then when the input rises above your reference voltage, the op-amp (acting as a comparator) will switch the output to the low rail and turn off the relay.

Next issue you have is that there's no latching on this - once the relay switches off, your battery voltage may fall back below the switching point and switch the relay on again. You could get around this by having a feedback from the op-amp output that pulls the reference lower, to provide either some hysteresis or latching action.

• i thought using the zener will increase the stability of the reference voltage . but if i used a voltage divider what values of resistors will give me an output of 12v as a reference voltage while the whole voltage coming out of the charger is 12v ?? and i actually don't understand why do i need a feedback in a comparator circuit ? – Gh-B Jan 18 '19 at 17:42
• found the right values thanks and the circuit is done now and it is working without a feedback but there is only one little thing i'm not sure about and it is how to connect this circuit with the battery being charged ? the input of this circuit is taken from the charger and the non inverting terminal is fed from the battery but the teminals of the relay ? how should i connect them with the battery ? – Gh-B Jan 18 '19 at 17:56
• As has been commented on, some op-amps can't work correctly with the input voltages near their supply rails, so you want to have the operating point nearer the middle. The divider will then put the measured voltage - the supply rail itself at half voltage, and the reference, which you could be using a Zener for, would be similarly scaled down. – Phil G Jan 18 '19 at 19:55
• thank u i already found the right values i chose 100 ohms and 10 k ohms and i got Vout = 11.8v and it is good for me . i don't wanna use an external supply voltage i wanna take the input from the charger and it only gives 12v . and for the op amp the input voltage that can handle is 15v and the supply voltage is 18v so isn't it safe to use a 12v as an input voltage and as a supply voltage ? – Gh-B Jan 19 '19 at 10:28
• The 741 (which is nearly as old as I am) allows a +/- 15V dual supply, so it can tolerate +30V on a single ended supply (see fig 1 in ti.com/lit/an/sboa059/sboa059.pdf ). You do need some sort of overvoltage clamp across the supply to absorb any transient on disconnection of the battery. – Phil G Jan 21 '19 at 15:14