So far I can't find the APM block diagram, so I decided to make one myself to better understand APM firmware. Hope this would help others too

Views: 2278


Reply to This

Replies to This Discussion

good job.


It is clear from your diagram 328 has been used for the PPM signal.

Really wise idea.

Hi Minh,

I wanted tu understand APM ArduPlane v2.50 source code. I saw both your documents regarding part of the source code explanation and block diagram. Can you point me to further documents which can help me understand further (or something that you have made)? There are too many files to get confused easily !

Hi Shyam,
I don't know what kind of documents you need, but you can read my recent post on APM1 hardware and Arduplane code description and explanation:

I think Bill Premerlani's work is the basic for understanding the main algorithm. So first you need to read that document. Regarding Arduplane v2.50 there's main change in DCM algorithm and this again relates to Premerlani's work, otherwise there's no much changes in plane controlling. So please read Andrew Tridgell's post about releasing of v2.50. Hope you'll find it not hard to understand v2.50.

You should probably skip v2.5.  There is a "crash on GPS loss" bug.

Quite a few people have also complained that it's mixing in bad GPS data, which causes problems with the AHRS.

2.6 is already out, so I would go with that or stick to an earlier version.  

Apparently the devs have decided to make everyone using the automatic auto update feature into unwitting beta testers.

Thank you very much, Minh. The DCM2 document was a bit complicated at first. But it gives certainly good idea of what is happening out there. I also went through the code, not really hard to understand. However, I have a few questions:

1. I am out there to design a 2-axis camera mount (Gimbal) (for pitch/ yaw). I wanted to know what are the steps I must go about (I see most of the ArduPlane code is not required for this task).

2. I have RC Txm/Rxc, board and servos with Gimbal. I need auto stabilization + Manual control.

3. Is it possible to override the manual RC txm control (I see from your diagram that the MUX decides this operation. How can I override it to do some other task (instead of manual control) ?

Your inputs will certain be of great value !!

Thanks you for your file.

I really don't understand your question, Shyam. What do you want to do with RC control?

Hi Minh,

I got some of the issues sorted out already. Going further, my question is:

1. I see from your diagram that the MUX 'select line' decides (on IN8) the operation whether to allow the PWM signals directly from the RC receiver OR let ATMega2560 chip send the PWM signals to the output. How is it possible that in the code, the plane gets 'stabilized' at the same time the user controls the aircraft manually via an RC transmitter. How are both things happening simultaneously (being sent to the output)?

2. Is there a documentation for understanding how PID controller is being used in case of controlling a gimbal/ camera mount? E.g. AP_Mount.cpp code.

Awaiting your response.

Reply to Discussion


© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service