Bluetooth Serial Communications with the APM

I've heard some people mention using bluetooth to communicate with microcontrollers as replacement for a serial or USB & FTDI. Recently some small bluetooth serial modules have become available from large electronics retailers and smaller ones that operate on large internet auction websites. They can be purchased now for just a few bucks. The module has all the bluetooth components integrated and takes 3 volt TTL level RS232 signals. It comes in a surface mountable pcb package, however breakout boards are available that have easily hand solderable headers, and a 3V regulator etc:

 

Although these modules are 3V, they will work with the 5V APM, so long as there is at least a 1K resistor on the RXD (which is what the 5V TX line on the APM will drive). The 3V signal from the module to the APM is OK as it is.

 

Starting communication is a matter of pairing with the device which comes up as 'linvor', then enter the default pin (0000). Add a com port to the device - mine comes up as COM8. The baud rate is 9600 by default, but can be changed with a special AT command, I set mine to 57600.

 

 

The range is nowhere near the XBees of course, however it is useful to configure PIDS  in the back yard etc - it's also nice and cheap.

There is some information in a multiwii discussion here. Also an interesting page with some useful technical info here.

Views: 3925

Tags: bluetooth, wireless

Comment by OG on April 2, 2012 at 11:01am

why do you need a 1 k resistor I use this setup a while back with the same module on a xbee shield master with back plane. can you tell me? I also working with Bluetooth mate silver after buying one more of these modules from goo luck buy for $9 & burning it out :( , i decided to go with the spark fun cheapest model still trying to get that to work. but the one on the xbee shield works no problems still.

Comment by Andrew Radford on April 2, 2012 at 11:59am

These modules need the resistor because they run 3V. So the TX out from the BT is 3V which is OK for the APM, but the TX output of the APM is 5V which is NOT good for the BT. Without the resistor, the RX line of the BT would burn out. 

Comment by Andrew Radford on April 2, 2012 at 12:00pm

Alex - standard telemetry baud is 57600 - set it to that.

Also are you sure that is the APM TX line you have put the resistor on?

Comment by Alex on April 2, 2012 at 12:19pm

Andrew on the APM i have GND / +5V / OUT / IN  , on the bluetooth module i have : vcc / gnd / txd /rxd. Where should be the resistor ? I will change now the baudrate of the module to 57600 and give another try. Thank you.

Comment by Alex on April 2, 2012 at 12:46pm

I've changed the baudrate to 57600 (so i think that i did not burned yet the bluetooth module :) ). I'm waiting your answer regarding the connection between APM and the module. 

Comment by Andrew Radford on April 2, 2012 at 2:41pm

It looks like on your photo you have the resistor from the BT TX to the APM RX, That's not correct, it should be between the APM TX and BT RX. Be careful about the 'TX' label on the APM board for the LED, not the pin.

You can also verify the BT module by connecting RX and TX pins (independent of the APM) and seeing if you get echoed characters on a serial terminal. This should work at any baud rate so is a good sanity check

Comment by druckgott on April 4, 2012 at 8:51am

Hallo Since ardcucopter 2.5.3 it do not work anymore for me nothing changed?

Do it work for you on 2.5.3??

Comment by Meiser on April 25, 2012 at 4:44am

Hello everybody,

I´trying to connect my bluetooth modul to APM2.0 but it won´t work for me.  Is there a workaround meanwhile

Cheers

Comment by Vernon Barry on April 25, 2012 at 6:15am

Meiser, on APM 2.0 a couple of us have had problems using the telemetry port shown in the instructions. The workaround is that there is another UART0 port on the long edge of the APM next to the ICSP 2x3 port. You can see the silkscreen on the bottom and the pinout is the same as the other port. It appears to be that on the bottom of the APM, there are solder pad jumpers intended to connect the port listed in the instructions to UART0 or UART2. Bottom line is that we know 100% if you use the hardwired port next to the ICSP 6 pin connector it will work.

Comment by Vernon Barry on April 25, 2012 at 8:18am

Here is a thread discussing the problem with Xbee on APM 2.0

http://diydrones.com/forum/topics/xbee-problem?id=705844%3ATopic%3A...

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service