0

I have a problem with a PCB, powered directly by a switching power supply, which transforms 230 Vac into 5 Vdc. It has an ATmega328 (Arduino standalone) microcontroller for managing PC LED strips.

If it is not connected to the PC it works perfectly, but when I connect via USB the GND of the computer to the GND of the PCB it goes crazy.

Measuring the 5 V power supply, this voltage is seen on the oscilloscope: enter image description here

Any ideas to reduce this?

Update:

Thanks @MarkU for your comment .. I didn't know!

Returning to us, touching the female USB port with the other male USB connected to the pc, I noticed small sparks. Therefore I tried to connect the power supply output GND to the lightning rod of my house. This drastically reduce the problem, without disappearing completely.

Another strange thing is that the problem disappears completely if, keeping the internal power supply, I feed the PCB to the PC through a CP2102 Breakout used previously to program the microcontroller.

I tried to search for the CP2102 Breakout scheme to understand the reason for this behavior, but alas to no avail ..

Jakob Halskov
  • 1,542
  • 12
  • 18
Pinguto
  • 255
  • 1
  • 6
  • 1
    Related: https://electronics.stackexchange.com/questions/78920/my-scope-detects-a-50hz-signal-when-the-probe-is-not-connected-to-a-circuit-is – MarkU Jul 24 '21 at 01:55
  • 2
    It sounds like the power supply is not properly grounded, faulty and and or has a leakage problem. Check its data sheet to be sure it is galvanic isolated. Measure between it and ground, there should be zero volts, if not replace it. – Gil Jul 24 '21 at 02:41
  • @Gil Are you saying between the negative of the power supply and the grounding of the home system? – Pinguto Jul 24 '21 at 08:41

1 Answers1

1

To be safe the power lines must be isolated from human contact. All of my bench equipment is grounded with the third pin on the line cord, you scope should be as well assuming it is plugged into the mains. This holds for almost all line powered systems as well. There is an exception, where the items are double insulated, like some power tools and wall warts. When you got sparks the energy had co come from somewhere, probably the power lines. This could be coupled via capacatance, I cannot see your setup. Does that power supply have a ground connection and is it connected, if not that could explain what you are seeing. I am basing that on your scope photo. The signal is approximately power line voltage and frequency. Try this link on Galvanic isolation from Wikipedia: https://en.wikipedia.org/wiki/Galvanic_isolation This will hopefully explain a lot better than I can in the allocated space here. Follow the links as well.

Gil
  • 4,951
  • 2
  • 12
  • 14
  • You were right! The voltage between the GND of the PCB and the isolation of the USB ports of the PC was almost one volt, so as I replaced the power supply the problem was solved! :) – Pinguto Jul 25 '21 at 15:51