element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Hit the power button (jumper) on another PC ?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 11 replies
  • Subscribers 675 subscribers
  • Views 1833 views
  • Users 0 members are here
  • raspberry_pi
Related

Hit the power button (jumper) on another PC ?

Former Member
Former Member over 12 years ago

So, I'm a bad sysadmin and I have to physically hit the power button on my servers every now and then.  The problem is my machines are in a server room that I can't always get to.

 

Sorry if this is the wrong place to post this.  image

 

 

So, I think it would be cool to have another machine on the rack that can hit the power button on one or more of the PC's on the rack.

 

My first thought is to stick a Raspberry Pi on the rack and plug the PC's pwr and rst jumper leads into a relay board like this: http://www.amazon.com/SainSmart-8-Channel-Relay-Module-Arduino/dp/B0057OC5WK/ref=sr_1_sc_1?ie=UTF8&qid=1367855066&sr=8-1-spell&keywords=8+channel+relaay+board

 

I would need a relay board, right?  Would the Raspberry Pi's output leads work on a jumper?

 

Would there be grounding issues?  I can plug the Raspberry Pi's power supply into the same outlet as my server, but it won't have a third 'ground' prong.  If there are grounding issues, would using the relay board solve them?

 

What's the simplest way to set this up?  Is there a board that has good library support or easy connectivity with the Raspberry Pi?

 

Has someone already done this or something similar?

 

Am I an idiot?

 

Thanks!  Any info is helpful!

 

 

 

