Home Automation Boards
First make the circuit connection as shown in fig1.1. The 1st Pin(Vcc) of Bluetooth(HC05) is connect to +5v of Arduino Uno and 10th pin(GND) to Arduino Uno GND. The 2nd pin(Tx) and 3rd pin(Rx) of HC05 is connected to 4th and 2nd of Arduino Uno.
Make sure that Rx pin of HC05 is connected to Arduino @nd pin through voltage divider contains 1k and 2k resistor, because Rx pin of HC05 is 3.3v compatible but Arduino GPIO output is 5v. So we decreasing the voltage from 5v to 3.3v using voltage divider to make Arduino and Bluetooth compatible.
Then 9th and 10th pin of Arduino uno is connected to R1 and R2 of relay board. Vcc and GND pin of relay board is connected to Vin(+9v) and GND pin of Arduino Uno. Another side of relay board three pin connector available, named NO(Normally open), C (common) and NC(Normally closed). Each relay contains separate connector. Phase(P) of 230v AC is connected to C (common) and one end of bulb is connected to NO(normally open). Another end of bulb is connected to Neutral(N) of AC supply.
After making circuit connection as per the fig 1.1 compile the Arduino program given below in Arduino IDE and upload program to your Arduino Uno using USB B type data cable. Power up your Arduino using 9v DC adapter. After power up your circuit the lrd on Bluetooth start to blink very fast, it means the Bluetooth device waiting to be pair. Now connect your mobile to HC05 using Bluetooth Controller app. After connecting your mobile to HC05 turn ON and OFF the lights using respective keys.