Two words: Lego Autopilot

Chris Anderson
The Long Tail

March 13, 2007

So you know how I'm trying to build a UAV for less than $1,000 [ http://www.longtail.com/the_long_tail/2007/03/the_sub1000_uav.html ] ? And you know how thrilled I was [ http://www.longtail.com/the_long_tail/2007/03/lego_segway.html ] to see that HiTechnic is releasing a gyro sensor [ http://hitechnic.com/ ] for the Lego Mindstorms NXT? Put them together and you can see where this is going.

Here's the world's first Lego autopilot, which I threw together this eve.

I haven't received the gyro sensor yet, so I've got a light sensor standing in for it in the picture, but the mechanicals are pretty much in place. Cool fact of the day: According to Google, this is the first time the phrase "Lego autopilot" [ http://www.google.com/search?q=%22lego+autopilot%22&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a ] has ever been used. I own this space!

This autopilot only controls the rudder, keeping the plane flying level when engaged and returning to the launch area. While the autopilot is disengaged, the servo arm controls the rudder under manual radio control as usual. But when you engage the autopilot (a third servo presses the "start" button on the NXT controller brick), the NXT servo drives the gear assembly above to move the entire R/C servo back and forth, while the R/C servo arm remains stationary. The effect is the same as if the R/C arm was moving, but the rudder is under Mindstorm control, not R/C control.

This autopilot is a "return bot". When engaged, it turns the aircraft 180 degrees (thanks to the compass [ http://hitechnic.com/contents/en-us/d1.html ] ) to point back at the launch area and keeps the plane level until the human pilot regains manual control.

Next step is to ditch the compass and add a Bluetooth GPS module (the NXT brick has built-in Bluetooth), so it can follow waypoints and be fully autonomous. I'm not quite sure how to control the vertical dimension--the altitude--with this setup, so right now it's best to trim the plane for level flight and engage the autopilot at a relatively high altitude. Any ideas on how to solve the altitude problem in a Lego-friendly way? [Update: I'm told that the standard elevation output of the GPS module may be good enough to use for maintaining level flight, even if it's not high enough resolution to navigate to a soft autolanding. Once the gyro sensor arrives, I can test that.

Copyright 2007 http://www.thelongtail.com/the_long_tail/2007/03/two_words_lego_.html