Please help me understand how the APM2 auto/manual switch is implemented.

I recently received my APM2 and am trying to figure out how the auto/manual mode switch is handled.

In the original Ardupilot (the atmega328 based board) this was done in separate hardware, so when the toggle/selection switch on the selection channel was set to manual, the RC receiver signals were passed straight through to the servos and the ardupilot had absolutely no control (it was 100% manual.) I liked this because if the AP firmware barfed for some reason I know I can always get back to 100% manual control.

I'm looking at my APM2 now, but I don't see the same selection implementation in hardware. Was a decision made to do this function entirely in the APM2 software? (Or am I misunderstanding something?) I've been trying to look through the code, but I'm still learning names and locations so I don't fully understand what is going on under the hood yet.

I'm hoping someone can enlighten me on what's going on, the design strategy, rational, etc.

Thanks!

Curt.

Views: 245

Replies to This Discussion

Just a quick follow up to my own question (I still want to know the answer because I suspect I'm not seeing something I should be.)  I can find references in the ArduPlane code (APM_Config.h.reference) saying MANUAL mode is full manual control via the hardware multiplexer.  But elsewhere in the code (Attitude.pde) I see if control_mode == MANUAL, the code appears to copy the receiver input values to the servo output values in software.  In my own experimentation (i.e. running a modified APM_radio demo), I toggle the selection switch (CH_8) but I never get straight pass through from my reciever ... the servos are always driven by the software outputs no matter which way the selection switch is set (and I verify the sensed value is changing from one extreme of the PWM range to the other.)

So hopefully someone can clarify -- is there something I need to do to enable the straight multiplexer pass through?  Was this feature removed from the hardware?  Are the comments in some places in the code lagging?  Am I correctly understanding the code, or am I missing something?

Thanks!

Curt 

Manual/Auto is software based, there is not separate hardware mix like original Ardupilot or the APM 1, check out similar query on subject.

If it is important to you have a look a a separate mux

 

Paul

Hi Paul,

Thanks for clarifying.

Hmmm, bummer, no one got permission from me to make this change!  Echoing the comments in the other thread...

  • This could affect the ability of any APM2 based UAS to ever pass safety checks unless the description of the manual failsafe can be sufficiently convoluted that no one catches this.
  • I assume we add a bit of noise and also a bit of lag in the controls by doing manual pass through in software -- the system has to read the RC receiver, update the PWM output registers, and then regenerate the signal.  I assume the hardware signal generation is clean and good, but timing the RC pulses is a place where some noise can be introduced (even though the APM does this pretty well) -- and then there will be a frame or so of extra lag in the response.
  • I understand this simplifies the board, but this is going to bite someone somewhere sooner rather than later I think -- who writes perfect code all the time?  (other than myself) :-)
  • Thanks for pointing out the external mux -- that my be a workable option -- although it adds significantly to the rats nest of wires in an install, increases the number of connectors, solder joints, etc. -- more external points of failure.

So I guess for now I'll quit complaining and work with the system, but I hope Jordi and Chris and others have their antennas up for horror stories, run away props, and otherwise unexplainable crashes and will consider adding the hardware mux back into the APM2.6 (or 3.0 or whatever comes next.)

Hi Curt

Bummer indeed!  I learned awhile back that APM 2 had software controlled manual.  I was unhappy with that for the same reasons as you.  What I didn't know was what I learned from the reference given by Paul, APM2 is primarily used by Arducopter fliers and Arduplane fliers tend to use APM1.  This was the first time I became aware of that.  I would not have spent my hard earned money on APM2 had I known of these two facts.

Oh well, back to my old APM1.  However I would support a future version of APM with hardware manual, perhaps as an option or maybe user-configurable

Curt, as others have mentioned, hardware MUXs don't make any sense for multicopters (which cannot be flown manually), which represent the majority of users. Unless we release a different board just for planes, we can't have a hardware MUX built in.

We do however sell a standalone MUX (just $18) that you can add that will do just what you want.  

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service