All Posts (14056)

Sort by
Developer

ArduPilot Mega sensor shield testing report

Hi all,
We have been testing the new beta sensor shield for Ardupilot Mega.

Note that this is a beta version of the sensor shield to test components, the final version will be different (Jordi commented this on other blog post)

The FTDI and mini USB works great for programming the At1280 with Arduino.
First tests were focused on the external 12 bits ADC (ADS7844) and the results are that it works great!!
We developed the SPI code to read the ADC and we used Timer2 interrupt to make a free running ADC at 400Hz.
Because our main loop run at 50Hz, we need at least 100Hz sampling frequency (to avoid aliasing), so we have an 4x oversampling and averaging on the ADC readings (this is good)
We are using the most efficient way to read the channels (16 SPI clock cycles per conversion. SPI runs at 2MHz).
When the code was tested, we coverted it to a standard Arduino library so the interface is very simple for the user.

I´d really like the "library" aproach because our code is now fully integrated in Arduino IDE, users can use this codes for other DIY projects, it´s very simple to use and we always include an easy example to test the library (File->Examples)
To install an arduino library you only have to copy the directory into your arduino\hardware\libraries and restart the arduino IDE.
To insert a library go to Sketch->Import library or you can test an example in File->Examples.
In this case, we only need to call APM_ADC.Init() on setup() and when we need an analog reading use :
value = APM_ADC.Ch(1);
The ADC library works really great!, so I decided to make a quick adaptation of our IMU DCM code to the ArduPilotMega. It works fantastic, very smooth and with high precision (see the video).


Find more videos like this on DIY Drones


Finally we measured the performance of the codes:
ADC 7 channels at 400Hz uses 98us*400Hz= 3.9% CPU
Full IMU DCM code takes 2.65ms*50Hz = 13.2% CPU
So we have an 83% of free CPU procesing power.
It´s very important to keep this part of code highly efficient.

Next step is to test the DataFlash code (AT45DB161) and convert it to a standard library.
I have doubts about if we can share the SPI bus between ADC and DataFlash (because how ADC SPI is implemented) but if this fails we have a second option in mind (using one of the serial ports in SPI mode)...
Next will be to convert our GPS code to a standard library and test all together:
-Radio library (APM_RC)
-ADC library (APM_ADC)
-DataFlash log library
-GPS library
-IMU DCM code
Then we start to add the latest autopilot code...

Code: APM_RC.zip This is the Radio Library (radio input and servo outputs)
This code uses hardware support for reading the radio input (input capture interrupt) and pulse servo outputs (Output Compare) so it´s very efficient, high accurate and uses very little CPU.
Code: APM_ADC.zip This is the ADC library to read analog data from gyros, accelerometers and diff pressure sensor.
Code: APM_IMU_test.zip IMU DCM algorithm for ArduPilot Mega Hardware (test code).
Note: All this codes are betas.

Jose.
Read more…

A public thank you to Caleb from CH Robotics

CHR6dmFrontBack_small.JPG


As some people might know there is a team hard at work on OpenPilot and we are making some progress, like every complex project things don't go as fast as you like but progress is happening. One of the things we are working on now is the low level infrastructure for the AHRS, this makes it so our EKF developers can just drop their code in without messing with the low level side of things.


On of the issues we needed to resolve was filtering the inputs, we were a bit unsure on which way to go. I sent an email to Caleb from CHR to ask his advice, he not only helped a lot but also gave us permission to use parts of his gyro filtering code such as his FIR filter as long as we credited him. Naturally he will be credited in the code and the credit file but I wanted to say a public thank you for this as well.



What I love about OpenPilot is the community, this side was mentioned on the podcast where we announced the project. Caleb is a perfect example of this community spirit.


Additionally, I don't see the CHR-6dm AHRS mentioned much here, so if you are looking for a well priced, powerful AHRS with a complete EKF have a look at http://www.chrobotics.com/ - Caleb rocks :-)


A small update on OpenPilot as well. Things are moving along, we have our issue tracker running now which can be found at bugs.openpilot.org there are still tasks to be added as not everything being is done is in there yet but it will be. There is a burn down chart which shows how far away we are from the version 1.0 release and a list of outstanding tasks that we need help with if people want to get involved.




Read more…
GSmphFT.vivideo_2010-03-16_00.07.44.m4v

After playing with lab view and the ArduPilot with the ArduIMU I have finally managed to get the time lag from the plane to the displayed action on the GroundStation to less than a half a second.
New VI file 1 AM 3/17/2010
Here is my rather crude video.

Earl

Here is the new VI for labview
The file name GS = Ground Station mph = Miles per hour FT = feet

GSmphFT.vi

Here is my latest version.
GSmphFT2.vi
Read more…

UAV flying in/around New York City?

