Quadrocopter MultiWii, serial Bluetooth connection

Yes, there is a cheap and working Serial-To-Bluetooth module available. This can be used in Slave function to get a wireless serial link to a Host computer for control.

I am using an Arduino Nano 3 with integrated Mini-USB port as the controller. Because there are 1 KOhm resistors between FT232 (USB-Serial converter) and CPU serial port, you can also connect the Bluetooth Serial module for serial communication. This is also the case for the Arduino Mega (ATMega 1280 CPU) controller.

You can use an Android App to change parameters.

You can use the MultiWiiConfig program, if the RXTXcomm.jar library is up to date (version 2.2pre2).

Serial Bluetooth Module

Attracted from a low price (about 8 EUR incl. shipping) I ordered a Serial-To-Bluetooth module Serial Bluetooth RF Transceiver Module RS232 w/ Backplane Enable & State Pin

Size: 40 x 16 mm
Coverage: about 10 m
Baudrate, default: 9600 baud 8N1
Bluetooth pairing code: 1234
Bluetooth name: lenvor, Type: HC06 - slave only
Power supply: 5V, 10 mA (Chip has 3.3V)

Type Information from Klaus DJ7OO:

I will just document the technical details for use. A more detailed guide is found on Fangin.com

In order to use this Serial Bluetooth Module for a wireless serial link to the MultiWiiControl (MWC) you have to configure it first with some AT control commands.

Hardware connection to the Serial Bluetooth Module for configuration with a PC:

MWC plug - BT J1 pin
--------------------
+5 V    -> 2, 5V (VCC, red wire)
GND     <> 3, GND
RXI     <- 4, TX data (3.3 V)
TXO     -> 5, Rx data

use an USB-to-Serial converter or a Nokia C-42 cable (Ebay) to test and change parameters.

Under Mac OS X using "CoolTerm":
Set local echo ON

Under Linux using PUTTY or "CoolTerm":
Set local echo ON
Text from the clipboard is inserted into the terminal window via the middle mouse key.

Do not use Carriage Return CR or Line Feed LF!

All commands (Input) should be entered in a Terminal window with copy and paste, just typing AT (fast, repeating) is ok.
The Serial Bluetooth module does not echo the input characters. You can do that with the terminal program.

For example, change name from "lenvor" to "MultiWii" and baudrate from 9600 to 115200 baud for MultiWii:

Input, no echo  Output      Note
-----------------------------------
AT              OK          for test
AT+NAMEMultiWii OKsetname
AT+BAUD8        OK115200    re-connect with new baudrate 115200
AT+PIN1234      OK1234

Note: if it does not work, try to swap RX/TX lines on one side.

The Bluetooth module itself needs a supply voltage of 3.3 V. The backplane has a 3.3 V regulator on board and has 6 connection pins, spaced 2.54 mm.

In order to avoid any conflict with +5 V data line, you should insert a 1 KOhm resistor in series to the RXD data line of the Bluetooth module. The transmit signal TXD has a 3.3V output level and must override the signal from the FT232RL USB/Serial converter, which is connected via a 1 KOhm series resistor to the CPU.

attachment:AndMwc_19p.png

attachment:AndMwc_19s.png

Android App MultiWii Configurator

There is an Android App by Nando (Android MultiWii Configurator, version 0.3.4) to adjust the PID parameters and more. On a LG P500 smart phone (display 320 x 480 pixel) it works, just the last parameter RC EXPO is not readable because of the small display. But you can scroll the screen vertical, so RC EXPO is reachable.

It supports MultiWii conf version 1.7, 1.8p2 and 1.9. Not 2.2.

There is also a second screen mask (AUX switching), you see it if you touch and move your finger horizontal over the screen. That allows to configure the AUX switching, for example LEVEL (ACC) and BARO.

Under Menu/Calibrate you can calibrate the ACC and MAG sensor.

In order to use the program, you first have to pair the Serial Bluetooth module with the PIN (default = 1234) under Menu/Settings->Select Bluetooth device. Here you can see the name of all to the smartphone known Bluetooth devices, tap on the device name which is connected to the MultiWiiControl.

Next you tap on Menu/Connect to connect to the Bluetooth device (e.g. named MultiWii). It can take a few seconds. The blinking LED on the Serial Bluetooth module will lit permanent if the connection is established.

Under Menu/Extras you can tap on Screenshot in order to save the screen contents to the folder amwc on the SC-Card, the name is AndMwcScreenshot_...png.

You can also save and load a set of named parameters in a profile file on the SD-Card in folder amwc with the entered name name.mwc.

Android App MultiWii EZ-GUI

It works with MultiWii version 2.2. I tried version 3.45. * It has an Exit button, and switches off Bluetooth and GPS at exit.

Android App NAZE32 Configurator

It works with MultiWii version 2.2. I tried version 1.49.

Function Matrix of Operating Systems

In all operating systems it did not work on the first try. Partially it has to do with the RXTX library version (see Links).

Problem Linux, Ubuntu 1104

While Bluetooth pairing to device MultiWii you have to take the pre defined PIN "1234".

The following tools are used for setup and debug:

Setup for automatic connection to your Serial Bluetooth device.

Manual connection to your Serial Bluetooth device, for debug

Linux, Ubuntu 1104, works after update

There is a problem with the RXTX Library version 2.1-7. You have to use version 2.2pre2, see above.

For the MultiWii conf program to work with rfcomm0, you have to compile it with the Processing tool (see Links), which must have an updated RXTX library version 2.2pre2.

Processing is the Cross Operating System development tool for Arduino and MultiWii conf.

Problem Windows 32

With a Bluetooth dongle inserted the Arduino IDE and the Config Program has a major start delay, and problems finding the serial ports.

A solution was worked out by "eried" in the Arduino forum: Road to solve the delay on the Arduino IDE

You have to replace the file rxtxserial.dll in the Arduino folder. This file can be downloaded from the given web address (version from 2009-03-17).

In my case on Win7-64 the serial ports COM6 and COM7 are created for the Bluetooth connection. When you look on the property page (Eigenschaften), you will see on the service (Dienste) tab "Serieller Anschluss (SPP) Dev B COM6".

The Bluetooth pairing with code "1234" does work without problem.

When I try with the program PUTTY to open a serial connection on port COM6 I will get an error: "Unable to open connection to COM6. Unable to open serial port".

The ArduinoBT also has a problem, see Arduino BT connection problems, which is solved with a modified boot loader. Unfortunately it will not help in my case.

List of pages in this category:

-- RudolfReuter 2011-09-27 10:08:08


Go back to CategoryQuadrocopter or FrontPage ; KontaktEmail (ContactEmail)

QuadrocopterBluetooth (last edited 2017-05-02 07:58:37 by RudolfReuter)