Updated schematic to correctly reflect what I wrote below...
I’ve had to add more functionality:
Top left: The linear regulator has been replaced by a LM2575-5. This will be the HV variant with a Vmax of 60v. The Diode is a Shottky, not a Zener as shown.
Bottom left: Simplified the XOR transition detector to only one Schmitt inverter per leg, by using inverted output of bi-stable to drive one side of XORs.
Bottom right: Added a relay to soft-switch the pump off (Pump OFF), so it isn’t running during supply changes.
Middle right: The two RC/Inverter pairs after each bi-stable are to add an initial delay before any switching takes place. I want to have a further delay between switching off one supply (Solar) and switching on another (Battery), using two separate contactors. The 3 NOR gates act as an AND. The last inverter is there so that the default supply (Solar) is from the NC relay contacts, so current is minimized – no relays energized in normal operations.
Bottom right: This new relay controls a soft-switch (Enable Batt Ops/Using Batts) on the pump telling it whether it is running from Solar (MPPT enabled) or Batteries (separate under-voltage functionality enabled).
I’ve included a timing/state diagram (SX rotated it and I couldn't figure out how to correct) to show how it should work.
Does this all look OK? I don’t care about the unlabeled switch functionality.
I have a further question:
As shown, the “Enable Batt Ops/Using Batts” relay switches on Delta #1 after the switch selects Batts and off Delta #1 after the switch selects Solar as the power source for the pump.
The pump senses the state of this relay on a POR. So I’d like it to go high when the “Supply from Batts” relay closes, and to go low when the “Supply from PV (Solar)” relay opens, as shown in Red in the timing diagram, i.e. each time a new supply source is connected.
I could add another RC stage for this relay to extend the delay to be slightly less than Delta #2. Is there a simple way to switch it based on the supply transitions?
====
I’m looking for some help reviewing and simplifying the circuit shown.
It’s to control a pump that can be powered from 3 different sources (Solar PV, Genny, Batteries - but not that relevant to the design, correct voltages taken care off). The pump has a remote on/off switch activated by shorting between two terminals. The purpose of this circuit is to always power the pump down before switching supply, so that the load is minimal. This reduces DC arcing in the contactors, and keeps the pump happy. I have 24V DC (coil) contactors that will be controlled by the relays shown.
The component values shown are simply what the schematic package defaulted to, ignore them.
At the top left is a separate battery under-voltage disconnect circuit, using an NE555. Battery voltage (44-48V) is on the left. The outputs on the right go to a contactor that switches the battery off if the input voltage drops too low. The two resistor voltage dividers are set to provide hysteresis.
The two switches on the left select either Solar, else Genny or Batteries. I’ve used an S-R latch to eliminate any switch bounce. They each have an RC delay stage (say 2 secs) driving a relay (that then drives a contactor, not shown). I’ve seen people use two Schmitt inverters – for hysteresis – to ensure a positive switching action at the relay. But given the S-R latch, do I need these?
It’s been a very long time since I looked at a transistor, and the world has moved on. Can anyone suggest a general purpose NPN device to drive a 5V relay coil? Or would a MOSFET be better?
The two XOR gates at the bottom act as a transition/edge detector. Any time either of the two switches changes states, this circuit energises a relay whose contacts are connected to the remote switch on the pump. The RC delay will be around 4 secs, to give a 4 sec positive pulse output on any edge change.
So, if a switch is pressed, the pump will immediately be commanded to switch off. 2 seconds later the selected contactor will switch output, and a new power source connected. 2 seconds later the pump will be released and start again.
As noted I don’t think I need the Schmitt inverters, but would like to know if there is any reason why not.
What’s the best way to create a single OR gate (there are two spare XOR gates available) instead of using a 7432? Perhaps just a couple of diodes?
I’d welcome any thoughts on the circuit - can it be improved and/or simplified?