APM, or ArduPilotMega is a an open-source autopilot and flight controller system for quadrotors and other vehicles with focus on autonomous behavior.
APM supports a very wide variety of quadcopters, multicopters, planes, rovers, helicopters and even underwater vehicles.
Just as other flight controllers, Ardupilot consists of a hardware +software part. Even though the hardware’s development was stopped a few years ago at version 2.8, it’s still a viable choice for basic autonomous behavior. For up-to-date and high performance hardware that can run the Ardupilot software stack, check out the Pixhawk family. The Ardupilot software is still under active development.
Compared to other flight controllers,the Ardupilot hardware is a good choice if you want to get a decent flight controller with some autonomous capabilities – the Ardupilot is the proven work horsefor this uses-case.
One of the most interesting things the APM can do is probably the automatic return home and landing capability, for example the Ardupilot can be programmed to return home when it loses the transmitter signal. Normally a quadcopter would simply shutdown and crash if it happens.
Other use-cases include way point based flying, geo fencing, and the Ardupilot is usable for higher-level tasks too including mapping and search-and-rescue.
While the APM 2.8 hardware makes a great all rounder, for best autonomous flight capabilities switching to the Pixhawk hardware platform is a great idea. Ardupilot supports the whole Pixhawk line, including the Pixhawk 2 and the Pixracer too.
The Ardupilot software + hardware combination is great for DIY projects, as it offers more flexibility than what you’d get with the other flight controllers.
Ardupilot supports a really wide range of vehicles – some of which you probably never thought could exist!
The more common vehicles supported by Ardupilot are planes, helicopters,rovers (cars), tri- , quad- , hexa- and octacopters.
The less common vehicles:
- Single- and coax-copters (these are much like helicopters, but theyhave fixed blades, and use control vanes for navigation).
- Quadplanes: Quadcopters crossed with airplanes. These aircrafts can take off and land vertically, but will fly like a plane once the get up in the air.
- A harvesting tractor was modified to support autonomous behavior with Ardupilot.
- Antenna tracker: the Ardupilot can be set up as an airplane-tracking antenna unit. This way you can have a lot longer range than you could have with a simple antenna.
- Ardupilot supports submarines too.
Using the APM for quadcopters
The Ardupilot makes a great flight controller for all the use-cases you can dream up for your quad. It’s used for just flying around, FPV racing,aerial photography, and autonomous missions too.
Even if you just want to fly around, Ardupilot’s extra features can come very handy, and could even save your quad from crashing.
Ardupilot features which make flying easier and more fun
The Simple and Super Simple modes work like the headless mode.
A lot of quadcopters (including a few toys) support headless mode. In this mode no matter what direction the quad copter drone is looking, using the forward stick will make if fly away from you, using the left stick will make it fly to the left. This mode is very useful if you lose orientation however it’s not much fun to fly this way.
The Ardupilot supports stabilize mode,
even combined with altitude hold. In this mode the stick input simply determines the roll and pitch angle of the quadcopter. If you center the stick the quad will level itself too. If you combine this mode with altitude hold mode, the quad will hold it’s altitude even while accelerating forward, and will ascend or descend only if you move the right stick up or down from the middle. This is the mode that’s both very beginner friendly and fun to fly around.
Ardupilot supports sport mode
, even combined with altitude hold. You can think of this mode as “acro light” – the sticks control the rate of rotation, however the quad will not lean more than the maximum angle you set up. Altitude can be held just as in the previous mode.
Acro mode is the same as the rate mode of other flight controllers.
In acro mode the quad will not self-level, altitude loss is not compensated,and the stick input will be interpreted as the angular velocity of the axisin question. For example the more you push the left stick left, the fasterthe quad will keep leaning left. Even if you pull the stick back to thecenter, the quad will lean left (and fly left) until you compensate bypulling the stick to the right. This is the hardest mode to fly in.
Geofencing is way to keep your quad “fenced”.
If a geofence is activated, the quad will not be able to break out of the fence. This mode is handy if you want to make sure your quad never flies away and stays in your line of sight.
Ardupilot supports return to launch mode.
When you activate the RTL mode from your transmitter, the quad will ascend or descend to a preset altitude,then fly to the takeoff location while holding the altitude, and finally it will slowly descend. This is a great way to get your quadcopter back would you lose orientation.
Ardupilot has a brake mode.
When you activate this mode from your transmitter, the quad will brake down and will start holding it’s position. The stick input is cut off at this point, and you’ll have to turnoff brake mode to get back the controls. You can think of this mode as a panic button and can save your quad from a crash.
Ardupilot has two main mission planner components
The Mission Planner and the Tower app support waypoint based flying, smooth flying using curves between the way points, survey mode to automatically survey an area and other modes too.
Both the Mission Planner and the Tower app supports pointing the camera to a preset location.
The Tower app has a “follow me” too, in this mode the quad will keep following you with the camera pointed at you while you are moving around.
Besides these the Mission Planner supports multiple “rally points”, which are designated landing locations. In case of a mishap, the quadcopter drone will select the nearest rally point and land
APM sample project and kits
450 size quad with Ardupilot
Ardupilot is great for DIY projects, you can use it to power almost any quad you’d like to.
There is a great post over at first quadcopter.com on using the Ardupilot with a DJI F450 flame wheel kit.
The takeaway of the article are that you can cheaply build a quad that’s performance rivals the commercially available drone’s performance. Tobe honest some luck is required if it’s your first build (click here to learn more about building your own quads).
The main sticking points were the badly aligned screw holes in the frame and the lack of documentation – these are fairly usual when building your own quads.
The components used:
- HJ450 a DJI F450 flamewheel clone
- 140 mm high landing skids
- APM2.8 flight controller
- 6M GPS with Compass L5883
- Flysky FS-i6 transmitter-receiver combo
- 4 x 920KV D2212 motors
- 4 x 30A ESCs for quadcopters
- 4 x 9443 propellers (2CW and 2CCW) (prop mount must match the motors)
- 5 x 10cm female – female servo wires
- DJI GPS foldable antenna mount like this one
- Carbon fiber GoPro camera mount with damping balls
- Hook & loop fastener
- IMAX RC B3 Pro compact 2s and 3s balancing battery charger (these)
- 11.1V 2200MAH 30C Li-Po battery
All in all the complete kit is much like this one.
You can get the Ardupilot components online:
The software is available for download here, the stable builds for multicopters are here. Either select your hardware there, or click here for the APM 2.x hardware builds, or here for the Pixhawk builds.
Getting the hardware is easy too, as you can find APM2.8 flight controllers, Pixhawk clones, Pixracer, and even quadcopter kits (without transmitter and receiver) online.