Intro: Android Controlled Power Strip
This 4-channel power box is Arduino controlled and bluetooth enabled, so it can be paired to your Android device.
CAUTION: THIS PROJECT INVOLVES 115V POWER WHICH CAN BE DANGEROUS EVEN DEADLY. DO NOT ATTEMPT IF YOU DO NOT HAVE ELECTRICAL EXPERIENCE. I AM NOT RESPONSIBLE FOR ANY DAMAGE TO YOU OR YOUR COMPONENTS. ATTEMPT AT YOUR OWN RISK!
Step 1: Materials
For this project I used the following products:
(1) old power strip
(1) Sainsmart 4-channel relay board
(1) Bareduino Plus kit by Virtuabotix
(1) HC-06 Bluetooth module
(1) Radioshack project enclosure.
I also use my Android device for control and an Arduino Uno to program the Atmega chip from the Bareduino kit. Miscellaneous wires.
Tools I used included screwdrivers, wire cutters & strippers, Dremmel tool, hot glue and soldering iron.
Step 2: Assembling the Outlets and Relay Board
First you need to remove the outlets, on-off switch and reset button from the power strip. Pay attention to how everything is wired and take pictures. The 115V wiring will remain the same with the exception being the (white) neutral wire, which will be wired separately to each relay and then from each relay to each outlet socket. The power strip I used was an old metal one, so I cut out some pieces to use as templates for cutting holes into my enclosure. The outlets come with both sockets connected by a metal clip. In order to get 4 seperate channels you need to cut or pull these clips. In the last photo you can see my layout for the 2 outlets, cord, power switch and relay board. The relay board can be connected as NO normally open or NC normally closed, I chose NO so the circuit would not be complete unless the relay was switched. I also chose to wire the (black) hot wire to all 4 channels and used the (white) neutral wire to switch on & off with the relays. I took the time to solder the ground wire to all 4 channels for safety.
Step 3: Add Control With Bareduino Plus and HC-06
The Bareduino Plus kit comes with the Atmega-328, crystal, resistor, capacitors and voltage regulator. I added the wires and breadboard. I've included the pinouts for the Atmega and the Bareduino schematic which was needed for wiring the relay board and Bluetooth module to the Bareduino. I have also included a photo from Techbitar's Ardudroid blog that shows how to create a voltage divider to pull the 5V serial signal from the Atmega down to 3.3V. I did not do this and though it worked, I did have bluetooth connection issues, so I will be adding the voltage divider. you can use the Arduino Uno and bluetooth shield, which is how I prototyped this project, but it would not fit in my enclosure and since I only have one Arduino the Bareduino was a great option. I used the sticky back on the breadboard to secure it to the relays and some double sided tape to mount the HC-06 to the side of my enclosure.
Step 4: Wrapping Up
Ideally I would have 115V AC to 9V DC transformer, but I didn't see how to fit one, so I used a 9V battery to power the Bareduino, HC-06 and control of the Sainsmart relay board. I will need a better solution but this works for now. Any suggestions would be appreciated. I soldered the tips of the 9V connector to make it easier to push into the breadboard and more secure. To program the Atmega-328 from the Virtuabotix Bareduino kit I installed it into my Arduino Uno and selected the Duemilanove board in the Arduino IDE tools. I chose to use the Ardudroid sketch by Techbitar.
Step 5: Testing
I tested with BlueTerm and it works great, but I settled on the Ardudroid app by Techbitar because of the Arduino specific UI. This app is available from the Play store for free and has a link from Google Play to download the Arduino sketch. First I tested without plugging in the 115V power. If everything is working the HC-06 bluetooth module will have a blinking light to indicate it is not paired. Make sure bluetooth is on, on your Android device and use the menu button in the Ardudroid app to connect to your bluetooth module. Once paired, press the appropriate buttons in the app to switch on & off the digital out pins connected to the relay board. I used pins 9,10,11 & 12 mainly because they are on the top row in the app and were easily accessible on my Bareduino. When you press the buttons in the app on your paired device the relays should toggle on & off. If working there will be an audible click each time they switch and on the Sainsmart relay board there are built in indicator lights. If all is good, close it up, plug it in and turn on the main power switch, if you don't blow a breaker of smoke any components you should be ready to run.
Step 6: Here It Is in Action
Drdray1 made it!