Thursday, April 4, 2013

Lego Mindstorms NXT

Searching on the internet, I found a number of people that had successfully implemented a segway style robot using the Mindstorms kit. I also found that IAR were giving away free a special edition of their development environment.

Unfortunately, it (special edition of IAR) won't run on windows 8 so I had to make do with the 32kb free version. I already had a jlink ice, so all I needed to do was to do a bit of soldering.

I wanted to hack into the main i2c bus to add a gyro sensor and unfortunately I managed to totally destroy a couple of surface mount resisters (I'm still learning to solder). Fortunately I was able to correct the problem and connect to the slave amtel chip. In the lego guide they do recommend against this and they certainly do not make it easy - no test points on the i2c.

I did manage to write a custom program to get a motor spinning in IAR. It was quite good to be able to single step through the program using the ice.

However after all of that, I discovered another problem, the whole system runs on 5V and my sensor is 3.3V.

As you can see there is not much lego left on the circuit board.


The ice connected to the circuit with some oscilloscope leads. I had to make the cable up myself and solder on the jtag headers.


The glue there is to provide strain relief - so I don't rip the tracks off the circuit board.


I2C traffic, under sampled, but look at the amount of traffic! In the standard lego software, it polls the slave processor for sensor and motor data at a very fast rate.

Actually I have four problems with the nxt:
1) IAR development environment limited to 32KB - I could use open source of course!
2) system runs at 5V and I will have to wait for a 5V sensor
3) I really want to use a more powerful system.
4) having only 6 batteries, it does not have much power especially when running on NiMh

It has been fun, but time to investigate something else.






No comments:

Post a Comment

Note: Only a member of this blog may post a comment.