Showing posts with label ardupilot. Show all posts
Showing posts with label ardupilot. Show all posts

Sunday, December 15, 2013

My Favorite RC Pilot

Her Dad is a pretty decent pilot, but this young lady is going to be a champ.
She's flying the Bixler 2 (zoom the pic and you can see it), using APM's Fly-by-Wire mode.  She did a great job staying in the square and keeping the plane out of the sun.

Sunday, January 8, 2012

Drone Downed in Stormy Sea, Rescued by Daredevil Sailor!

Have you ever worried that people might take you too literally? When I tossed off the EastBay C tagline ("come fly with Mark in the lovely San Francisco East Bay") this is certainly not what I was thinking!

I went out with Andreas today... he had figured out the problem he was having with his FPV receiver -- a bad connection on the ground station -- and had everything ready for trying out out FPV + ArduPilot.

First, the good news... APM + FPV is a great success.  Fly-By-Wire mode perfectly controls the plane while flying FPV -- smooth turns, no problems with oversteering etc.  And if you ever get disoriented, a simpe flick of the switch puts the plane into loiter mode while you get things figured out.  It's also great for switching pilots... pop into loiter mode, swap the video, and take up where the first pilot left off.

Things were going great, when suddenly the receiver lost connection; being in fly-by-wire mode, the Zii was content to continue flying the direction it was headed -- North, towards Marin County.  Andreas headed after it, with me following behind.  He ran towards the north part of Chavez Park, and found a lady who had seen the Zii fly by.  In fact, she had seen the Zii land in the water.  Here's the view, facing north; Point Richmond is in the background. It's sort of visible in this picture here.  Andreas was not in a cheerful mood at this time... when I pulled out my phone to document things, he sort of groaned, "do you have to be taking pictures of this?"


We sat and watched the Zii in the water for a while... the wind was blowing back to us, and it looked like the plane was getting closer.  Unfortunately, the tide was moving to the west... the plane got closer to us, and then started moving away, floating towards the southwest. We weren't sure if it was floating towards San Francisco, or if it would veer out to the Pacific under the Golden Gate bridge.  I snapped this picture as the first Zii framed by the Golden Gate.  Trappy, I hope you're impressed!

There were a couple of sailboats around, and I thought we might be able to get one of them to come to the rescue.  Unfortunately, they were a bit too far out to communicate with.  But that gave Andreas an idea... he had a friend with a boat that sailed out of the Berkeley Marina.  He pulled out his phone, and made a call. Miraculously, the friend was driving over the Richmond Bridge... he would turn around, and be there within 30 minutes to launch a water rescue.

Traffic was good, the boat was launched quickly, and it came up the west side of the Bay.  Andreas saw the boat, and pointed out the Zii. It's just where his hand is.  We passed the time speculating about which pieces of the plane could be recovered.






Time between initial distress call and rescue, 27.5 minutes.  Hooray Captain Tim!  And our friend Jim who had come out with us did a great job of making sure all the gear didn't walk away.  Hooray Jim!


 Here's the recovered Zii.  The plane is in perfect condition -- nice job, RiteWing!  The GoPro was fine as well.  Wiping off some water, it was still powered on and running well.  Too bad we didn't have it recording all that time!
 RiteWing flyers, the choice of amphibious flying professionals everywhere!
Electronics:  The battery, APM 1, receiver, servos, and motor seem to have survived.  The battery compartment wasn't filled with water... the Zii must have landed smoothly and stayed flat the entire time.

The  GPS, XBee, and video transmitter were lost... it looked like there was a current active on these devices, and the brackish or salt water caused the power pads on the board to corrode away.



Here's the last logged location, at the northwest tip of Chavez Park, and heading north.  Strange,  that as soon as it went over water it seemed to lose power and stop logging.  Is the City of Berkeley running some nefarious experiment here, perhaps left over from the 1960's?  Will Chavez Park suddenly disappear in time?






