From their inception in the late 1990s, LEGO Mindstorms kits have unleashed a passion for robotics among both children and adults. I distinctly remember unboxing my first Mindstorms set as a 10-year old, poring over the thick printed manual filled with intricate mechanisms and complex code. I was immediately hooked!
Over many summer vacations and weekends, I experimented endlessly with that original kit. And 20 years later, I still fire up my collection of kits to this day. Now, as an experienced electrical engineer, I apply far more advanced techniques, but that initial spark of joy in creating moving, sensing robots remains strong.
In this post, I will guide you through exercising that same creativity for the first time with your new LEGO Mindstorms EV3 set. We will start easy, learn together along the way, and slowly expand into more complex builds fueled by the passion of the Mindstorms community.
A Brief History of LEGO Mindstorms Over the Years
Before we dive hands-first into a pile of Technic pieces, let us appreciate how we arrived at the capabilities packed into those plastic boxes.
Year | Set Name | CPU | Motors | Sensors |
---|---|---|---|---|
1998 | Robotics Invention System (RIS) | 32-bit ATMEL | 2 | Touch, Light |
2006 | Mindstorms NXT | 32-bit ARM7 | 3 | Touch, Light, Sound, Distance |
2013 | Mindstorms EV3 | 300MHz ARM9 | 3 | Touch, Color, Gyro |
2019 | SPIKE Prime | Custom SOC | 3 | Distance, Force, Color |
With each generational update, the computational and mechanical capabilities expanded greatly, leading to increasingly sophisticated robots. The EV3 set we will use strikes a nice balance between approachability for new builders and advanced features to grow into.
Now, let‘s dig in and build your first bot!
Assembling a Starter Robot
LEGO graciously includes instruction booklets in their retail sets with some sample builds. We will leverage that to create our first rover bot on wheels, Barbara. Yes, Barbara the Robot!
Later we can get creative with developing our own custom mechanisms, but this foundational model using the included parts will get us rolling. Literally!
Pieces and Parts
Here is what you will find when you first open the box:
- 1x EV3 Intelligent Brick – This is the brain!
- 2x Large Servo Motors
- 1x Medium DC Motor
- Cables, Battery Pack, Sensor Inputs
- Metal Beams, Connectors, Wheels + Tracks
- Total parts: 541
We will primarily need:
- Motors
- Wheels/Tracks
- Beams
- EV3 Brick
- Cables
Also grab a couple of touch sensors, as we will add basic collision detection capabilities to Barbara.
Assembling the Drivetrain
Start by snapping together the structural beams to create a chassis for Barbara using the included building instructions as a guide. Make sure to leave space for the EV3 brick and room for cables.
Attach the motors directly to the chassis beams using connector pegs. Pay special attention to the gearing direction – we want the motors to drive the wheels forward not in reverse!
Here is the initial rolling chassis:
Adding the Brick + Sensors
Next up, place the EV3 brick conveniently on top of the chassis using connector pins. Brick placement is important to ensure the cabling reaches all the motors.
Carefully route cables from the side-ports of the brick to each motor assembly. Also run cables from the rear sensor ports to the touch panels on the front and back of the chassis.
Here is Barbara fully wired up:
Coding Behavior with Blocks
For a long time, programming RCX bricks involved writing opaque numeric codes. Modern LEGO software now features an excellent drag-and-drop system using visual blocks that lower the barriers to entry.
Let‘s use this intuitive interface to define Barbara‘s movements:
- Connect EV3 Brick to computer via USB cable
- Launch LEGO Mindstorms Software
- Drag Move Steering block to start
- Set speed to 30%
- Duration 5 seconds
- Turn direction/angle to zero
This simple script will just roll Barbara forward for a few seconds. We can now progress to more complex logic by snapping additional blocks to react to sensor data!
Expanding Barbara‘s Capabilities
While our initial Barbara build moves around without falling over (mostly!), there is tremendous room for enhancement. The full LEGO Mindstorms community offers guides, mods and whole new programming frameworks to push the boundaries.
Let me walk you through some fun expansions…
Mechanical Upgrades
If you wish Barbara could traverse more than just smooth floors, consider upgrading her drivetrain to tank tracks equipped with suspension:
The mechanical principles are similar, with the structural beams supporting motor assemblies. But the maneuverability and stability increases dramatically!
I built this tracked rover to handle gravel, dirt and small obstacles with ease by following tutorials from an excellent site called [Not So Basic Building](https://www.philohome.com/ disadvwheeledtank/disadvwheeledtank.htm). Definitely check them out for more creative builds.
You may also fancy constructing Barbara 2.0, a walking humanoid bot:
These twins were built using pieces from three EV3 retail sets to have enough components. Each leg has its own servo for stable dynamic motion.
Walking robots require mastering quite advanced construction and programming compared to rovers. But the folks at EV3Lessons.com break down mechanics, center of gravity balance and block coding very intuitively across a series of tutorials.
The key is fully utilizing the beams, pins and gears to translate rotary motion into linear leg movements without toppling over!
Coding Enhancements
While the official LEGO drag-and-drop IDE provides an excellent starting point, you will soon want more programming capabilities. The open-source EV3Dev community project offers so much more.
EV3Dev replaces the standard OS and enables directly programming the brick in text-based languages like Python! For the Barbara build, we can now integrate a library to read analog sensors:
from ev3dev2.sensor import *
from ev3dev2.sensor.lego import TouchSensor
touch_sensor = TouchSensor()
while True:
if touch_sensor.is_pressed:
print("Sensor touched!")
How cool is that! EV3Dev opens up scripting Barbara‘s behaviors in compact syntax, while benefiting from the vast Python ecosystem.
Check the EV3Dev documentation for even more complete API references across a multitude of sensors.
Community Resources
The brilliance of LEGO Mindstorms lies in fostering a passion among millions. This active user community has created an incredible range of resources, software libraries, 3D models and guides over 20+ years of Mindstorms sets!
I highly recommend browsing the following sites when you are looking for creative inspiration or troubleshooting tricky builds:
- AltBricks – Reviews of hundreds of fan-created LEGO projects
- EV3Lessons – Deep dives into dozens of fundamental robotics concepts
- Not So Basic Building – Catalog of unique community-designed builds using LEGO
And share your own awesome robots on the global Mindstorms User Panel!
The breadth of information available from fellow LEGO robotics enthusiasts ensures your potential to experiment is limitless. There will always be new parts to discover, programming tricks to leverage and skills to add with such a great support community!
Educational Value
While unleashing your personal creativity is super fun already, LEGO Mindstorms kits also serve a deeper educational purpose. They enable students to pick up valuable STEM skills in science/engineering via an engaging, hands-on method not found in dense textbooks.
In fact, schools adopt LEGO robotics programs because they spark interest and retention of these typically ‘dry‘ domains early on. Students work collaboratively to construct real mechanisms using motors/sensors and visually program behaviors resulting in walking, talking, sensing robots!
Educators leverage LEGO Mindstorms masterfully because they enable learning these vital 21st century skills seamlessly:
Programming – Snapping visual code blocks together provides an intuitive starting point before diving into text-based coding. Students quickly learn functions, loops, conditions without the frustration of syntax errors!
Electronics – Constructing robots requires connecting motors/sensors and routing wires appropriately without short circuits. Wonderful electronics 101 without needing a separate breadboard or oscilloscope!
Mechanical Engineering – Assembling steady, dynamic bots demands learning principles of gears, rotary motion, torque, friction and gravity/balance. Immediately evident if pieces do not align or connect tightly.
Creative Problem Solving – Open-ended LEGO pieces, reusable components and collaborating within student teams nurtures persistance, iteration and thinking outside the box. Success is completely in their hands.
So do not throw away your Mindstorms components when done playing! Donate kits to local schools/libraries and motivate young minds to build the imaginative skills that drive innovation. Your childhood set may just lead budding engineers to create the next generation of autonomous robots decades down the road!
I fondly remember the indelible impression LEGO Mindstorms left on my early interest in all things electronics. Now with an actual EE degree and years of experience, I return to my trusty EV3 components time and again when prototyping new mechanisms and prototyping embedded systems.
In that spirit of learning, I hope I have inspired you to get hands-on building your Barbara starter bot, while unleashing creativity for future exploration of community resources. Grab your LEGO pieces and let‘s get rolling my friend! Please share photos of your whimsical robotic creations with me @robots4lyf.
Happy Building!