Arduino and LEGO NXT is fun

By | October 15, 2012

OK, I knew about the Arduino platform for quite some time. But I was not sure what I would like to to do with it. But with the next Science Olympiad looming on the horizon and the need to find a cheap photo gate timing system, I had the idea of an Arduino-based system. The first thing I built was not the photo gate setup, but a little autonomous car;-)
The little car is a combination of LEGO MINDSTORMS NXT parts with a Arduino ADK board, a NXShield-M to connect the ADK to the NXT pieces and a TinkerKit Mega Sensor Shield for the LED illumination;-) The sensors are a mindsensors NXTSumoEyes IR detector as the main eyes and a standard NXT touch sensor just as backup in case the eyes do miss an obstacle.

In the picture on the left, the front shows the SumoEyes, the touch sensor with a front bumper and the TinkerKit LEDs on the top.  In the picture on the right, the Arduino shield stack is nicely visible. The battery pack (6*AA) is not really visible, it’s under the NXShield-M. Since the TinkerKit uses pretty large plugs for it’s sensors and LEDs, I needed to add some extra headers as spacers between the TinkerKit shield and the NXShield-M. All the way on the top sits the ADK;-)

Two NXT motors build the drive train and a little cap nut in the back is used as third `wheel’. I did not find a nice little wheel which would work well for quick turning and the nut works pretty well on laminate (not so well on carpet;-).
This was my first Arduino project after the obligatory `led on pin 13′ tests;-) I’m surprised how quickly you can create little projects which work actually pretty well. The whole Arduino sketch is only 214 lines long;-) My little sketch is here when you’re interested. Have fun experimenting with it.

Below is a little `night time’ drive video. My phone was not too happy with the low light, so some parts are not as sharp as I would have liked. But overall it shows pretty well how good the eyes work;-) The car does not even need it’s touch sensor in that run.

As always have fun experimenting;-)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.