Wake On LAN

I needed a solution to remotely turn on a computer. There are many hardware devices you can buy, but I thought Wake on LAN (WOL) would be the ideal solution and give me a chance to experiment with Microchips ENC28J60 Ethernet controller chip. WOL is a computer networking standard that allows a shut-down computer to be booted remotely. I have written WOL programs in software, but I needed a hardware device that could be wired to a control panel. The ENC28J60 chip is a stand-alone Ethernet controller. The chip is controlled by an SPI interface which is common to most of the Atmel AVR ATMega chips. After reading the ENC28J60 datasheet, I was a little apprehensive, but then I found Ben’s Hobby Corner. Ben has done a great job of creating Bascom basic code to control the ENC28J60 based on a hardware solution from Tux Graphics. The circuit is very simple with very few components required. Here is a 3D render of my design which is loosely based on the Tux solution.

WOL Rendering

I highly recommend using MagJacks to interface the chip with your network. The built-in magnetics greatly simplifies the circuit. The pinout of the MagJack does not work well with a breadboard, so I decided to build an adapter to facilitate prototyping. Here is a render of my adapter.

Magjack Adapter

The adapter also incorporates the 6 resistors, 2 capacitors and the choke required by the MagJack. This frees up a substantial amount of real estate on the breadboard. Here is the schematic.

Magjack Schematics

Here is the Cadsoft Eagle drawing of the 1-3/8″ square board. One bridge was necessary to keep the design as small as possible. Please note that the pinout of MagJacks are not consistent. My adapter was only designed for the Bel Stewart SI-50170 which I chose because of availability and cost.

Magjack Board Drawing

I get frequent emails requesting more information on how I etch boards. Here are my etching notes and this is a great website that further details the process. I’ve also decided to add a few extra photos of the process. Here is the copper clad board after I transferred the design with an iron from photo paper that I printed with a laser printer. The trick to a good transfer is to have clean copper and to use extra wide nets.

Magjack Traces

Here is the board sitting in an acid solution. You can see the copper not covered by toner dissolving.

Magjack in Acid

The finished adapter. The graphics are transferred with the same iron/photo paper technique. I drill holes with a wire gauge bit and a small drill press. People say carbide is better, but the steel bits work fine for me.

Magjack Adapter

The adapter on the breadboard.

Magjack on Breadboard

Now that I have a working prototype it is time to build the actual WOL circuit. Here is the board layout. I opted to keep the design small at 2-3/16 x 3 inches. The circuit is single sided but does require 5 bridges.

WOL Board Drawing

The WOL board after coming out of the acid. Again the wide nets improve toner transfer.

WOL Traces

The finished board. Instead of a linear 78xx voltage regulator, I am using the Dimension Engineering 3.3V 1A Switching voltage regulator. It is more expensive, but it is very efficient and heat was a concern for my application. It produces almost no heat compared to a linear regulator which runs very hot powering the ENC28J60. The 3 pin header at the bottom left is for an illuminated pushbutton switch which triggers the WOL packet. I added some code to generate a subtle pulse on the button’s red LED.

WOL Board

I mounted the board in a metal case. I used a hand nibbler to cut a rectangular hole for the RJ45 jack. I drilled holes for the power, switch and LED jacks. A slip of the drill caused serious damage to my switching voltage regulator. My repair work includes a large cap soldered to the back replacing an SMD version and 3 solder drops at the base.

WOL in Case


WOL & MagJack Eagle files.
WOL source code v.1.01 – Released 11/28/2007 – For ATMEGA8 (default fuses should be OK)
ENC28J60.INC (required to compile source code)

Parts List:
Microchip ENC28J60 Ethernet Controller Chip1
Atmel ATMEGA81
25 MHz Crystal1
Resistor Carbon Film 10k Ohm 1/4 Watt 5%2
Resistor Carbon Film 2K Ohm 1/4 Watt 1%2
Resistor Carbon Film 270 Ohm 1/4 Watt 5%4
Resistor Carbon Film 50 Ohm 1/4 Watt 1%4
Ceramic Radial Capacitor 18pF 50V 5%2
Ceramic Radial Capacitor 10nF 50V 10%3
Polarized Radial Capacitor 10μF 16V 20%2
4.7μH Axial Choke1
2 x 1 Pin Straight Header .100"1
3 x 1 Pin Straight Header .100"1
5 x 2 Pin Straight Header .100"1
Shunt .100"1
3.3V Voltage Regulator (or DE-SW033 Switching Regulator)1
Bel Stewart SI-50170 MagJack1
28 Pin Narrow IC Socket2
Illuminated LED Push Button Switch1
Single-sided Copper Clad Board 1 oz. 2-3/16" 3"1