Facebook Twitter Gplus YouTube RSS
Home » Featured » Tutorial: Building an NXT Segway
formats

Tutorial: Building an NXT Segway

You can build the Anyway Segway with any NXT kit

This is the basic Segway platform that you will use in each of the Segway tutorials. The robot is often referred to as ‘Anyway’, because you can build this robot with ‘Any’ version of Mindstorms NXT. Apart from a (any) NXT set, you will need a Gyroscopic Sensor for balance measurement: Either the HiTechnic Gyroscope, the Dexter Industries dIMU, or the Microinfinity Cruizcore. Consult your programming tutorial to see which sensor you should use. If you know, proceed to the building instructions below.

Anyway with a HiTechnic Gyro Sensor:

Anyway with a Dexter Industries dIMU:

Anyway with a Microinfinity Cruizcore:

Build Anyway as for the Dexter Industries dIMU, but add this sensor instead. Simply attach it to your Segway as shown here.

Programming the Segway

For various tutorials on programming the Segway that you just built, use one of the following links.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
20 Comments  comments 

20 Responses

  1. Darrin

    Hi Laurens-

    Is there an NXT-G example program for the Dexter dIMU Segway? I’m trying to learn how to use it and need an example (the stuff on the Dexter site is more for displaying values rather than actual applications).

    Many thanks!

    • It’s under construction as I write this. I’m working with Dexter Industries to help improve their gyro sensor block, which isn’t fast enough as of this writing.

      For a Segway example, I would recommend to read the RobotC code. It’s tricky to see what’s happening in an NXT-G program with all their blocks and wires.

      • Darrin

        Thanks Laurens. I’ve been playing around with their sample NXT-G programs today and have picked up a bit more. Good idea on checking out the RobotC code. I guess that will push me to learn it sooner rather than later.

        Cheers!

      • Dylan

        Any word on the Dexter dIMU version? RobotC is a payware system, so I’d like to stick with the stuff that comes for free with the NXT. Thanks!

        • The block that Dexter Industries provides is not fast enough, and the readings are not accurate enough, it seems.

          RobotC is a very powerful tool for programming your robots, so it may just be worth the investment, depending on how often you plan to use it.

  2. Bob

    Hi Laurens
    What a brilliant project! I am trying to teach myself Labview and wondered if you have also programmed this in Labview and, if so, would it be possible to have a copy of the code please.

    Many thanks.

    • Hi Bob, Thanks! I did not make a Labview version, but there is a version made with the graphical LEGO MINDSTORMS Software. That language is based on labview, so that’s the closest I can get in this case.

      You could ‘translate’ the code from there. I would however recommend to translate from the RobotC code. It’s much easier to read and it saves you from a lot of redundant code.

  3. tae so koo

    thank you….

  4. Maria

    Hey Laurens!

    I have a question: Is it possible to do your Segway model using a light or colour sensor, from Lego Mindstorms NXT 2.0?

  5. celene

    how can i purchase this kit?

  6. Bogdan

    Hi Laurens,

    Do you have any news on the dIMU’s NXT-G programming for the segway?
    Everybody said that dIMU is a better sensor that Hitechnic, but for the regular NXT-G people, like me, it seems a waste. Prove me wrong please, my dIMU is waiting for it’s segway!

    Best regards,

    Bogdan

    • Hi Bogdan,

      I made a version for the dIMU but I couldn’t get it stable at the time. I think I need to find new balancing constants (by trial and error) to make it balance again.

      I could send you the current version of my program. Want to help me find those constants?

      Let me know and I’ll send you an email.

      Laurens

  7. Edward Harimoto

    Hello again,
    This is Edward, and i am wondering were you can get the programming block for the blue chip/gyro sensor in step 5 and where you get that gyro sensor in step 5.

    Please email me if you can,
    Thanks,
    Edward
    :)

  8. [...] really interesting and inspiring robot, and it took me very little thought to remember the awesome Anyways (a Segway style self balancing robot built with Lego Mindstorms) by Laurens Valk. Laurens had done all the hard work already and provides plans to build a few variants of the [...]

  9. Hannes

    Hello,

    I built up your Segway and used the software and it works realiable.
    Congratulations!

    The reason i build up your segway is to get a feeling for a segway because i have to build a cheap version for some workshops.
    So i used some Model Servos, one IMU-9 to detect angle and one Arduino.
    Time showed it is not that easy!

    I like your design, because you are just using one Gyro, calibration is just to correct offset and the balancing point will be found automatically compared to others who set the angle for upposition.

    Would be great if you could answer the following questions:

    1: Do you think your algorithm will also work without the use of sensors on the wheels? (will be more complex for just a standing segway)

    2: How did you get all the parameters for kp, ki, kd and the error-factors? Trial and error? Matlab and simulation?….. I have played around with some pots to tune, but no satisfaction.

    The goal for my segway is just standing upright. Moving or not doesn’t matter.

    Greetings
    Hannes

  10. bob

    what Sensor is the black 1?

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>