- Remove all of the screws on the battery backup unit and set them aside.
- Remove all unnecessary components, like the old circuit board and batteries.
- Save the usable parts, like the various lengths of wire, power cord, LEDs, RJ45 jacks, switches, and the enclosure with outlets intact.
- Remove the plastic housing on the network switch to save space.
- Also, remove the plastic on the power adapters.
2Mains Power Wiring
Next, we're going to start extending wires and mapping out where we want things to go. I like to add plenty of wire ahead of time and trim to fit as I go.
- Extend the wires coming from the power cord and solder the white and green to the proper sides on one set of bus bars of the outlets. The black needs to be soldered on, too, but we'll come back to it.
- Add jumper wires between the two sets of outlet bars (all three bars). Most BBUs come with a surge only side and a battery + surge side. We will be joining both sides to create a simple power strip.
- Solder separate wires to the hot and neutral rails to attach the Raspberry Pi and network switch adapters later. This can be two hot and two neutral wires or just one of each to daisy chain the adapters.
- Now for that black wire of the power cord. I saved the large breaker button when tearing down the BBU. If you still have it or maybe a 10A or 15A fuse, solder one terminal to the black wire on the power cord and the other terminal to an extension wire. That extension wire gets soldered to the hot bus bar on the outlet you soldered the neutral (white) and ground (green) wires to.
3Low Voltage Wiring
Now we're going to wire up the power adapters for the switch and Pi. I used two separate identical adapters, because 2A is just enough for the Pi's recommended input current and the second one would have some current to spare with the 800mA the switch would pull.
- First solder the hot and neutral wires you added to the bus bars in the last step to the adapters' mains in (side where the big metal blades were connected).
- Now cover the connections in hot glue to keep them from wiggling around or shorting on something else later.
- Find a good spot in your enclosure to glue or screw them to, and, if yours is like mine, make sure to leave room to plug in your USB cable.
- Repeat the steps for the second adapter. You can also daisy chain them in parallel, if you only soldered one set of wires onto the bus bars.
Here are the loose cables I made for plugging in power and network. You don't necessarily have to have plugs and jacks on everything. I chose to make things easily removed, rather than solder everything directly. (This step can be done later.)
- Cut one of the ethernet cables in half and set it aside. These will be for our jacks on the outside of the BBU.
- For the second ethernet cable, I cut it to just the right length to go from the switch to the location of the Pi and crimped a new male end on. If your cable is already short, or you've got room for the slack, you can skip this.
- Cut and splice the power cable for the switch to the length needed.
- Cut and splice the USB cable for the Pi to the length needed, or use a really short one.
5Wiring the Network Jacks
These are the network (RJ45) jacks that will replace the old phone (RJ11) jacks. I pulled them out of another BBU's surge protection circuit. You can use punch down jacks, but the stranded wire from the patch cables make a better connection when soldered.
- Remove the RJ45 jacks from the old circuit protection, if needed. If your BBU came with RJ45, just remove all other components (diodes, capacitors, fuses, etc.) from the board.
- Solder the colored wires of the cut patch cables in the proper order on the back of the connectors.
- Test all connections.
- Glue the two connectors together to make mounting to the enclosure easier.
Next we'll wire up the LED. You'll need the 470 ohm (yellow, violet, brown) or similar resistor, the LED, two lengths of wire, and (optionally) a connector that will plug into the Pi's GPIO.
- Solder the red wire to the positive lead on the LED & heat shrink it.
- Solder the black wire to the negative lead of the LED & heat shrink.
- Cut the black wire in half & strip both ends.
- Solder one lead of the resistor to the black wire on the LED.
- Solder the other lead of the resistor to the piece of black wire you cut off.
- Heat shrink over the resistor.
- Crimp or solder the connector to the two wires.
7Push Button Wiring
This is the button used to send basic commands to the Pi. I have it setup to shutdown and reboot the Pi depending on how long the button is pressed (code is in a later step). Notice, from the pictures the resistor was kind of an after-thought and is optional if you are able to use the internal pullups on the Pi. I decided to use bash scripts to talk to the GPIO, so programming the pullups wasn't really an option.
You will need the momentary push button, three pieces of wire, one to two connectors that fit the Pi's GPIO (optional), and the 10 - 100 ohm resistor (also optional).
- Solder wires to the button's two terminals.
- Solder a second wire to one of the terminals & cut it in half.
- Solder one lead of the resistor to the cut wire on the button.
- Solder the other lead of the resistor to the loose wire that was cut off.
- Heat shrink everything neatly.
- Crimp or solder the connectors to the wires.
8Mounting the Button & LED
- Mount the LED where the "Wiring Fault" LED was and cover it in plenty of hot glue.
- Mount the push button with lots of hot glue where the "Reset" breaker button was.
9Mounting the Network Jacks
- File out the space where the RJ11 jacks were to make room for the larger RJ45 jacks.
- Mount the jacks with hot glue & cover all of the solder points with glue.
10Installing the Switch & Breaker
Now we'll be installing the network switch and circuit breaker.
- Find a good place to mount the switch & mark out the holes for the screws.
- Predrill the holes for the screws.
- Install the power cable for the switch.
- Mount the switch and plug in the power cable.
- I also hot glued the Pi's power supply on top of the switch, but this can be at the bottom with the other one.
- Glue down the circuit breaker in an open spot.