Hey guys, this is my first post here on DIYDrones (I've been reading this site for a few months now, just not posting anything until now).

I'm in New York City (Brooklyn to be exact) and I'm really interested in building and flying a UAV. However, I'm wondering whether it's a good idea, or rather if it's even possible to fly an RC plane here. Obviously I'm not planning on flying around skyscrapers or anything, I just want to fly something and take a few camera shots or videos.

As an alternative, I can always take the train out to Long Island and fly there, but that would seem to be a big hassle getting a plane hidden on a train and keeping it all unbroken at the same time.

What do you guys think? Is there anyone here from New York City or some other largely populated city? Where do you fly, how, and when?
Read more…

march_giveaway.png


Leading up to the 10th anniversary of my robotics blog, GoRobotics.net, I'm doing a series of robot prize giveaways. This month's giveaway features $250 worth of prizes from our sponsors Pololu,Super Droid Robots, Zagros Robotics, Solarbotics and No Starch Press.

1st Place Prize – Orangutan B-328 Robot Controller (donated by Pololu), 2x 24V 195 RPM Gear Motors (donated by Super Droid Robots), and The LEGO MINDSTORMS NXT Idea Book (donated by No Starch Press) – worth $100

2nd Place Prize – Arduino Duemilanove, Tamiya Gear Box and Sport Tires (donated byZagros Robotics), and The Unofficial LEGO MINDSTORMS NXT Inventor’s Guide (donated by No Starch Press) - worth $75

3rd Place Prize – Herbie the Mousebot Kit (donated by Solarbotics), and LEGO MINDSTORMS NXT Thinking Robots (donated by No Starch Press) – worth $75

Read more…

BaroneOSD is a PAL video overlay impression WITHOUT additional hardware required (NO LM1881 Sync generator).

Use only 3 pin:

D1 (USART TX) used to pump pixel in the video connected with a 330Ohm resistor to D6

D6 (AIN0) Video in/out, connect here you camera or radio TX.

D7 (AIN1) 0.3V Voltage reference (you can use a partitor resistor)


http://www.elenafrancesco.org/arduino/



Read more…
In order to properly size displays for the ArduPilot GCS it would help to know what screen resolution everyone uses - in the field on their GCS computer (laptop)

640x480
800x600
854x480
960x1200
1024x640
1024x768
1152x864
1280x720
1280x768
1280x800
1280x960
1280x1024
1360x768
1366x768
1400x1050
1440x900
1600x900
1600x1000
1600x1024
1600x1200
1600x1280
1680x1050
1792x1344
1856x1392
1920x1080
1920x1200
1920x1440
1920x2400
2048x1280
2048x1536
2560x1600
2560x2048
3840x2400

Other ( if so what?)
Read more…
3D Robotics

Jason Short and I had great day of testing and improving code (and putting in a pretty good T3 contest time!). Once again we were at the RC club in Point Richmond, across the Bay from San Francisco. Jason was just back from a skiing vacation where he tangled with another snowboard to the tune of 17 stitches on his ankle (I saw them: ouch) but fortunately UAV development doesn't require a lot of running.


You can see what flight testing looks like above. I fly, he watches the telemetry and then makes changes in the code for me to test.


Here's the rundown of the day's progress. You should see all this reflected in the code in the repository in a day or so:


The Good:


--Navigation is now locked in pretty well. Straight lines to waypoints (no more snaking) and pretty tight turns between them.


--Manual throttle control now works in autopilot mode! Just like you can "nudge" the plane's direction with RC controls while it's flying autonomously, you can now speed it up or down. Excellent for finding the best speed for T3 runs!


--The funky thing with one of my Futaba FASST receivers working and the other not was solved. Turns out that one of them outputs the PWM on all channels in serial, and the other in parallel. Who knew? Anyway, ArduPilot can handle either. If your radio does something weird like only letting you fly left, not right, edit this line in the config file:


//3-2

#define RADIO_TYPE 0 // 0 = sequential PWM pulses(Fasst, Spektrums), 1 = simultaneous PWM pulses (Corona RP8D1)


--We flew the FunJet in RC mode (although it has an ArduPilot, we haven't set up elevon mixing yet). Amazing performance: fast, rock solid and incredibly maneuverable. Once we get it dialed in with the AP, we're going to be looking at sub 10 second Sparkfun runs ;-)



The Bad:


--We still don't have altitude hold working right. We finally got it to display the right altitude in the ground station, but for some reason it's not holding. Jason thinks this is just a matter of tweaking throttle and pitch gains, but for now I had to trim the pitch down manually for the T3 trial runs just to ensure the plane didn't get too high during the autonomous portion.


--We're getting different results with different sensors. I'm flying with FMA sensors, and Jason was flying with DIY Drones sensors. The calibration routines should mean that as long as you've got a matched pair it shouldn't matter where they come from. But for some reason it still does, and different sources require different gains in the code. We'll figure out a way to make that go away...


The Stupid:


--I almost crashed one time by launching with stabilization accidentally on, but not yet calibrated (it takes a few second to calibrate in the air). Also we found that if you happen to power on in stabilization mode, it messes up your waypoint settings (for some reason it thought it was starting on waypoint 7), so for now just don't do it until we can find and fix that bug.


--I also almost crashed launching downwind. In my defense, the wind shifted direction. But still!


--I nuked another Xbee by powering on with the signal line attached. I can rescue it, of course, but I CAN'T WAIT for ArduPilot Mega to make this problem go away with the dedicated serial lines.

Read more…

Variable Pitch Quad Rotor - M/UAV

Variable Pitch Quad Rotor - M/UAV

3689343247?profile=original

DIY project ranging from a 600cc 120HP etec Ski-Doo engine, UltraSport 254 tail rotors, extruded aluminum blades from Vortech, aluminum / steel tube structural components, and a carbon fiber reinforced polymer monocoque frame.

Read more…
3D Robotics

Tutorial: Programming your uBlox GPS module

Although you can buy the uBlox modules pre-programmed from the DIY Drones store, you may want to do it yourself, either because you want to update the firmware or change some settings, or because you've bought the module from Sparkfun because we were out of stock and you need to set it up to use with ArduPilot.

Here's a simple tutorial on how to program your module (it replaces this older tutorial):

First, you'll need the DIY Drones adapter if you don't already have it.

You can use our GPS-to-FTDI cable to connect this directly to your PC, or make your own.

If you're going make your own, solder a four pin header on the pins below the GPS connector on the adapter, as shown above. Now connect it to your FTDI cable, with the pin mappings shown above. I use jumper cables and a six-pin breakaway header for this, as shown below, but you can use any method you want, including making a custom cable, which is the neatest method if you plan to do this more than once:

Jumper wires connected to six-pin header:


Header plugged into FTDI cable:


Once you've made the physical connections, download and install the U-center software from uBlox. (It doesn't work on Windows 7, so if that's what you're using, open a virtual Windows XP mode window to run the software in. You'll also need to "attach" the FTDI USB serial ports, which you should be pretty familiar with if you use virtual XP mode).

Now run the U-center software, selecting the Com port that your FTDI cable is attached to. You also need to tell it what baud rate the GPS module is running at. If you got it from the DIY Drones store, it's 38,400. If you got it from Sparkfun, it's probably 9,600:


You can tell if it's working by going to View/Binary Console. You should see the data flowing through. Also, the icons circled below should be green or flashing green (it's not showing a sat lock because I'm indoors):


If it's not working, check these things:

1) Did you wire it up right?
2) Did you select the right Com port?
3) Did you select the right baud speed?