Lessons learned
  • Fly with a transmitter/receiver that has a Failsafe.  Ironically, Andreas' Christmas present was a FrSky Tx/Rx, still on its way from HK.
  • Fly with the GoPro in the hard case.  This is only incidentally from landing in the water (hey, it survived that fine!) but from taking a tumble in a landing previously.
  • If the plane loses connection, try and recall it immediately via the ground control station.  Andreas was downfield when connection was lost.  I was at the GCS, but didn't know that the connection was lost until I went to check with Andreas.
  • It might be worthwhile to investigate a method for waterproofing onboard electronics.
  • Always turn your GoPro on, even if you don't plan on an "interesting" flight!

Monday, December 19, 2011

Ritewing Zephyr II + Ardupilot Maiden

Great success with Andreas' Zii/APM combination.  Flew beautifully, APM control was good, able to tune things in the air. All around a great success and left everyone feeling very pleased.  Andreas has named it Beast of Kandahar.

We flew with two batteries... 3S/5000, and then a 4S/3000.  The 3S seems to provide plenty of power -- enough to accelerate straight up. Andreas had also just upgraded the power system to:

    NTM Prop Drive 35-36A 1800
    Turnigy Trust 70A
    10x6 prop





Ground Video. This contains most of the flying modes, takeoffs, landings, and low passes.  I'll make a trimmed down version later if this one seems repetitive.



Airborne Video.

Wednesday, October 26, 2011

APM carrier for Hawk Sky and related planes

Inspired by the new Bixler Accessory Chassis on diydrones, I thought I would tidy my own setup and make my own adaptation for the Hawk Sky.  I haven't quite finished it but it looks promising enough to write up, and I think something similar would work on other models with a front hatch.

I cut the horizontal top plate using the opening as a template.  I just cut the cardboard "close enough" and then traced the opening directly onto the cardboard.  I used scissors for the cutting.

 I then did the same for the forward and rear risers.  I attached the three pieces with epoxy.  I positioned the pieces on the plane and then spread the adhesive on the front and back joints.  I used enough so that the joint didn't need any extra reinforcing.  Note that the fuselage opening bends down towards the front.  I attached the top plate to the front riser in such a way as to keep the top plate level.
 I tried a couple of different ways to attach the APM.  What eventually worked best was a cardboard carrier  bent to the appropriate size and hot glued to the top plate.

I cut some holes to run wires, see the ABC lights, and reach the reset button.  I attached the xbee and GPS on the top plate with velcro.  I didn't make a GPS mount like diydrones did; if I have reception problem I will do so.
 I uncased the Turnigy 9x receiver both to save weight and get clearance for the battery.  I replaced the standard 3-wire connectors with single wire connectors.  Later I'll get the rectangular 6-way connector and use that instead of multiple single wire connectors, but it doesn't seem to be a problem for now.
 The unit sits on top of the battery.  With the receiver case removed, there's just enough clearance for the 3S 2200 mAh 15C battery.  I velcroed the reciever on the bottom and hang the antenna wire out the side.  That's roughly equivalent to what I've been doing and haven't had a problem so far.  I provided some strain relief for the antenna by hot gluing it onto the board.
c
AUW for the unit with velcro is 13.3g. Still to do:  put some magnets to hold everything down, velcro or otherwise attach the APM to the lower carrier, and attach the pitot tubes.  I'm hoping to attach the tubes to the carrier if I can.

I'll update later when I've applied the finishing touches and gotten the thing into the air.

Thursday, October 13, 2011

xbee causing odd servo jittering in APM?


Here's an odd thing that happens in my office.  I haven't noticed it happening in the field.
  • when powered up, the servos constantly jitter
  • jittering seems to be going through the APM... note the period of time when APM is booting and jittering stops
  • jittering associated with 900MHz xbee
  • if the xbee is disconnected, no jittering
  • if I ground the xbee by touching the antenna, jittering stops

I'm curious as to the cause of this; partly to see if there's a problem, fix, etc, but mostly to understand what's going on. The primary practical issue is that the jittering noise seemed to make people nervous as they were looking at the unit.

update:  It seems to be noise from the radio.  There are quite a few postings on this in the diydrones forum.  Applying a ferrite ring on the cable between APM and xbee seems to be the recommended fix.



