CC1101 UHF Radio Transceiver: alphaTX
By Richard
- 5 minutes read - 888 wordsAlphaTX Project
The alphaTX is an easy to use radio based on the TI CC1101 transceiver chip and an STM32 microcontroller.
The goal of this project is to develop an easy to use radio transceiver for the 433 MHz band. It is inspired by OpenLST from Planet Labs, which is an open-source transceiver similar to those used in Planet’s satellites.
Several CubeSat projects I’ve worked on have based their radio designs upon OpenLST. It’s a great reference, but embedded software development for it requires a $100 programmer and a custom development toolchain. I wanted alphaTX to have an approachable development toolchain and low development costs.
The CC1110 used in OpenLST is an 8051 microcontroller attached to an RF block. The built-in 8051 is what makes development difficult, since it is what is imposes the debug tool restriction, and it has limited RAM and flash. By pairing your own microcontroller with the CC1101, which has the same RF block as the CC1110, you can build a device with the same RF performance and fewer software development restrictions.
Video
Project Goals
- With a solid embedded software architecture, develop an easy to use radio transceiver board that could operate as a CubeSat command and telemetry radio system or a wireless replacement for a UART.
- Minimize barriers to entry for those who may wish to customize alphaTX firmware or hardware for their application.
- Get acquainted with the STM32 development ecosystem.
- Learn about RF design.
- Make it easy to support different packet radio protocols and different data interfaces.
STM32 Microcontroller Selection
More and more projects online are using STM32s, likely because of their many peripherals, good driver libraries, and low-cost dev tools such as IDEs and debuggers. I chose the STM32 for these reasons, and because I hadn’t used an STM32 in a personal project before.
Clones of the ST-Link v2 debugger can be found on Ebay for about $10. That’s much more attractive than the $100 CC debugger required for the CC1110, and it can be reused on any STM32 project.
A common and inexpensive development board is the STM32 Blue Pill, with an STM32F103
onboard. Since I had a Blue Pill already that I could use for embedded software development before the PCBs arrived, I chose the STM32F103
for the first hardware revision.
Hardware
The main components in the system are:
- CC1101 radio transceiver.
- STM32F103 microcontroller to interface with the user’s system and to manage the CC1101.
- FT230 to provide USB-UART conversion for easu interfacing with a PC.
- 24FC16T EEPROM for storing non-volatile configuration settings.
A microcontroller plus an FT230 is a pretty standard architecture for my projects. While the STM32 has USB support built-in, I decided to lean on the FTDI to keep things simple for the first revision. My goal is to make a radio, not a USB driver.
The PCB
KiCAD was used for the schematic and board layout. As I’ve been doing recently, I kept a project-local footprint and symbol library instead of using a common or default one. This makes the KiCAD project 100% portable, which is not always the case when trying to reference components from the default libraries that a user may or may not have installed.
Embedded Software
Embedded software for alphaTX is written in C++. The main modules are:
- Command handler
- Radio protocol handler
- CC1101 driver
Commanding
AlphaTX takes commands (for controlling alphaTX) and data to transmit over the radio over its UART. Commands are designated with a leading /
, and other data without a leading slash is transmitted with the radio. All commands or data to transmit are delimited with \r
, \n
, or \r\n
to provide compatibility with different serial terminals.
When an alphaTX receives data from its radio and can decode it successfully, it is also emitted from the UART. When the optional debug outputs are disabled, alphaTX can act as a wireless replacement for a UART.
Protocol Details
There are two components to the protocol: keepalives and data acknowledgement.
When two alphaTX boards are set up, they transmit keepalives between each other unless there is other data to send. This regular ping-pong of data between boards helps keep the link state good, as the CC1101 is configured to calibrate its frequency synthesizer whenever it switches between transmit and receive. Without this regular management, it can take a few tries to successfully have a packet acknowledged, likely because of slight frequency drifts between the two boards. It will be interesting to see if the need for this can be eliminated by using a 0.5 ppm TCXO instead of the relatively unstable 30 ppm crystal.
Once an alphaTX receives data, it always acknowledges it by transmitting a packet. The board who originally sent the data will keep trying to transmit the data if it doesn’t receive an acknowledge packet after a certain amount of time.
RSSI Indicator
Each packet received by the CC1101 makes its RSSI (in dBm) available. In debug mode, the RSSI is printed alongside the received packets.
The RGB LED on the alphaTX board is used to indicate the RSSI by colour. This is a fun feature to experiment with. As you walk across the room, you can see the LED transition from blue (very good RSSI) to green, yellow, and red as the signal strength decreases while alphaTX tries to maintain the link with the keepalive packets.