If you want to update the firmware, you can get the latest uBlox firmware here. Use the one for the "LEA-5H" modules.

To flash the new firmware go to Tools/Firmware update. Make sure the firmware image points to the file you downloaded and unzipped.


To configure a module to use with ArduPilot, download this file.

Go to Tools/GPS configuration, and select the file you just downloaded. Check the "Store configuration..." box and click on "File >>> GPS".



If you were communicating with the module at any speed other than 38,400, you'll find that the configuration process will fail midway through. That's because it's just gotten to the bit that changes the communications speed to 38,400. Set your u-center com speed to 38,400 and run it again. It should work this time.

When you're done, go to Receiver>> Action>> then click Save Config. Otherwise, every time you unplug your gps, it will revert back to the original configuration.
Read more…
3D Robotics

Latest research on optical flow

I've been fascinated by optical flow ever since I learned that you can do some pretty good navigation work with the chip taken from an old optical mouse. I think this is probably going to be one of the methods we use to take Blimpduino navigation to the next level (it's ideal for any unknown environment, as well as GPS-denied ones). As the picture above suggests, optical flow is the method that many animals, especially insects, use to navigate in complex space.


Here's a writeup from Hizook about the latest research in the field. The authors describe the advantages of this technique:


"The main benefit of this method is that the information about the optics and scene depth is wrapped into a model that is easily learned from video from the robot. No calibration grids or complicated lens distortion models are required! The primary limitation from a practical standpoint is the assumption of constant scene depth, which would break down if, for example, the robot turned to directly face a very close wall, departed from the ground plane, or moved from a narrow corridor into a large open area. "


Here's a video that shows how it works:


CVPR 2009 from Richard Roberts on Vimeo.


[Fly image at the top from the Max Planck Society]

Read more…
3D Robotics

Last weekend for your T3 entries!

3689342983?profile=original


Entries for the current T3 contest (virtual Sparkfun competition) are due by midnight PST on Sunday, so this is your last weekend to get a flight in. The current leading time is 25.7 seconds by Brian Wolfe. Here's his track:



Jason Short and I will be flying the pattern tomorrow as we test some new code. We're just using beater EasyStars, so we won't win, but the point is just to enter. Get out there and try the course--it's the easiest one we've done!



Read more…