Bluetooth SmartRoom

by kumaran512 in Circuits > Electronics

19567 Views, 296 Favorites, 0 Comments

Bluetooth SmartRoom

KIMG_20160610_124618_HDR.jpg

This project will guide to have 4 Channel Relays for 4 different AC loads which can be controlled via Smartphone using Bluetooth.

This has the added features of:

1. Saving power state when electricity interrupts.

2. Can be controlled both from phone and local switches

3. Fully software controlled (Unlike two-wiring between relays and power switches).

Required Components

KIMG_20160609_121153_HDR.jpg
KIMG_20160607_134954_HDR.jpg

1. HC-05 Bluetooth serial module

2. 4 Channel 5V 10A Relay Board

3. Microcontroller Type Dot Board

4. 28pin IC Base

5. 10K 2W Resistor 5pcs

6. Berg strip

7. 16Mhz Crystal

8. DC Barrel Jack

9. Led and holder

10. 5V Phone charger

11. Enclosure Plastic or Wooden

12. Securing screws (as required)

13. Miniature switches 4 pcs

14. 2Pin AC Socket

15. Arduino with DIP IC or USB UART Adapter (For porgramming the chip)

16. ATMEGA 8 with Arduino Bootloader

17. 22pf 2pcs

18. LM7805 and Heatsink with 0.1uF and 10uF Caps

19. Female to Female Dupont wires

ALL NECESSARY MECHANICAL TOOLS.

Check out the images for the above mentioned components.

Total project components sourcing for me it took Rs.750 (Approx. 11$)

Google it with names to find availability with your local seller.

Schematic, Testing and Uploading Microcontroller

New-Schematic-3.png
KIMG_20160606_182246_HDR.jpg
KIMG_20160607_190524_HDR.jpg
KIMG_20160627_182739_HDR.jpg

Initially prepare the board for programming as per the following link

http://diyhacking.com/shrink-arduino-projects/

https://www.arduino.cc/en/Main/StandaloneAssembly

http://playground.arduino.cc/Learning/AtmegaStandalone

Once prepared use USB UART converter to upload the below sketch following steps from above link

MODIBT.ino = https://drive.google.com/open?id=0BzCkdlaIWBucSERO...

Use Bergstrips for connection as shown in images.

Soldering and Prototyping

KIMG_20160606_205341_HDR.jpg
KIMG_20160607_134856_HDR.jpg
KIMG_20160607_134908_HDR.jpg
KIMG_20160607_165400_HDR.jpg
KIMG_20160607_170831_HDR.jpg
KIMG_20160607_223548_HDR.jpg

Here I used a Dot Board compatible with Microcontrollers which was easier to solder.

Again its all own way of building a circuit in an stripboard.

Place 2W 10K resistors to pins12, 13, 14, 15.

1/4W is enough for pin 1.

Use Berg strip pins and Dupont wires whenever and wherever necessary.

Here I have attached my samples.

If you don't like this step you can spare an arduino instead.

Enclosure Preparation

KIMG_20160609_123811_HDR.jpg
KIMG_20160609_124203_HDR.jpg
KIMG_20160609_125550_HDR.jpg
KIMG_20160609_130731_HDR.jpg
KIMG_20160609_132207_HDR.jpg

Place the components randomly and mark its location on board.

Visible components are Led, HC-05, 4 x miniature switches, 2Pin socket with 5V adapter.

Use Drill machine, Hand Files, etc to suit the components

Attached images for reference

Adding Miniature Switches for Manual Switching

KIMG_20160609_134159_HDR.jpg
KIMG_20160609_135420_HDR.jpg
KIMG_20160609_145918_HDR.jpg
KIMG_20160609_175117_HDR.jpg
577113ec67400c7349000ce3.jpeg
KIMG_20160610_123143_HDR.jpg

Here as shown have small switches, as mentioned before these are software controlled which keeps micro-controller pulled high and low to toggle the load status.

Here in Arduino coding I have used EEPROM to save the power status., so avoid unnecessary power cycles.

One terminal of all miniature switches are series connected to 5V directly as shown.

Adding Relay Board to 230VAC

5774a1ba4fbadedefc000196.jpeg
KIMG_20160609_175612_HDR.jpg
KIMG_20160609_192147_HDR.jpg
KIMG_20160609_203719.jpg
KIMG_20160610_112550.jpg
KIMG_20160610_123150_HDR.jpg

Here I have attached the schematic.

Analyse the default circuit.

Remove the old switches

Connect the disconnected wires to the Relay as shown in schematic

Place the assembled board, hang it safely

230 VAC IS HIGHLY DANGEROUS. HAVE A CERTIFIED ELECTRICIAN PRIOR PROCEEDING.

Android App

Screenshot_2016-06-28-08-48-29_nextprototypes.BTSerialController.png
Screenshot_2016-06-28-08-48-51_nextprototypes.BTSerialController.png

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

I have used Bluetooth Serial Controller app to configure Bluetooth.

Here characters from A to H is used in serial communication between ATMEGA8 and HC-05.

Just open the app and set for any 8 buttons the characters A to H as shown in images.

The app has the option in hide unused buttons, and do it so.

Any queries,
kua201@gmail.com

-Kumaran