Arduino shocks me on USB port

I found a previous post about this here but haven’t been able to solve my own problem.

I built a Hyperion Ambilight following a guide on the MediaPortal forums found here.

The parts that I am addressing are the 5V 8A LED PSU, the WS2812B LED strip and obviously, the Arduino.

I have never worked with AC so I followed the instructions about how to wire the PSU using the guide on this page.

All went well actually. My LEDs are working, got the colors calibrated etc. Life is good!..until I started to put everything together into a case. When I touched the Arduino I got a mild shock from the USB port cover. I thought at first it was from the PSU case since I read that if the ground and neutral are mixed up that it may electrify the case but I already made this mistake before and fried the previous PSU by mixing those up. I got a multi-meter and got no reading on the PSU case. Touched the PSU case and no shock. I thought maybe it had been a static discharge which worried me more thinking I might have fried the Arduino. I went to remove the USB cable from the Arduino and I got shocked again. It’s not a large voltage, mostly just annoying but contant. The fact that it is there concerns me that something is not right and it might ruin the whole setup, particularly the Raspberry Pi since it is connected to the Arduino, if I don’t figure it out.
I have another simpler Adalight LED setup on my PC that only uses the Arduino and I checked that one and it was fine. I’m including a crude sketch of the connections to see if anyone can tell me what I may have done wrong. I know it might be a bad PSU as mentioned in the other post where someone had a similar issue but I want to make sure that might be the case before buying another only to find out that had nothing to do with the issue.
I am a complete amateur to electronics so I in this particular case I don’t know exactly what to look for aside from double checking my connections.

If you are getting a shock from [u]anywhere[/u] on the case, including a USB plug cover, you have some sort of live connection to the AC line.

This is an extremely dangerous situation, guaranteed to eventually fry your electronics, if it doesn't kill you or a family member first.

Throw that PSU into the recycling bin and use a good quality, safety inspected, [u]case grounded, three wire AC plug[/u] power supply for your project.

I already feared as much. Fortunately the only person at risk would be myself since I live alone but I left everything unplugged since it is definitely not worth the risk until I got it figured out. Many people had used that type of PSU in their builds. Already scouring the internet for something I should have bought it in the first place. Thanks jremington.

You can get [u]great bargains[/u] on power supply bricks from thrift shops.

Look for XBox power supply bricks (12V at 16 amperes, or 200 watts, plus 5V), for about $10. Also look for LCD monitor bricks -- they come in several voltages but usually several amperes current.

Also new or rebuilt: https://www.amazon.com/Original-Power-Supply-Microsoft-XBOX/dp/B000PT18OS

Now that I think about it, I think I have an old Xbox PSU lying around that I don't use. Hope I actually still have it. It would actually be able to pull double duty since I want to add a fan or two to the enclosure. Thanks for the ideas. Been shopping online for too long and have forgotten than thrift stores are a great place to get many such items.

Is it actually plugged in to a socket with earth? Only connecting an earth wire and not plugging it into a socket with earth will not work. Sounds to me like a filter cap between mains and earth which can give you a nice tinkle of you leave earth unconnected. Same for desktop PC's without earth.

Hi,

Connect the -ve of the power supply to gnd of the power supply, that way everything will be at gnd.

At the moment your low voltage circuit is floating with respect to earth/gnd.

Tom... :)

From your schematic, it appears you do not understand the concept of an Earth GND, being as your “-v” from the PSU and your arduino GND are NOT shown connected to the PSU PE (Protective Earth) GND, which , for your information , is the ONLY reason the PE exists. It has nothing to do with the operation of the electronics and were it not for the presence of humans, would not even be necessary. The purpose of the PE is to GND ALL the GNDs of anything connected to the PE to protect the user. This is also why, in the USA , the Neutral is required to be connected to PE at the POE (Point Of Entry) transformer in a building.

I thought maybe it had been a static discharge which worried me more thinking I might have fried the Arduino.

If it's real-quick and maybe you see or feel a spark, it's static discharge and once it's discharged it won't happen again until you move around and "recharge" your body.

If it's continuous it's the power line. And, you can usually feel the "vibration" in your (fingers/body, etc.) from the 50/60Hz power line frequency.

Its a known feature of a lot of SMPS's that they have enough stray capacitance to cause sensible current levels. I think its at the switching frequency, not the mains frequency, where the inter-winding stray capacitance in the transformer(s) will have most effect.

Better supplies use an earthed inter-winding screen in the transformer to stop this.

Perhaps ground the output negative terminal?

For instance if you switch 200V at 50kHz then 10pF stray capacitance will conduct about 0.6mA

raschemmel: From your schematic, it appears you do not understand the concept of an Earth GND, being as your "-v" from the PSU and your arduino GND are NOT shown connected to the PSU PE (Protective Earth) GND, which , for your information , is the ONLY reason the PE exists. It has nothing to do with the operation of the electronics and were it not for the presence of humans, would not even be necessary. The purpose of the PE is to GND ALL the GNDs of anything connected to the PE to protect the user. This is also why, in the USA , the Neutral is required to be connected to PE at the POE (Point Of Entry) transformer in a building.

