<> = HC-06 Bluetooth Modul = {{attachment:HC_06_modules_s.jpg}} 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: {{attachment:HC_06_module__5v_board_top_s.jpg}} {{attachment:HC_06_module__5v_board_bottom_s.jpg}} == Connection to FC/NC == Sample of connecting the bluetooth module to the debug port of a NaviCtrl: {{attachment:HC_06_connected_to_NC_debug_s.jpg}} || '''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): {{attachment:HC-06-connected-to-MKUSB.jpg}} || '''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: {{attachment:hc-06-005_21092012_120748_.png}} Copy and paste '''AT+VERSION''' into the terminal (paste is just a simple right-click using PuTTY), the module should report the version number: {{attachment:hc-06-006_21092012_120800.png}} Now change the baud rate by pasting '''AT+BAUD7''' into the terminal, the module should acknowledge the command: {{attachment:hc-06-007_21092012_120811.png}} Right click on the title bar and select "Change Settings...": {{attachment:hc-06-008_21092012_120814.png}} Goto Connection -> Serial and change the Speed to 57600: {{attachment:hc-06-009_21092012_120833.png}} Try to talk to the module again with '''AT+VERSION''': {{attachment:hc-06-010_21092012_120839.png}} And if you want, change the name with '''AT+NAMEcheap_mk''': {{attachment:hc-06-011_21092012_120847.png}} 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 ---- . KategorieHardware