Search This Blog

Tuesday, October 20, 2015

Bluetooth Connection

Setup

Flight Controller:  CC3D
Bluetooh Modem: HC-06 Wireless Bluetooth Transceiver
Serial Connection: FT232 for Arduino -FTDI Basic Program Downloader
Firmware: CleanFlight 1.9.0

Steps
- Install FTDI Virtual Comm Port Drivers on PC (Current version: 2.2.18 for Mac)
Download from http://www.ftdichip.com/Drivers/VCP.htm

- Set output voltage on FTDI as 5V using onboard 3.3V / 5V switch
- Connect FTDI board with Bluetooth modem with 4 wires. Note that TX connects to RX and RX conencts to TX.

FTDI - Bluetooth Module Connection

- Connect FTDI board to PC using micro USB cable
- Check that blue LED on FTDI and red LED on Bluetooth are on
- Install Arduino on PC (current version: 1.6.5)
Download from https://www.arduino.cc/en/Main/Software
- Start Arduino
- Select port that FTDI cable is connected from Tools/Port
- Start Tools/Serial Monitor from menu.
- Check that baud rate is set as 9600 (default parameters for bluetooth module are 9600 baud rate, 8 data bit, 1 stop bit and no parity)
- Check that FTDI connection is established by typing AT command. Response should be OK.
- Type the following commans in order:
AT+NAMEBLTDRONE
AT+BAUD8
First command will set a name for the bluetooth connection (this will appear in the bluetooth device list on PC). For example BLTDRONE
Second command will set baud rate to 115200 for bluetooth connection.
- Select 115200 on Arduino / Serial Monitor screen in order to set current connection baud rate same as bluetooth module.
- Check connection again by AT command
- Set bluetooth connection password by
AT+PIN1234
where 1234 is the new password
- Disconnect USB cable
- Connect bluetooth module to flight controller
For CC3D: Use 4 wire cable that comes with CC3D package.
CC3D Main Port for bluetooth module connection




Note that TX connects to RX and RX connects to TX.
- Connect power to FC. Check that red LED is flashing on bluetooth module
- On PC, enable bluetooth
- Scan for devices and pair with BLTDRONE device, using password 1234
- Start CleanFlight
- Select bluetooth port as connection name and 115200 baud rate as connection parameters and connect
For mac, connection name is /dev/tty.BLTDRONE

Connection with Android
- In CleanFlight, add another VCP port
Bluetooth connection is on UART3
- Download and install EZ-GUI Ground Control Station on Android
- Enable bluetooth on device, pair as described above with same password
- In EZ-GUI, select Bluetooth as connection type in Settings menu
- Select bluetooth module from paired list
- On main screen, select Connect

Reference Links:
http://quadmeup.shtr.eu/adding-bluetooth-telemetry-to-flip32-and-cleanflight/
Video from Painless360: https://www.youtube.com/watch?v=aqhcpz-faLk
OpenPilot Wiki: http://opwiki.readthedocs.org/en/latest/user_manual/oplink/bluetooth.html


No comments:

Post a Comment