Sunday 3 July 2016

Automation Using Bluetooth HC-05


Automation Using Bluetooth HC-05

Bluetooth is a Wireless communication protocol got its name after King Herald Bluetooth,
Bluetooth is a IEEE 802.15.1 standard part of Personal Area Network (PAN) operates at 2.4GHz ISM band. Bluetooth uses Frequecy Hop Spread Spectrum(FHSS). Bluetooth divides transmitted data into packets, and transmits each packet on one of 79 designated Bluetooth channels. Each channel has a bandwidth of 1 MHz. It usually performs 800 hops per second, Bluetooth Module HC-05 is the serial device.


It has six pins
1. State -leave it floating
2. Rx- Should be connected to Tx of UART
3. Tx- Should be connected to Rx of UART
4. Gnd- connect it to Ground(0V)
5. Vcc- connect it to 5V
6. Enable- used in AT command mode.

Before using Bluetooth Module initially it is configured through AT commands.
use USB-TTL converter 
      Cool-Terminal





                                                USB-Serial(TTL) Converter







Microcontroller pins cannot drive relay directly hence a driver circuit is required.

Driver should have good current gain. CE or CC configuration is preferred
Relay has 5 terminals 
1. Vdc - 5v
2.Gnd- connect it to  Collector pin of BJT
3. Common - Connect it to AC/DC source
4. NC- Normally close connect it to load1 
5. NO- Normally open connect it to load2

or else connect only one load to any of these two pins (4,5)
so that you can switch only one device at a time.




download code -click here

No comments:

Post a Comment