Shop our Airplanes Products Drone Products Sales
Thread Tools
This thread is privately moderated by closedsink, who may elect to delete unwanted replies.
Mar 11, 2015, 06:05 PM
Registered User
Discussion

CX-10 JR Module (Green, Blue PCBs)


A lot of work has been done trying to get the awesome CX-10 to work with other transmitters, since its stock TX leaves much to be desired. I have a Taranis transmitter, which has a JR-type module for other protocol support, and so my goal was to build a JR module, based on an Arduino, that would do the protocol conversion between the PPM output of the Taranis, and the SPI input of the CX-10 RF chip. My focus was to support the version of CX-10 that has a GREEN PCB for both transmitter and quadcopter.

I did some research, and came across a thread with a lot of good info on the CX-10 protocol:
http://www.deviationtx.com/forum/pro...8-jd-395-cx-10

Great stuff. I did some research of my own as well. I saw that a few folks tried to get the CX-10 working using an NRF24L01 RF chip, but it seems like no one was successful, as the register set appeared not to be 100% compatible with the chip used in the CX-10 controller (XN297). I decided that the only way to go was to use the XN297 itself, so I carefully removed just the small PCB area that contains the XN297 and its associated components. I had to remove the left joystick first, which was a challenge due to the number of pins, and it particular those tied to the ground plane. Once the joystick was removed, I carefully cut out the PCB section. I used a coping saw for the vertical cuts, and a dremel for the horizontal cuts. The dremel caused enough vibration that the crystal connected to the RF chip broke off due to metal fatigue of the leads. Fortunately there was enough lead length that I was able to solder it back on. If I did this again I'd forget the dremel.
Once the XN297 was removed, I needed to attach 6 wires to the backside of the PCB: VCC, Ground, MOSI, SCK, CSn, and CE. I used a microscope and a fine tipped iron for this.
As I said, I used an Arduino for the protocol conversion. I chose a Pro Mini, 16Mhz, 5V device.
For the software, I looked around to see if anyone had done anything I could hack, and I found some great work done by midelic here on rcgroups:
https://www.rcgroups.com/forums/show....php?t=1921870
I see he borrowed from the work of other folks (gotta love this community).
He generously offerred his source code for a JR module that supported the A7105. It wasn't too hard to modify this code to talk to the XN297 instead.
I used a logic analyzer to debug the code to the point where I thought it was ready, and then connected the Arduino to the XN297 board. The CX-10 binded no problem, but I had an issue with some channels being inverted (one of which was the throttle ). After fixing that, it worked great!
I have since added mode 2/3 control, and that is working great too. I still need to add flip control, but that should be pretty easy, since I believe I know what I need to do.
Anyway, I hope this inspires other folks to try this. I'm attaching pictures of the CX-10 mutilation, and I'll add more details to this as time permits.

3/12/15:
Added source code for green PCB. Now supports 3 modes, and flip control. See files section below.

3/12/15: Protocol Notes:
I looked at the captures taken by folks on the deviation thread:
http://www.deviationtx.com/forum/pro...8-jd-395-cx-10
and duplicated it as exactly as possible. The only changes I made were the values of the bytes that appear to be unique to each transmitter (I think these bytes are for frequency hopping, and transmitter ID). There were captures from 2 different users, and they contained different bytes, and mine had a different set as well, so I used those of my transmitter. I think any "set" of values will work, but I would recommend that if you're cannabilizing a CX-10 transmitter, you capture the bytes for that controller, and use those in the source. That would guarantee that no issues would occur when flying with other CX-10s.

3/12/15: Transmitter Programming:
I use a Taranis Plus radio. I modified the PPM stream to be Futaba-compliant (AIL, ELE, THR, RUD), since that is the order the channels are sent to the XN297. I had to configure the model for 6 channels total:
AIL
ELE
THR
RUD
Mode Control
Flip control

Mode Control - Set this to a 3-position switch, and programmed the pulse to be:
Mode 1 - 1ms (-100)
Mode 2 - 1.5ms (0)
Mode 3 - 2ms (+100)
The software reads the PPM pulse and configures the data packet appriopriately.
Flip Control - I set this to work from a momentary switch:
Off - normal, no flips (-100)
On - Flip mode enabled. (+100) Activate flip mode by toggling the switch, then release. After the flip is executed, you are automatically back in normal mode. Currently I don't have any beeps programmed when you're in flip mode, and I don't know if this is possible, but I'll look into it.

I'll publish the model file as soon as I can.

3/15/15:
goebish here on rcgroups successfully unlocked the protocol for the BLUE version of CX-10, and designed a PPM converter for this. You can find his code at:
https://gist.github.com/goebish/f8982353c34f2b71ffe8
(excellent work, goebish!)
Note - the blue PCB connects the MISO line from the transmitter chip (XN297), whereas the green PCB does not.

Now, here's your extra credit homework, for those who may have both blue and green models. Merge the blue/green programs into one, allowing a single module to fly both. An additional channel could be used to select between the 2, or the momentary switch could be sampled on startup to do the selection, then be used for flip mode after that.

