[This original ArduPilot board, now called the "Legacy ArduPilot" is no longer produced or officially supported by the DIY Drones dev team, and this page is maintained just for historic reasons. However, there are still many users of it out there and it still works fine. The user group for Legacy ArduPilot users, for both thermopile and IMU use, is here.]

 

ArduPilot is a full-featured autopilot based on the Arduino open-source hardware platform. It uses infrared (thermopile) sensors or an IMU for stabilization and GPS for navigation. It is the autopilot used to win the 2009 Sparkfun Autonomous Vehicle Competition.

The hardware is available from Sparkfun for $24.95. An expansion board ("Shield") kits that includes an airspeed sensor, a 3.3v power regulator for 3.3v GPS modules and other sensors and cables and connectors for easy attachment of the XY and Z sensors, is available from our own store for $57.20.

 

User f

ArduPilot features include:

  • Can be used for an autonomous aircraft, car or boat.
  • Built-in hardware failsafe that uses a separate circuit (multiplexer chip and ATTiny processor) to transfer control from the RC system to the autopilot and back again. Includes ability to reboot the main processor in mid-flight.
  • Multiple 3D waypoints (limited only by memory)
  • Altitude controlled with the elevator and throttle
  • Comes with a 6-pin GPS connector for the 4Hz uBlox5 or 1hz EM406 GPS modules.
  • Has six spare analog inputs (with ADC on each) and six spare digital input/outputs to add additional sensors
  • Supports addition of wireless modules for real-time telemetry
  • Based on a 16MhZ Atmega328 processor. Total onboard processing power aprox 24 MIPS.
  • Very small: 30mm x 47mm
  • Can be powered by either the RC receiver or a separate battery
  • Four RC-in channels (plus the autopilot on/off channel) can be processed by the autopilot. Autopilot can also control four channels out.
  • LEDs for power, failsafe (on/off), status and GPS (satellite lock).


Resources:

ArduPilot requires the free Arduino IDE to edit and upload the code to the ArduPilot board.



The code is currently optimized for the Mutiplex EasyStar three-channel powered glider and FMA sensors, but can be modified for other aircraft and sensors. It uses the rudder/ailerons and elevator to maintain level flight and navigate to GPS waypoints. It supports a desktop setup utility and ground station software. It also includes a "fly-by-wire" mode that simply stabilizes RC flight. The main code is ArduPilot2.x.zip in the download section of our Google Code repository, where x is the latest version.

What you need to make a fully-functional autopilot:


Open source extras:

  • If you want to build your own board from scratch, the necessary files and component lists are here.
  • [Note: you shouldn't need this, since this code is loaded on the ArduPilot board at the factory] Latest multiplexer code (for the board's second processor, an Attiny, which runs the failsafe system) is here.
    Instructions for loading this code are here.



Recommended UAV setup:


