I'm making a circuit to alternate its input, depending on the voltage that's feeding the system. I used a voltage comparator with a transistor and a relay to do this:
The simulation works pretty well, but when doing it in real life, I have already burned 2 op-amps. I noticed the resistance between pins 3 and 4 got pretty low (from like, 1k to 20 ohms after the op-amps were burned).
I was trying to understand what the problem was, and by making some changes in the simulation (image below), I noticed that pin 7 is somehow with the same voltage of the
BAT1. Like in the image below, the simulation starts with the relay contact already changed. I don't know if it is the problem, but it might have something to do with it. I can't understand what's happening.
When I tried to change the pin 7 connection to
BAT1, it seems like it works. But my idea was to preserve the voltage from
V1 (it would be a photovoltaic panel to feed the load, if there is no power, then the load wouldn't be fed).
Thanks in advance.