About | Contact | Github | CV | PubKey

Building a mobile robotics platform with LEGO


As I had an old LEGO NXT set lying around at home, I decided to set up my little mobile autonomous robotics platform with it. The nice thing about LEGO is that I can quickly change anything I want without having to drill, cut or glue. Its fun and and it remembers me of my youth when I was building huge LEGO models for hours with a friend of mine.

What you need:

The cable of the motors to the BBBL requires a little bit of soldering. The BBBL has separate encoder in- and PWM outputs located at the “back” side whereas the original LEGO NXT motors use only a single cable.

BBBL motor out and encoder in

Now the crucial thing is to make the right connections. The LEGO cable configuration is

Color Name
White Motor 1
Black Motor 2
Green 4.3 Volts
Yellow Tach01
Blue Tach02

and matching this to the BBBL pin configuration

Motor outputs on the BBBL
Encoder inputs on the BBBL

should give you beautiful cables like shown below. The white dot on the PCB indicates pin number 1 if you are not familiar with the convention.

Motor cable from NXT to BBBL.

You should now be able to drive your robot around using PWM and also control the speed with the integrated encoders.

    $ rc_test_pwm -d 0.5

Test this out by running the PWM ports with 50 percent duty cycle. Your small robot should move! Although finding a safe place for the BBBL was not trivial, I finally have a small mobile platform to tinker around and I can change the layout as I like because it is LEGO :).

Back to home

© 2020 Jens Petit