Pi Power (Remote Power Management with Pi)

“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……

http://www.instructables.com/id/PiWork-Serial-Console-Server/

.

NOTE: Faster-than-light (also superluminal or FTL)Pi Power (Remote Power Management with Pi)

Step 1: PARTS:

F/F Jumper Wires

http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=F%2FF%20jumper%20wires

http://www.amazon.com/40pcs-Female-2-54mm-Jumper-2x40pcs/dp/B00GSE2S7U/ref=sr_1_2?ie=UTF8&qid=1419042157&sr=8-2&keywords=F%2FF+jumper+wires&pebp=1419042163584

.

(Optional)

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).

http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=Angry%20Birds%20Starwars%20stickers

.

(Alternatives)

Header to USB

http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Daps&field-keywords=header%20to%20USB

.

USB Battery Pack

http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Daps&field-keywords=USB+Battery+Pack

.

USB Power Adapter

http://www.amazon.com/s/ref=nb_sb_ss_c_0_12?url=search-alias%3Daps&field-keywords=usb+power+adapter&sprefix=usb+power+ad%2Caps%2C132&rh=i%3Aaps%2Ck%3Ausb+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”!

http://en.wikipedia.org/wiki/ATX

http://lifehacker.com/5828747/how-to-build-a-computer-from-scratch-the-complete-guide

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…..

(MY SETUP)

#MAIN BOARD
POWER BUTTON@Gray/White

Pi @Blue(Pin24)/RED(Pin23)

#Pi Pinout
http://elinux.org/File:GPIOs.png

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…….

.

(MY SETUP)
#MAIN BOARD

POWER BUTTON@Gray/White

Pi @Blue(Pin24)/RED(Pin23)

#Pi Pinout

http://elinux.org/File:GPIOs.pngPi Power (Remote Power Management with Pi) schematic

Step 6: THE EASY WAY: Get “GPIO”

(ACCESS YOUR PI REMOTELY)

#GET GPIO
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

#TEST IT

gpio

gpio readall

NOTE: I am using “ARCHLinux” on my Pi; again, see my post about the setup…..

http://www.instructables.com/id/PiWork-Serial-Console-Server/

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)


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top