Disclaimer and Social

This page may contain affiliate links. As an Amazon Associate I earn from qualifying purchases.

Showing posts with label UNO. Show all posts
Showing posts with label UNO. Show all posts

Tuesday, September 18, 2018

LEGO Mindstorms Motors with Arduino

Found a bunch of my old LEGO Mindstorms robotics stuff and realized that I could still use all the old motors and most of the sensors. The old versions of the motors (RCX 1 & 2) are just 9v DC motors so I can easily control them with an Arduino.

These old motors are super sturdy, reasonably powerful and the gearing makes them great for any hobby level robotics project. And of course, they fit into the entire LEGO ecosystem so they are easy to prototype with.

LEGO Mindstorms RCX motors can be used with an Arduino with Adafruit motor shield
Just a few leftover LEGO Mindstorms Technic motors. And I've got lots more Mindstorms and Technic parts, plus quite a few Bionicle sets. 

I stopped using the RCXs when the software and drivers stopped working on modern systems. I thought about buying the NXT or EV3 versions, but by that time I was already into Arduino or Raspberry Pi and couldn't justify buying another brain and motor/sensor package.

So the motors and other items languished in storage for years. But I wanted to find one of my robot chassis (still assembled after all these years) to use with some beginning roboticists. I was going to 3d print some adaptors for the cheap DC motors. But when I saw the old motors I realized I could just cut the LEGO connector wires and plug them directly into a motor driver.

Normally, I would just upgrade to newer equipment, but I have a dozen of these motors and several robot chassis and mechanical contraptions that are already designed ( and more importantly, already assembled) to work with this style of motor. Since the motors are designed to run on 9v (I remember running them at up to 12v without damage) so I knew they would work well with several of the Arduino motor drivers I already have. I decided to put these handy little motors back to work.

I chose to use Adafruit's Motor Shield. It can handle 9-12v easily and has handy screw terminals for attaching wires. And the well-written library makes it easy for new roboteers to program their creations. It gives you four DC motor outputs (or two stepper motors) as well as two servo ports. And it leaves the analog and digital inputs to use with sensors.



Put the shield on top of a UNO and they are about the same size as the old RCX, so they fit perfectly onto the existing robot chassis. Or use one of the new M4 powered UNO compatibles and have enough power and speed to run a full color touch screen display, Bluetooth, GPS and a 10 DOF sensor board. You could even get one of the smaller boards like a Feather or Teensy.

Compare LEGO Mindstorms RCX brick with the size of an Arduino and Motor Shield combo
The Arduino and Motor Shield are slightly smaller than the original RCX brick, so they can be substituted into any design that uses the old RCXs. And the motor shield gives you an extra motor port and the option to run the motors at higher voltages for that extra boot of power.

Hooking up the motors is simple. Just use one of the Mindstorms motor cable and cut the wire that runs between the two LEGO connectors. You will get two cables, one end with a LEFO connector and one with just wire. Strip a small amount of insulation off the wire. Attach the connector to the motor, then screw down the wires into any of the four ports on the motor shield. Use the LEGO motors like any other DC motor.

Just snip the wire between the connector blocks and attach them to the screw-terminals of the motor shield.

You could get fancy and tin the wire with solder, crimp a pin to the wire, or splice it into a breadboard style wire.

Now build a robot and code the Arduino using the library for the motor shield.

LEGO Mindstorms RCX motors running on an Arduino with Adafruit motor shield
You can run the old LEGO Mindstorms RCX motors using an Arduino and Adafruit's Motor Shield kit. The motors are simple 9v DC motors that are geared to be powerful and sturdy. Plus they fit into the LEGO and Technic universe, so you can build almost anything you can imagine.
For information about connecting to later LEGO Mindstorms kits check out:


As an Amazon Associate I earn from qualifying purchases.
Shop through our Amazon links to help support this site.

Also find me on:

Wednesday, May 17, 2017

How I Spent $250 to Dim a Lightbulb


Maybe that's a slight exaggeration - I could do it for pennies, or free using salvaged parts. But I really have spent hundreds of dollars over the last few years learning how. Along the way I also learned how to make the hardware and write software to control them with sensors, timers and all types of remote controls. By now I can recreate most Dollar Store electronic gadgets for less than $100 each.

Go ahead and laugh... you're supposed to, it's kind of silly. Most hobbies are.


12v incandescent light bulb powered by Arduino Uno and Adafruit motor driver
This is a 12v incandescent light bulb powered with an Arduino Uno and an Adafruit Motor Shield over the microcontroller's I2C bus. I have run massive motors and steppers off this same board, so I knew the shield's TB6612 H-bridges could easily handle the voltage. A quick guestimate said I would be nowhere near the 3 amp max for the board. There are three more 12v channels left to power a cold cathode tube, an old fluorescent and LEDs. And there are tons of other inputs and outputs that I can hook up to sensors and displays.


Like most hobbies there is an initial cost to buy the basic equipment and a huge investment in time. Eventually you get to a point where it becomes cheaper and the process becomes really fun and mostly pain free.

Per hour of fun, this electronics hobby has turned out to be one of the cheapest and most rewarding hobbies I've ever tried - and probably not for the reasons that you think.







All this tinkering and making and studying electronics - it's really just a way to gain access to other creative people. All these projects are eventually supposed to be put into other projects. That makes a great excuse to meet new people and get them to share their creativity.

Jewelry, clothing, furniture, cars, sculpture... doesn't matter to me. Can I help another creative bring their projects to life? Being able to add movement and lights and sounds to other people's projects is a great way to connect with other hobbyists.

So far, this simple hobby has allowed me to meet and befriend quilters and welders, fashion designers, models and photographers, jewelry makers, graphic designers and gear heads and... well, you get the picture.

I've helped a few of them with their projects, and they have all taught me something about their chosen medium. We can share our successes and our failures, our passion and pain. We don't use the same materials, but we all understand the creative drive. Every creator needs friends who not only tolerate your $250 lightbulb dimmer, but help you along the way.

This particular lightbulb dimming is part of an attempt to create a Steampunk style lamp with multiple light sources. I wanted that old time glow that only incandescent and fluorescents can provide.

I know I will need help from other makers to get this working. And it will probably turn out much better and more attractive thanks to their help.

All in all, I think this newest hobby has been a total bargain and a complete blessing.

Also find me on: FACEBOOK