DIY Bluetooth Home Automation Hub: Arduino Nano Edition
by msnikhilslm in Circuits > Arduino
81 Views, 2 Favorites, 0 Comments
DIY Bluetooth Home Automation Hub: Arduino Nano Edition
This guide will walk you through building a versatile home automation controller. This project is perfect for those who want to combine electrical switching (lights/fans) with mechanical movement (locking mechanisms or blind controls) using a smartphone.The core of this build is an Arduino Nano communicating with a smartphone via the HC-05 Bluetooth module. We use a Relay to act as a smart switch for high-voltage appliances and two Servo Motors to handle physical tasks.
Supplies
Microcontroller: Arduino Nano
Communication: HC-05 Bluetooth Module
Actuators: 2x SG90 (or MG995) Servo Motors
Switching: 1-Channel 5V Relay Module
Power: 5V 2A DC Power Supply (Servos draw more current than a USB port can provide)
Miscellaneous: Jumper wires, breadboard, and a smartphone with a Bluetooth Terminal app.
Wiring and Schematics
HC-05
VCC - 5V
GND - GND
TX - TX
RX - RX
Relay
VCC - 5V
GND - GND
IN - D2
Servo 1
VCC - 5V(external)
GND - GND
SIGNAL - D3
Servo 2
VCC - 5V(External)
GND - GND
SIGNAL - D4
Tip: Connect the VCC and GND of both servos directly to your external 5V power supply. Ensure the GND of the external power supply is also connected to the GND of the Arduino (Common Ground).
Coding
Copy and paste this sketch into your Arduino IDE. It is set up to listen for specific character commands sent over Bluetooth.
Configuration
Download a Bluetooth Terminal app on your phone
Pair your phone with the HC-05 in your phone’s Bluetooth settings (Code: 1234).
Open the app, connect to the HC-05, and set up buttons to send the following characters:
- Button 1: R (Light ON)
- Button 2: r (Light OFF)
- Button 3: 1 (Servo 1 Open)
- Button 4: 0 (Servo 1 Close)
Conclusion
You now have a functional "Command Center" for your room or workshop. The relay can be safely wired to a lamp (ensure you follow proper AC safety protocols!), while the servos can be 3D-printed into custom housings for mechanical automation.