Tag Archives: bluetooth

HobbyKing AIO – GPS and Bluetooth

I started by connecting the HobbyKing AIO board to the GPS that I bought from HobbyKing for $35 and to the HC-05 Bluetooth module. This allows me to configure the AIO via BT.

IMG_8400

The connections are as follows:

GPS to AIO board

The UBlox Neo-7M GPS comes with a cable that has 2 mini-molex connectors, one with 4 pins and one with 5 pins.

gps connector

Some changes must be made to these connections in order to fit them to the AIO board. Moving the cables between pins is simple – lift the flap that holds the cable inside the connector and pull the cable out. See the photo below.

IMG_8401

The changes to cabling are as follows:

4-pin connector

The 4 pin connector is connected to the i2C connector on the AIO.

It should have the following cable connected to it, from top (leftmost) to bottom:

  1. SCL – moved from pin 2
  2. SDA – moved from pin 3
  3. VCC – moved from the 5-pin connector
  4. GND – moved from the 5-pin connector

5-pin connector

The TX and RX cables from the 5-pin connector must be connected to RX2 and TX2 on the AIO board respectively. So I replaced the 5-pin connector with a 6-pin connector that I had from the AIO package and connected the TX and RX cables at the right slots.

AIO board to HC-05 BT module

The BT module connects to the FTDI port on the AIO as follows:

  1. AIO GND  —> HC-05 GND
  2. AIO VCC   —> HC-05 5V
  3. AIO – RX   —> HC-05 TX
  4. AIO TX is connected to HC-05 RC via a voltage divider in order to protect the HC-05. The HC-05 uses 3.3V while the output of the AIO board may be 5V. The following photo of a crumpled piece of paper shows the two resistors that form the voltage divider.

IMG_8402

AIO external power

The AIO receives 5V power from an external source on the GND and VCC pins.

 

 

HC-05 Setup

The HobbyKing AIO that I’m using in this project talks MAVLink with the APM console (or any other MAVLink management console). I decided to use BT for connecting it to the console so I borrowed a HC-05 module from my good friend Tomer.

The HC-05 comes configured for 38400 bps (bits per second) so the first step was to configure it to operate at 115200 bps.

Configuration of the HC-05 is done with a FTDI board. I bought one on Ali express for $2.48.

Here are the HC-05 on the right and the FTDI board on the left:

IMG_8391

This FTDI board has a switch that sets it to use 3.3V or 5V. Since the HC-05 is sensitive to voltages over 3.3 I used 3.3V.

The HC-05 enters configuration mode (via AT commands) when pin 34 is pulled high. On this board pin 34 is connected to “Key”.

The two boards are connected as follows:

  1. FTDI ground —> HC-05 ground
  2. FTDI TX          —> HC-05 RX
  3. FTDI RX          —> HC-05 TX
  4. FTDI VCC       —> HC-05 Key
  5. FTDI VCC       —> HC-05 5V

Now the FTDI board can be connected to a USB port and you can use a terminal program (I used Arduino’s serial monitor) to connect to it. Remember that the connection speed is 38400.

Sent “AT” to the board and it should respond with “OK”.

To change the bit rate send “AT+UART=115200,0,0”. The board should respond with “OK” and it is ready.

The data sheet for the HC-05 can be found here.