Lego Mindstorms NXT Segway
Posted by Rich | Filed under Lego, Rollers
The other night I was researching building a balancing Segway like robot with the Lego Mindstorms NXT kit. I wanted a robot that could balance on two wheels and could move forward and backward. I also wanted the robot to recover when “pushed”.
I was familiar with Steve Hassenplug’s Legway built on the Lego RCX platform, but I wanted to tackle the challenge with the NXT. Luckily, I found Philo Hurbain’s NXTWay. I was intrigued enough to build a copy and try out the programming.
It is quite hard to get the balance right and in the end I created a very aggressive robot that I can push around and it will mostly right itself. Here is the video of the final creation.
16 Responses to “Lego Mindstorms NXT Segway”
-
Marek Says:
January 14th, 2007 at 9:08 amHi Rich,
very impressive NXTWay. Me and my son, we want to give it a shot as well and I was wondering if you could share with us your NXT-G code so we get some ideas how the balancing portion needs to work.
Thanks
Marek
-
Dev Says:
January 19th, 2007 at 9:55 amNice!!!

-
Rich Says:
January 19th, 2007 at 12:47 pmI pretty much modified the code from Philo’s website listed above. Modify the “scale” parameter to get some of those effects.
-
swissboy Says:
February 4th, 2007 at 4:07 amhi,
your bot is very nice. i have some problem with the program from Philo. could you give me the programm for the nxt??
thanksand sorry for my bad english, but i speak normaly german
-
Pete Says:
February 4th, 2007 at 7:05 pmVery cool what you did! I played around with the scale, but wasn’ able to do anything you did. Could you post your scale and PID values(KD, KI, KD) and potentially other params you edited?
Also: were you able to place counterweights so that your NXTway balance standing fully upright?
Any hints would be great - thanks!!! -
joe Says:
February 5th, 2007 at 7:08 ami think all you did ws to sewt the light sensor value when it was at x it was vertical, when it was lesss it went forward to correct it self, when greater it went backwards to correct its self. and by adding a second sensor would prob make it easyer to backwards. but if you did programing a certian way just add a wheely bar.
-
Rich Says:
March 15th, 2007 at 11:34 pmI could only get it to balance, but not move or move and not balance. I need a second light sensor so I can rebuild it and try for both movement and balance without any non-lego sensors.
-
Steve Says:
March 20th, 2007 at 4:59 pmHi Rich,
your NXT Segway is really a piece! Could you please get in touch with me? -
Jeremy Says:
March 21st, 2007 at 11:42 pmHey Rich,
I was wondering if you programed this using the Mindstorms software or programs listed on Philo’s website. I am trying to program it using the Mindstorms software and I can’t get it to work.
Thanks.
-
Rich Says:
March 23rd, 2007 at 3:50 pmI used the program from philo’s website and modified the variables.
-
brett stevens Says:
May 19th, 2007 at 3:44 pmI have been trying to build this NXTway but I cannot get it to stand straight no matter how I vary the coefficients! Nor beable to move and stay balanced. Does anyone have some tips on how to go about “tuning” KP, KD, KI. Should the scaling parameters for err
-
Rich Says:
May 22nd, 2007 at 9:50 pmIt has been a while since I played with this one, but try to slowly change the variables. Start with one variable at a time. It took forever for mine to balance and move properly. Even after all that work it was still quite un-reliable.
-
nils Says:
June 26th, 2007 at 6:21 amHello I would have there times ne question: I try for 5 weeks already mean Segway robot to programieren and to calibrate ultrasonic sensor (17-9) cm or photosensor (382-525) and I get it not, could you me perhaps times help or me one tap give. Mfg Nils would make me happy about an answer
-
Luiz Says:
July 10th, 2007 at 2:21 pmCongratulations!! you robots are so cool!!
do you just have a NXT kit?? -
Rich Says:
July 12th, 2007 at 8:50 amI have a few NXT kits and lots of other technic kits used for parts.
-
jorge - españa Says:
May 29th, 2009 at 7:58 amPlease. i need contact with the code source of this video. who is the creator.contact with me: gsivillerp@hotmail.com or sistemas_wl@hotmail.com.
this is my project final of the course system embebed and i cant stand up my robot lego nxt. please urgent contact with me.