Monday, October 3, 2011

XBee APM Overview

Got the XBee soldered and tested, but forgot to link to the video. Doing that now, and leaving this as a placeholder for all wisdom XBee.









Sunday, October 2, 2011

First test of APM auto mode: Drone Status Achieved!

Hooray!  Finally got the xbee assembled and tested... still seems somewhat miraculous to be logged into to a computer flying around overhead.  Went with Andreas and his friend Reto, (an old schoolmate visiting from Switzerland -- they did their robotics project together), to the park to try fully automatic flight controlled by waypoints.

Had some initial difficulties connecting the xbee.  It turned out that rebooting the vmware windows session on my macbook fixed that problem.  The pre-cached map tiles worked well.

Shiny laptop screen + Full Sun = invisible.... will figure out some boxy thing to provide some shade for the screen.

Video cap of part of the flight is attached below. The waypoints are wrong. Be sure and save the waypoints to a file after you fiddle with them if you intend to play back the log files later.

The main goal was to get the unit in the air, and exercise all the modes.  All of that worked and we finished up with everything intact, so we considered it a great success... Hooray!!

Still need to hook up the magnetometer, pitot tubes, and battery monitor.  But it seems things are so far going not too badly!  Also need to do:  hook up APM to the simulator, build APM from source and fly that.




Wednesday, September 21, 2011

APM Success!

What a great day!  Launched the Hawk Sky with APM and took it into both stabilized and fly-by-wire-a modes.  Flew like a dream in both.  The FBW mode is surreal... no matter how you jerk the stick around, the APM controls the plane smoothly.  I used all the default PID values.

I'm rather ecstatic... there's been a lot of work and study to get to this point and to see it go so smoothly has been very gratifying.  Thanks to all who have helped me get this far!

Here's a quickie minimally edited video.  The hatcam ran out of battery before I got to FBWA mode, so I'll add that later.  I think the FBW mode might be ideal for FPV and AP, since it looks so smooth (at least from the ground).


This video is from a couple of days later.  Winds were high, gusting to 20mph, and the plane flew so smoothly in fly-by-wire mode.  I forgot the hat-cam, but grabbed the video with my iphone.  Just the fact that the wind could be blowing so hard and I could fly one-handed while working the phone impressed me!




Wednesday, May 11, 2011

Idea: ArduPilot Differential GPS

Update


Fail... lots of people have thought of this idea and it won't work.


Executive Summary
  • Hook a GPS to GCS.
  • GCS calculates GPS difference.
  • GCS transmits GPS correction over xbee MAVLINK connection
  • ArduCopter Stabilize mode gets very fine resolution.

Background

I was just reading the ArduCopter 2.0 docs and saw this:

The quad should stay in a 4-5 meter diameter "circle" around the target position.

I recalled an old TV show where somebody used differential GPS (hereafter DGPS... is that a common name?) to track glacier movement... they had DGPS receivers planted across the ice, and a DGPS transmitter attached to rock.  I recall being impressed that they were able to get 1-inch resolution.

I googled around for DGPS products -- wouldn't it be neat if you could just buy something and have your ArduCopter hover with that kind of resolution! -- but found out a couple of things:

  • DGPS seems pretty common in the GIS world.
  • the definiton of "highly affordable" DGPS systems was about $15k.  Yikes!
  • "portable" DPGS receivers were touted as being easy to carry around by a single person.
  • DGPS seems to work by sending the sideband correctional signal over some kind of modem.
  • "normal" GPS receivers won't benefit from a DGPS transmitter.

Idea

So, I had an idea for implementing DGPS in the ArduPilot/ArduCopter world.
  • Hook up a GPS unit to your ground control station (GCS).  This could be any GPS unit... You could use a hand-held receiver with USB, make a custom arduino-based unit, etc.  The purpose of this unit is to be near the GCS and feed a love GPS signal of the GCS's current position.
  • When setting up the GCS, allow an absolute current position to be entered.
  • Add a MAVLINK message outbound from the GCS to the plane(s), broadcasting the difference in measured and specified absolute position and altitude.
  • When in stable mode, the ArduPilot software takes the DGPS correction into account if it is available.
  • Super Precision Stable Mode!

