I connected four Mecanum wheels to the four motors of the LEGO MINDSTORMS Robot Inventor 51515 kit. The result is an amazing car that can drive in every direction. It can even rotate on the spot. Here’s how to build and program the Mecanum wheel robot inventor car.
Mecanum wheel robots versus rotocaster robots
Mecanum wheels are a lot like omni-wheels. The omniwheels are also known as rotocasters or holonomic wheels. An Omniwheel has no lateral grip and would go everywhere. But Mecanum wheels are different. Unlike rotocasters, the Mecanum wheels have diagonally oriented rolls. If you push a wheel like that sideways, it starts to rotate! Some people call this type of wheel the Swedish wheel or Ilon wheel after its inventor, Bengt Erland Ilon. Ilon came up with the concept while working with the Swedish company Mecanum AB.
The diagonal rollers on the Mecanum wheels allow for a whole new range of movement. Now you can strafe sideways, turn, and accelerate. The only thing you need to do is change motor directions.
The straight rollers on the omniwheels also allow for multidirectional movement, but you need a different robot setup. Here’s an example of an EV3 robot with holonomic wheels.
Rubber band cannon omnibot Building Instructions – PDF
Strafe, aim and drive in every direction with this gun platform for a double-barrel rubber band cannon. Rain down terror on your housemates in Video conferences. To build this, you need three LEGO MINDSTORMS EV3 medium motors and a Large Motor. You need a bunch of Technic parts too, but they are pretty common. Here the full part lists:
Building the LEGO MINDSTORMS Remote Controlled Mecanum wheel car
The wheels combine well with Robot Inventor because there are four motors in the set, and four is the minimum amount of motors you need to work with these wheels. The build is not very hard. Slap four motors on your Robot Inventor hub and you’re rolling!
If you want building instructions, you can get them on my Patreon site. This is a Patreon supporter exclusive!
You can also build pure LEGO Mecanum wheels if you’re a LEGO purist. I’m particularly fond of this design by Yoshito Isogawa. The wheels perform less than dedicated wheels, but they work fine. Building instructions for those wheels are also on Patreon!
Programming the MINDSTORMS mecanum wheel car with word Blocks/Scratch 3.0
Now that we’ve assembled the car, it’s time to add a remote control program. I first attempted this with Word Blocks and the virtual remote. The result was a fairly simple program. You can use it with the virtual remote on your computer or smartphone. You can download the program below.
What I didn’t like about the program was the horrible lag between moving a stick and the response from the robot. It’s really not much fun to drive the rover like this. That’s why I moved to python.
Programming the car with Python and Remote control with an Android app
To avoid the lag, I have developed a complete Bluetooth library in Python. That library can connect two Robot Inventor hubs, and it can even connect to my app in the play store. You can even use LEGO SPIKE Prime as a remote control device for the Robot Inventor Mecanum car. Here are free building instructions for a SPIKE Prime remote control wheel.
Remote Control Steering Wheel with SPIKE Prime
With this SPIKE Prime RC steering wheel, you can remote control your LEGO robots. It works on LEGO MINDSTORMS EV3 robots, SPIKE Prime, and Robot Inventor 51515 robots with direct brick to brick Bluetooth connections.
To connect to the newer hubs you need to run Python code on both the robot and the steering wheel. The code for steering wheel is included. You will have to customize the robot sc…
The code for all of this is in my FREE public GitHub repository: mpy-robot-tools. Be sure to run to mpy-robot-tools installer first. Then you copy the code to a new MINDSTORMS project and run it once. You can delete the program.
After installation, you can copy the car receiver code to a new MINDSTORMS project. When you run it, make sure that Bluetooth Autoconnect is TURNED OFF! I mostly use USB to program my robot.
Once the code is running, you can connect with the MINDSTORMS RC Ble Android App from the Google Play store. But you can also connect with any hub running the transmitter code. No need to change the code on the car.
The hardware you need to build this Mecanum Wheel omnibot
I received these wheels courtesy of DF Robot. I modeled, and 3D printed wheel hubs to make them fit LEGO. My friend Stefan helped me kindly fine-tune these hubs’ clutch power, so they grip LEGO axles tightly. I shared the STL file as a download on my website. With it, you can 3D print your own adapters.
- 2x right side wheel: Black Mecanum Wheel (97mm) – Right
- 2x left side wheel: Black Mecanum Wheel (97mm) – Left
- 4x Adaptor hub. You can order them printed on hubs.com. Choose FDM. Or you can print them yourself. Here’s the mecanum wheel hub STL file you need.
Help me build more models like the robot inventor mecanum wheel car
I hope you enjoyed all these free code files and explanations. I’d love it if you would show your appreciation and join my other Patrons on Patreon.com. Be sure to share this article!