3/16/15:
Added schematic
3/30/15:
Added Taranis model file
5/4/15:
Updated source to specify "TAER" channel order from TX, which will work with any radio that outputs channels in this order (Spektrum is one). This is the only change. Thanks goes to goebish, since I shamelessly stole this change from his module.
5/5/15:
Updated source make PPM timing more universal. It should work with most (if not all) transmitters now.
5/17/15:
Updated source (to "v3"), to support random selection of transmit ID values. Frequency hopping values are then computed from these. Big thank you to goebish who finally cracked the code for this. This version should be used in place of previous versions, as it allows multiple quads to be flown together without interference.
Last edited by closedsink; May 17, 2015 at 04:03 PM. Reason: adding content
Sign up now
to remove ads between posts
Mar 11, 2015, 06:31 PM
Waste Nothing
RickC_RCAV8R's Avatar
Desires ? Yeah , the infant sized TX leaves a lot of them to be had ! I went so far as to take an old full sized TX , strip it for all but the joystix and replaced the guts with the CX-10's TX board . (see my blog entry on this) Since I did the conversion , my flying skills went a waaay up with only a couple of flights . My QRX350 loves the fact that I can fly it with improved skills .

I fly the CX-10 in the house all of the time with this new TX conversion . Awesome !
Mar 12, 2015, 04:29 AM
I Void Warranties
goebish's Avatar
Nice hack

I've been looking for a xn297 breakout board for a good amount of time, but never found one, so this is a solution.
Mar 12, 2015, 05:24 AM
Registered User
Excellent work buddy! Now if we can source the xn297 somewhere with decent tx range.
Mar 12, 2015, 08:25 AM
Waste Nothing
RickC_RCAV8R's Avatar
I have been monkeying around with the Dweenie uControllers for a few years now and can understand what you did here . It is at a level above my simpler hack . My hack was a box conversion of the Tx's . The vacuum solder sucker whipped the joystix out in no time ! Waay better than using wick . Also , the 24L01 doesn't have the required range . It works great for WiFi under 50 ft. ranges though .
Mar 12, 2015, 08:46 AM
Waste Nothing
RickC_RCAV8R's Avatar
Forgot to ask : What code did you come up with ? I would like to try this one with aUNO mini or my 2560 .
Mar 12, 2015, 10:46 AM
Registered User
Still finishing the code. Need to add flip control. Might have that working tonight. I'll try to upload the source then.
Mar 12, 2015, 11:39 AM
Registered User
jjmelo's Avatar
Dude! Love the CX-10 but that the radio and I was thinking about doing something similar to this. Keep up updated please, excellent work!
Mar 12, 2015, 04:14 PM
Certifiable
stringrazor's Avatar
Quote:
Originally Posted by RickC_RCAV8R
Desires ? Yeah , the infant sized TX leaves a lot of them to be had ! I went so far as to take an old full sized TX , strip it for all but the joystix and replaced the guts with the CX-10's TX board . (see my blog entry on this) Since I did the conversion , my flying skills went a waaay up with only a couple of flights . My QRX350 loves the fact that I can fly it with improved skills .

I fly the CX-10 in the house all of the time with this new TX conversion . Awesome !
That's a great idea! I've got a few Tx's I'll never use anymore.....
Mar 13, 2015, 04:48 AM
I Void Warranties
goebish's Avatar
Thanks very much for the source code, any idea if it does work with "blue PCB" CX-10 and remote ? Looks like it also uses the XN297, but I'm not sure the protocol is exactly the same.
Last edited by goebish; Mar 13, 2015 at 07:07 AM.
Mar 13, 2015, 07:06 AM
I Void Warranties
goebish's Avatar
I've read somewhere else that even if green & blue versions are using the same RF chip, they're not compatible... Oh I guess I'll have to play with the logic analyzer when I have a chance, protocols shouldn't be that much different...
Mar 13, 2015, 07:47 AM
Registered User
Quote:
Originally Posted by goebish
Thanks very much for the source code, any idea if it does work with "blue PCB" CX-10 and remote ? Looks like it also uses the XN297, but I'm not sure the protocol is exactly the same.
Not sure, as I don't have a blue one to test. Seems like I heard it was, and other folks said no.
Mar 13, 2015, 07:53 AM
I Void Warranties
goebish's Avatar
Ok, best way is to try, pity that I have only one transmitter... Oh well, it's worth the sacrifice

Will try to find some time to test it this week end (will dump the spi bus before "destroying" the TX pcb).
Mar 13, 2015, 10:33 AM
Registered User
Quote:
Originally Posted by goebish
Ok, best way is to try, pity that I have only one transmitter... Oh well, it's worth the sacrifice

Will try to find some time to test it this week end (will dump the spi bus before "destroying" the TX pcb).
Good Luck! I was hesitant to cut up my PCB as well, so I ordered a second CX-10 in case it didn't work out.
Mar 13, 2015, 10:39 AM
I Void Warranties
goebish's Avatar
I think I can experiment without cutting the pcb, I'll only cut the +vcc trace to the MCU

Thread Tools