Lego Mindstorm

For our first lab experiment we were paired in groups, I ended up working in a group of three, to build a basic two-motor NXT car.  As someone who did not play with Lego’s too much as a child this seemed like a very daunting task.  But with the detailed instructions and two enthusiastic lab partners, this lab ended up turning up into a very enjoyable time.

To build our car we were given a kit and instructions to build a 2 motor car, with no light or touch sensors.  There were 17 required pieces, some pieces required different quantities though, so there was a lot to work with.  We were given a big box filled with a plethora of pieces and had to find all of the individual pieces required for the type of car we needed.  The first step was to put the battery into the NXT which was just a simple stick in procedure.  Using the double black connector pegs attached to the NXT we connected the motors on both sides.  Originally we attached the motors backwards so although it worked and was able to be mobile, once we realized and corrected our mistake it worked much better.  We then attached the support motors and the wheels.  Next were the front wheel assembly base and attachment.  When working with the little pieces, like the L beams, it was easy to get confused by the sizes but we were given a cheat sheet with a picture (with the correct measurements) so we could match up what was found in the box to the paper and then know exactly what the piece was. We then connected cables from ports A and C on the NXT to the motors and then connected the entire car to the computer with a USB cable.

On the computer we used the LabView program to operate the car.  This involved inputting different functions and commands to make the car perform different actions.  Once we completed the program, we saved LabView and sent the program directly to the NXT, so that the program could be executed without having the USB attached to it.  We were able to have our NXT drive in a circle with a 2 foot radius and then reverse the direction.  With LabView we were able to run the motor forwards, backwards, and even in a circle using different power levels.  It was very simple to change the program and the settings, with just a click of a button we were able to lower the power of one motor while increasing the other, the difficult part was hitting the orange button on the NXT once it started going!

We weren’t just playing with robot cars though, this experiment also showed us how to measure the distance the wheels traveled and the speed at which the car traveled. Then given a formula in class we were able to calculate our percent of error, all of our tests fell on or below the 20% limit that was given so overall our experiment was a success! These were our results:

Results of test 1: (1 sec run time)

Distance measured by ruler – 23/24 cm

Distance measured by program – 23 cm

Total rotations – 1.48

Velocity – .23 m/s

1% error

Results of test 2: (.5 seconds of run time)

Distance by ruler – 13cm

Distance by program – 11cm

Total rotations – .70

Velocity – .22 m/s

16% error

Results of Test 3: (.75 seconds)

Distance by ruler – 21 cm

Distance by program – 18cm

Rotations – 1.15

Velocity – .24 m/s

20% error

Results of Test 4: (1.25 seconds)

Distance by ruler – 33cm

Distance by program – 30cm

Rotations – 1.9

Velocity – .24 m/s

9% error

Lego NXT

Leave a Reply

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