Orange Module running MULTI protocol
Posted: Sun Apr 24, 2016 11:01 pm
There is a thread on RCGroups describing how to build your own Tx module. This supports various RF sub-modules and uses an Arduino Pro Mini to control them. One of the RF options is DSM2/DSMX. It uses a protocol called MULTI to communicate with the transmitter. The firmware is open source.
Details for all this are here: http://www.rcgroups.com/forums/showthread.php?t=2165676.
I have ported the firmware so it runs on the Orange DSM Tx module(s). One advantage of using this is it works with the BNF models the original firmware fails with.
The main problem is flashing the new firmware. The Orange modules use an Atmel XMEGA device that needs to be flashed using a "PDI" programming interface, so a USBASP cannot be used.
To help with this, I've coded a PDI XMEGA programmer in the "maintenance mode" of ersky9x for the 9XR-PRO and the 9Xtreme. This is available in the file ersky9xProvR219m.zip (or later) at: viewtopic.php?f=7&t=4676&p=65894#p65894.
Since I created a bootloader for the Orange module, it now means you may only need to flash the bootloader to the module, then you can flash the application from a radio running ersky9x, or possibly using a FTDI device (not tested), but you will need a resistor in the Tx signal from the FTDI device if it outputs 5V.
You still need to get the bootloader onto the module. As a way of doing this, I've produced a sketch for an Arduino Pro Mini that contains the bootloader code, and also PDI programming code.
To use, connect:
Ground from the module to ground on the Arduino.
Vcc (3.3V) from the module to Raw (or maybe VCC) on the Arduino (I tested using Raw).
PDI Clock from the module to IO2 on the Arduino.
PDI Data from the module to IO3 on the Arduino.
Power the module, the Arduino will be powered from the 3.3V from the module.
After a couple of seconds, the LED on the Arduino will flash, around once per second if the bootloader flashed OK, and 5 times per second if it failed.
In theory, the Arduino is running too fast (16KHz) for operation from 3.3V, but it should work, and only needs to flash the module once.
The sketch for the Arduino: I've created some instructions on how to do all this in the attached .pdf file ("PDIflashing.pdf"). The firmware file(s) for the Orange module is also attached. Note that some older modules are blue, and these need the 'blue' version of the file.
I've built files for both the Green and Blue boards from sources that support the bootloader. These files are the 1.1.6.21 sources, with the addition of improvments for the FrSky X telemetry protocol, and they also check for an attempt to flash the bootloader and drop out to the bootloader. Use these files if you have er9x/ersky9x/openTx with the DSM changes (Sep 2016) that provide DSM2-22, DSM2-11, DSMX-22, DSMX-11 and AUTO, sub-protocol options. Instructions on modifying a Taranis to be able to flash a XMEGA device:
Note: On a standard Taranis (not a PLUS), you will need to remove RP1 from the main board for this to work, see: viewtopic.php?f=40&t=8753&p=118349#p118349. The "Blue" module also needs a track cut to allow it to work. The picture in the PDF file shows a wire that needs to be added to allow telemetry to be used. The processor pin the wire connects to is tracked to the next pin (corner pin). This connection needs to be cut, while still leaving the corner pin connecting to the track (it is the serial input to the processor), see this diagram: Here are some pictures of how I wired to a 'Blue' module:
I have some jumper wires that are in pairs I used, sometimes only one of the pair is connected.
At the bottom of the first picture the red wire is soldered to the Data pad and the yellow wire is soldered to the Clk pad. When these wires reach the pin header at the left of the picture, the yellow wire continues yellow (the green wire of the jumper cable is not connected), and the red wire continues as white (the blue wire is not connected).
At the top of the first picture there is a red and a black pair connected to the Gnd and Power of the 5-way socket. At the 9XR-PRO end, the wires are plugged on the the module bay pins, the yellow (Clk) wire at the bottom, then the black (Gnd) and the red (power), then miss a pin and the white (Data) to the top pin. You will need to check the module to make sure the serial data gets to the correct pin of the processor. All the modules I tested were originally intended for the 9XR-PRO to use the antenna in the handle. As such, they used a serial connection.
If the board is Green, and looks like the image below, check for the two resistors R1 and R13, they are missing on the attached image. When fitted, they are 10 ohms, but a direct short will work as well. R1 is needed to respond to the MULTI commands, R13 is needed for telemetry.
If you have a "blue" board, check for a connection between the PPM pin of the module connector (top pin), and the processor corner pin just beside where the wire mod is shown. On my board, this connection measures 220 ohms. Mike.
Details for all this are here: http://www.rcgroups.com/forums/showthread.php?t=2165676.
I have ported the firmware so it runs on the Orange DSM Tx module(s). One advantage of using this is it works with the BNF models the original firmware fails with.
The main problem is flashing the new firmware. The Orange modules use an Atmel XMEGA device that needs to be flashed using a "PDI" programming interface, so a USBASP cannot be used.
To help with this, I've coded a PDI XMEGA programmer in the "maintenance mode" of ersky9x for the 9XR-PRO and the 9Xtreme. This is available in the file ersky9xProvR219m.zip (or later) at: viewtopic.php?f=7&t=4676&p=65894#p65894.
Since I created a bootloader for the Orange module, it now means you may only need to flash the bootloader to the module, then you can flash the application from a radio running ersky9x, or possibly using a FTDI device (not tested), but you will need a resistor in the Tx signal from the FTDI device if it outputs 5V.
You still need to get the bootloader onto the module. As a way of doing this, I've produced a sketch for an Arduino Pro Mini that contains the bootloader code, and also PDI programming code.
To use, connect:
Ground from the module to ground on the Arduino.
Vcc (3.3V) from the module to Raw (or maybe VCC) on the Arduino (I tested using Raw).
PDI Clock from the module to IO2 on the Arduino.
PDI Data from the module to IO3 on the Arduino.
Power the module, the Arduino will be powered from the 3.3V from the module.
After a couple of seconds, the LED on the Arduino will flash, around once per second if the bootloader flashed OK, and 5 times per second if it failed.
In theory, the Arduino is running too fast (16KHz) for operation from 3.3V, but it should work, and only needs to flash the module once.
The sketch for the Arduino: I've created some instructions on how to do all this in the attached .pdf file ("PDIflashing.pdf"). The firmware file(s) for the Orange module is also attached. Note that some older modules are blue, and these need the 'blue' version of the file.
I've built files for both the Green and Blue boards from sources that support the bootloader. These files are the 1.1.6.21 sources, with the addition of improvments for the FrSky X telemetry protocol, and they also check for an attempt to flash the bootloader and drop out to the bootloader. Use these files if you have er9x/ersky9x/openTx with the DSM changes (Sep 2016) that provide DSM2-22, DSM2-11, DSMX-22, DSMX-11 and AUTO, sub-protocol options. Instructions on modifying a Taranis to be able to flash a XMEGA device:
Note: On a standard Taranis (not a PLUS), you will need to remove RP1 from the main board for this to work, see: viewtopic.php?f=40&t=8753&p=118349#p118349. The "Blue" module also needs a track cut to allow it to work. The picture in the PDF file shows a wire that needs to be added to allow telemetry to be used. The processor pin the wire connects to is tracked to the next pin (corner pin). This connection needs to be cut, while still leaving the corner pin connecting to the track (it is the serial input to the processor), see this diagram: Here are some pictures of how I wired to a 'Blue' module:
I have some jumper wires that are in pairs I used, sometimes only one of the pair is connected.
At the bottom of the first picture the red wire is soldered to the Data pad and the yellow wire is soldered to the Clk pad. When these wires reach the pin header at the left of the picture, the yellow wire continues yellow (the green wire of the jumper cable is not connected), and the red wire continues as white (the blue wire is not connected).
At the top of the first picture there is a red and a black pair connected to the Gnd and Power of the 5-way socket. At the 9XR-PRO end, the wires are plugged on the the module bay pins, the yellow (Clk) wire at the bottom, then the black (Gnd) and the red (power), then miss a pin and the white (Data) to the top pin. You will need to check the module to make sure the serial data gets to the correct pin of the processor. All the modules I tested were originally intended for the 9XR-PRO to use the antenna in the handle. As such, they used a serial connection.
If the board is Green, and looks like the image below, check for the two resistors R1 and R13, they are missing on the attached image. When fitted, they are 10 ohms, but a direct short will work as well. R1 is needed to respond to the MULTI commands, R13 is needed for telemetry.
If you have a "blue" board, check for a connection between the PPM pin of the module connector (top pin), and the processor corner pin just beside where the wire mod is shown. On my board, this connection measures 220 ohms. Mike.