NXT AutoPilot v. 0.1 BETA

UPDATE: 0.2 BETA and a simulator setup have been published HERE.So, here it is; one more BETA of NXT AutoPilot.I didn't have the time to do enough testing during the holidays so this is still going to be a BETA version instead of the non-BETA I promised. However, I caught some very nasty bugs in the stabilization loop and added some nice functionalities.// -Fixes in 0.1:// -Added variance (gyro vs. accelerometer) based coefficient for gyro drift fixing.// -Fixed some crucial GPS errors.// -Everything is now based on PID controllers (even yaw).//// -Still not using compass or barometer although the device driver for compass is still there// if you don't mind some home brewing..TO-DO:-Navigation still assumes GPS co-ordinates to be co-ordinates on a flat surface. Introduce ball geometry..-I'm planning to buy a 3D Bluetooth GPS so alternate device driver and control loops are needed.-Documentation.Hopefully someone finds this useful..NXT AutoPilot v0.1b.zip WARNIGN: This version of the auto pilot is out dated!Sami F.
E-mail me when people leave their comments –

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

Join diydrones


  • Thanks for the info!
  • T3
    Those might do. I have stopped developing the NXT AutoPilot because I ran out of funds and intrest for the project. One thing that I recommend you do is make it with full 6DOF IMU. I.e. you'll have to put the servo controller and accelerometer onto the same port (in order to get 3 gyros connected) which will slow down the refresh rate of both of these a little but with 3 gyros slowing down the accelerometer a little is nothing to worry about. Other than that my code should be up to the task.
  • T3
    Yes that's what I meant but the GPS I use supports only RMC so there's no altitude coming out of it and for a 3D GPS I need a new parser and a new control loop but in the mean while I can provide the barometer code if someone decides to pick that path; My matriculation examinations begin within a month or so and therefore I won't publish any updates for the next 3-4 months so that's why I mentioned the barometer path. Sorry for the confusion.
  • 3D Robotics

    You can get the altitude reading from the GPS, so no need for a barometric sensor.
  • T3
    These are the already available HiTechnic rate gyros and everything else you'd need is also already commercially available.

    There are already gyros (both roll and pitch) holding the plane level with the aid of the accelerometer. But unless you can perfectly set your throttle and trim you aircraft the altitude will change over time and for a fully functional autopilot you'll want to be able to set 3D waypoints. I have source for an I2C barometer (SCP1000-D11) but it's stripped from this version of the NXT AutoPilot since this sensor requires some home brewing in order to work with NXT.

    3D bluetooth GPS modules are also becoming relatively cheap so I'll try and add one to this project so that we can finally have a fully functional Lego autopilot which is built with commercially available parts.
  • Are these the unreleased new gyros or are they the ones you can order from Lego today?

    Also would it be reasonable to use a heading hold gyro from a heli on the elevator channel to maintain altitude?
  • T3
    No, just the standard ones so there's no altitude hold ATM.
  • 3D Robotics
    Excellent! Many thanks for sharing it. Any special hardware requirements or just the standard Accel+2gyros+servo driver+BT GPS?
This reply was deleted.