This project enables a Raspberry Pi, Beaglebone, or other small computer to be powered over an Ethernet cable. This very handy if you have a Pi somewhere where getting mains power to it is difficult, or if you want to run several devices from one central UPS.
It's cheap and quite simple to put together, with just one slightly tricky bit of soldering...
Step 1: About Power over Ethernet
If you want to get straight on with building, skip this bit!
The basic principles of Power over Ethernet (PoE) are straighforward: at one end of the cable, either near the network hub or built into it, is an 'injector' which takes DC power and the network signals, and combines them onto one cable. At the far end of the cable is a 'splitter' which does the reverse, taking the cable input and producing a DC power output and a network connection.
There are two main types of PoE systems. 'Active' systems have circuitry at both ends so that the injector only turns power on when a compatible device is detected on the cable. This is the sort you'll find on commercial network switches with PoE built in. 'Passive' systems are commonly found in cheaper applications (e.g. home CCTV) - here the power is applied all the time and no detection circuitry is used.
A passive system uses spare wires in a CAT-5 network cable to supply power - a 10- or 100-Mbit Ethernet connection only needs 4 of the 8 available wires to operate, leaving 4 free for power. Gigabit Ethernet connections need all 8, so don't work with passive PoE. Fortunately just about all Gigabit devices will fall back to 100-Mbit operation if only 4 wires are connected.
This project uses a simple passive PoE arrangement. The only refinement is to use a higher DC supply voltage (12-24V) than the Pi needs, and to step it down to 5V at the Pi end. The advantages to doing this are:
Step 2: You will need...
The project uses these components:
You will also need these tools:
Step 3: Solder in the RJ45 socket
Life is never just easy, and the first problem is getting an RJ45 socket soldered into some 0.1"-pitch pad board.
One row of pins will fit fine, but the other is offset, and you need to drill out holes in the board until they go in. Also, the plastic mounting lugs will need a bigger hole. The end result isn't pretty, but if you get 4 pins in OK, the socket will be pretty solid.
Step 4: Wire up the DC-DC converter
The DC-DC converter module can now be mounted on the board. The one I bought had its input and output connections in the corners, which let me attach it using four Molex pins (see photo). Put the pins in right places in the pad board, then lower the module down over them, and soldered the top of each pin to the module. Then turn it all over and solder the bottom of each pin to the pad board.
The next stage is wiring the converter's input to the RJ45 socket. This is best done by following the photo: the back row of pins on the socket are numbers 1,3,5,7 (left to right), and the front row are 2,4,6,8. You'll need to connect both pins 4 and 5 to the converter's +V input, and 7 and 8 to the -V (or Ground) input. These are the red and black wires, respectively, in the photo.
At this stage, I would strongly recommend checking the connections are correct using a multimeter:
If all is well, apply power to the PoE injector and check that there is a corresponding voltage between the +V and -V input to the DC-DC converter. If so, check that you have +5V on the output terminals of the converter. (The module I bought had a trimmer to adjust the output voltage). Please check the converter output voltage before wiring this to the Pi, as the Pi will be damaged if it is too high.
Step 5: Wire up the Ethernet connection
Here comes the tricky bit!
Start by cutting off one end of the spare Ethernet cable, leaving about 20-25cm of the cable attached to one of the plugs. Strip off about 3cm the outer sheath, exposing the 8 cores in the cable, then strip a few mm from the end of each core.
The Ethernet connection is made by connecting pins 1, 2, 3 and 6 on the RJ45 socket to the same pins on the plug. The standard ("T568B") wire colours for these are as follows:
It is worth checking (with a multimeter) that your cable follows these before soldering the wires in, as it'll be messy to put right afterwards. Once you have picked out the four wires you need, the other four can be snipped off, as they should be left unconnected.
To attach the wires to the pins of the RJ45 socket, I found it helpful to drill out four of the holes in the pad board so the wires could be fed through from the top side. This holds them in the right place for soldering, and will provide some strain relief when assembled.
When you're done, the socket should look something like the photograph (except, hopefully, a bit neater). To hold the cable in place, I drilled a couple of small slots in the pad board, then threaded through a small cable tie.
Step 6: Connect power to the Pi
The Raspberry Pi can be most easily powered by connecting to the power pins on the GPIO header. The (original) Model A and B headers are described at http://www.raspberrypi.org/documentation/usage/gpi... , and the newer Model B+ header is shown at http://www.element14.com/community/docs/DOC-68203/...
For either model, pins 4 (+5V) and 6 (Ground) are suitable connection points. I used a simple 2-pin 0.1" socket (Multicomp 2212S-02SG-85 from http://cpc.farnell.com) wired as shown in the photo: the red wire is +5V and the green is ground. You may want to protect the connections with heat-shrink sleeving or a blob of silicone.
Step 7: Test and go!
It's a good idea to give the wiring a final check before hooking up the Pi. Using a network tester or multimeter, check that lines 1, 2, 3 and 6 are connected through the RJ45 socket to the RJ45 plug (see photo). Do not connect the network tester to the PoE injector when it is powered on, as it will fry the LEDs in the tester.
The whole system can now be assembled. The 'input' side of the PoE injector (marked 'LAN' in the photo) connects to a network hub / router. The 'output' side connects to the splitter board via a network cable (usually this will be much longer, of course). The RJ45 plug and power lead from the splitter board go to the Pi - double check the connection to the GPIO header before powering on.
If all is well the Pi will boot when you apply power to the PoE injector, and it will have a connection to your network. Success!