All Posts (14048)

Sort by
3D Robotics

A big code release tonight--this is the full setup that won the Sparkfun autonomous vehicle competition. Along with general improvements to the code, this is the entire package of autopilot, setup utility and ground station code. It's a full Unmanned Aerial System, not just a UAV! ArduPilot 2.1
  • All the features of ArduPilot 2.0 plus...
  • Supports XY sensor in diagonal postion
  • Requires Z sensor [UPDATE: FMA is no longer carrying those. While we sort out alternative sources, you can buy them from Dean Goedde for $40 (scroll down for price list)
  • Controls throttle if airspeed sensor is attached via the ArduPilot expansion board.
  • Supports desktop setup utility for waypoints and autopilot settings. (Waypoints are no longer manually entered in the code. They can only be entered with this utility.)
  • Last version of the code to support the original ATMega168-based board. Future versions will require the new ATMega328-based board.
  • Field setup procedures are here
  • Get it here
If you are using the expansion board and airspeed sensor, to control the throttle you must solder a wire from digital pin 8 to "MUX IN 3" Desktop setup utility

  • Add waypoints manually; utility displays them on Google Maps
  • Set max altitude, speed, circle radius
  • Set elevator, aileron/rudder trim
  • More features coming
  • Get it here ("ArduPilotConfigUtility")
When using this utility for the first time with ArduPilot, click Write before anything else in order to format the EEPROM. Also, ensure that the "Set RTS on close" box is checked in your serial port's advanced properties (control panel/device manager), as described in our Arduino debugging tips) Ground station

  • Requires free Labview runtime engine and serial drivers (install both. Note: if you've already installed Lego's Mindstorms NXT software you may find you've got a driver conflict, because it's based on LabView, too. Uninstall the Mindstorms software first.)
  • Works with Xbee wireless modules
  • Displays real-time attitude, speed, altitude, current waypoint, heading, distance to next waypoint, etc
  • Displays real time position on Google Earth
  • Get it here
  • Source code is here
Read more…

Here's a modification of original ArduPilot, running on Arduino Pro Mini.I'm just posting photos for now, since there's still lots of things to do for my planes to fly. Maybe when things are tuned, I'll post also modified code.My first testing or original ArduPilot few weeks ago was disaster, I tried to see my plane to see directly follow path, so I skipped slow testing of everything in small steps. Result was plane out of control, flying away to distance. Later I found it using bike, 1.5 km away. I had luck that time, I could have some $350 flown away, or maybe breaking someone's roof. Anyway, my previous plane was not flying nice, so this one is replacement, and it flies good in manual mode.

See the Arduino Pro Mini, compared to ArduPilot. It's smaller, and it lacks mux and failsafe chips. So great care must be done for switching between autopilot/manual modes on main cpu. Luckily tests show that it can be done relatively nicely using interrupts, so if main program control locks, interrupts still keep running, providing the possibility to gain control over plane.

Arduino Pro Mini on left, ArduPilot board on right.So far I play with FMA copilot replacement, implementing just stabilization. 6 RC channels are read, and 4 are written, the code can pass 4 channels through unmodified, or read them and mix with other values.
Read more…

EasyStar Mods - Wing Root Magnets

In this modification, magnets are installed into the wing root. This modification was inspired by the tendency for the wings to vibrate themselves apart during flight. Since simply pinning the wings in place (either mechanically or with adhesive) would not allow the wings to be compliant during a hard landing, magnets seemed like a good substitution. The process for installing the magnets in the wing root is very similar to the process for installing magnets in the canopy (see my previous post, "EasyStar Mods - Magnetic Canopy"). (Note that these pictures were taken after I had already done this modification)Materials:1. EasyStar RC plane2. Hobby knife3. Epoxy or CA4. Four neodymium magnets (I used 0.25" diameter, 0.125" thick; in retrospect, going one size up to 0.375" might be better)Process:1. In one wing, cut two small holes using the hobby knife for the magnets to fit into. The holes should be located near the forward and aft part of the root. The hole depth should be sufficiently deep to allow the magnets to be flush to the surface.2. Install the magnets by bonding them in place with either CA or epoxy. I used CA and have had no problem with them coming out.

3. After the adhesive has dried, cover the magnets with a piece of wax paper and snap 2 new magnets on top of them. Insert the spar into the wing (breaking through the wax paper). Slide the other wing over the spar and push down so that the magnets leave an impression in the wing. This will ensure proper placement of the magnets in the second wing.

4. Cut small holes in the second wing where the impressions were made and put adhesive in the holes.5. Replace the wing so that the magnets fit into the holes. I feel that this method is better than dropping the magnets into the holes since it guarantees that the magnets have the correct orientation.6. Once the adhesive has dried, separate the wings and peel off the wax paper.
Read more…

Possible useful UAV programming codes

UAV codes.pdfI am only about 4 hours into my "self-induced" C++ tutorial course starting from "what is a programming language?" So I cannot determine with great certainty how useful the included codes in the attached project may be. I hope that it would help some of you way ahead of me in the programming department.Would appreciate any feedback on the usability of these codes...
Read more…
T3
The mystery of the 12 second latency in the dynamic response of the EM406 GPS is solved.Recently, I stirred up a debate about whether or not the EM406 has a 12 second latency or not. A few of us were seeing a 12 second latency. The majority of EM406 users were not seeing it.It turns out that the dynamic performance of the EM406 depends on which interface you use, NMEA or binary. If you use binary, there is a 12 second latency, then a 3 second "smoothing" transient.If you use NMEA, there is a smoothing transient only. The NMEA interface to the EM406 provides dynamic performance as good as the LOCOSYS or the ET312.It is my speculation that "track smoothing" is turned on in the EM406 for the binary interface, and either it is always on, or I have not figured out how to turn it off. If anyone knows how to turn track smoothing off in the binary interface for the EM406, please let me know so that I do not have to scrap my binary interface and start over on a NMEA interface.
Read more…
3D Robotics

ArduPilot isn't just for planes--it's a great board for robot cars, too. At least three of the rovers in the Sparkfun Autonomous Vehicle Competition used our board for their vehicles, where it was just acting as a 2D autopilot. Nathan Siedle, the CEO of Sparkfun, used a modified ArduPilot board for his rover and others used the board stock. Like almost all the rovers, regardless of what board they used, they went awry at one corner or another, due to waypoint, software or sensor errors or just wild out of controlness (see above). The one rover that finished the course used a custom Atmega32 board. Next year I'd expect more rovers to finish the course, just like DARPA road race. I also expect more of them to use ArduPilot: it's the easiest way to add RC and GPS to Arduino. You just need to program them right! (photo from Makezine)
Read more…

EasyStar Mods - Magnetic Canopy

This is a pretty simply modification to the canopy to replace the plastic tabs with magnets. Once done, it is quick and simple to get the canopy on and off and, as a bonus, it makes a neat snapping sound when you put the canopy back on. The process is straightforward. (Note that these pictures were taken after I had already done this modification)Materials:1. EasyStar RC plane2. Hobby knife3. Epoxy or CA4. Four neodymium magnets (I used 0.25" diameter, 0.125" thick; in retrospect, going one size up to 0.375" might be better)Process:1. Remove the plastic tabs by cutting around them with a hobby knife and then pulling them out.2. Cut small holes in the canopy area of the fuselage to fit the magnets into. Install the magnets (I installed mine near the front, as shown) by bonding them in place with either CA or epoxy. I used CA and have had no problem with them coming out.

3. After the adhesive has dried, cover the magnets with a piece of wax paper and snap 2 new magnets on top of them. Replace the canopy and push down so that the magnets leave an impression in the canopy. This will ensure proper placement of the magnets in the canopy.

4. Cut small holes in the canopy where the impressions were made and put adhesive in the holes.5. Replace the canopy on the fuselage so that the magnets fit into the holes. I feel that this method is better than dropping the magnets into the holes since it guarantees that the magnets have the correct orientation.

6. Once the adhesive has dried, remove the canopy and peel off the wax paper.

Read more…
In this other post, I wrote I intended to use the interrupt based NewSoftSerial llibrary for Arduino. Many of us know that the standard SoftSerial library comming with Arduino is not usable as is. Some tried out interrupt based serial to gain an additional serial IO on ArduPilot, but there are negative feedback about usability. As usual, I wanted to discover by myself!3689314587?profile=originalMy intention was similar and is determined by my airframe setup. As the diagram shows, I load two ArduPilot boards into my plane, one (apA) as autopilot and the second (apB) for some additional tasks. One such task is parsing NMEA GPS sentences to my video OSD, an Inspire OSD, which requests 4 different NMEA sentences to fully exploit all its functions (GPGGA, GPRMC, GPRTE, and GPRMB). With the route information, the OSD can show distance and direction to next waypoint (left/right arrow and associated angle). This OSD was specifically made to be linked to the Garmin Geko handheld GPS which spits the necessary NMEA sentences out of the box. An EM-406 can also be used as is, but then, there is no waypoint functionality available.I use a LS20031 GPS running at 57600bds, spitting two NMEA sentences necessary for ArduPilot (GGA and RMC). It is connected to ArduPilot board apA and this direct connection is utterly important for autopilot navigation. So how to share the GPS running at 57600 with the OSD reading "only" at 38400bds?My goal is to connect my GPS to apA AND to my second ArduPilot board (apB). apB will read the GPS at 57600 and write GGA and RMC sentences as is to the OSD at 38400. For this function, apB is just a bauds rate adapter. Additionally, apB will also use processed data received from apA (next waypoint, etc) to assemble/emulate RMB and RTE NMEA sentences which will also be sent to the OSD.For developing and testing purpose, I replaced the apB with my Duemilanove Arduino board. For a start, I connected the GPS data output to Arduino. I set up a new sketch instantiating two software serial IO ports:- gpsRx(12, 98): Rx on pin 12 et Tx on non-existing pin 98, used only to receive from GPS; speed 57600bds;- osdTx(99, 13): Rx on non-existing pin 99 and Tx on pin 13, used only to send to OSD; speed 38400bds.I replaced the OSD with my FTDI breackout board to monitor the result on the laptop. For the sake of educating myself, I also implemented an 2x16 characters backlit LCD I wanted to try out (it is displaying the number of GPS readings; not useful but nice to make work for a first time).After many trials and error, I managed to get a decent result in the output. I'll write more on my experimenting later. For now, here's just an illustration of the test setup.Added 2009_05_02:After more evening work, I made some progress. My current setting is:- ArduPilot A board: autopilot functions, ArduPilot ver. 1 code, reading GPS uart serial input at 38400 at 2Hz, parsing fix_position, current destination waypoint, waypoint distance and bearing all together in a special NMEA-like format ($APDAT, 1, 1, 1324, 244*) to uart serial out at 2Hz.- ArduPilot B board: other functions, custom code, reading GPS over uart serial input at 38400 at 2Hz, reading ArduPilot A $APDAT sentences over NewSoftSerial input at 38400 at 2Hz, parsing GPS NMEA sentences (GGA, RMC) to video on screen display at 38400 uart serial out at 2Hz, adding an emulated waypoint navigation sentence ($GPRMB) with the data received from ArduPilot A, together with the GPS sentences to OSD.- Inspire OSD- XbeeCurrently, I am adding the reading of Xbee 868 headtracking data over NewSoftSerial at 38400, which is not so easy. the decoding code works as a stand alone, but not yet integrated as I want it in my ArduPilot B code. The difficulty is to have the Xbee headtracker data read as they arrive (ie only when updates are necessary to respect limited duty cycle of xbee 868) while reading other data from GPS or navigation ArduPilot which are sent at 2Hz frequency. In fact, when implementing NewSoftSerial, one has to take care of doing a full reading and buffering of data on one soft serial input before being able to read and buffer another data stream on a second soft serial input. Whenever you call a begin on a NewSoftSerial input instance, it flushes the buffer of the other instance. Being able to do that tricky back and forth from one input to the other without loosing data is not easy, but not impossible.I try to keep the loop free for new headtracker data for as long as possible within a 500 millisecond cycle. But in that cycle, a full reading (and processing) of the 2 GPS NMEA sentences and of the short APDAT sentence must be achieved too.For now, I continue tweaking to see where the different function calls are to be placed best to achieve a smooth cycle with all necessary tasks done. It's a bit of a struggle with trial and error, with a lot and a lot of code uploading to see if it behaves better or not (or if it behaves at all!).I hope to reach a solution in the coming days, because my iron-on shrink cover for my Kadet arrived a few days ago and I'd like to cover that plane now. My UAV will receive a nice color scheme with metallic dark red, some transparent dark red, some clear, some light grey, some metallic anthracit grey, some cub yellow and finally some chrome strips! Or maybe some less...IN PROGRESS
Read more…

ArduPilot Success Stories/Videos

Hello Everyone,I am excited with the ArduPilot project and the DIY Drones community activities. I decided to buy an ArduPilot from Sparkfun (they do not have in their stock at the moment). Meanwhile I am searching for ArduPilot success stories, and successful flight videos with ArduPilot. Although there are a couple of ArduPiloted EasyStar flight videos on YouTube, those videos do not show accurate navigation results (I hope I am mistaken).If you know successful flight videos of ArduPiloted UAVs, can you post their links?May be the proprietor of this site can create a new tab/section specifically reserved for the listing of ArduPilot success stories/videos.
Read more…
T3

MatrixNav is released.

Successful flight testing of MatrixNav is complete. MatrixNav is open source C firmware for the UAV DevBoard that provides pitch stabilization and return to launch functions for inherently stable aircraft that are controlled by rudder and elevator. MatrixNav is built on top of a method for integrating gyro signals into orientation information called direction-cosine-matrix (DCM). Flight tested firmware and documentation are available.A dozen test flights were made with an electric powered Gentle Lady under the following conditions:1. Both calm and windy conditions.2. Powered and gliding.3. Return to launch with the plane pointing away, toward, or perpendicular to me.4. Circling behavior under RTL control after the plane crosses the launch point.5. Hand launch in both manual and pitch stabilized modes.6. Landings with pitch stabilization turned on.MatrixNav completely solves an issue that I wrestled with in previous versions of my firmware: gyro cross coupling during a banked turn. If you attempt to use a pitch gyro signal to stabilize the pitch of a plane, it will measure a portion of the turn rate of the plane during a banked turn, and will cause the plane to dive into a turn if the bank angle is too great. The use of direction cosines eliminates the cross coupling and makes it simple to achieve a level turn at any bank angle.Furthermore, since MatrixNav relies mostly on gyros, not accelerometers, I was finally able to turn on pitch stabilization during hand launch.I added a feature to give the plane a kick during return to launch: you can program in the return to launch pitch angle. By deliberately pitching the nose down a bit, you can increase the return speed to better penetrate the wind.MatrixNav is intended for you to either use as-is, or to serve as the starting point for your own projects. So if you have a UAV DevBoard and want to use it to do some flying of an inherently stable plane, you will definitely want to try out MatrixNav.By the way, the MatrixNav documentation is not up-to-date about what the LEDs will do. Sorry about that, I really don't look at the LEDs anymore, they are usually hidden in my plane. Here is what they do:1. The LED on the EM406 will go out entirely, because MatrixNav puts the GPS communications in binary mode.2. Both LEDs on the the dev board will come on briefly during power up, to self test them.3. After power up, the green LED, stat2, will indicate whether or not MatrixNav is receiving valid pulses. It will be on continuously if there are valid pulses, otherwise it will go out.4. After power up, the red LED, stat1, will flash a few times, and then go out until the GPS is locked, and then it will resume flashing.After power up, MatrixNav goes through an initialization process that waits for both GPS lock and valid radio pulses. When pulses are received and when there is GPS lock, the rudder will wag a few times. When it stops wagging, MatrixNav records the present location as the return to launch point and you are cleared for takeoff.Bill Premerlani
Read more…

Three Cheers for Chris and Jordi

For three wins:Ardupilot Team vs. TreesArdupilot 2 Trees 0
Find more videos like this on DIY Drones
For those that missed, it, today's Sparkfun event was a smash, literally and figuratively. It turns out that U(A)V's of all stripes have the same propensities as Charlie Brown kite. Aside from the Trees into which Jordi scored direct hits, the wheeled varietals made their own attempts to climb the Sparkfun forest.The wind certainly made itself known, and my first impression of the ardupilot (with pitot) was that it had very stable flight characteristics, wind notwithstanding, and that the waypoint acquisition was the low hanging fruit for improvement. I suspect the wind had decreased the accuracy outside the waypoint margin, resulting in several fly-arounds - but when the accuracy came withing range, it was quite effective in circling the building.
Read more…

Tilt Error Compensation

Hi,First of all I many thanks to Chris for directing me to the right link, which has enabled me to have an enormous understanding to what I needed to do and gained other info that I was not aware of...Brilliant Forum!!!Right now I am working on the CMPS03 digital compass. I have managed to get the compass programmed and it works fine on the Horizontal/Yaw manoeuvre. I am working on the till error compensation right now (Pitch & Roll). However, I am struggling with the following areas:- I am experiencing a random flickering during the tilt “Pitch” on the North & South direction. Is this okay or is it due to something that I have done wrong?- I plan to use an additional CMPS03 to detect the Z-axis because I could not find another single axis compass, which also uses I2C interface. How can I use only one of the sensors reading when pointing on the Z-axis.- I have looked into the brilliant comparison in the FQA between “Gyros, Accelerometers, Infrared sensors....”. to avoid complexity and expenses as am still learning about UAVs & RC Aircrafts, I thought to go for Infrared sensors. is my understanding right that I would be able get the till measure through an Infrared horizon sensor and would it work with this compass module.Thanks for the support.Best regards,
Read more…
3D Robotics

WE WON!!!!

With the plane down from the tree and taped up, we were the last team of the day to do the last run. The winds had picked up to 10-15mph, gusting even higher. We had one run to hit it. Jordi took off, went downwind and switched it into autonomous mode. It made the first waypoint (into the wind) easy and them zoomed by the second one, then took the third waypoint (downwind) really wide. Then it started heading back into the wind towards the finish line. Oh no, it looks like it's too close to the building and we're going to cut a corner! But then, at the last minute, the plane corrected, moving slowly into the wind, and drifted to clear the corner by about a foot. Then straight and true over the finish line! 36 seconds! First place! Hurray!!!!!
Read more…