I’m powering a solenoid valve with 5v through the normally open side of the pHAT relay.
The relay is controlled by a USB device ('Novation LaunchPad") connected to a Pi Zero.
Everything works perfectly when the 5v battery for the solenoid is disconnected: the relay clicks when the LaunchPad buttons are pressed and it continues to work indefinitely.
When I supply voltage to operate the solenoid valve through the relay (independent 5v battery), it works for a few button presses (random number < 20), but then the USB Launchpad resets.
It’s as if the solenoid is producing a back EMF that is somehow getting back to the Pi and causing USB to fail. Surely the ‘external’ relay circuit should be totally isolated from the pHAT and Pi? How can loading it make any difference at all?
Behavior is repeatable for multiple pHATs, Pis, days, and batteries.
I’m guessing that is a voltage spike issue generated by my solenoid; I’d like to try putting a component into the external circuit to damp any voltage spikes; suggestions?