Had a near miss on the workbench the other day when the Mode was not properly recognized on my APM 2.5. When the APM was started it was in RTL mode despite the fact the transmitter switches corresponded to MANUAL mode and the PWM value being read was 1823ms (MANUAL MODE). After about 20 seconds the APM went to full throttle on the workbench! Fortunately no damage done to either myself or to anything on the table.
I have the following setup for each of the modes:
Mode 1 PWM 0-1230 11 RTL
Mode 2 PWM 1231-1360 5 FBW-A
Mode 3 PWM 1361-1490 12 LOITER
Mode 4 PWM 1491-1620 2 STABILIZE
Mode 5 PWM 1621-1749 0 MANUAL
Mode 6 PWM 1750+ 0 MANUAL
The attached tlog (2012-12-15 12-52-44.tlog) shows the input on CH8 (my mode switch) to clearly be above 1800ms which should respond to the non-adjustable MANUAL mode, instead it has been interpreted as RTL mode as can be seen in the MP. After 20 seconds you can see CH3 go to 100% throttle.
Before I submit an 'issue' for this I wanted to see if anyone else has experienced any unexplained misinterpretations of the mode switch inputs. I'm stumped as to the cause as this appears to be a clear case where the PWM value is well above the 1750ms threshold to be in MANUAL mode (not user changeable) throughout the entire file yet the MP shows that the APM believes it is in RTL mode and after 20 seconds it switches to full throttle.
I am using an APM 2.5 running 2.68, I have a uBlox LEA-6, Airspeed sensor, Attopilot voltage and current sensor, 3DR 900MHz telemetry and a MinimOSD v1.1 running MinimOSD Extra r458. Power is supplied to the APM via a Castle Creations 10 Amp BEC and the Minim OSD is powered in a two stage format with the digital side powered by the APM and the Analog side powered by the vTx and a separate battery.
If anyone has any ideas I'd be happy to check anything out. It's been to windy or cold here to do any actual flight tests yet, and until I find an explanation to this behavior I'm grounded as I don't trust it's behavior. Manual must always mean Manual.
Regards,
Nathaniel ~KD2DEY
Replies
After re-reading the wiki section on failsafe function setup and operation for the APM 2.x I don't believe that this is truly failsafe related although the timing for RTL mode does match the setup for long failsafe response there isn't a matching response for the default short failsafe response CIRCLE. The thing that really bothers me is that I have found several tlogs where this seems to be happening and the timing appears to be consistent. This would suggest that the behavior is not related to a hardware issue (faulty switch for example) but rather something I don't understand in the code. If Tridge or someone else gets a chance to look at my tlogs and render an opinion I'd appreciate it!
Hope everyone has a Happy Holiday!
Regards,
Nathaniel ~KD2DEY
Nathaniel,
Looking over the Arducopter docs HERE, it states that the mode input to the APM should be on Chan 5, like in Steven's post notes.
Are you taking Chan 8 of your RX and connecting to APM Input Chan 5?
If so,I guess the APM won't care as long as it sees the PWM values and equates them to your Flight Mode defined settings.
-=Doug ~KB4FEM
Someone must have something to contribute here. I'm sure this isn't the expected behavior, if it is it's a real safety problem and I need help figuring it out. So please offer up your 2 cents here.
Regards,
Nathaniel ~KD2DEY
Here is a recording of the MP HUD showing the behavior in the first tlog. The log file doesn't start playing for about 20-30 seconds and only lasts for about 30 seconds. I added 3 user items to the HUD CH 03 IN, CH 04 OUT, Mode Switch (CH 08) IN, and Mode Switch (CH 08) OUT raw PWM values for all. You can clearly see that the Mode switch input and output remain static and that CH 03 IN remains static while CH 03 OUT goes to full throttle about 20 seconds after the log file begins to play.
http://youtu.be/dpQz9Ukwq-8
Here is a copy of the parameter file I extracted from the above tlog file.
2012-12-15 13-09-00.param
I found another log file from earlier the same day where I cycled through all the modes. Everything seems normal in this graph.
You can clearly see each of the modes and their corresponding PWM values.
No Solution from me at this stage, but are you logging the PPM inputs as well as the outputs to see if the radio is causing the issue ?
Also, although I have a Futaba T8FG, on another thread it was suggested as setting RTL to Mode 4 as this is what the APM uses as failsafe.
Therefore this is what I have mine set too.
It may be worth posting the .log file instead of the .tlog file to the above.
It may be worth swapping Mode 1 from RTL to a different mode such as Stabilise.
I also notice your Mode 11 (RTL) is Mode 6 on my configuration, could this have anything to do with it ?
Apparently this is happening more than I thought. I found another tlog that shows this same behavior. I'm not sure what firmware version I was running at the time, possibly 2.67 but I must not have had the motor connected at the time. I don't understand whats happening but I am concerned about safety at this point. I can't have it going into RTL when I'm sitting on the ground have it go to full throttle and not be able to switch to Manual.
Anyone have any ideas?
2012-11-24 15-06-06.tlog