Monday, February 13, 2012

Power over Ethernet with Arduino

If you have a Ethernet-attached Voice over Internet Protocol (VoIP) telephone on your desk, as so many of us do, than you already may be using Power over Ethernet (PoE). PoE is a standard (IEEE 802.3af) way to power Ethernet-connected devices over the CAT5 Ethernet cable itself. I routinely encountered PoE VoIP phones back in my telephony days, but it's also found in all sorts of devices, like wireless access points and security cameras, anywhere it's a hassle to run an Ethernet cable and a power cable.

(Important safety tip: PoE provides serious voltage, 48 volts DC, compatible with a lot of legacy telephone equipment. It's enough to make you sit up and take notice if you get careless with it.)

So since I'm on a roll regarding alternative methods to power Arduino microcontroller boards, it probably comes as no surprise that I wanted to see if I could power one just with an Ethernet cable for my Amigo project. Arduino is so popular that an entire ecosystem has sprung up making Arduino-compatible parts and accessories, and also Arduino-clone microcontroller boards. One of these is the Freetronics EtherTen, which combines a Arduino Uno-clone with an Ethernet Shield-compatible Ethernet port, all on one board. When my EtherTen arrived in an envelope covered in international shipping labels from this Australia-based company, the very first thing I did was hook it up and download my little web server application. It worked the first time with absolutely no changes. The EtherTen just looks like a standard Arduino Uno with a standard Ethernet shield. The only difference was the board uses a mini-B USB connector instead of the Uno's relatively gigantic B connector; the EtherTen comes with the appropriate USB cable just so this detail doesn't slow you down. For you doubters, here's a screen snapshot taken from my application running on the EtherTen (without any actual sensors, so the readings are bogus).

Screen shot 2012-02-13 at 9.56.00 AM

But the integrated Ethernet isn't the only thing that attracted me to the EtherTen. Freetronics offers an optional PoE module that can be attached to the EtherTen to draw power for the board from any PoE-compatible Ethernet connection. Some assembly is required, but recent experience has made this software guy pretty fearless with a soldering iron. Here's a photo of the EtherTen with the PoE module on top. Yes, those are LEDs you see lit, and that is only a CAT5 Ethernet cable attached to the board. The screen snapshot above was actually taken from this configuration.

Freetronics EtherTen with PoE

For large sites that have lots of PoE devices, like a VoIP phone on every desk, the wired network infrastructure will have been built out with Ethernet switches that natively provide PoE, what are known as Power Sourcing Equipment (PSE). For my tiny little lab, I just purchased a TRENDnet PoE injector. A PoE injector takes a regular CAT5 Ethernet cable and mains (wall) power as input and outputs PoE over a second CAT5 cable. (There are also PoE splitters which take a PoE CAT5 as input and output a CAT5 without power and a separate power cable.) Here's a photo of the EtherTen hooked up to the injector. You can see the unpowered CAT5 and power cord coming into the injector on the right and the powered CAT5 exiting on the left connected to the EtherTen.


So why Power over Ethernet for Arduino? Because doing so allows a network-attached microcontroller, perhaps with a Zigbee radio or other useful shield, to be deployed to remote locations using just a CAT5 Ethernet cable. If the radio has a Zigbee Coordinator (ZC) or Zigbee Router (ZR) personality, than the remote yet effectively mains-powered microcontroller can provide management and routing for the mesh network and provide bridging between battery-powered Zigbee End Devices (ZEDs) and applications running elsewhere on the network.

This is all ridiculously inexpensive to play with. We're in an era of ubiquitous computing and network connectivity. Why not be a part of it?

No comments: