Finished
π You built it!
Your phone now controls three lights and a fan through Bluetooth, an Arduino and four relays.
Your project at a glance
Phone commands
| Relay | Arduino | Controls | ON | OFF |
|---|---|---|---|---|
| 1 | pin 8 | Light 1 | B | A |
| 2 | pin 9 | Light 2 | D | C |
| 3 | pin 10 | Light 3 | F | E |
| 4 | pin 11 | Fan | H | G |
Relays are active-LOW: LOW = ON, HIGH = OFF. Serial Monitor and Bluetooth both run at 9600 baud.
Signal side (Arduino)
| From | To |
|---|---|
| Arduino 5V | red (+) rail |
| Arduino GND | blue (β) rail |
| Relay VCC | red (+) rail |
| Relay GND | blue (β) rail |
| Relay IN1 | Arduino pin 8 |
| Relay IN2 | Arduino pin 9 |
| Relay IN3 | Arduino pin 10 |
| Relay IN4 | Arduino pin 11 |
| HC-05 VCC | red (+) rail |
| HC-05 GND | blue (β) rail |
| HC-05 TXD | Arduino pin 7 |
| HC-05 RXD | Arduino pin 6 |
Load side (battery only)
| From | To |
|---|---|
| Battery + | Relay 1 COM |
| Relay 1 NO | 220 Ξ© resistor 1 |
| Resistor 1 | LED 1 long leg (+) |
| LED 1 short leg (β) | Battery β |
| Relay 1 COM | Relay 2 COM |
| Relay 2 NO | 220 Ξ© resistor 2 |
| Resistor 2 | LED 2 long leg (+) |
| LED 2 short leg (β) | Battery β |
| Relay 2 COM | Relay 3 COM |
| Relay 3 NO | 220 Ξ© resistor 3 |
| Resistor 3 | LED 3 long leg (+) |
| LED 3 short leg (β) | Battery β |
| Relay 3 COM | Relay 4 COM |
| Relay 4 NO | Fan wire 1 |
| Fan wire 2 | Battery β |
Battery β never connects to the Arduino. Keep the JD-VCC jumper on the relay module.