Raspberry Pi Power Strip

Who needs a case for their Raspberry Pi when everyone already has a perfectly good surge protector? A surge protector/power strip is something that never gets in the way, is often tucked away somewhere with no attention paid to it, already has RJ-45 and power input – it’s perfect!

This project actually draws its inspiration from the Power Pwn, an awesome device from Pwnie Express. The only problem with the Power Pwn (for us, at least) is its prohibitive price tag. So while very cool, and loaded with some pretty nifty hardware and software, AJ and I set out to build our own.

The hardware required for the build:

  • Raspberry Pi
  • Low-profile microSD card adapter (or solder your own)
  • USB to TTL Serial Cable (or easily make your own using commonly available parts)
  • A surge protector with RJ-45 protection (we used this one, although we were able to catch it on sale for $15)
  • Slim 5V AC adapter (we used the 850mA Nook adapter, although any small adapter will work)
  • Multimeter
  • Soldering iron
  • Misc. common tools (screwdrivers, etc.)
  • Electrical tape
  • CAT5/6 cable

Before we begin, I would like to give a few words of caution. First of all, you are dealing with an exposed 120V AC – if you do not feel comfortable with that please do not attempt this! Second, make sure everything near the Raspberry Pi is well insulated before even thinking of powering on the surge protector. Finally, as always, I am not responsible for any injury, death, or damage to either you, your hardware, or your property. Again, please exercise great caution and think before you do anything!

Please see the pictures of the build on Picasa.

Now we can begin.

1. Unplug the surge protector, and open it up (there should be screws on the bottom).

Your surge protector should look something like that.

2. Begin by removing the actual surge protection board.Simply cut the wires that are soldered onto the board and unscrew the once screw holding it in place – it should come right out. (A follow-up guide will include how to implement the power button back in place.) If you would like, you can also de-solder or cut the ground wires on the  RJ-45, RJ-11 and coax protection boards.

3. Rather than having a very suspicious AC adapter and its cable on the outside of the adapter leading in, we decided to place it inside. So crack open your AC adapter’s case and wind the innards in electrical tape – insulating it from the 120V rails it will sit right next to.

4. Solder the positive and negative leads/wires on it to either the corresponding rails, or the corresponding power inputs. White/red is positive, and goes to white; black is negative and goes to black. It is unlikely that there is a third wire, but that would be the ground in this case (usually green – solder that to its matching color.)

We chose to solder directly to the wires leading to the rails, although either would work (the factory solders its wires to the rails).

A closer look at how we soldered the AC adapter to the 120V lines. The black cable leading out into the center is the 5V USB power cable from the adapter itself – we’ll get to that a bit later.

5. Seal these joints with an excessive amount of electrical tape as shown in the other album pictures. Make especially sure the bottom of each joint is fully insulated with electrical tape.

6. Now to actually power the Pi using the AC adapter. Using this diagram as a reference, and the fact that the Pi can be powered using its GPIO pins, we were able to easily construct our own cable (many of you may recognize that it came from the startup button for a computer). Alternatively, you can use the $10 USB to TTL Serial cable, or simply solder onto the GPIO pins directly via the back of the Pi.

7. Simply wire the pinout using the GPIO diagram as a reference. (5V positive to positive, negative to ground). When you’re finished, plug in your newly made USB to GPIO power cable on to the Pi’s GPIO pins!

8. I cannot stress extreme caution enough. This step is absolutely the most dangerous, and although trivial, one small lapse in judgement could deliver a pretty nasty shock to either you, your pet, or your Pi. Plug in the power strip, making very sure you are not touching anything inside strip. Your Pi should now successfully power on!

The Pi is now on as indicated by the red LED. To all those wondering how the Pi is reliably held in place; it’s quite a snug fit and the power cable acts as a seat belt. Please also note that although I am, I advise you to not even touch the device at this stage.

9. It’s great that the Pi is up and running, but what’s the Pi to do without network connectivity? This is why an RJ-45 surge protector is required/highly recommended; the idea is to be able to plug in a straight-through Ethernet cable into the on-board RJ-45 protector, and have the Pi obtain network access that way.

10. Start heating up your soldering iron again, and optionally take out your multimeter. To make sure of the pinout set your multimeter to measure resistance, and probe a RJ-45 pin with each pinout on the board. Ours was quite simple – each pin corresponded quite logically.

Pin 1 (1st pin from the left, top row) corresponds to the orange/white wire, Pin 2 (1st pin from the left, bottom row) corresponds to the solid orange wire, etc. Simply solder your regular straight-through pinout (we only used 4 because that is all that is required for data transmission).

