Linkit One BT- Power Box With Timer Using Android

by jegatheesan.soundarapandian in Circuits > Microcontrollers

3903 Views, 62 Favorites, 0 Comments

Linkit One BT- Power Box With Timer Using Android

DSCN4009.JPG
DSCN4011.JPG

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.

Materials Required

IMG_1133.JPG
20151119_230735.jpg
IMG_1136.JPG
20151120_233238.jpg
20151120_233322.jpg
20151120_233512.jpg
20151120_233810.jpg

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.

9) Wires.

10) A Square box (use Wooden or plastic electrical box, but i use a very hard carton box comes with a electrical catel).

Program to Check Data Received From App

IMG_1133.JPG
code snapshot.PNG

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.

Setup Android App and Check the Keys

DSCN3985.JPG
DSCN3986.JPG
DSCN3987.JPG
DSCN3988.JPG
DSCN3989.JPG
DSCN3990.JPG
DSCN3991.JPG
Find Keys.PNG

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)

Real Time Control Coding

Program snapshot.PNG

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.

Testing the Program

20151119_004504.jpg
20151119_004518.jpg
Linkit one with Arduino Bluetooth Control Device App

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.

Timer Feature in APP

DSCN3992.JPG
DSCN3995.JPG
DSCN3996.JPG
DSCN3997.JPG
DSCN3994.JPG

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.

Make Connections

20151120_233652.jpg

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.

Change Pinno in Code

Capture.JPG

1) In the Board we only use the pins 10,11,12,13.

2) So change the code to control that pins only.

Fitting and Wiring With Box

20151120_233846.jpg
20151120_235841.jpg
20151120_235912.jpg
20151121_002829.jpg
20151121_004243.jpg
20151121_004205.jpg
20151121_003928.jpg
20151121_004730.jpg

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.

Fix the Controller

20151121_011817.jpg
20151121_011937.jpg
20151121_011957.jpg
DSCN4012.JPG
20151121_012337.jpg

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.

Real Time Use

DSCN3999.JPG
DSCN4013.JPG
DSCN4010.JPG
DSCN4005.JPG
DSCN4008.JPG
DSCN4009.JPG

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.

Normal Control

6) After connect check the devices ON/OFF by click the appropriate Button.

Timer Control

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.

In Action

Android Bluetooth control switch board with timer   1
Android Bluetooth  control switch board with timer   2

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.