Wednesday, May 20, 2015

Spectra Module to Bluetooth Link for RC Telemetry

The Android App I created, "RC Telemetry", will display the telemetry received from a Hitec Spectra Radio system. Unfortunately, to receive that data directly from the aircraft you would need Hitec's proprietary radio receiver and creating something like that is just too hard. Fortunately, there is another way to receive the telemetry data, and that is by receiving it from the Hitec Spectra module in your transmitter itself. The telemetry data is sent back to the Spectra module from the aircraft and if you are using a Hitec Aurora radio system, the data is then sent on in to the radio and is displayed on the control panel. If you are using just the module inside a different radio, then you can still get at the telemetry data, but you have to access it by connecting to the Spectra module. The Aurora radio receives the telemetry data over a low level protocol called I2C and we can use it to to get access to the data.  In that protocol, there are "Slaves" and "Masters" and they refer to the roles that the devices play when communicating. In the Hitec system the Spectra module is the "Master" and sends data out to all "Slaves" on the bus. In order to start receiving the data, we have to connect a device and have it become a "Slave" to the Spectra module.

Once you have connected to the I2C bus and set about becoming a "Slave" you will start receiving data like any other "Slave" on the bus. So in order to get the Android App the telemetry data, we need to create a little hardware device that will connect to the Spectra module receive the data and transmit it on to the Android App. The easiest way to transmit the data to the Android App is to send it over a Bluetooth Serial link, and that is just how the App is coded.

Here is how the data flows through the system:
Spectra <- (I2C) ->Teensy (Serial Data)->Bluetooth Module (2,4GHz radio) -> RC Telemetry App

The following is my description of how I assembled a device that does what is described above. I experimented on a breadboard, but I will be soldering this together to make a little unit to connect to my radio all the time. I will include picture of that in a different post.

I have recreated this device using three different micro controller boards: Adafruit Trinket, Teensy 2.0 and the Teensy LC. Of these three boards, I really prefer the Teensy LC because it is so much fast than the other boards, so you can do much more with it. In fact, I have added a little Nokia LCD display to the device so I can display real time telemetry right on the LCD screen without the need to even have the app running.


  1. Microcontroller board:
       Teensy 2.0, running at 3V3 - $16 for board and $1 for the 3V3 regulator
       Teensy LC running at 3V3 -  $11.65
       Adafruit Trinket 3.3V - $6.95
  2. Bluetooth Serial Module - $6.27 from
  3. Standard Servo Cable (3 conductor, keyed)
  4. 2 1.5K Resistors to use as pull ups



The pins of the TeensyLC and Bluetooth modules have names and are marked on the devices. We will be using the TeensyLC's hardware serial port, so we must use the specified pins. Here is the connection matrix:

Teensy to Bluetooth
TeensyLC pictured

 Teensy 2.0  TeensyLC  Bluetooth 


The Spectra module has a port in it where a standard Servo connector can be connected. It might be covered by a small plastic cover, We will number the port from the top to the bottom. The top is the connection closest to the keyed port. In the photo the yellow line is connected at the top:

Spectra to Teensy
Spectra Module with Servo Cable

 Teensy 2.0 
1 (yellow) 
2 (red)
3 (black)

In order to connect the servo connector to the Teensy, I used 3 pins plugged into the servo cable and that plugged into breadboard. The 1.5k resistors can be seen plugged from the pins to the 3.3V bus. These must be present to in order to pull up the I2C bus:
TeensyLC pictured with Pull ups


Plug in your Teensy at this time, it should power up and the Bluetooth module should power up as well. On the both the Teensy and the Bluetooth module there are LEDs that light up, if you do not see any lights, unplug it and check your connections.
When the Bluetooth module gets power, you will be able to bind it to your computer or your phone. It will not get any data yet, of course, but you should see it out there. After you bind to it and connect, the blinking light will change to steady on.


Install Arduino and Teensyduino in order to program the module using the Arduino interface. The program for the TeensyLC version of the program depends on the i2c_t3 library, so make sure that you install that library when given the choice while installing Teensyduino.

Note, For the Teensy 2.0, I am running it at 3V3 and at that voltage, it is supposed to only run at 8MHz; I run it at 16MHz and there do not appear to be any ill effects. On the TeensyLC, this is no issue, it is a 32 bit processor running at 48MHz at 3V3!

I have written a simple program that will configure the micro-controller to be a slave on the I2C bus so that it will receive data from the Spectra module. As soon as it receives a packet of data, it immediately transmits that data out to the Bluetooth module. This program is dumb, it does not even look to see if there is a valid Bluetooth connection or anything, it just sends the data. It does have some code in there to blink the LED on the board when it is receiving data and to glow steady if no data is being received.


The TeensyLC version of the program does not take any special modification to the library it uses, so just download the program and load it up in the Arduino environment and program the Teensy LC with it.


Teensy 2.0

The program for the Teensy 2.0 depends on a modified version of the Wire library called WSWire. This modification has a set of loops that will reset the I2C hardware on the Teensy if the bus gets locked up. Be sure that you install the WSWire library, I provide a link here, but I think you can find it elsewhere too. To install the library, follow the directions on the Arduino website, there are instructions on how to install a library there.

WSWire Library

Download the Arduino program below and program it onto your Teensy, it should start running immediately