Electronic – LM741: voltage comparator Issue

battery-chargingoperational-amplifiersolar-charge-controller

I'm working on an automatic battery charging source switching between solar power and a 24Vdc wall adapter.I'm using a LM741 as voltage comparator and a relay for power switching. Basically, if solar power is not available or solar voltage is below a threshold value then battery charging source should be automatically switched to the DC wall adapter supply. So, for detecting solar voltage threshold, I'm using a LM741 as voltage comparator.

I'm facing issues with the LM741.

Whenever solar power is available whether it is as low as 3.1V or as high as 12V, the relay remains switched to solar power source.

To set the threshold value I'm using a 10K potentiometer.

The relay switches to the DC wall adapter when solar voltage goes below 3.0V.

I have tried changing the potentiometer position, but at every position the threshold value remains 3.0V, and the relay switches back to solar power when the solar voltage gets above 7.7V. I have tried changing the potentiometer position, but at every position this value remains 7.7V.

I have attached my schematic diagram. Can someone please tell me why I'm not able to change the threshold voltage using the potentiometer?

enter image description here

Best Answer

I'm afraid you've set yourself up for a Learning Experience. I'm not trying to be disagreeable, but you've done pretty much everything wrong you could.

1) 741s are only specified down to about +/- 5 volts. Trying to use one at 3 volts single-ended is never going to end well.

2) 741s have limited input common-mode range, typically within about 2-3 volts below V+ and above V-. That is, you cannot tie an input to the V- pin and expect the chip to work. Maybe it will, and maybe it won't, but if it doesn't you have nobody to blame but yourself.

3) 741s have limited output swing, typically within about 2-3 volts below V+ and 2-3 volts above V-. So, if the output works at all in your circuit, you'd expect several volts on the output regardless of the inputs. This, in fact, seems to be what's happening - your relay is always on. However, it would not be at all surprising if some 741s operating in this circuit would always have a zero output - and there is no way to tell in advance.

So, the short version is that 741s are intended to be used with both + and - power lines in the range of 5 to 15 volts, centered on ground. Input signals should be within the range of 2-3 volts less than the power supplies, and also centered on ground. You should not expect output voltages outside the allowed input range, and maybe even less if you're trying to provide a lot of current.

It's perfectly possible to use a 741 in single-supply operation, but it takes more knowledge than you have right now, so don't try it until you get more experience.

For your circuit, you should get a real comparator which is specified for 3 to 12 volts power supply voltage.

Finally, even if you do get a proper IC, your circuit will ALWAYS behave as it does now. Since pin 2 is tied to ground, pin 3 will ALWAYS be greater than pin 2, and the relay will always be activated.

With a 10k base resistor to T2, you will not be guaranteed enough output current to turn on the relay. Using a 12-volt relay at 3 volts should never work at all. That fact that it seems to do so says that something very wrong is going on in your circuit.

As has been mentioned, you also need to add hysteresis. As it stands, even if everything works (and you've changed the pin 2 issue), the circuit will chatter uncontrollably when the solar voltage is near the trip point. When the voltage gets high enough the relay will activate and the solar cell will try to supply current to the charger. The combination of relay current and charger current will load the solar voltage, which will drop. The comparator will detect the low voltage, turn off the relay, so the voltage will rise, and the whole cycle will repeat.