Pages

Tuesday, 29 January 2013

Pi power again

Today I was going to wire up the relay box so that the Pies could be automatically rebooted if they crashed. Fortuitously, the LM2596 power step down modules arrived today, and they're beautiful! So I used two of those.

They're £3 each, which is really cheap, and they not only step down any voltage (in my case, 12 volts from a PC power supply) to any voltage (you adjust it using the little brass screw, I'm using 5.3 volts); they also have an onboard voltmeter that tells you the input or the output voltage, and they have screw terminals to make connecting them up easy. I'm using two of them now, each one connected to a four-way USB hub, with up to four Pies on the hub. Power from the hub goes via the relay box (I cut the red wire on each of the cables that power the Pies, and connected the ends to the terminals of the relay box), which is set to "Normally Closed", so that when the box is first powered up, all the Pies will be given power.

And the power will be very high quality - I have a UPS that's giving the PC power supply a steady feed, the PC power supply does a lot of smoothing and regulating to give the 12 volts to the LM2596, and the LM2596 is also regulating the output. The onboard voltmeter says 5.3 volts, and I put a multimeter on it, and it really is exactly what it says. Unlike the power supplies that you just plug into the wall.

To connect the LM2596 to the power supply, I needed a Molex connector with two wires on the 12 volt line and neutral. Rather than solder this up, I dived into my box-o-bits and came up with a couple of 8cm fans which had died. I'm a bit of a never-throw-anything-away-that-might-one-day-be-useful fan. I cut the cable off the dead fans, threw away the fans (!) and there's my cable, ready-made.

The relay box is connected via a serial port to a "watchdog" tower computer, and on that tower I've written a graphical user interface for switching the Pies off or on, and a progam to check the Pies once per minute, and if one of them isn't responding, to cycle the power to that one.

So when a Pi crashes in future, it'll be rebooted without me having to do anything, and I'll get an email from the watchdog to tell me it happened.

Also, an HDMI-to-VGA cable arrived today, and it works fine between a Pi and an ancient CRT (cathode ray tube, they're big and heavy, totally obsolete, but I have a few and am I supposed to throw away a working monitor?). I have the Pi set for 720p, which I think equates to about 1280 by 960 pixels, which is all I'd expect from that monitor.

Tomorrow I'm planning to do the second part of the Gypsum Gyratory - 50 caches in about 11 miles with lots and lots of contour lines to cross, and plenty of mud around. I'll be knackered by the time I finish!

No comments:

Post a comment