Introduction: How to Control Home Light With Android /Ios Mobile Phone Application

About: Mechatronics engineer Author ( Arduino + Visual Basic 6.0: Make your own software to control Arduino Robots ) Twitter account @ujashpatel

Recently I am trying to do experiment with wireless communication. one of the easy way to control home lighting is radio frequency module and 2 Arduino board . but there is a one other easy option available to control on and off action of ac device . it’s a Bluetooth shield . here in this tutorial we are going to learn how to control on and off action of ac bulb with Redbearlab Bluetooth low power shield v 2.0 . and android /ios application.

Part to be required
1. Arduino board(uno or arduino mega).

2. Android or ios device.

3. Standard library of redbearlab.

4. Relay board.

aduino board

Complete introduction of arduino is given on arduino.cc

Relay board

Output of arduino is generally 5v dc . for controlling ac bulb we have to control on and off action of relay board . we can also make a realy circuit but standard channel realy board is available at market so you can buy from below link..

http://www.amazon.in/CHANNEL-MODULE-CONTROLLABLE-R...

Bluetooth shield

You can buy it from many website . here I give link of amazon .

http://www.amazon.in/Bluetooth-Energy-Shield-Ardui...

Step 1: Download Standard Library and BLe Application

Redbearlab provides standard library for ble shield but sometimes some people complain about that its not working with ble shield so here i upload the library which work for me you can download it from below link

https://drive.google.com/file/d/0B5cV5Gwy-s3RQ2F2ZWFNRWxiQVU/view

Download arduino ide

http://arduino.cc/en/Main/Software

Download android /ios application

ios application

https://itunes.apple.com/app/ble-controller/id8550...

android application

https://play.google.com/store/apps/details?id=com.redbear.redbearbleclient

extract zip file and import library to arduino ide ....

Step 2: How to Add Library to Arduino Ide ?

open sketch/import library /Add library ...follow the step shown in image ...and browse two folder ...import it one by one....

after importing library go to file/ Example /Rbl_nrf8001 / Ble controller ...here you find a standard program from Redbearlab ...Now next step is fix up ble shield on arduino board ....you need to just fix up on arduino board the shield is manufactured with standard size for arduino uno and mega ....

Step 3: Fix Up the Ble Shied on Arduino Board

plug the cable and upload the program on arduino .....

Step 4: Setup for Ios Phone

download application ...

turn on the blutooth (here device is not shown on iphone)

open application - scan for device

connect and define the pin number 4 as output (by tapping on pin number we can define it as input/output)

connect the pin no 4 of arduino with relay operated pin ...when we high the pin in phone application then pin number 4 on arduino is high which operate relay ....from that we can control bulb ....

For android phone setup we need to turn on Bluetooth and wifi for detecting device ...

Step 5: Setup for Android Phone

download application ...

For android phone setup we need to turn on Bluetooth and wifi for detecting device ...

open application - scan for device

connect and define the pin number 4 as output (by tapping on pin number we can define it as input/output)

connect the pin no 4 of arduino with relay operated pin ...when we high the pin in phone application then pin number 4 on arduino is high which operate relay ....from that we can control bulb ....

Step 6: Demo Video

here is demo video provide by redbearlab we just need to connect the relay board in place of led .....thank u ..comment if you face any difficulty .... :)