Intro: Linkit One BT- Power Box With Timer Using Android
Controlling device through remote of fixed wiring is just static. So for dynamic plan to build a power extension board controlled only by bluetooth. Search on the play store and found Arduino Bluetooth Control Device free app. The App is designed to send data for on and off to micro controller through blue tooth and also have timer for each switch to flip the switch status.
Use the App feature, design a power supply board to control the power supply in the switch box, Also set the timer with on delay and off delay timer to flip the switch status controlled by remotely.
Step 1: Materials Required
1) Linkitone Board with Wifi/Bluetooth Antenna.
2) Bread Board for Testing.
3) Relay Control Module To switch on/off the device (LED for testing)
4) Android Phone.
5) Android Bluetooth Control App free download from google.
6) Power Socket - 4 nos.
7) Power Plug - 1no.
8) Power Adapter 12V, 5V each 1no.
10) A Square box (use Wooden or plastic electrical box, but i use a very hard carton box comes with a electrical catel).
Step 2: Program to Check Data Received From App
1) connect the Blue tooth antenna to the Linkit one board.
2) Upload the program given above. Program contain code to print the data receive in serial.
Step 3: Setup Android App and Check the Keys
1) Download Android Bluetooth Control App from play store and install it in mobile.
2) Open the App.
3) Click Click connect, Shows the available blue tooth devices.
4) select the Linkit one Blue tooth device name u given.
5) The board connected with the Mobile.
6) Open the Serial monitor in the PC.
7) Check for each key turn off and on characters received (Check with the data provided by the App supplier)
Step 4: Real Time Control Coding
1) As per the data receive in the serial port. Add the conditions in the coding.
2) Use Switch case to Low/High the digital pin.
3) Upload the above program to your Link it one.
Step 5: Testing the Program
1) Connect the LED positive lead to the digital pin and negative lead to the Gnd.
2) Connect 8 LEDs from Digital pin 3 to 10.
3) Connect the power supply to Linkit one.
4) Open the Android Bluetooth Control App in mobile and check all the LED's.
See the video of how it works.
Step 6: Timer Feature in APP
1) U can set the Timer to flip the status of the corresponding Pin.
2) In the menu click Timer Settings.
3) Its open a form listing timer settings for 8 buttons.
4) Click Timer 1 setup. Its shows u a selection box with 1 minute to 4 hours.
5) Select the Time we want to select. (For more settings of timer the app program is supplied by the developer in paid basics see the link u download)
6) Now in the main screen click timer on. The down timer run and at the end of the time it pin the pin status with the timer.
7) Click the button name settings to change the button name.
Step 7: Make Connections
1) Connect a 12V Relay module with 4 relays to the Linikit one.
2) Use digital pins 10,11,12,13 and gnd. Connect both board using wire strip connector.
3) Paste wire strip connector with Tape.
4) Join all the common pins of the relay together.
5) Take 4 separate wires of different colors from NO of the relay.
6) Join the common wire from relay to the phase of the 12v and 5V adapter. And Connect the wire to the external power supply plug phase.
7) Join the Neutral of the external power supply to the 12v and 5V adapter.
Step 8: Change Pinno in Code
1) In the Board we only use the pins 10,11,12,13.
2) So change the code to control that pins only.
Step 9: Fitting and Wiring With Box
1) Take a hard Wiring Wooden or Plastic box. I use hard hard carton box comes with a electrical catel.
2) Mark the side of the box for 4 power socket. Mark for inner square size, then only the socket hold on the hole.
3) Insert the socket inside the hole.
4) Link the neutral of the 4 socket using wire and join it with the neutral of the incoming line.
5) Connect the Four wires from the NO of the Relay control module to the phase of the 4 sockets.
6) Screw the sockets with the box.
7) Put all the Adapter in side the box.
8) Take the power supply wire out through the side of the box. Connect a power plug in the end of the wire
9) Cover the whole electrical assembly with a plastic box. To avoid short circuit with controller or relay board.
Step 10: Fix the Controller
1) First paste the relay module using a double side sticker and plug in the power supply.
2) Connect the strip wire to the relay module.
3) Paste a Packing sponge over the relay control board.
4) Connect the Blue tooth antenna to the Linkit one board.
5) Paste the link it one board over the packing sponge.
6) Connect and paste the strip wire.
7) Plug in the power adapter pin to the Linkit one.
8) Close and Paste the box.
Now the Blue tooth controlled Extension box is ready to operate.
Step 11: Real Time Use
1) Connect Extension box to the power board.
2) Plug in any devices to the power socket as per requirement.
3) I connect a Table Night lamp, Mosquito Liquidator, A hot glow gun and a extension board.
4) Open Arduino bluetooth control device app in the phone
5) Click the connect button in the app.
6) After connect check the devices ON/OFF by click the appropriate Button.
7) Set the timer of each switch.
8) Click the timer of on the App.
9) Now the timer is step down run. At the end the switch for that timer is flip.
Step 12: In Action
I connect my devices and control it in first Video.
After 1 minute i want my night lamp should be switch off and Mosquito liquidator should turn off. See the function.