Revisiting a Childhood Robot
Today, I want to talk about something I used to play with around 15 years ago — the LEGO Mindstorms NXT.
The set I had was an educational version of LEGO Mindstorms. It didn’t come with a particularly large number of LEGO pieces, but the most interesting part was the NXT itself, a programmable controller that served as the brain of the robot.
You could build a robot using LEGO pieces, connect different sensors and motors to the controller, and then upload a program to it.
Back then, we used a graphical programming interface. Instead of writing actual code, we could drag and drop different functional blocks to construct the logic of the program.
For example, we could use an ultrasonic sensor to measure distance, other sensors to detect light, color, or sound, and motors to control the movement of the robot. We could also define conditions, loops, and how long each motor should rotate.
By combining these blocks, we could create surprisingly complex behaviors.
I remember that most of the challenges we played with as children involved following a black line on the ground. Sometimes, the robot had to collect a ball and bring it back. Other times, it had to knock down a bottle and return to its starting position.
At the time, I was more interested in what the robot could do than how the controller itself actually worked.
Fifteen years later, I find myself much more interested in what is happening inside that little machine.
Bringing the Hardware Back to Life
Since the device had been sitting around for so many years, it was no longer working.
The first thing I suspected was the battery. I originally used rechargeable batteries, which had probably degraded over time. After replacing them with six new AA batteries, the NXT finally came back to life.
However, there was another problem: the LCD screen was no longer displaying anything.
I could hear the startup sound when I powered on the device, which suggested that the system was still booting. Unfortunately, without a working display, I couldn’t see the menu or interact with the original interface properly.
This made me wonder: could I still communicate with the device without using its original interface?
And more importantly, could I replace the software running inside it?
Exploring the Firmware
I started by asking ChatGPT about the NXT’s hardware, reset mechanism, and firmware update procedure.
It turned out that the NXT has a physical reset button. When I used it to enter firmware update mode, the device started making a repetitive ticking sound.
This sound indicated that the device was waiting for new firmware to be uploaded.
That was particularly interesting to me because it meant that I didn’t necessarily need a working LCD screen or even the original LEGO software to interact with the device at this stage.
I then found some publicly available LEGO NXT firmware source code online. I downloaded the source code and started experimenting with it, making my own modifications and building the firmware myself.
Eventually, I was able to flash my modified firmware onto the device.
After rebooting the NXT, the controller was able to run the firmware I had built and behave as I expected.
At this point, I was no longer running the original firmware that came with my LEGO NXT. I had overwritten it with my own modified version, and the hardware was still functional.