Airframe option one: Hobbico SuperStar (49" wingspan, $95, shown above). This is an inexpensive, good flying high-wing trainer with ailerons. It can be hand launched in a park or take off from a runway, and replacement parts are readily available in case of a crash. If you want much better performance with this aircraft, you can upgrade it to a brushless motor, speed controller and a LiPo battery. [If you don't already have one, you'll also need a balancing charger and power supply.] Note: any stable aircraft with both ailerons (for stabilization) and rudder (for navigation) can work, so feel free to experiment with what you've got.


Airframe option two (recommended for ArduPilot 2.x): EasyStar (shown above). Performance can be improved with the modifications described in this post.

You'll also need:

  • A six or seven channel RC transmitter and receiver, with at least one toggle switch (ideally three-position but two-position will work, too, although you will have to mix channels to have access to both autopilot modes in the air), such as the Futaba 7C.
  • Some servos (at least three for ArduPilot 1.0; at least two for ArduPilot 2.x) and at least three female-to-female servo cables to connect the RC receiver to ArduPilot.


Cool optional extras for your UAV:

Views: 311279

Comment by fefenin on August 1, 2009 at 1:18am
@Jordi :
RTL doesn't work as well as WP...

i don't understand why there is "#" before IF when we talk about defines, i added that into the header:

#define FLY_BY_WIRE_REVERSE_ROLL_PITCH 1 // 0 = normal, 1 = pitch reversed,2 = roll reversed,3 = pitch and roll reversed



and change the code from:
{
pulse_servos(PID_roll(PID_error((read_Ch1()/FLY_BY_WIRE_GAIN_ROLL), roll_trim+get_roll()),roll_abs,t_dt),PID_pitch(PID_error((-read_Ch2()/FLY_BY_WIRE_GAIN_PITCH), pitch_trim+get_pitch()),t_dt));
air_speed_hold=FLY_BY_WIRE_SPEED_SETPOINT;
}

to:

{
switch (FLY_BY_WIRE_REVERSE_ROLL_PITCH)
{
case 0:
pulse_servos(PID_roll(PID_error((read_Ch1()/FLY_BY_WIRE_GAIN_ROLL), roll_trim+get_roll()),roll_abs,t_dt),PID_pitch(PID_error((read_Ch2()/FLY_BY_WIRE_GAIN_PITCH), pitch_trim+get_pitch()),t_dt));
air_speed_hold=FLY_BY_WIRE_SPEED_SETPOINT;
break;
case 1:
pulse_servos(PID_roll(PID_error((read_Ch1()/FLY_BY_WIRE_GAIN_ROLL), roll_trim+get_roll()),roll_abs,t_dt),PID_pitch(PID_error((-read_Ch2()/FLY_BY_WIRE_GAIN_PITCH), pitch_trim+get_pitch()),t_dt));
air_speed_hold=FLY_BY_WIRE_SPEED_SETPOINT;
break;
case 2:
pulse_servos(PID_roll(PID_error((-read_Ch1()/FLY_BY_WIRE_GAIN_ROLL), roll_trim+get_roll()),roll_abs,t_dt),PID_pitch(PID_error((read_Ch2()/FLY_BY_WIRE_GAIN_PITCH), pitch_trim+get_pitch()),t_dt));
air_speed_hold=FLY_BY_WIRE_SPEED_SETPOINT;
break;
case 3:
pulse_servos(PID_roll(PID_error((-read_Ch1()/FLY_BY_WIRE_GAIN_ROLL), roll_trim+get_roll()),roll_abs,t_dt),PID_pitch(PID_error((-read_Ch2()/FLY_BY_WIRE_GAIN_PITCH), pitch_trim+get_pitch()),t_dt));
air_speed_hold=FLY_BY_WIRE_SPEED_SETPOINT;
break;
}


that works but maybe it's not good to do ??? should i do it with the specials IF (#IF) ???

thank's in advance
Comment by Greg Fletcher on August 1, 2009 at 9:07am
Bug in Arduino-0016 and win XP
I noticed a annoying problem with Arduio 16. Win XP doesn't see it as a program ! I had ver 15 installed and then installed ver 16. Everything was fine. was going to start anther copy of Arduino to compare an older version of ardupilot with ardupilot 2.23 the see wat was changed. I noticed that my second instance of arduino was ver 15 ? I started the second indstance by double clicking on a pde file. I right clicked on a pde file to set the "open with" and chose arduino from the list only it was Arduino0015. I then deleted Aurduino-0015 folder and did the "open with" thing again and Aurduino was no longer on the program list. I tried everything and can't get it to work. So to avoid problems only open a sketch from within Aurduino-0016 from the file menu and never double click on a pde file to start aurduino-0016. Also check the version at the to of the window. If you think you are using ver 16 you may never look up at it.

Developer
Comment by Jordi Muñoz on August 1, 2009 at 10:56am
fefenin:

Well thats medium C stuff you must know if you are trying to program an autopilot. =)
#IF are conditionals for the compiler (Preprocessor directives), so the code inside the IF# or #ELSE will compile and consume flash space, the other part don't.
Is better than the software if, because you don't want waste tiny CPU power making that condition forever. But if condition still a lot better than switch (very bulky).

http://www.cplusplus.com/doc/tutorial/preprocessor/
Comment by Peter Meister on August 1, 2009 at 12:29pm
Jordi,

Your project work is impressive, I am by no means knocking here. But there are multiple people with systems not working at all, and my setup is exactly in-line with your recommendations. The 2.2.3 simply does not work, and honestly the evidence from all the above should be sufficient to prove the issues are real.

Again, other then you and chris, no one else except david low have reported a successful flight on this forum with 2.2.3. So I think that is a clear indication of the issue. There are dozens of people on here, are telling me that all of them simply have it working and then leave the forum? That makes absolutely no sense, my frustration is that I have spent REAL money buying all this gear, countless versions of sensors, countless xbee modules due to shield issues, and 2 types of GPSs - Almost $800 worth of gear and you know what, it doesn't work. I am just asking for you to really look deep now, you can say its someone else, but its not at this point.

To anyone out there, please prove me wrong. Post your successful setup, and show me a successful flight video and google earth kml.

Cheers,

-Peter
Comment by Peter Meister on August 1, 2009 at 12:33pm
Jordi,

I am using Arduino 16 yes..have been since day one...

Admin
Comment by Thomas J Coyle III on August 1, 2009 at 1:04pm
Peter,

I think that the problems with Arudpilot v 2.2.3 are the result of trying to support too many GPS models and formats. I am presently using the EM406A which, short of using the uBlox, seems to be the GPS that both Chris and Jordi have had success with.

I noticed recently that Jordi has indicated that they want to support only one GPS in the future and that will be, Ibelieve, the uBlox.

I have all of my Ardupilots built: one Atmega168, two Atmega328 and one spare Atmega328. However, I am still at work to complete the construction of two EZ*s and two TwinStars. I should be flying by Larbor Day if all goes to plan.

Regards,
TCIII

Developer
Comment by Jordi Muñoz on August 1, 2009 at 2:07pm
Hello Peter,

Well you can program you own code and share it with us (actually is the idea). =) We have expended a little bit more than 20 times $800 to give you a "free" autopilot code and not getting a cent. The hardware can't be free because we don't sell it all and it really cost.

