Hi guys. Here's a little experiment we did yesterday using Doug Weibel's spektrum-to-PPM substitute firmware for the APM's ATmega328P, an upcoming (now available here!) Spektrum Adapter accessory board, and an ArduCopter. Sorry about the lack of video, but I can assure you our resident quad pilot Jeff Taylor flew this here at the shop with good results (considering none of this is fully baked)!
The Spektrum Adapter accessory powers the Spektrum module with an on-board 3.3V regulator, takes care of level translation on the single serial line, and has an input pin to enable/disable the regulator (this is used for putting the satellite in bind mode). The four pins are GND, 5V, data, and regulator enable.
I wrote a (very) crude sketch to put the satellite in different bind modes, you can grab it here: https://gist.github.com/ef01907a5c90dd66f987. I've tested it with DSM2, DSMX, and Orange Rx satellites. I've found that "DSM2 1024/22ms" mode is the one that works with Doug's firmware. The sketch is meant to be used on any Arduino Mega style board, it uses Tx1 to enable the regulator and consequently the satellite at the right moment to then receive the bind mode pulses sent out through Rx1. Once the sat is in bind mode, Rx1 is configured as an input again to receive the serial data after binding.
The ATmega328P needs to be re-programmed with Doug's firmware. You can either Arduino-ify the chip with the right bootloader and load the sketch through an FTDI cable connected to IN1 and IN2, or take the easy way and verify the sketch, grab the .hex file, and load it with an AVR ISP programmer.
Once the sat is bound, I soldered the adapter board on to an APM as seen in the photo, directly on the three IN1 pins. IN1 is the 328's Rx and is the only pin needed to receive the satellite's channel data. The small blue wire in the photo is connecting the 5V and reg enable pins to keep the regulator on at all times. The 328's Tx line could also be set high at all times to do the same thing, maybe the binding modes can be integrated into the 328 firmware as well?
After this, all should be the same as when using the full Rx module with servo extension cables. We found no problems with this setup during the Mission Planner configuration steps.
The Spektrum Adapter boards are now in stock in the store! Feedback for future revisions is welcome, and happy hacking!
Comments
I have already postet one on page 4
Which board du you have 1280 or 2560
Many thanks stu
@ Chad, it does not work with APM2.0, there is no alternate firmware for it's PPM encoder that works with Spektrum satellites.
Does this work with the new AMP 2.0 (purple board)? If so... is the setup the same? Where would it hook in?
Alfred, Colin, the original PPM encoder firmware can be found in the APM repo:
New ArduPPM: http://code.google.com/p/ardupilot-mega/source/browse/#git%2FTools%...
Old PPM encoder: http://code.google.com/p/ardupilot-mega/source/browse/#git%2Farchiv...
I would have thought it would be in the source code somewhere.
Otherwise you can use the "-U flash:r:flashDump.hex:i" option with Avrdude to save the current flash data. Then you could always restore it with "-U flash:w:flashDump.hex:i"
Thanks for that ansere Colin. I'll keep that in mind.
Umm, is the old sketch avilable for dowload some place? If I need to change back?
Alfred, it is only for the satellite receivers. You would need to load the old sketch (an remover the small board) to be able to use it with a regular receiver again.
If I load the new sketch to the APM will I still be able to use the APM with a regular receiver? Or will it be only for the DSM2 Satalite?
I can confirm that Spektrum satellite receivers (DSM2) definately output more than 7 channels, you must bind them with at least an 8 channel main receiver though. I did this on my Mikrokopter quad and get 9 channels with my JR DSX9, although with the right TX they do support at least 12 channels.