I have a solar pool pump inline with a normal pool filter pump. If the pool pump turns off while the solar pump is on.. then the solar pump can’t pump properly. This is an issue since the filter pump sometimes will turn off in hot weather (or if hot water is flowing through it). I built a sensor to require the filter pump to run in order to run the solar pump. Also I ran an external switch for the solar pump.
I will note that working with mains voltages is inherently dangerous, and I’d advise against it for anyone not sufficiently trained.
The circuit consists of a current sensing board ($5.50 with delivery) and a Zero-Cross SSR ($12 delivered…). The sensor is just a coil around one of the conductors in a ‘sensor’ mains extension cable. When current is high enough through the sensor, the SSR is in turn energised, closing the circuit through a second ‘trigger’ extension cable . I put a switch in between the sense output and the SSR. That’s basically it. I thought about a pull-down resistor on the input for the SSR, but since it needs 5v plus a small current to trigger.. I think it should be fine left open.
Initially I used a current sense board with no relay output, although this did not live up to specs delivering 5v digital output and caused a bunch of issues… eventually I gave up trying to implement a transistor/relay and bought a sense board with an inbuilt relay. The components in the system run off 5v and are powered by a USB power adaptor 🙂