Build Log for Arduipilot Mega project with AXN Floater


Just posting a link to a build log I've been working on to show my progress with setting up the Ardupilot Mega on an AXN Floater:

So far, I've gotten the HIL simulation working with X-Plane. Instead of the provided pearl script, I'm using my own Processing application to translate between the APM and X-Plane. It runs on a seperate laptop, and also can display other useful information (control deflection, accelerations, attitude, etc) that help with debugging. I will probably be testing the plane on its own in normal RC configuration fairly soon.

I've also been trying to include a little bit of more basic stuff, like care of LiPo batteries, and how voltage dividers work, but I would be glad to answer questions of how things work, or why I'm doing something in some way if I haven't explained it clearly.

E-mail me when people leave their comments –

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

Join diydrones


  • Developer
    OK. Thats right! If you check the ArduPilot code you will see the "INPUT_VOLTAGE" definition that informs the real voltage to add more precision to the ADC calculations. So, if your VCC is 5.2 or so, the ArduPilot code will take it in account when extracting the original voltage values. It's really nice!
  • Sandro,

    Thanks for checking out my page -

    Thats right, the ADC should sense about 4.9 mv per bit of the voltage it sees at the input, after the voltage divider. I intended to mean that the 14.6mv should represent the actual battery voltage change per bit, before the voltage divider, since 4.9 *3 = 14.7. I should probably clarify that in the post.
  • btw. here is my axn with basic ardupilot+arduimu:
  • Developer
    Very nice build log, Andrew!

    I read all quickly but by now I think you need to correct this part:

    "...since we are using a 1/3 voltage divider, each machine unit will correspond to about 14.6 millivolts, which is excellent for in-flight monitoring purposes.".

    The ADC maps VCC into 1024 steps, right? So when you give to it an input of 4.2 or 3.7 or whatever... the reference still is 0 to VCC from bit 0 to bit 1023. So --if the APM regulator is feeding ADC with exactly 5V-- it still uses around 4.9mv per bit, NOT 14.6mv. ;)
This reply was deleted.