Wednesday 4 September 2013

Arduino BLUETOOTH Communication with PC

In this post ill show you how to connect arduino to your laptop via bluetooth connectivity. 
Bluetooth is a wireless device which helps in sending and receiving data wirelessly. It is good for short range communication, range within 10mts. There are many bluetooth module out there in the market, but i am goin to use AUBTM-20 its a cheap bluetooth module. 

Parts you will need

A bluetooth module 
An arduino
A laptop with bluetooth
Jumper wires
A led

Connection

The fig. shows the connection between the bluetooth module and arduino. 
RX pin from bluetooth module goes to the TX pin on arduino and vice versa. Since the data that is being transmitted from bluetooth module is being received by arduino, and vice versa. Therefore we always connect RX pin to TX pin. connect a led to pin 13 on arduino.


Level shifting
In some bluetooth module the data voltage is 3.3v and the data voltage on arduino is 5v, the 3.3v form TX pin of bluetooth to RX pin on arduino will not create any problem, but the 5v from TX pin of arduino to RX pin on bluetooth will burn the bluetooth chip. In order to protect this we need to shift the level of TX arduino pin to 3.3v. make this connection for TX arduino pin to make it work with the bluetooth.



Putty

PuTTY is a free and open-source terminal emulator, we will use it to connect to the serial port.Download putty on your laptop. AFTER  making all the connections and uploading the code to arduino, turn on the arduino and your laptop, from your laptop search for the bluetooth module and make the connection and note down the serial port for connetion.
open the putty software 


  • click on the serial button
  • change the port to the bluetooth connection port
  • click on open
now when to press "1" you can see the led glow and when you press "0" the led will turn off.

Make use of this tutorial to make a HOME AUTOMATION system.


CODE




No comments:

Post a Comment