Saturday, May 7, 2011

Turnigy 9x mixing for ArduPilot Mega

Tom Paton deserves a PhD in obscure radio settings for figuring out how to mix Turnigy 9x mode switches:
        http://rcav.posterous.com/programming-an-ardupilot-mode-switch-for-turn
He has a great writeup explaining the details of what he did... here's my quick-ref version.

ArduPilot Mega Functionality

       THR-CUT    F-MODE    POS        FUNCTION
           FWD    N           0        manual
                  1           1        stabilized
                  2           2        fly-by-wire-a
          BACK    N           3        auto
                  1           4        loiter
                  2           5        rtl

Basic Idea

  • Set the Throttle Hold Button to control Channel 5.
  • Add a mix, such that putting the F-MODE into NORM position subtracts 20.
  • Likewise, for F-MODE in position 1, subtracts 50.
  • Likewise, for F-MODE in position 2, subtracts 100.
  • This gives us 6 discrete values that will be broadcast on channel 5.
  • These 6 values map to the APM control function values.

    Setting The Mix
    • Set Channel 5 to Throttle Hold
              [FUNC SETTING] [AUX-CH]
                    CH5    THRO-HOLD
    • Set mixes 1-3
              [FUNC SETTING] [PROG MIX]

                      MIX1    MIX2    MIX3
              STATE     ACT    ACT    ACT
              MASTER    GYR    GYR    GYR
              SLAVE     FLP    FLP    FLP
              OFFSET    000    000    000
              UPRATE   -020   -050   -100
              DNRATE   -020   -050   -100
              SW        ID2    ID1    NOR
       
    • Check the Settings with the Display Menu.  There should be 6 discrete values.
              [FUNC SETTING] [DISPLAY]
     Further Mixing Information

    The manual has a unique perspective on mixing.





      Ardupilot Mega 2.1, Happy Killmore Ground Control

      Getting the hang of this... here's the latest APM.




      Still to to on Turnigy 9x:
      • figure out failsafe
      • figure out mixing, so 3-way switch can control

      Sunday, March 27, 2011

      Ardupilot Mega with Ardupirate-NG, software test

      Hooray, we got the Ardupilot-NG load downloaded, built, installed, and configured.  Next step: hook it up to the Arcticopter.  Hint OTD:  the Arduplane and Arducopter loads need different inputs on the control inputs.  Channel 8 on both switch the APM into strict pass-through mode, definitely not what you want for multicopters!


      Wednesday, March 23, 2011

      Hooray, Ardupilot Mega 2.0-Beta works under VMware!

       It's alive!  Everything working under VMware!
      Everything seems to work... moving the board around causes the right servos to move in  the right ways.

      Video forthcoming!

      Monday, March 21, 2011

      Hooray, Ardupilot Mega hooked up via VMWare on Mac!

      Windows Setup:
      • fresh Windows 7
      • VMware Fusion 3.1.2
      When installing Windows, be sure and turn on automatic updates and automatic driver install.

      Plug in the Ardupilot Mega to a USB port:
      • specify that the device will attach to windows.
      • the first time windows detects the APM, it will automatically download and install the proper driver.
      • Typically, it will show up as COM3.
      Ardupilot-specific Software:
      • Mission Planner
      • Ardupilot Mega 2.0 (source)
      • Aruduino 0022 (windows)
      The first time Mission Planner starts it will ask the location of the APM source.  We were able to update and install the APM 2.0 software this way.

      We also built and installed the APM 2.0 source and used the Arduino serial monitor to run the debug monitor.  Set the Arduino serial monitor to Carriage Return / 115200 baud.  Was able to correctly read the GPS position!

      We wasted a fair bit of time because I confused my old busted Turnigy 9X (on its way to be returned to Hobby King) with the new replacement.

      Next steps:
      • test out radio functionality
      • test ardupirates quad source
      • hook up to xpilot
      • figure out and order xbee stuff

      Wednesday, March 9, 2011

      Setting up the Ardupilot software

      The Ardupilot software uses the Arduino environment to compile and download to the Ardupilot board.  Here's how to set up your environment for that.

      Download and install the Arduino Software
      • The software is here: http://arduino.cc/en/Main/Software.  Get the latest version.  There are pre-compiled binaries for Mac, Windows, Linux-32 and Linux-64.
      • I'm using a Mac.  It's a DMG with the Arduino software, ready to drag into your Applications folder.
      • There's also an enhanced FTDI USB driver.  It's a package that installs using a password.
      Set up a Working Environment
      • This is a software project, and tidy housekeeping now will pay off handsomely in the end!
      • I chose this as my base directory: $HOME/Dropbox/projects/ardupilot.  I'll call this $TOP below.
      • Later we'll set up a SVN checkout.
      • For now we'll just unzip the Ardupilot and Arducopter distributions here.  I'll save local copies of the zipfiles in $TOP/dist.
      Dowload and unzip the Ardupilot Software
      • From here: http://code.google.com/p/ardupilot-mega/downloads/list.
      • The following is what I did from the mac command line... Adust to your favorite workflow.
      • cd $TOP/dist
        wget http://ardupilot-mega.googlecode.com/files/ArduPilotMega1.02.zip
        cd ..
        unzip dist/ArduPilotMega1.02.zip
      Download and unzip the Arducopter Software
      Set up the Libraries
      • The most painful step in getting things set up is getting the libraries installed.
      • Here's the biggest pain in the whole software setup.  There might be a better way, but this is an area where the Arduino software could stand improving.
      • Find your Sketchbook path.
      • On mac:
        grep sketchbook.path ~/Library/Arduino/preferences.txt
        sketchbook.path=/Users/mh/Documents/Arduino
      • Go to the sketchbook path just discovered.
      • mkdir libraries, if it does not already exist
      • cd to the libraries directory.
      • copy all the folders in the ArduPilot project libraries directory here.
        $ cp -rp ~/Dropbox/projects/ardupilot/1.0-BETA/libraries/* .
      • restart the Arduino program.  These libraries should now be available during compiliation.
      Test your installation
      • Start the Arduino program
      • From the top menu, File/Sketchbook/libraries should show you the libraries you just copied, something like the screenshot below.
      • Open the standard "blink" Arduino Demo: Menu: File / Examples/ 1.Basics / Blink
      • Compile by pressing the "Verify" button.
      • If that works, add the line
        #include
        to the beginning of the file
      • Compile again.  If this works, your libraries have been installed.
      • If it doesn't work, get ready to pull out lots of hair and gnash your teeth.
      Build the Ardupilot Software
      • start the Arduino system
      • asdf
      • File/Load the main ArduPilot program, ArduPilotMega/ArduPilotMega.pde
      • When you compile, you will get an error like this:
        config.h:58:3: error: #error XXX You must define GPS_PROTOCOL in APM_Config.h
        (ignore the Aduino environment highlighting, and scroll back in the error window to the beginning of the error messages.  this is another area where the Aduino system could use some work.)
      • Look in APM_Config.  See where is says "READ THIS. REALLY! READ THIS."?  Take that advice.



      Build the Arducopter Software

      Friday, February 25, 2011

      A Closer Look at the ArduPilot Mega

      We received the ArduPilot board last week, and now we're getting ready to start getting going with it.  We bought the assembled and tested system from uDrones.  They're providing a great service by providing assembled and tested boards, as well as selling RTF quadcopters as well.  There's a nice writeup on what they're doing on diydrones
      Here is what we ordered from uDrones.  The assembled and tested price includes the Ardupilot, IMU, and MediaTek GPS.  There's an optional GPS upgrade from MediaTek to U-blox.  The magnetometer is optional; you'll need it for any copter configuration.
      • Ardupilot Mega 1.4.  This is the red board.  It's a custom Arduino-based board.  A separate coprocessor handles PPM (radio control) decoding.
      • IMU/Oilpan Board.  This is the blue board.  It came from uDrones attached to the Ardupilot. It holds the gyros, accelerometers, pressure sensor, magnetometer input, etc.
      • MediaTek MT3329 GPS: 10Hz + Adapter Basic.  This is the cheaper GPS option when buying from uDrones.  It's the recommended standard unit.
      • HMC584 Triple Axis Magnetometer: Rev 1.1.  This is most important for multicopters. 


      Weights for each of the units are as follows:
      • ArduPilot + IMU/Oilpan: 395 grams
      • MediaTech GPS: 74 grams
      • HMC584 Magnetometer: 22 grams






      We received the unit pre-flashed for the X-quadcopter but we'll be downloading our own builds.

      Lots more details to come as we start assembling and testing the quad and fixed wing versions.

      Wednesday, February 16, 2011

      Ardupilot Mega arrived from uDrones today!

      Just got a call from Josh, the assembled and tested Ardupilot Mega has arrived from uDrones today.  This is a pretty big deal thing, as I was a bit intimidated by all the soldering that needs to be done for the plain board version.  What if the board didn't work when I was finished?  How would I tell if it were a problem with my assembly, or something else?[*]  I would hate to turn "Josh's Flying Camera" project into "Mark's Learning Electronics" project!

      But, udrones.com to the rescue, who is selling an assembled and tested package including the main board, IMU, GPS, and magnetometer, all assembled, tested, and loaded with code.  Hooray, and thanks to diydrones for the heads-up!

      Speaking of diydrones, I met with head-droner Chris Anderson this last weekend.  He lives in Berkeley, and tests at the same places that I fly.  I'll follow up with another post, but I told him about the Arcticopter project, and that I was interested in writing a document oriented to the beginner.

      So, onwards and upwards, hopefully to the exact altitude specified!



       [*] which would match 100% my first experience with RC planes.  I bought my first receiver (a Spektrum AR6100E), and spent literally hours trying to get it to bind to the transmitter.  Since I had never seen in real life a bind procedure, I had no idea what to expect, or how to diagnose the problem.  I eventually put a youtube up on rcgroups and asked if I was doing it correctly (they said I was).  The story has a happy ending -- I contacted Horizon, they looked at the video, confirmed I was doing it right, and sent me a replacement unit which I received in two days.

      I also had the same experience the time I tried flying my first plane.  It was a foamy I had built using plans downloaded from rcgroups.  It had a lot of problems, and I had no idea if it was something I was doing wrong as a pilot, or something I had done wrong building, or some combination of both!

      Sunday, February 13, 2011

      EasyStar Brushless Notes and Shopping List

      Here's what I did to convert the EasyStar to a brushless system.

      Andreas recommends the credit card approach for expanding the rudder, and using real hinges to install.  I did that here.





      Shopping List:
       CA Glue and Kicker:

      The instructions recommend CA (superglue) and CA Accelerator (aka kicker).  You can probably use just about any medium-viscosity super-glue.  You definitely want the kicker.  Don't get any glue on your skin along with the kicker... it gets hot fast, and of course it's glued to your skin!  A lot of people recommend using Goop glue (which is soft and rubbery) for attaching the motor.  Then it's a lot easier to cut out neatly if you need to replace it.
      Range Video has two interesting EasyStar products:
      • EZ-Pod: nice-looking no-mod canopy replacement for holding a camera with servos.
      • Outrunner brushless motor mount:  not sure why this is any better than using an inrunner, unless you were planning on swapping motors a lot?
      Chris has an awesome aerial video mount here, and a video down at the Alameda Air Station.

      Tuesday, February 8, 2011

      Ardupilot for Beginners

      In addition to making an arducopter based Arcticopter, I'm going to build an ardupilot plane.
      This is just a place-holder to get started... Once I've got a plan, I'll start filling this in.

      All related posts will be here:

      http://eastbay-rc.blogspot.com/search/label/by-the-numbers

      Airplane:
      • Multiplex Easy Star
      • Easy Star Lipo conversion
      Electronics:


      TODO: flesh this out as first step in build guide.