Posted by Jason Short on December 6, 2009 at 5:41pm
Hi everyone, I'm looking for some volunteers to test some code that's part of the 2.5 release of Ardupilot.I'm looking for a wide range of radios and here's the trick: You need to solder a jumper from input 3 to Pin 13 on your ardupilot.I'm sure some people will have issues, so better to catch them now versus the final release. I'm also going to be posting more code snippets to test in the coming week.Here is the file: Ardupilot_radio_tester.zipPlease center you radio trims before you run this so we can compare output. Use the serial out in Ardiuno to see the output.note:Radio model #Receiver model #Ch3 Failsafe settingCh1-3 values when radio trims set to central positionNote,if you can set your radio's failsafe to drop ch3 value below normal, please try that. Also, let me know if that can't be done with your radio.Thanks!Jason
Changed my Spektrum/JR gear for a Futaba 7CAP with a R137HP PCM 1024 RX for testing on the ArduPilot
Seems that this is more promising, was shuffling to different modes, the RADIO_TYPE 1 works great, with the ArduPilot reading the full range of the aileron and elevator servos. But it's not reading the throttle channel.
RADIO_TYPE 0, on the other hand doesn't read the values. When I move the sticks far to the opposite side. The values doesn't move from center position.
(L/C/R) ch1: 1106/1520/1520
(D/C/U) ch2: 1105/1517/1517
(LO/MID/HI) ch3: 1448/ (moving around 1106 to 1503) - random values when moving around the sticks
(LO/MID/HI) ch3_OUT: 1072 1224 1496 (goes randomly when throttle is moved around)
I'm not sure anyone would need to bother removing the led or resistor from d13. Just plug the rudder or elevator servo line into the throttle channel instead, and set the THROTTLE_IN define to 0. So the program will only measure servo signal on the normal first two inputs. that's if there was any issue in the first place, maybe also my receiver battery or something else.
But I might remove the led / resistor on ardupilot d12 and d13 if they prevent SPI from working using those lines. Does anyone have experience with this? will the extra draw of a led prevent SPI from working at higher speeds?
Thanks! Those are pretty accurate values. I'm happy. I will leave the LED voltage issue up to Jordi. I'm not much of an EE!
If I can get some more feedback I'll release the next test, which is more fun. And flyable.
the test program freezes for me as is. with or without throttle connected. if I change the THROTTLE_IN define to 0, then it will run. (giving values for just ch1,ch2) if I use a jumper with a 1k resistor on either end to d13, and brush against 5volts, the program runs with times given for my 'manual pwm'. I think my reciever is not putting out enough on the signal line to drive the led that happens to be on d13? the d13 pin seems to read correctly using either the PINB or digitalRead methods, so I think my pin is not dead. the throttle channel drives a servo just fine.
so values for the throttle are from plugging the throttle channel in to servo input 2.
Spektrum dx5e / AR500
ch1,ch2: 1480-1500, zero trim, depending on which side the stick just came from.
ch3 throt: 1093 idle position w/ zero trim, 899 idle position w/ minimum trim
my understanding from reading radio instructions, the failsafe position can be set at any stick & trim position, so as low as 900. not sure there's a way to set it lower than that.
Good point, you don't need to solder for the test. You can connect a jumper from your radio pin to pin 13 and bypass the ch3 input on the ardupilot. This should work for the test, but of course won't work for Ardupilot as it bypasses the mux needed for normal flight safety. Just be sure it's the signal pin connected to pin 13 and not the ground or 5v from the radio.
Just set the throttle to it's off or idle position.
My results are:
Futaba Faast R617FS (7 ch)
ch1 (rudder) : 1500 - in center position, no radio trim
ch2 (elev) : 1500 - in center position, no radio trim
ch3 (throt) : 1024 - in idle position
ch3 (throt) : 920 - Failsafe - when radio is turned off
set the throttle trim centered initially, go to high & low positions to see normal range, and then go to low position, and then change trim setting to lowest?
shouldn't need to solder, right? just plug a jumper (or a normal servo cable) from the throttle channel on the receiver, and get the signal line to d13 line (which is used as an input). ?
Comments
Changed my Spektrum/JR gear for a Futaba 7CAP with a R137HP PCM 1024 RX for testing on the ArduPilot
Seems that this is more promising, was shuffling to different modes, the RADIO_TYPE 1 works great, with the ArduPilot reading the full range of the aileron and elevator servos. But it's not reading the throttle channel.
RADIO_TYPE 0, on the other hand doesn't read the values. When I move the sticks far to the opposite side. The values doesn't move from center position.
Using: #define RADIO_TYPE 1
(L/C/R) ch1:1108/1523/1925
(D/C/U) ch2:1108/1521/1924
(LO/MID/HI) ch3:981/981/981
(LO/MID/HI) ch3_OUT:1000
--
Using: #define RADIO_TYPE 0
(L/C/R) ch1: 1106/1520/1520
(D/C/U) ch2: 1105/1517/1517
(LO/MID/HI) ch3: 1448/ (moving around 1106 to 1503) - random values when moving around the sticks
(LO/MID/HI) ch3_OUT: 1072 1224 1496 (goes randomly when throttle is moved around)
Regards,
Teejay
I don't follow. How will that help me test this code?
But I might remove the led / resistor on ardupilot d12 and d13 if they prevent SPI from working using those lines. Does anyone have experience with this? will the extra draw of a led prevent SPI from working at higher speeds?
http://diydrones.com/profiles/blogs/arduimupilot-firmware-ready#com...
You can also rigorusly test your latest code in this.
Try to double check, i'm using the AR7000 (Spektrum) i had no problem. The last solution i will suggest is remove the LED's or the resistors..
Thanks for your help!
If I can get some more feedback I'll release the next test, which is more fun. And flyable.
so values for the throttle are from plugging the throttle channel in to servo input 2.
Spektrum dx5e / AR500
ch1,ch2: 1480-1500, zero trim, depending on which side the stick just came from.
ch3 throt: 1093 idle position w/ zero trim, 899 idle position w/ minimum trim
my understanding from reading radio instructions, the failsafe position can be set at any stick & trim position, so as low as 900. not sure there's a way to set it lower than that.
hope that helps. fun little experiment, thanks
Just set the throttle to it's off or idle position.
My results are:
Futaba Faast R617FS (7 ch)
ch1 (rudder) : 1500 - in center position, no radio trim
ch2 (elev) : 1500 - in center position, no radio trim
ch3 (throt) : 1024 - in idle position
ch3 (throt) : 920 - Failsafe - when radio is turned off
shouldn't need to solder, right? just plug a jumper (or a normal servo cable) from the throttle channel on the receiver, and get the signal line to d13 line (which is used as an input). ?