Lego Mindstorm and LabView Experiment

For our first experiment in Sci-184 Hybrid, we basically did what I loved so much growing up, built stuff out of Legos and messed with a new computer program. Constructing the NXT Robot itself was a fun time for my partners and I. Locating certain pieces proved to be a bit of a challenge, but we persevered and got it assembled!

…Only to find that we assembled the robotic motor “arms” backwards, so the front wheel didn’t quite touch the ground as it was supposed to. We remedied this problem quite quickly, but it was a moment of the building process that will stick with me due to its sheer Homer Simpson “D’oh!” factor. The next step after assembling the main body of the robot was to connect cables from the NXT robot to its motor arms. This gives the robot the “brains” to translate incoming programming code (which I will elaborate on later in this blog) from the NXT main body to its robot arms, creating movement!

The program we were using was called LabView, and it was similar to some programs I’ve used in the past but definitely proved to be a unique experience for me. The program works by creating a kind of virtual schematic of what actions you want the robot to perform, and then actually sends the code directly to the robot via a USB cable connection so the program can be executed remotely, free of wires, by pressing a button on the main body of the NXT.

Once we were all set up with our program, we got used to using it by making it go forwards and in reverse and even dabbled with making it go in circles. Circular motion was attained by giving one motor arm more power than the other in LabView, making one wheel perform more rotations per second and therefore creating a circular motion. The main experiment we performed involved giving the robot differing amounts of battery time, or power, and calculating some statistics about it (such as distance traveled, RPMs, velocity, etc.) We calculated this by using the program and by using our own judgment with a good old fashioned ruler. I will post the results below. We calculated the percent of error in our measurements and found that all of the tests fell on or below the 20% acceptable threshold for error.

Overall this experiment went smoothly, and I had a lot of fun building the robot and messing around in LabView. Successful science!

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

One thought on “Lego Mindstorm and LabView Experiment

  1. Juliann

    Thanks for the good writeup. It in fact was once a enjoyment account it.
    Glance complex to more introduced agreeable from you! However, how can we be in contact?

    Reply

Leave a Reply

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