Inhaltsverzeichnis
HC-06 Bluetooth Modul
HC-06 based modules are sold at eBay, dealextreme, rctimer and a lot of other places. The modules are cheap and do their job.
Technical Data
- Chipset: CSR
- Bluetooth V2.0
- Working voltage: 3.3V
- Current: pairing 20~30mA, connected 8mA
- Dimensions: 1.06 in x 0.51 in x 0.04 in
- Dimensions: 2.7 cm x 1.3 cm x 0.1 cm
- Weight: 0.18 oz (5 g)
Different boards
The modules are often sold with 5V-compatible add-on boards like this one from rctimer for MWC:
Connection to FC/NC
Sample of connecting the bluetooth module to the debug port of a NaviCtrl:
cable |
module pin |
NC pin |
yellow |
TXD |
1 - RXD1_DEBUG |
green |
RXD |
9 - TXD1_DEBUG |
black |
GND |
7 - GND |
red |
VCC |
2 - +5V |
Required AT commands
Most of the modules are not set to the correct baud rate when shipped. For example the devices for Multiwii MWC are mostly sold with a configuration of 115200baud whereas the MikroKopter uses 57600. Refer to the product page to see which is the default baud rate.
For the modules from rctimer with the 5V-adapter-board the commands are the following:
command |
response |
effect |
AT+VERSION |
OKlinvorV1.6 |
Gets the version info, no changes |
AT+NAMExyz |
OKsetname |
Sets the module name to "xyz" |
AT+PIN1234 |
OKsetPIN |
Sets the module PIN to 1234 |
AT+BAUD7 |
OK57600 |
Sets the baud rate to 57600 |
To set those commands the complete command has to be sent in under a second. So do not try to type in the commands by hand but copy and paste them into a terminal. There is no need for a line feed or carriage return after the commands, just the string is ok. The modules do not echo the characters you enter, so you will just see the reply and not your command.
A sample setup procedure for the MWC modules that are shipped with 115200 baud:
Connect the HC-06 module to the MK-USB (be sure to use a HC-06 that is 5V compatible or include a level converter):
cable |
module pin |
MK-USB pin |
yellow |
TXD |
9 - RXD |
green |
RXD |
1 - TXD |
black |
GND |
7 - GND |
red |
VCC |
2 - +5V |
Now open the serial port with PuTTY using the right port number and in this case the default baud rate of 115200 baud:
Copy and paste AT+VERSION into the terminal (paste is just a simple right-click using PuTTY), the module should report the version number:
Now change the baud rate by pasting AT+BAUD7 into the terminal, the module should acknowledge the command:
Right click on the title bar and select "Change Settings...":
Goto Connection -> Serial and change the Speed to 57600:
Try to talk to the module again with AT+VERSION:
And if you want, change the name with AT+NAMEcheap_mk:
Now the module is ready to use with the MikroKopter.
Links to shops
http://www.rctimer.com/index.php?gOo=goods_details.dwt&goodsid=764&productname
http://www.dealextreme.com/p/wireless-bluetooth-rs232-ttl-transceiver-module-80711