The easiest & economical way to go wireless in an Embedded project is through a Bluetooth module.Your Serial communication goes Wireless using this module.
The types available in the market are HC-04 , HC 05 & HC06 .The HC 05 is a Master/Slave module & the other two models are Slave only models.The Slave only models need a Master like Android phone to get paired.
HC05 model can be configured either for a Master or for a Slave mode , thus most preferred for a Microcontroller project.
The HC-05 module can build a connection to other modules, while HC04/HC-06 modules can be a slave only.Two Slave modules cannot communicate with each other themselves.
HC04 is factory loaded with LINVOR firmware.If you power up the module and scan for Bluetooth devices using your Android phone , you can see the name LINVOR on the phone.If the module is HC05 , you see the name HC05 on the phone.
The square wave like design on the top of module acts as antenna & the range is about 30 feet.
The specifications of different models of Bluetooth module is on this Wiki page :
Above is the picture of a raw HC05 Bluetooth module .The module operates on 3.3 V DC power & the acceptable TX/RX signal level is 3.3v & not 5v. The KEY pin (pin 34) on a HC05 module plays an important role in entering AT mode of the module.
I suggest to buy a module on a breakout board and available as JY-MCU modules.The Bluetooth module is mounted on a breakout board and connections provided using header pins.You can safely provide 5v power to this board, as it has an inbuilt 3.3v regulator.Also the board has Status LEDs for visual indication of status of module.
The module is covered with a plastic transparent sleeve.If you need to access all the pins , cut this sleeve out.Mostly the header pin connections extended is enough for connection to a microcontroller.
To connect this module to a Laptop an USB to TTL converter board built on Prolific’s 2303 IC is required.
This is an inexpensive module with USB at front & header pins for connections.When connected to PC you need to install the driver for Prolific 2303.
The connections between HC05 module & the USB converter are simple as below :
HC – 05 MODULE USB-TTL MODULE
VCC ——> 5.0V
GND ——> GND
TXD ——> RXD
RXD ——> TXD
Now plug the USB connector to a port on your PC.The power LED on USB board glows & the Status LED on Bluetooth board starts blinking fast , indicating that it looks for a pair.
From your Android phone , go to Settings , switch ON the Bluetooth & under properties Scan for available Devices.
The Bluetooth module will show up as HC-05 under Available Devices.
Touch on the HC-05 & feed the PIN password as 1234.
Touch OK to see the HC-05 under paired Devices.
To communicate with PC you need Terminal software on Android phone as well as on the PC.
From Android’s Market search for “BLUETOOTH TERMINAL”. Select the one with Bluetooth symbol and install it.
Open the installed Bluetooth terminal.On the top you can see a Connect button & to its left bottom a small drop down arrow is seen.Touch that drop down to see the available devices.
Touch on the HC-05 & then Connect
Now the fast blinking of LED on HC05 SLOWS DOWN TO ONE BLINK per second indicating that it has been paired with a Master ( Android phone).
Now we’ve to install a Terminal software like Putty or CoolTerm on your PC.
PuTty download link : http://the.earth.li/~sgtatham/putty/latest/x86/putty.zip
Open Putty & under Session select Serial.Enter the COM port allotted to the USB-TTL board (here it is COM 10).This can be noted down from the Device Manager’s COM port allocation.
Enter the Speed as 9600 which is the Baud Rate of communication.
Under Terminal Settings ensure that Local Echo – Force ON is selected.This enables you to see what you type on Putty screen.
Click on Open to see the Terminal window for communication.
If the connection is lost Touch Connect again on the phone.
Type in some characters on the Phone & touch SEND.
You can receive the characters on the Putty screen.
Same way type in some characters inside Putty screen to see them received on the phone.Thus a 2 way communication is established.
You can also test a Loopback method.
Connect the Tx & Rx of Bluetooth module together .For this test PC 7 USB board are not required.Just you need to provide 5v power to module & loop the Tx/Rx.
Now the characters sent will be received back.
Watch this support video :