3
\$\begingroup\$

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:

https://www.splitbrain.org/blog/2018-04/09_hacking_el-wire_inverter_on_off_switch

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:

Ariel 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. :)

enter image description here

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!

The final product

\$\endgroup\$
12
  • 2
    \$\begingroup\$ All your loads are DC and do not require isolation. Why use relays instead of MOSFETs? \$\endgroup\$
    – bobflux
    Aug 20, 2022 at 20:23
  • 2
    \$\begingroup\$ Do you not have any bypass capacitors on the power supplies? Why do you seem to be using 5V relays from 3.3V logic signals? And what current does the relay pack need? \$\endgroup\$
    – PStechPaul
    Aug 20, 2022 at 21:10
  • 1
    \$\begingroup\$ The EL wires use AC, generated by the small inverters "EL packs". You can use a MOSFET to switch the DC supply to the inverters. In fact you could do that with the relays too, it could solve your problem, because the DC side should have little noise, while the AC side is high frequency AC that can leak through the relay's capacitance. \$\endgroup\$
    – bobflux
    Aug 20, 2022 at 21:56
  • 3
    \$\begingroup\$ I would suggest bypass capacitors of 100-470 nF from 3V3 to GND as well as Vcc (5V?) to GND. \$\endgroup\$
    – PStechPaul
    Aug 21, 2022 at 3:35
  • 2
    \$\begingroup\$ Sorry, you need an oscilloscope to develop electronics. Without it, it’s guesswork. My best guess you be you lack decoupling capacitors. \$\endgroup\$
    – winny
    Aug 21, 2022 at 6:28

2 Answers 2

4
\$\begingroup\$

Please note that you are switching the EL wire itself with the relays. And you don't mention how you power the EL power supply, i.e. batteries or the 3.3V.

Contrary to what you may assume, the EL power supply itself works on 3V DC, but it outputs high voltage at high frequency. Maybe 100 volts AC at few kilohertz. And the EL wire itself is a highly capacitive load.

It is likely that the intended operation of the EL supply is not to abruptly disconnect and reconnect the EL supply output to EL lights. Or to even keep it turned on without a connected load.

The disconnection of EL wire with a relay may cause a spark between relay contacts and that is quite a strong source of electromagnetic interference. The connection of EL wire may cause a large current spike needed to charge the capacitive EL wire, and high currents flowing in a loop of wire is again a transmitting antenna for electromagnetic interference. And it is unknown how the EL supply behaves with no load, the output voltage may be much higher and it could arc over the open relay contacts, or capacitively couple the high voltage high frequency waveform to nearby wiring.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Thank you for this comment. It corroborates a lot of what I’m surmising from deeper digging. Yes - I was using the intended 2xAA power supply for the EL wire rather than the 3.3v pin on the pico. I have now seen that the EL power supply is not recommended to operate without at least 3” of wire at all times, and I almost put an EMI tag on this post because I guessed that might be the issue. I’ll switch to toggling the on/off button for the EL’s DC power supply instead of the AC output. \$\endgroup\$
    – Psyferre
    Aug 21, 2022 at 14:34
4
\$\begingroup\$

You should use VBUS (pin 40) in place of VSYS (pin 39), because there is a diode between these pins.
And add a decoupling capacitor (perhaps a supercapacitor 6V), because you are driving relays with a high current supply need (~100 mA ?)
Perhaps also insert a diode between VBUS and the VCC supply of relays boards.
I also should use pin 38 preferably as GND for relays boards in place of pin8 and pin13.
More nearest of the "input" power supply pins ...

pico datasheet.

enter image description here

Here is what I should do

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ Thank you so much! I've updated the schematics based on your comments and others'. If you can confirm I've covered the bases I'd really appreciate it. Thanks for your help! \$\endgroup\$
    – Psyferre
    Aug 21, 2022 at 17:12
  • \$\begingroup\$ Hope that now all is working without any flaws ... Good luck. \$\endgroup\$
    – Antonio51
    Aug 21, 2022 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.