I admin I am a total amateur. So, if I am understanding you right, I need to run a wire from the -V to the PE to make sure it is properly grounded?

That would be a good idea

regards

Allan.

I don’t know what the problem is but either you are not paying attention or are having trouble understanding what I said. The whole point of your post is that you were shocked. I clearly explained the purpose of the PE and instead of asking if you should connect the arduino GND to the PE (since that’s where the shock was coming from), you asked if you should connect the -V of the PSU, which has nothing whatsoever to do with the shock from the USB of the arduino.

Do I need to repeat it ?

Connect the arduino GND to the PE. (of the PSU)

Your post does not specify the nature of the source of the USB. Is it a laptop with a 2-prong power supply plug or a desktop with a 3-prong power supply cord ?

IF it is a laptop with a 2-prong power supply cord, is that 2-prong plug KEYED so it can only be plugged in one way ?

Do you understand why these questions are important ?

raschemmel:
Do I need to repeat it ?

Connect the arduino GND to the PE. (of the PSU)

Your post does not specify the nature of the source of the USB. Is it a laptop with a 2-prong power supply plug or a desktop with a 3-prong power supply cord ?

IF it is a laptop with a 2-prong power supply cord, is that 2-prong plug KEYED so it can only be plugged in one way ?

Do you understand why these questions are important ?

I will read more thoroughly and pay more attention next time. I am a stupid man. :disappointed_relieved:

I posted a link in my first post about what I am building. Hyperion Ambilight There is no laptop or desktop involved. The devices involved are a Raspberry Pi connected via USB to the Arduino UNO, PSU, USB EZCap Video Capture, HDMI to RCA Converter, HDMI Splitter and an external USB Hub. They are connected quite similar to this.

This one is pretty close except that I use the Arduino UNO attached to the Raspberry Pi to control the LEDs.

What I discovered last night while taking things apart to add the necessary wires in order to ground it properly per raschemmel is that I don’t get shocked by the Arduino alone. It’s when I touched the Arduino USB port AND the PSU case that I got shocked.

I still have to connect the Arduino GRD to the PE to see if it solves this but this is what I figured out.

Unlike the pics above the HDMI to RCA converter will not work without getting power to the USB port. It was while I was disconnecting things that I found out that if the converter had the USB cable plugged in that touching the Arduino USB port and the PSU case would shock me. If I unplugged the USB cable from the converter there was no shock at all from the touching them.

I thought I had narrowed down my problem so I switched out the cheapo USB cable it came with for a quality one, still got shocked. I unplugged the USB hub from the power adapter, still got shocked. I tried three different hubs and still got shocked. They are not cheap, no name hubs either. It comes down to is that if the HDMI converter has a USB cable plugged into it, touching the USB port of the Arduino and the PSU case results in a shock. I still have to see if the same thing occurs by simply having the USB cable plugged into the converter but not into the hub. I don’t want to plug it into the Raspberry Pi for fear that it might fry it.

I’m glad to have narrowed it down but never in a million years would I think that a little device like this would cause these issues.

If I can get it fixed fine but if not then I will get a regular brick power adapter and be done with it and/or another converter. I definitely don’t want to have an unsafe setup that could hurt someone or start a fire if it really goes haywire and shorts out in a catastrophic manner.

I’ve put in so much time getting it setup that at this point I’m just want to figure out why such a little device is causing this.

I have also attached a couple of pics of both sides of the converter. Maybe it can help.

Hi,
Your second picture did not take.

The OPs two attached images.
8e0dd8c2b530be68b4a03d502fa9447a01438139.jpg
efe5fcf69ca5e9f0de4b570a116bd76587d293b9.jpg
Tom… :slight_smile:

Do any devices obtain power from ac/dc converters not shown in your connection diagram and whst happened when you vonnected UNO GND to PE ?

When I connected the UNO GND to the PE I was still getting a shock when touching the UNO USB port and the PSU at the same time. Nothing if touched individually.

I swapped out the HDMI switch for another because it was causing display problems on a couple of devices. Interestingly enough now the HDMI to RCA converter does not need the USB cable to be plugged in in order to work properly. Still getting a shock though.

For the sake of thoroughness here is the list of devices involved that use a dc adapter.

  • External USB Hub
  • Raspberry Pi
  • HDMI Switch

The LED strip is the only device that is powered by the PSU. I can put up a pic of the wiring between the LED, UNO and PSU later tonight since it's gonna be another long day for me.

Thanks for that TomGeorge

Here is a pic of the current wiring setup with the PSU, Arduino and Raspberry Pi.

IMAG0061.jpg

Photo is a bit dark. I see live, neutral, what's the third wire?

And the fat yellow cable goes to LED's?

Pi has a separate power supply?

Pi powers the Arduino?