ArduPilotMega + Spektrum satellite Rx -- NOW AVAILABLE

3689420756?profile=originalHi 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!

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • I bound my satellite with a 7 channel receiver (and not the APM) and I am starting to wondering if the Spektrum satellite only puts out 7 channels when bound with a 7 channel receiver?

    I also found another post which sets out the protocol for the satellite coms.

    http://www.diydrones.com/profiles/blogs/24ghz-how-to-read-7-channels

     

  • Developer

    Spektrum seems to have three main protocol variations : DSM, DSM2, DSMX.

    Some informations here :

    http://www.rcgroups.com/forums/showthread.php?t=1524521&page=2

  • Developer

    I have never tested with DSM2.  There could be some differences that need reverse engineered....

  • Doug,  I'm assuming that you mean the code on the 2560 chip and not the 328p (since this is new code for the Speaktrum Adapter).  If so I don't beleive the problem lies with the numbering convention.

    I have had the same problem with Ch8 = Ch7.  I have also changed the firmware so the failsafe values are all unique.  When the Tx is turned off and the Rx goes into failsafe, the Mission Planner software reflects the failsafe values correctly on all 8 channels.

    So I think the poblem is with reading in the values from the satellite receiver, or perhaps with the satellite receiver itself.

    I am using a DSM2 (which from the write up should work).

    Can anyone confirm that the DSM2 actually works with 8 channels?

  • Are there any news availaible or do some more people have experience this this??

    Special CH8 or so???

  • Developer

    There are two numbering conventions depending on where you look.  The code initially (3 years ago) used the convention 0-7.  That still exists some places in the code.

  • Ok now it works.

    Do you know why chanel 8 = ch7???

  • Developer

    If I understand your question the answer is probably to increase the throttle travel (lower the low throttle endpoint) in your transmitter programming.

  • Hi, I have some problems if I use this sattelit. I have turnighy controllers. And the Output signal is to high. Itßs at 1070 with the spektrum satellit and if I use the normal hexfile with a normal reciver the output is at 1010.

    If I use the spektrum setellit, my controllers always make a beep eavry 0.25 sec that told me the throttle output is to high. What can I do?? The Output itself works ok because I I put a servo on Output 1 it moves with the throtle or if I rotate the copter.

  • For no output I mean the Output 1-8 from the board for the motors and servos.

    Ok now I also have an output, I have uploaded it new and it works. Don´t know why it works not at the first time. I selectet a atmega328 to create the hex file.

     

    Do you know if it´s posible to make a serial output on doub´s sketch and read it ofter the AVR programmer, so what we could solve the problem with the chanel 8?

    I have changed this lines

    const uint16_t failsafe_values[8] = {1500,1500,1000,1500,1500,1500,1500,1500};
    const uint16_t startup_values[8]  = {1500,1500,1000,1500,1500,1500,1500,1500};

    but do not help anything

This reply was deleted.