Category Archives: Projects

PC power switch over Internet via Arduino

I made this to use with the Custom Server I built. The problem is that I don’t need to use it 24/7 so I wanted to find a way to remotely turn it off/on. The most obvious way to do this is via Wake-on-Lan. This is supported by the motherboard and works fine if I’m on the same network, but seems impossible to do across the internet. I can’t find a way to get the WOL packet past my router intact.

So I decided to use an Arduino Uno board with an Ethernet Shield. Arduino is a low cost microprocessor that is programmed using a language similar to C, and is often used for education and small projects. The Ethernet Shield is an add on board that allows the Arduino to become an internet enabled device. I bought the shield on eBay.

The code behind this is a modified version of the example available from:
Pin Control Over the Internet –
My Code

Using that example I changed it so that one pin went HIGH when the page was loaded. How is this useful at all to power on a pc? Well, when you press the power switch on a computer case what you are actually doing is shorting two pins on the motherboard supplying a pulse to the PWRSW+ pin. Putting a transistor between the pins and using the signal from the Arduino to activate it, an electronic switch can be made.

Thus the pc can be switched on demand from anywhere with an internet connection. As an extension I wanted¬† a way to see if the computer was already on before trying to start it. Conveniently the motherboard output for the PWR LED is ~5V when the computer is on. It’s as simple as reading this voltage into the Arduino’s ADC and writing an IF statement dependant on the input level.

NPN Transistor used as a switch

NPN Transistor used as a switch

LED Circuit Diagram

The power LED circuit

So I now have a way to remotely¬† power my server that is software independent of the server itself, useful if it’s blue screened or frozen. The Arduino is powered from a USB port so it’s a pretty tidy system.

Computer ON


White wires from the power switch pins, blue and purple from the power LED pins

The output on the control page.

The output on the control page.

Share Button

Leave a Comment

Filed under Projects

Custom Server

Beginning sometime in summer 2012 I decided I was going to build a compact computer to be a server for a variety of applications. I currently use it as a remote uTorrent client, file storage, secure FTP server as well as the occasional Minecraft or UT2004 server. I built the case out of plywood as opposed to using a normal computer case because I wanted it to be as small and unobtrusive as possible, plus it gave me something to do.

First up are the specs, I had a huge amount of trouble trying to get all the parts to work together and after a lot of buying and swapping components I eventually deduced that whilst it was powered by the originally intended PSU the TV card refused to show up in the device manager at all. After returning that and testing the whole thing on my desk (where the site banner picture came from) I could set about building the case.

Part Testing

  • 2.8 GHz Intel Pentium 4
  • 2 x 512MB DDR2 RAM
  • ASRock G31M-VS2 (Micro-ATX)
  • ATI Radeon 5400 Series GPU
  • 2TB SATA Drive
  • Hauppauge TV Card
  • Multi Card Reader
  • Laptop DVD Drive
  • HTPC Power Supply (350W)

The first step was salvaging the motherboard back plate from an old pc case, because of the convenient standard mounting holes and it provides a ground source. Here you can see it bolted on to the base and with the side mounts, motherboard mounts and feet in place.

Bare Board

Case Base
After that I cut out the front section and made two holes for air intakes. The dust covers were bought from eBay.



Here’s a shot of the motherboard attached to the backplate, it gives you an idea of how much space I was working with.


Newly attached side sections.

Empty Case

Motherboard sat in the case with the GPU and TV card installed.

Case w/ Mobo

The power supply, hard disk, card reader and DVD drive sit on some shaped aluminium strip. Also in these pictures you can see the profile for the DVD drive and card reader has been cut out the front.

Case with supports

Case front

Ideally the PSU case, hard drive and motherboard back plate are all a common grounding point, so these are wired together.

Ground wires

The power switch and LED extended with some tape and zip ties.

Motherboard inputs

Card reader and DVD drive sat on their strip.

IO Mounted

All the components snugly inside at last.

Components in

Birds eye view.

Top view

A close up look at the clearance between the motherboard and other components. Hopefully by placing the PSU above the processor heat-sink some of the heat is extracted quicker.


A shot of the extension cards whilst I was trying to figure out how to cut the back profile.

Extension cards

A shot of the front with the card reader and DVD drive in place.

Case front

A shot of the back after a supporting brace was added in order to affix the PSU. The HDD is screwed directly to the aluminium strip it’s sat on along with the card reader. The DVD drive proved difficult to mount as they’re designed to slot in a laptop and give you no attachment points. Eventually I just glue gunned it to the strip.

Components in

The rear profile cut & drilled.

Case Rear

The top extract fan before I realized there was so little space that it was going to have to be mounted on the outside.

Case top


Case top

The top and rear attached together just before it was screwed into the hinges (on the freezer workbench).

Case top & rear

The case rear affixed.

Case Rear
This is what the remote access looks like, 256-AES provided free by The shut-down timer is started on boot so I can’t accidentally leave it on for days.

Remote access
And it’s final resting spot in the upstairs office. All that it needs to function is a kettle lead for the PSU and two ethernet cables (one for the Arduino board). This took several months of slowly working on it every now and then but it was fun to do and now has a useful function. I’m going to talk about the gubbins on top in a separate post as it’s more Arduino related. Thanks for reading!

Server Final

Update 23/01/2014: LogMeIn have unfortunately decided to bump their remote access service from free to $49 a year. Whilst their product is by far the most convenient there is no way I can justify paying that much for personal hobby usage. I’ve now changed the configuration to Teamviewer.

Share Button

Leave a Comment

Filed under Projects