11. We chose to make a slight modification to the actual RJ-45 connector so that it bends slightly better, but that is not all necessary and you can continue without doing so.

Our slight modification to the connector.

This is how it should look after the steps above are completed.

12. After Step 11, we’re pretty much complete. Simply insert the low-profile microSD adapter, close up the Pi Strip (and re-add any components you de-soldered), and plug it in! You can optionally strip shielding of the main power cable if you think it is too thick, but that is not necessary.

The completed Pi Strip!

There should be a follow-up guide regarding getting the power button to function, as well as implementing a few LEDs quite soon.

If you have any tips on what we could have done better and/or suggestions for additions/features we’d love to hear it in the comments!

23 thoughts on “Raspberry Pi Power Strip

  1. Pingback: Malicious Raspberry Pi power strip looks a bit scary - Hack a Day

  2. There are two things that would be neat to see added. First wifi. easy enough with usb and the pi.

    Second that would set you a step above the pwn plug would be to integrate ethernet over AC. If you could fit a module in there as well and pump out data through the AC lines I think that would add another interesting aspect for pentesting.

    • Hmm, that’s interesting. We would probably require a new (bigger) surge protector for that – I assume you’re talking about powerline networking? And yes, WiFi is next; this is just a starting point/proof of concept.

      We also plan on creating a “media center edition” with a few more I/O ports exposed (for HDMI, external HDD, etc.).

  3. Pingback: Indagadores |Seguridad informatica |Seguridad en internet » Raspberry Pi malicioso regleta parece un poco de miedo

  4. Pingback: Malicious Raspberry Pi power strip looks a bit scary | Cool Internet Projects

  5. Pingback: Raspberry Pi in a power strip #piday #raspberrypi @Raspberry_Pi « adafruit industries blog

  6. Pingback: ใช้รางปลั๊กไฟแบบมีช่องเสียบ LAN มาทำเป็นกล่องให้ Raspberry Pi แถมสอดส่อง LAN ได้ด้วย | Raspberry Pi Thailand

  7. Pingback: Pure Decking 0090 Show Notes |

  8. Pingback: Turn a Raspberry Pi Into a Super-Cheap Power Strip Packet Sniffer

  9. You guys didn’t run in to the problem of all the network traffic going over the USB 2.0 bus (throughput? What’s that?), or the kernel bugs of the upstream link being lost under large network loads?

    • Everything seems pretty stable on our Pi so far. Fortunately, with the latest revision of the Pi the issue has definitely been fixed, and the Pi has been upgraded to 512MB – not to mention the inclusion of mounting holes! As such, we plan on following up with a more refined version of this project when we can get our hands on the latest model.

  10. Pingback: Turn a Raspberry Pi Into a Super Cheap, Packet-Sniffing Power Strip | JRV Technology

  11. What am I missing? You can’t just tap into a network like that, without a switch. It is the equivalent of a cat5 Y-cable [they don't make those (well, not exactly)]. Devices plugged into the cat5 port of the surge protector would not operate correctly when the Pi was powered on. It’d be fine if you had cat5 running into the surge protector but not out, but then that’s not exactly inconspicuous, and I doubt there’s room for the guts of a small switch inside there. Is there any way to add a second ethernet port to the Pi?

    • You’re totally right – the connection is only one-way. Our thoughts on the limitation was that surge protectors are usually tucked away somewhere where there are already a lot of cables strewn about, and that, in our experience, no one really uses RJ-45 surge protection anyway. If need be, a second NIC (USB to Ethernet) NIC could possibly be added, but the main constraint is room. When the latest Raspberry Pi is released (it solves the issue over not having enough USB current, has mounting holes, 512MB of RAM), we plan on creating an updated guide with a roomier surge protector, and possibly including a built-in USB hub for extra devices (flash drive, USB NIC, etc.) For now, if extreme physical stealth is required, I would stick with a mini WiFi adapter like this one: https://www.adafruit.com/products/814

  12. Pingback: Turn a Raspberry Pi Into a Super Cheap, Packet-Sniffing Power Strip [DIY] « The Far Edge

  13. Pingback: RasPi power strip sniffing around

  14. Pingback: Turn a Raspberry Pi Into a Super Cheap, Packet Sniffing Power Strip | 45-adapter

  15. Pingback: Turn a Raspberry Pi Into a Super-Cheap Power Strip Packet Sniffer | surge-protector

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>