Mounting an APM on a Bixler2 upside down using AHRS_ORIENTATION

I've flown a lot of different planes while working on ArduPlane, but it wasn't till yesterday that I first flew what is perhaps the most popular plane for new ArduPlane users - the Bixler2.

While setting it up on Saturday evening I had a bit of a look through some Bixler build logs in the forums, and I was surprised to find that none of the suggested ways of mounting the APM were really convenient. Some people put it in the bottom of the fuselage, which makes it difficult to get cables to, and hard to work on. Some used custom or commercial mounting systems for putting the APM on the top at the front, but that makes the Bixler less aerodynamic, and trying to cram all the accessories like telemetry radio and GPS in makes it a tricky fit.

The solution I came up with is to mount the APM upside down on the underside of the canopy. ArduPlane has supported the AHRS_ORIENTATION option for a few releases now, which allows you to have your APM mounted in a lot of different orientations. In this case it seemed perfect to use AHRS_ORIENTATION=8 and mount it upside down on the bottom of the canopy. The advantages are:

  • it is easy to get at the APM for programming it, or accessing the pins, as you just pull the canopy off, and the APM comes with it
  • when you remove the canopy it makes it easy to get to the battery space, as the APM is out of the way
  • it leaves plenty of room for the receiver and GPS on the top part of the canopy
  • it is clear of any wind effects, well shielded in the fuselage

I also used a pin through the plastic top of the canopy to hold the canopy on more firmly, as I don't really trust the magnets. You will also notice a couple of pins stopping the wings coming loose - those fuselage screws are rather loose and one came loose on the first flight.

This mounting system is also ideal for a PX4. I happened to use an APM2.5 for this build as I was doing bench tests on my PX4, but either one works with the AHRS_ORIENTATION option.

One thing to watch for with AHRS_ORIENTATION is that you need to reboot and then re-level your plane after setting it. It is best to use the CLI full accel calibration, so it can properly adjust for the slight pitch of the canopy bottom surface.

Cheers, Tridge

Views: 10617

Comment by Chester on April 28, 2013 at 10:12pm

Wow. Look very nice. Waiting for flight video.

I have one question: As I know canopy mount magnets are rare earth and very strong. How is yout mag? I think i will big interference on mag from this magnets.

PS: I'm thinking abount mount my PX4 оn plane. But Px4 still does not support voltage anc current pins :(

Comment by Andrew Tridgell on April 28, 2013 at 11:21pm

Wow. Look very nice. Waiting for flight video.

I didn't take any video - flying circuits around my local flying field isn't really exciting.

I have one question: As I know canopy mount magnets are rare earth and very strong. How is yout mag? I think i will big interference on mag from this magnets.

I don't know actually - the APM2.5 I used was one I managed to break in testing months ago, and has a broken I2C bus, so no compass. I just set MAG_ENABLE to 0. I'll replace it with a PX4 at some stage and see how the magnetic interference is. If I found it was a problem I'd remove the magnets are use a couple more pins or a small dowel to hold the canopy on.

PS: I'm thinking abount mount my PX4 оn plane. But Px4 still does not support voltage anc current pins :(

It does have the pins actually, although the cabling isn't as obvious as it is for the APM2. I'm planning on working on the documentation this month, I'll try to remember to add some docs on how to get voltage and current sensing on the PX4.

Cheers, Tridge

Comment by Kevin Hester on April 29, 2013 at 3:38am

Hi Tridge,

This is very similar to how I mounted mine, but I placed it upside down underneath the wing on the belly (changed to this style after you added the multi orientation stuff).  Cutting out a bit of foam made for a nice 'bomb bay' style door to get to the APM.  This leaves the entire front empty to make it easy to slip battery in.  I mounted the GPS on the top side aft of the prop.

Comment by u4eake on April 29, 2013 at 3:59am

I have had magnet interference once on my apm1.  I had it mounted on a rover together with a camera.  Couldn't get the rover tracking straight and found really strange compas readings.  When the apm was removed from the rover it worked normal.  After a long search, I went over the rover with a manual compas and found the source of interference : a magnet on my camera that holds the optional wide angle lens in place.  It was about 10cm from the APM.

So yes, a permanent magnet will confuse the compass and on my new X8 I didn't fix the canopy with the included magnets :

Comment by iTech on April 29, 2013 at 11:22am

I have PX4 on Bixler2 and I suprise.  PX4 is very sensetive to magnets. 

Its just not working with magnet.  I mean all servo outputs are dead if magnet closerden 5 cm to PX4 (with PXIO) 

Comment by Andrew Tridgell on April 29, 2013 at 9:20pm

Hi Aytek,

Thanks for noticing that! I've been doing some testing of the PX4 and strong magnets today, and there is an interaction with magnets, but I haven't yet narrowed down exactly what is happening. After I work it out I'll post something.

Cheers, Tridge

Comment by James Adams on April 30, 2013 at 1:58pm
I designed up a part for mounting on a bixler as well! It is meant to be 3D printed. See here:

I could print it for anyone if you don't have access to a printer.

Comment by Andrew Tridgell on April 30, 2013 at 4:00pm

Hi again Aytek,

I've found the cause of the magnet problem with PX4. It was a compass driver bug for the PX4, which I've now pushed a fix for.

The bug was that the APM PX4 compass driver wasn't handling the error from the NuttX driver when the compass saturated (which happened when a strong magnet was very close). The driver looped waiting for a valid value from the compass, which caused the main loop to stop until the compass was healthy again.

The fix is in git master now, and will be in the next release.

Cheers, Tridge

Comment by Mark Harrison on April 30, 2013 at 8:02pm

@James, is that for a Bixler 1 or Bixler 2?  Or do they share the same canopy?

Comment by iTech on May 1, 2013 at 9:24am

Hi Andrew,

I am surprised. I never imagine it has a software bug instead of hardware design issue.

Thank you for the update. I will try it this weekend. 

In the mean time i got an idea: Engin failure detection ( if not implemented  or exist yet :) 

I think we can detect engin failure trough the current draw of aircraft ( via power module reading ) If there is an engine failure it should drain less power than expected. 

In case of engin failure pilot can be warned over telemetry or maybe APM will try glide to home.

PS: Some how i deleted my orginal comment.




You need to be a member of DIY Drones to add comments!

Join DIY Drones


Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2020   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service