I'm working on a project that involves a Pi Pico driving two 4-channel relay modules. With no power supplied to the modules, everything works great - they open and close as designed for my application. One of the two modules is driving four arrays of 12 V LEDs using a 12 V DC battery; no issues there.
The second relay module is driving one of four sets of EL wire, which use a 2xAA battery pack with a 3 V AC transformer inside.
Most of the time, the Pi will immediately reboot if the power source for the EL Wire is at all connected to the second relay, though it sometimes manages to activate one or two of the relays on the module before doing so.
I have a feeling I need to isolate that AC power somehow, but I'm not sure what needs to happen. I understand they're already supposed to be opto-isolated.
If anyone can point me in the right direction I would very much appreciate it.
Here's the hardware I purchased:
Relay - https://amazon.com/dp/B07DN8DTRW
EL Wire - https://amazon.com/gp/product/B08THDC2CX
Here's what the EL pack looks like inside, and what I did to it to make it able to be powered constantly:
Pin definitions in the code:
self.happy_button = Pin(10, Pin.IN, Pin.PULL_DOWN) self.sad_button = Pin(11, Pin.IN, Pin.PULL_DOWN) self.scared_button = Pin(12, Pin.IN, Pin.PULL_DOWN) self.thinking_button = Pin(13, Pin.IN, Pin.PULL_DOWN) self.happy_relay = LowRelay(2, Pin.OUT) # just subclassed to reverse off/on self.sad_relay = LowRelay(3, Pin.OUT) self.scared_relay = LowRelay(4, Pin.OUT) self.thinking_relay = LowRelay(5, Pin.OUT) self.group1_relay = LowRelay(6, Pin.OUT) self.group2_relay = LowRelay(7, Pin.OUT) self.group3_relay = LowRelay(8, Pin.OUT) self.rgb_relay = LowRelay(9, Pin.OUT)
Finally, here's my schematic:
Edit: With everyone's advice, I've altered the schematic a good bit. I've moved all AC power to another pot to avoid EMI, and the secondary relay module now only provides power to the appropriate inverter, which provides power to one of the four strands of EL wire. This means that I'll have to put all four DC/AC inverters in the pot, but I can't see a good way around that without switch the AC power, and I don't currently have any mosfets or other relay modules to work with. I've moved the 5v power for the relays to pin 40, and I'll add bypass caps between pin 40 (vbus) and pin 38 (ground), as well as pin 36 (3.3v) and 38 (gnd) as soon as I can get them. Here's the updated schematic. If anyone can confirm I've covered all the bases that would be fantastic! Thanks, everyone. :)
Edit 2 Just thought I'd post an update on this project. Moving the AC power to another pot away from the pico did the trick. Everything worked perfectly (with the exception of EL wire being too dim under stage lights), and the costume was a big hit. Thank you all for your help!