I am building a light I can control from the command line across WiFi. I've got a Raspberry Pi Zero, a tiny little WiFi dongle from ModMyPi and a relay with VCC, Ground and IN pins. I also bought one of these AC240V to DC5V step down buck converters because I would like to put the whole lot in a box and power it all from the mains.
I thought this would be fine, but when I put all the modules together and get it working the Pi intermittently just turns off and won't show any signs of life until I unplug and reboot the device again.
The problem must be with the power supply - is it too simple/cheap a device? When I measure the voltage across the Pi it varies wildly when the Pi is working, whereas a normal USB charger maintains a steady voltage. Am I missing something? Is there some kind of module I can buy which produces the same quality of 5V DC as a USB charger? Or something (like a capacitor??) I can add to the circuit to ensure a steady voltage?