Hitec Optima PPM

*UPDATE – Hobby King now stocks Hitec compatible receivers with PPM and RSSI outputs. I would recommend purchasing one of these before considering modification of your official receivers.

**Only attempt this modification if you know what you are doing and understand the risks.

The lack of PPM output on Hitec Optima receivers is disappointing. To fill the void I have written firmware that will work with the regular Optima series (Optima Lite not tested) with a combined PPM output. The project is hosted here.

A quick search pointed me to some work by Libor Tomsik that seemed to do the job. However, I thought I could compile a cleaner implementation. I found that the processors in the Optima range appear to doing the exact same thing, the Optima 6 and 7 are even toggling the channels on their non-connected pins.

I mapped the pins:

PORTC
PC0 – Channel 2
PC1 – Channel 1
PC2 – Channel 6
PC3 – Channel 7
PC4 – Channel 8
PC5 – Channel 9

PORTD
PD0 – TXD
PD1 – RXD
PD2 – Channel 5
PD3 – Channel 4
PD4 – Channel 3

The Optima receivers have two AVRs, the master deals with control of the wireless transceiver and the slave simply receives channel timings through USART (115200 8N1) and outputs them with PWM. The serial data stream has packets as follows:

  • Arrive approximately every 20 ms and contains 21 bytes
  • Begin with two bytes of 0xFF
  • End with 0xEE
  • Has channel values ranging from 0x19EB to 0x3C7A. This corresponds to the number of timer ticks on a 7.3728 MHz clock in 900 us and 2100 us.

I threw together some firmware that can operate on the secondary AVR of the Optima range. The code is relatively simple, and has a basic blocking loop that outputs CPPM on the highest channel and regular PWM on the others.

PPM frames will remain shorter than 21.4 ms and have a sync pulse that is 4.6 ms. Due to the fact that Hitec chose to transmit all 9 channels to all their receivers, you could have 9 channels on the PPM frame. However, this firmware only outputs the first 8 channels for compatibility with flight controllers. You can easily add more channels by changing the preprocessor macros yourself in the source code.

There are two options for this firmware:

  • Flash onto the existing slave AVR of the receiver.
  • Solder to the RX line and intercept the signal with another microcontroller.

##################################################
FLASHING THIS FIRMWARE IS NOT REVERSIBLE AND
WILL VOID YOUR WARRANTY, I AM NOT RESPONSIBLE
FOR ANYTHING THAT HAPPENS WHEN YOU USE IT
##################################################

Before you decide to flash this firmware. I think it would be most useful to put this on an Optima 6 or 7. It would be a waste to use the Optima 9 as they are quite big and bulky. The smaller Optimas can be stripped of their cases and have the boda antenna exchanged for something like this.

Visit the project site to retrieve a copy of the hex file for your receiver. To flash the firmware you will need to make a wire harness to contact the programming pins, the pinout is below. Refer to this guide for more instruction on flashing the firmware.

There are two variations of the firmware:

  1. MIXED MODE
    • Regular PWM is output on the lower channels of the receiver (1 to N-1) and combined PPM on the highest channel (N).
  2. SELECTABLE MODE (Not tested extensively, only bench tested)
    • Regular PWM on all channels or
    • Connect the signal pin to ground (with a bind plug) on channel 1. Enables combined PPM on the highest channel of the receiver.

All builds are available from the downloads section here. If you want to build the firmware yourself, you will need to set up a proper build environment and use the provided Rakefile.

MAKE SURE YOU FLASH THE CORRECT MICROCONTROLLER, YOU WANT THE ONE THAT IS THE SLAVE, NOT THE ONE THAT DEALS WITH WIRELESS TRANSFER. Optima 6 and 7 have the pads in similar locations. Optima 7 here.

hitec

##################################################

Common Questions

Is the voltage level of the programmer something I need to think about?
The Optima receivers operate on 3.3V. Although the AVRs are 5V tolerant, I am not certain whether they share the same bus as the other components (CC2500) that are not 5V tolerant. To be safe, if you only have a 5V programmer it should be ok to connect all the programming pins except VCC in order to program. You will just have to power the receiver from the SPC port or the servo bus with SPC jumper connected.

Leave a Reply

Your email address will not be published. Required fields are marked *