×

Warning

Error loading component: com_tags, Component not found.

Summary of Project Idea

After discovering the Turnigy 9X and the development of 3rd party firmware, I got the idea to start creating a new controller board for the Turnigy 9X to enable the controller to directly connect with a computer for logging and control purposes. It is also the intention of this project to allow a second radio transceiver to be installed inside the transmitter to allow a serial/telemetry link with a controller inside the aircraft for my other projects.

During research for this project, I discovered 2 different boards being developed/sold which have a similar idea although not for the purposes of UAVs in mind. The project, Gruvin9X, provided a very helpful resources including a schematic of the original Turnigy 9x as well as the ability to look at another board and how they designed it. After finding the Gruvin9X project, I discovered another board, the ErSKY9X, which aims to use an Atmel ARM chip to greatly exceed the capabilities of the original 9X board. These 2 projects aim to greatly improve on the existing Turnigy 9X platform and in turn make advanced featured transmitters available at a price point more affordable to the common hobbyist.

Project Details

The primary aim of this board is the ability to be suitable as a full UAV controller suitable for certain competitions as well as a general purpose advanced RC transmitter. These basic abilities means that the RC Transmitter requires to remain as a standard RC Transmitter to provide the basic functions that are vital for the operation of the aircraft as well as a platform to give visual feedback to the user of position and altitude of the aircraft when the aircraft is being controlled by its onboard computers. The added ability to log the telemetry data is also required to make performance comparisons between different settings on the UAV.

To make the replacement board as simple and cheap as possible, a single microcontroller is to be implemented with expansion options to allow for other radio modules or GPS modules to be added by the user.

During development of the replacement board, it was thought a simple 32 macro-cell CPLD (Complex Programmable Logic Device) could be used to allow free up pins on the main microcontroller for other functions, while also making interfacing with the LCD module easier and faster. It was discovered during implementing the basis of the code for the LCD controller that the intended function could not fit within a 32 macro-cell CPLD and at least a 64 macro-cell CPLD would be required. The cost of adding the additional IC into the design reduced the appeal of the QFP-100 microcontroller and CPLD design. It was noted that moving to a QFP-144 microcontroller design would have yielded easier coding with little additional cost and greater feature range than adding a CPLD to the design.

During research for this project, I discovered 2 different boards that have been made and currently either finalising the design to prepare to sell boards or already selling the boards. The boards similar to the one that this project aims to develop, are developed without UAVs in mind, but it shouldn’t be too hard to add those components to their boards to suit the basic tasks I have in mind to complete the objectives of this project.

The boards either centre on an overpriced microcontroller, although the microcontroller selected does have the advantage easier and faster code development as the microcontroller can reuse code developed in the original ER9X firmware project; or have features which I do not need for my intended purpose but may be useful for other users such as Bluetooth or a speaker.

The Gruvin9x is based around the Atmel ATMega 2560 while the ERSky9X is based around a Atmel Cortex-M3 processor and a Atmel ATTiny87. The ERSky9X also features a MAX3223 which prohibits the use of GPS units that are already at TTL/CMOS levels on the 2 available USART ports, although from my understanding the third port available which is connected to the Bluetooth module is available when the module space is not populated.

The following features have been included in the design to meet the design requirements of this project:

  • A microSD card slot is provided at the edge of the board with full SDIO support to provide storage for settings, models, and logging of telemetry and aircraft input.
  • 3 USART ports are provided for additional peripherals such as XBee Modules, GPS Modules and Bluetooth Modules, the first port also provides CTS and RTS signals if required.
  • A SPI Port which can be clocked at up to 30MHz
  • A micro USB-B connector has been provided to interface with computers to allow for Joystick emulation for simulator use, or serial port emulation to work with a program for logging, control or setting variables on the UAV's control board.
  • A dedicated JTAG/SWD port has been made for programming and debugging purposes, the port shares pins with the SPI port.
  • 2 DAC Outputs have been brought out to a header to allow for an optional speaker to play sounds on conditions set by user. A full I2S (shared with the SPI port) interface is also provided if the user does not want to use the microcontroller's DAC
  • A space for an optional RTC 32.768 kHz crystal has been left unpopulated on the PCB if a more accurate clock source for the internal RTC is needed, although the microcontroller has an integrated RTC crystal
  • Lastly a connector for an optional battery backup is available if the time is needed to be kept for logging purposes

Due to the lack of access to a physical Turnigy 9X currently, I'm unable to size the space in the transmitter which would allow me to determine whether a XBee Module could fit directly on the PCB with little issue. In the future, this feature that could be added in the design when I have access to the transmitter.

Project Plan

Stage 1:

Start PCB design around known measurements provided by other projects. Acquire a Turnigy 9X transmitter to allow measurements to be made to ensure design will fit into transmitter body. Design a temporary PCB to allow prototyping with a STM32F4-DISCOVERY board. Start porting ER9x software to the STM32F2/4 architecture. Designing PCB is expected to take up to a month, with the temporary PCB taking less time (approximately 1 week) due to less design requirements.

Stage 2:

Finalise PCB design and send to PCB manufacturer, testing all functions after assembly to ensure design objectives have been met and the basic firmware based on ER9x is functioning correctly. Start rewriting firmware to allow for more advanced features not originally available in ER9x. Design modules to connect to function ports including an XBee Module. Assembly and Testing is going to take approximately 1 week providing the port of ER9x has been completed previously. Designing modules to connect to function ports will take approximately 1 week per module. The rewriting of the firmware will take approximately 1 month to complete and should allow for all project objectives to be fulfilled.

Bill of Materials

Components for a single board:

Item Name
Qty
Unit Price
Sub-Total
STM32F205
1
$ 9.80
$ 9.80
25MHz SMD Crystal
1
$ 0.86
$ 0.86
Custom PCB
1
$ 8.00
$ 8.00
200 Ohm Resistors 0603
8
$ 0.02
$ 0.16
0.1uF Ceramic Caps 0603
16
$ 0.024
$ 0.38
2.2uF Ceramic Caps 0603
2
$ 0.07
$ 0.14
16pF Ceramic Capacitors 0603
2
$ 0.13
$ 0.26
1uF Ceramic Caps 0603
14
$ 0.125
$ 1.75
10uF Ceramic Caps 0603
1
$ 0.43
$ 0.43
LCD Connector
1
$ 1.11
$ 1.11
5x2 1.27mm Header
1
$ 0.87
$ 0.87
Micro USB Type B
1
$ 0.87
$ 0.87
7-pin 2mm Connector
1
$ 0.33
$ 0.33
5-pin 2mm Connector
3
$ 0.24
$ 0.72
6-pin 2mm Connector
2
$ 0.28
$ 0.56
9-pin 2mm Connector
2
$ 0.40
$ 0.80
12-pin 2mm Connector
1
$ 0.51
$ 0.51
Tactile Switches
6
$ 0.26
$ 1.56
2-pin 2mm Right Angled Connector
1
$ 0.11
$ 0.11
N-Channel MOSFET
1
$ 0.14
$ 0.14
MicroSD Card Slot
1
$ 2.96
$ 2.96
LD1117S33CTR
2
$ 0.48
$ 0.96
Total in USD
$ 33.31

Equipment Needed For Project

Stage 1:

  • STM32F4-DISCOVERY Development Board
  • Turnigy 9X
  • Custom PCB for development

Stage 2:

  • Infrared reflow oven
  • Solder Paste
  • Paste Stencil