3D Robotics

GeoCrawler 1 (Lego Autopilot) Instructions

[NOTE: This post describes the original version of the Lego Mindstorms autopilot, which is a navigation-only (rudder and GPS) autopilot. Since then, we have created a full navigation-and-stabilization (aileron and elevator and GPS) autopilot. However, since it uses prototype hardware that is not yet commercially available, I'm not posting full building instructions and code yet. Till then, the one below is a fine way to start. Also, you may note that the plane shown, a Hobbico ElectriStar is not the one described below and now recommended, which is its better-flying cousin, the NexSTAR.]

Description: The main aim of this project is to both make the world's cheapest full-featured UAV and the first one designed to be within the reach of high school and below kids, as a platform for an aerial robotics contest. Like the Lego FIRST league, but in the air.

(There is another aim of this project, which is more about policy. At the moment the FAA regulations on UAVs are ambiguous (we believe that by staying below 400 feet and within line-of-sight we're within them). But there is a good deal of concern that as small and cheap UAVs become more common, the FAA will toughen the rules, making activities such as ours illegal without explicit approval. I hope this project will illustrate why that approach won't work.

By creating a UAV with Lego parts and built in part by kids, we haven't just created a "minimum UAV", we've created a reductio ad absurdum one. If children can make UAVs out of toys, the genie is out of the bottle. Clear use guidelines (such as staying below 400 feet and away from tall buildings) would be welcome, but blanket bans or requirements for explicit FAA approval for each launch will be too hard to enforce. The day when there was a limited "UAV industry" that could be regulated are gone.)

Here's a video of it in flight:

Features: In GPS mode, unlimited pre-programmed waypoints, with programmable options such as circle and hold. Ability to integrate other sensors, such as ultrasonic, compass, gyros, accelerometers, or barometric pressure (altitude). With optional bluetooth cellphone integration, control via text message, including dynamical-changed GPS waypoints, "come home" and "circle" commands, etc.

This is the most complete UAV, so I'll start the instructions here from the beginning:

  1. Learn to fly R/C planes! These UAVs don't take off or land by themselves, so you've got to be a competent pilot. If you've never flown before, I suggest starting with a Hobbyzone Firebird Phantom ($60). Once you've got the hang of that (you'll crash a lot when you start, but it's tough and can take it), you may want to upgrade to the Hobbyzone Aerobird Swift ($150), which has an elevator and ailerons and will get you really ready for proper planes. Don't worry if you total this bird; we'll be able to use its radio system later.
  2. Get the UAV airframe: a Hobbico NexSTARr (68" with radio and motor, $429).
  3. Autopilot: I'll assume you've already got Lego Mindstorms NXT. For the basic version of the UAV you'll also need a compass sensor. You can see how the whole thing works here (it's easy to build the mechanical assembly, which is quite simple. Just remember to screw the base pieces into the airplane's plywood servo floor so they don't move. Full details and diagrams are here.) Here's a video of it working: Here's the Mindstorms NXT-G code: Main, Subroutine (download both). Or, if you prefer RobotC (I do!), here's the code in that. The GPS version is also working and you can download the beta of it (RobotC version) here. If you're using GPS, you'll need a Bluetooth GPS receiver. Might as well get one that has logging, too, so you can see your course in Google Earth. The i-Blue 747 ($70) is recommended.
  4. For stabilization, use the FMA Direct FS8 Co-Pilot, which uses infrared sensors ($115). Put the sensor on the top of the wing, as the instructions suggest. It works better there than on the bottom of the plane.
  5. You turn the autopilot on and off with a servo strapped to a touch sensor. This video explains how.
  6. For video, use the Range Video Aerial Video System 2 (camera, rx and tx, $365; pick the "portable video" option, which gives you a rechargeable battery on the receiver).
  7. You can build a pan-tilt camera mount out of Lego and your two spare servos, like this. Here's a video of it working: Use a spare transmitter and receiver to control the pan-tilt,and power it with this Li-Ion battery ($18). I assembled the whole video downlink assembly on the back of the Electristar battery door, like this. (that's showing a different receiver and battery pack, but the concept is the same.)
  8. For recording and viewing the video, you'll want a video capture card for your laptop. There are several available options, but if you have an ExpressCard slot, I recommend the Avertv Express MCE.
  9. It's hard to see many laptop screens in daylight, so you might want to get one of these screen shades.
  10. Later, we'll add the cellphone for real-time GPS waypoint uploading via SMS.

Notes:

Many people have asked why the Lego autopilot moves the whole servo back and forth, rather than just controlling the servo arm the way a R/C receiver would. There are two answers to this: 1) we always want to have a manual override, so in this case you can manually control the rudder servo arm even as the autopilot is moving the whole assembly back and forth to control the rudder another way. 2) there is no good commercially available way to communicate directly from the NXT brick to a R/C servo. That said, there are some products in development that will make this possible. Stay tuned....

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • 3D Robotics
    Akrram: Thanks for the reply, but this is the wrong thread for your question. Discussion about tilt-compensated magnetometers/compass should be in the sensor Forum.
  • Hi Chris,

    Many thanks for your speedy reply. Ya this is a personal project I would like to accomplish , and part of it is to do with a project that I am working on at my University for my final year project… if this is what you meant by your question?

    Would I still be able to take part in this thread if it is ok?

    Regarding the compass it is true, I found the same issue. But I am not sure if this is the case with all magnetometers as this is the only one I have experimented with. I will have a search in how the IMU would connect/work the compass. Hope it will work, I will let you know if it does. :)

    Many thanks,

    Akram
  • when i run the UAV2 code deflect right always goes to 1 and will never go to 0
  • 3D Robotics
    Akram: you're posting in a thread about Lego Autopilots. Is this a Lego project?

    As far as compasses go, they need to be tilt-compensated with an IMU. Traditional magnetometers do not work correctly by themselves in an aircraft (as we discovered with the first version of this one)
  • Hi Chris,

    I love your work, it is fantastic. I can’t wait to have my system up and running.
    I am in the process of building a navigation system for a remote control aircraft/UAV and I have the following model on mind:

    http://alshobbies.com/shop/lookupstock.php?pc=6081&Desc=calmato%
    http://alshobbies.com/shop/lookupstock.php?pc=3359&Desc=gp
    http://alshobbies.com/shop/lookupstock.php?pc=7435&Desc=futaba%...

    I also plan to use the following components
    - CMPS03 Compass Module
    - Piezo Electric Gyroscope (Part No ENC 03JA)
    - EM406 GPS Unit

    So far I have programmed the Devantech CMPS03 compass module and it gives an accurate reading as long it is moving horizontally. Once I apply the motion Roll or Pitch the compass gives inaccurate readings. Do you have any idea how to resolve this problem?

    I thought of following but I am not sure I fit will work:
    - Mathematical gimbal.
    - Build a gimbal to see if it works too.
    - Have more than one compass and somehow develop a code that will read of all the three.

    I am so puzzled with how to tackle this problem to attain the accurate reading during all maneuvers. I would very much appreciate any suggestion or comments to how to solve this.


    Thanks,

    Akram
  • 3D Robotics
    Dave,

    It's "Go" by Lemon Jelly
  • Hi Chris,
    which band did you put in your first video ??? It sounds @_@ veeeery interesting to my ears...
    I'm looking for it all around internet.... but nothing found yet. Could you please tell me exactly which band is?
    Anyway...apart this information I can say you that the thread is very interesting and I took a look on your job...really great. what a pity I don't have a NXT or mindstorm kit at my home and my next money will be spent for a oscilloscope....:(

    Dave
  • 3D Robotics
    Paul: Mindstorms can only connect with GPS via Bluetooth. In the version above altitude is not really maintained. The FMA keeps the plane level which is good enough for a minute or two if the plane is well trimmed. Not a long-duration solution obviously.
  • P.S. -- By reading yours and other sites, I'm starting to get a better idea of how all the pieces of a DIY UAV work together, but I have a long way to go. In the case of the Mindstorms UAV, how is altitude maintained? Is it programmable, or does the FMA Direct Co-Pilot simply hold whatever altitude it's at when the UAV is flying autonomously?

    Thanks again,
    Paul
  • Chris, I have a Delorme Earthmate GPS antenna used with a laptop and Street Atlas USA. I did find two videos on your site that seem to indicate it can be used in a UAV. Would it be adaptable to the Mindstorms UAV? It has a USB connection and is normally powered by the laptop. I imagine it could be connected to a Bluetooth transmitter, but if that's what's needed along with a power source, I might be better off getting the datalogging GPS you recommended above. I'd be interested in you comments. If I do this, it will be on a budget.

    Thanks,
    Paul
This reply was deleted.