“Pi Power”!!! Remote Power Management with a Raspberry Pi……
“Not so long ago in a galaxy far, far away… our hero needed access to data near a distant star in the far off reaches of space” ….no need for “FTL” travel as I was actually in my living room on my laptop and was too lazy to go back and turn on my PC to get the files I wanted….. I was thinking, “wish I had some kind of remote power management on my PC like those State of The Art servers in the Data Center I maintain”…… Plus, those “Legacy” servers in the Data Center without power management are a pain and could use an upgrade…. Let’s see if we can do something about that?
As you soon will see, with a Pi and a few tweaks we shall have what we seek… Yes, kiddies this could be the “Wuxi Finger Hold” of all Pi2PC modifications so, follow along closely. (It’s an ingenious PC hack that anyone can do)
NOTE: Follow another post I made to build a Pi worthy of this challenge… after that you will need two things, “literally”: (2) F/F Jumper Wires……
NOTE: Faster-than-light (also superluminal or FTL)
Step 1: PARTS:
F/F Jumper Wires
STICKERS: Angry Birds StarWars
As you know “It’s dangerous to go Solo so, take a Wookiee with you”… you’d think one of the kids put their sticker on my Pi (but nah, it was me).
Header to USB
USB Battery Pack
USB Power Adapter
Step 2: DISCLAIMER: (Besafe you we working with electricity and static sensitive components)
[Only tested on] An ATX compatible PC/ITX Motherboard and (ATX)POWER supply….. “your mileage may vary”!
Again, be safe as “Electricity” can KILL or at the least ruin your day.
Step 3: STEP #1
Take apart your Pi and add the wires…..
Step 4: STEP #2
Take apart your PC and add the wires from the PI….
Step 5: STEP #3
NOTICE: We are replacing the wires for the the ATX power buttons located some where on the outside of the case.
That’s it! Now let’s do the software setup…….
Step 6: THE EASY WAY: Get “GPIO”
(ACCESS YOUR PI REMOTELY)
echo y | pacman -Sy python #Thinking about doing a python script but as it turns out we do not need it
pkgfile -s gpio
echo y | pacman -Sy alarm/wiringpi
NOTE: I am using “ARCHLinux” on my Pi; again, see my post about the setup…..
Step 7: THE HARD WAY 🙁
[[ TOGGLE PIN 23 ]]
echo 23 > /sys/class/gpio/export #Create a GPIO file access
echo out > /sys/class/gpio/gpio23/direction #Configure the Pin Direction (In/Out)
echo 1 > /sys/class/gpio/gpio23/value #Write a value
echo 0 > /sys/class/gpio/gpio23/value #Write a value
echo 23 > /sys/class/gpio/unexport #Delete the created GPIO (11)
For more detail: Pi Power (Remote Power Management with Pi)