0

Using Raspberry Pi to test Power Supply Reliability

I recently came across a problem with a friend whose computer was having strange issues of switching off entirely at random. We contacted the power supply support channels who suggested it sounded as if the surge protection on the motherboard was faulty, which I agreed with since in all my experience so far, I’ve never had a power supply behave so inconsistently. We’d have the computer stress testing for over 48 hours straight without any problems but the next day, it’ll power off in the first few minutes.

So we came up with a little test involving a raspberry pi in order to test the reliability of the power supply. Since we didn’t have a spare power supply to use, we needed a way of proving if it was the motherboard shutting off or the power supply giving up.

We used the common method of making a connection between ports 16 and 17, as shown in the image to the right to force the power supply to turn out without being connected to a motherboard. We also connected a few peripherals such as fans, leds and hard drives to give the power supply a fair test so that it was under at least some sort of load.

So using the raspberry Pi, I wrote a simple little program to read the status of a GPIO pin which was connected to the 5V line on one of the power supplies 4-pin molex connections.

I popped a few resistors in too to split the load so that I didn’t risk damaging the Pi.

I won’t post the source code since it was quickly hacked together and a mess but here is the basic flow:

WHILE TRUE
{
	IF ( GPIO INPUT IS FALSE) //Stopped Receiving Power...
	{
		RECORD TIMESTAMP
		WHILE GPIO INPUT IS FALSE {}
		RECORD TIMESTAMP
		PRINT HOW LONG POWER CUT FOR
	}
}

Leaving it running, we’d get a lot of messages saying the power had been cut for about 3 microseconds, which I’ve put down just to noise/normal operation but there were times where it reported that there was no power for around 36000 microseconds. I’m not an expert by any means but I’m pretty sure a good, solid power supply should not be cutting out power for that period of time!

The end result is we bought a new power supply and the computer runs perfectly now 🙂 It was an interesting small Pi project none the less to help confirm a problem with the power supply which we are now returning.

Alex