0
\$\begingroup\$

Alright, I pretty much just got into electronics, and one of my first projects was an Arduino-controlled LED light strip. I wrote some software to control the color and brightness from my computer via USB.

I simply connected a 12V power supply to the Arduino's VIN and GND pins, and also connected the 12V rail to the + connector on the RGB strip. I then drive the PWM signals to ground for R, G and B via MOSFETS.

enter image description here

This system is working perfectly, but I have encountered a very strange issue: If I unplug the 12V PSU completely, the Arduino turns off - to be expected. But if I plug it into my extension cord, which has a power switch, and I turn off said power switch, I would expect the result to be same - a turned off power strip does disconnect the line, right? And yet, every few seconds the Arduino's power LED blinks.

It seems to me, that some part of the system introduces a little bit of voltage, just enough to charge up a capacitor somewhere. I have tried disconnecting the USB cable, thinking that the power might come from there, but that did not change anything (the computer that the cable was connected to was turned off anyway, but I thought that maybe some power was still coming through it's USB ports).

I'm not too worried about power consumption or anything, but that red light blinking every minute or so is pretty annoying.. What can I do?

Thanks in advance,

Pi

PS: I just measured the voltage between VIN and GND when the PSU is plugged into the turned off extension cord, and I saw a voltage of about 2V, rapidly descending to 0, then a blink, and then it went back to 2V. That seems to confirm my theory, right? It doesn't help me to fix it though...

PPS: This is the extension cord I have: Amazon. Does it matter that is has USB ports? I'm not using these atm however.

\$\endgroup\$

closed as unclear what you're asking by Andy aka, RoyC, Sparky256, Voltage Spike, PeterJ Jan 15 '18 at 12:16

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ And if you turn on your power cord you will either cause electrocution or a fire. You don't appear to know what you are doing or saying. \$\endgroup\$ – Andy aka Jan 14 '18 at 17:05
  • \$\begingroup\$ How exactly did I risk any of these things happening? \$\endgroup\$ – PiMaker Jan 20 '18 at 21:38
2
\$\begingroup\$

Ideally, the switch in such an extension cable switches the live and the neutral lines. Often, only one will be switched because single pole switches are cheaper.

If only one line is switched, you want it to be the live wire. But, live and neutral are pretty much undefined in a german outlet. You can never be sure (without measuring the voltage to the ground wire) which pin in the outlet is live.

So, you switch the extension cable off, and maybe it breaks the neutral instead of the live wire. You then still have 230VAC going to the outlets, but no current flows because the neutral is open.

Except that your outlet strip also has that 5V power supply in it, and perhaps other leakage paths. That allows a small current to flow through the neutral wire from the outlet strip back to either the real neutral or to the ground wire.

This gives your powersupply a little bit of current to play with. Not enough to operate properly, but enough to output just enough voltage and current for the Arduino to start up - and it draws enough current to short out that little bit of leaked current, so it shuts off again. Then the whole thing starts all over again.


Unplug your extension cable from the wall, rotate the plug 180 degrees (to swap the pins in the outlet) then plug it back in again. Now see if your Arduino still blinks.

\$\endgroup\$
1
\$\begingroup\$

It is fairly apparent that the power source does not completely turn off when you flip the switch. Not uncommon for electronic devices these days.

Whatever the internals are of that thing is, it appears to leak a bit of current when turned off.

There is not really much you can do about that except perhaps adding a suitable bleed resistor across the supply output small enough to keep the caps in the Arduino discharged.

\$\endgroup\$

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