I purchased a 5 volt power supply off Amazon. It runs from 120 VAC and produces DC power. It's a switch mode power supply. If I put a multimeter on the output it always shows approximately 5.0 VDC.
I ran into extreme difficultly in using this power supply for any sort of actual project. The output is extremely noisy.
I connected some small capacitors with a value of 10 pF and 10000 pF to the output of the power supply. I would think the power supply would have small capacitors of this type in any case, but apparently not. These eliminate lots of HF noise that is coming out of the power supply. Unfortunately this noise is not really the issue.
Here is what the power supply looks like on my oscilloscope with no load.
Adjusting the time scale and voltage scale I saw this
The channel in blue is the output of the power supply. The channel in yellow is the output of a filter network I built. I used the low voltage side of a mains transformer and a large electrolytic capacitor. Here are pictures of those, although I doubt it matters at all. The inductor is wired in series with my load(if any), and the capacitor is parallel with the power supply.
I decided to test just the power supply with a resistive load. I selected a 10 ohm resistor. This should provide a load of approximately 500 milliamperes.
The filter network deals with some of the oscillations, but there is still an almost 1 volt spike on the output of the filter network. I tried moving the capacitor around, but it makes little difference. In fact, even with the capacitor disconnected the output does not change much.
Here is a small transformer removed from a switching power supply. I connected the 5 volts in series with the primary of this transformer.
And the view from my oscilloscope:
It seems that almost any inductor filters out the oscillation with the period of approximately 3.5 microseconds. But that huge spike the precedes the oscillation remains. In this case the power supply jumps around by over 2 volts. 2 volts on a power supply meant for 5 volts is 40%.
The interesting thing about this is the capacitor seems to make no difference. It is old, but I've tried several and gotten the same result. They all have some capacitance, although it may be slightly diminished over time.
Given the fact the voltage still swings all over the place with the capacitor, my only theory is that the circuit inside the power supply is actually shorting its own output. If the regulator on the output of the power supply just turned off, the voltage would just taper downwards because the capacitor would slowly discharge. It's almost as if the power supply is internally shorting for a brief period of time, then the regulator goes a little nuts and "rings" as it tries to find 5 volts again.
Why is the regulation of my 5 volt power supply so poor and how to address it?
Although I cannot imagine it would help, here is a picture of the power supply with its case off
I performed an additional test with the mains transformer as a filter wired in series with 4 resistors. One of the resistors was the 10 ohm resistor, the other three were 6 ohm. This should give a resistance of 1.66 ohms for approximately 3.125 amps of current. This does not change anything significantly in the observed output. I reversed my probes in this test, so the colors in this screenshot are reversed as well.
Here is a closeup shot of the "spike" as I called it.
I also tried connecting a 1 microfarad capacitor across the power supply while it was driving the 10 ohm load. Here is what that looked like