When i use this code for my own purposes it works good and i just share it with you. I added another protocols to keep other persons happy (i don't have too, you know? But i did), they use it not just for airplanes.

Anyway my code is just prototype and a lot of the code is very valuable specially for people WHO want to learn many things about micro controllers/robotics and some university's use it and i hope many people learn something about it.

Now i feel so sorry about your problem (really), but also your complains or whatever it is will not help me debug your problem. As i report before: How i suppose to fix something is working for me? There's nothing i can do like this. Would be nice if you can come here or i go over there and work together in the field. If some body is able to spot the problem and tell me what it is i will fix it too. But is difficult when somebody that really knows about programming comes and give me the reports (real beta testers).

For now the next version i will add the fly by wire reverse options, eliminate NMEA and concentrate more in the tuning for the easystar. Also i need to organize the code, i just add, add and add but i never had the time to polish it.
Comment by fefenin on August 1, 2009 at 2:07pm
hello,

i'm using the arduino 16 as well!

thank you for the turorial Jordi! i'll read the link you sent me...
where can i find the whole set of function , same website?
i would like to learn more about C++, i feel very much at ease with proton Pic basic (i made a simple autopilot that works good as the ardupilot V1) , but i'm not good at all in C

Thomas J Coyle III :
i'm using a hacked GPS that works exactly as the EM406A and thezr is still this bug!

i flew my plane today and lost it!

i spent 4 hours running into the corn field to find it ! (thaughtit was lost forever) i've got scratches everywere on the face...
my girlfriend went to give me some help searching and she mostly return the car upside down!
we had to return it with a four wheel drive. (nobody and nothing damage)

it was a great day!! (but i would not do that everydays)

nothing was broken exept the whole plane (crashed it nose down full throttle) the clevis broke on the elevator control surface




i've got to rebuild it and then concentrate on the naviguation function, could be a problem with the roll set point
Comment by fefenin on August 1, 2009 at 2:18pm
Jordi,

i guess what you want to do is the right thing ,
and thank you for the reverse thing: can you leave me the time to do it the proper way and post it so you can tell me if it's good or wrong (learnibg purpose)

i'm still sorry about NMEA but no worries i'll use the GPS i hacked , it has a port B that can be configured to send NMEA to my eagletree OSD and of course the port A in SIRF binarie

Developer
Comment by Jordi Muñoz on August 1, 2009 at 2:20pm
I will ask you again Peter, I'm confused. Are you using EM406 in binary protocol or NMEA? Now check this, in the ground station, if you look the compass you will see two arrows, one indicates were are you going and the other indicated were do you want to go.... Have you ever check that info? Well both arrows must be overlapped, if they are means your traveling to the right direction.

Tell me what you see in those arrows please, that may help me a little bit.

Jordi

Comment

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

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service