An aside -- the normal solution to this would be a remotely controlled power strip.  Unfortunately, my motherboard doesn't always boot on power, despite having that attribute set in BIOS.  For example, if you do a shutdown, the motherboard won't boot the system on a power cycle.  890fxa-gd70, if anyone's interested. Wake on Lan only seems to work from 'suspended,' not shut down.  Also gonna look at an ethernet NIC WOL, but I don't expect that to work.

  • Sign in to reply
  • Cancel
  • Former Member
    Former Member over 12 years ago

    I'm part way through building my design for something that sounds very similar.  I'll be using a Pi to drive it and will have relays to switch mains power, the power button and the reset button. I'll also have detection of the power led being on, along with serial console for each attached PC.

     

    I couldn't find an off the shelf device that did all of this in one box, and being able to remotely physically push the power button, hold it down for four seconds etc. is a huge plus point and I'm surprised that there don't appear to be remote power strips that provide this sort of thing.

     

    You will want relays for the power/reset switches as you can't be sure how the motherboard implements these. You run the risk that the motherboard applies 5V to your Pi's 3.3v-only gpio pins, or takes too much current if you don't use a relay.

     

    If you get a decent network card (intel 1G pci-e ones work for me) then WOL normally works. I can physically disconnect power, reconnect it and have WOL work fine.

    Sometimes with a shutdown it'll depend on the OS and/or driver what happens, for some cards and linux distros I've had to use "ethtool -s eth0 wol g" very late in the shutdown sequence to enable MagicPacket WOL to work. Various windows drivers I've seen have an option to enable WOL that defaults to off etc. Finally, you may need bios settings to be correct for it to work.

     

    tuna salad wrote:

     

    For example, if you do a shutdown, the motherboard won't boot the system on a power cycle. 

    there's normally a bios option for that (but not always especially if it's a desktop board), it's usually called something like 'power state after power failure' and has options like 'always on', 'always off', 'previous state'.  If yours is set to always off or previous state then what you're seeing is to be expected.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    selsinork wrote:

     

    I'm part way through building my design for something that sounds very similar.  I'll be using a Pi to drive it and will have relays to switch mains power, the power button and the reset button. I'll also have detection of the power led being on, along with serial console for each attached PC.

     

    I couldn't find an off the shelf device that did all of this in one box, and being able to remotely physically push the power button, hold it down for four seconds etc. is a huge plus point and I'm surprised that there don't appear to be remote power strips that provide this sort of thing.

     

    You will want relays for the power/reset switches as you can't be sure how the motherboard implements these. You run the risk that the motherboard applies 5V to your Pi's 3.3v-only gpio pins, or takes too much current if you don't use a relay.

     

    Yes, that's the other reason to use a relay -- you don't have to worry about the motherboard's implementation.  Also, I think the relay sovles potential grounding issues.  I was thinking I'm not sure how to ground the pi with the PC -- if I power it off of the PC, it may not get juice at some PC power states.

     

    Can you point me to a collection of hardware that you think would work?  I don't know how to connect that relay board to the pi and what software interface I should use.

     

    If you get a decent network card (intel 1G pci-e ones work for me) then WOL normally works. I can physically disconnect power, reconnect it and have WOL work fine.

    Sometimes with a shutdown it'll depend on the OS and/or driver what happens, for some cards and linux distros I've had to use "ethtool -s eth0 wol g" very late in the shutdown sequence to enable MagicPacket WOL to work. Various windows drivers I've seen have an option to enable WOL that defaults to off etc. Finally, you may need bios settings to be correct for it to work.

     

    I'll be messing with this.  One problem is that I don't have any free pci slots on that machine, so I can't add an intel nic.  I haven't ruled out using the crappy onboard NIC for WOL.  I just haven't gotten it to work yet.  Another option is USB NICs.  Some support WOL.

     

     

    there's normally a bios option for that (but not always especially if it's a desktop board), it's usually called something like 'power state after power failure' and has options like 'always on', 'always off', 'previous state'.  If yours is set to always off or previous state then what you're seeing is to be expected.

     

    Yeah, that attribute only had two options, and even when it's 'on,' it doesn't always work.  I don't think there was an 'always on' option.  One time, I did a 'shutdown' and it wouldn't boot on power cycle.  One time, I updated the kernel, and it wouldn't boot on power cycle.  It's meant to be a desktop board, not a server board, so those options aren't very robust.

     

     

    In any case, a machine that remotely hits the power button would be awesome.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    tuna salad wrote:

     

    if I power it off of the PC, it may not get juice at some PC power states.

    you could power it from 5VSB - pin 9 on the ATX power connector http://en.wikipedia.org/wiki/Atx#Power_supply as this will have power as long as the PSU is connected to the mains.  However keep in mind that 5VSB likely has limited power available, check the rating on your PSU before doing this.

     

    Can you point me to a collection of hardware that you think would work?  I don't know how to connect that relay board to the pi and what software interface I should use.

    Not particularly, sorry. I'm building mine from the ground up, designing the pcb's myself.

     

    I'm using an MCP23017 I2C gpio expander and interfacing everything to that. You can connect up to eight of these to a single I2C bus meaning that I can easily expand the number of channels. The software interface is just the kernels standard GPIO interface under /sys/class/gpio, nothing special or specific to the Pi, but there's nothing that needs high speed or out of the ordinary features here.

     

       Another option is USB NICs.  Some support WOL.

    Usually a different 'usb wake' option in the bios for that.

    In any case, a machine that remotely hits the power button would be awesome.

    I remember finding a blog post some years ago where someone had a machine that kept locking up and had arranged another PC to be facing it in the computer room. Some careful alignment and something glued to the front of the CD drawer on the second system allowed him to eject the CD tray and have it press the reset button on the first PC. Quite ingenious image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    There's always this, which seems to do exactly what i want:  http://www.skpang.co.uk/blog/archives/753

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    or maybe this:  http://arduino.cc/forum/index.php/topic,24161.0.html

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    tuna salad wrote:

     

    or maybe this:  http://arduino.cc/forum/index.php/topic,24161.0.html

     

    this r2duino runs runs on 5v, so i can't power it off the raspberry pi

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    tuna salad wrote:

     

    There's always this, which seems to do exactly what i want:  http://www.skpang.co.uk/blog/archives/753

    and that's surprisingly similar to what I'm doing, 4 relays like that for mains, then 8 much smaller reed relays for each of power and reset buttons for four channels. My mcp23017 has 16 gpios compared to the 8 on their 23008, I use the remaining four to read the state of the power leds.

     

    Really don't understand what the fascination with darlington arrays is though..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    tuna salad wrote:

    this r2duino runs runs on 5v, so i can't power it off the raspberry pi

    Yes you can, it's a usb device. You just plug it into the USB port on the Pi.

     

    It's another level of abstraction though, you'd basically be using the Pi to download code to the arduino and having the arduino push the buttons. So you'd need to work out how to communicate from the Pi to the code you write for the Arduino so that you can tell it what to do.  The skpang relay board is probably easier to get started with if you don't have arduino knowledge already.

     

    Also be aware that the 'relays' on that board are solid-state, not mechanical. Nothing necessarily wrong with that, just something to consider.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    so, this looks like the absolute easiest solution: http://beaglebone.cameon.net/home/devantech-2-channel-usb-relay

     

    unfortunately, it's out of stock.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    so piface looks perfect.  i didn't know that even existed.  so i bought one from newark.  i'll let you know how that turns out.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube