Mecanum Omnidirectional Robot Car using the Quantum Integration System

In this project, we’re going to be building a wireless robot car that uses mecanum wheels to enable omnidirectional movement. If you haven’t heard of mecanum wheels before, they’re tireless wheels with a series of rubberized rollers around the circumference.

Mecanum Wheels LH and RH

These rollers are typically at an angle of 45 degrees to the wheel’s axle line and opposing wheels are of the opposite hand. This enables the usual forward, backward and turning movements of standard wheels, but also allow unique translational movements horizontally and diagonally depending on which direction the wheels are turned.

We’re going to be using the Quantum Integration system to take inputs from a joystick controller and drive the motors. We’ll be using two Builder bases, one as a transmitter on the controller and one as a receiver on the robot car, so the starter bundle is perfect for this project.

We’re also going to use three of their DIY PCB kits – the power supply, the four motor driver and the joystick controller.

Quantum Integration DIY PCB Kit

Here is my project video, read on for the full written instructions:

What You Need For This Project

You’ll also need some basic soldering tools to assemble your PCBs, these are the tools that I use:

Assembling The Robot Car

I’m going to use the same car that I’ve used for my previous obstacle avoiding robot and object tracking robot projects, but this time I’ll replace the Arduino with a Quantum Integration Builder Base.

If you’d like to 3D print the same chassis that I’ve used, use the below link to download the files. I printed them in black PLA with a 15% infill.

Let’s start out by assembling the power supply module. This module just takes a DC input of 7-12V provided through a 2.1mm barrel jack and converts it to 3.3V or 5V to be used by the Builder Base and Motor Driver.

Power Supply Module Kit

I’m going to be using a 3 cell LiPo battery to supply power to the car, but you can use three 18650 lithium-ion cells or 4 AA cells to power yours. It’s worth mentioning that 9V block batteries typically can’t produce enough current to drive four motors, so you’ll need something more substantial.

Power Supply Module Assembled

Next we’re going to assemble the Four Motor Driver kit. This kit features two L293D motor drivers along with a PWM expander and the supporting components required to independently drive up to four small DC motors, so it’s perfect for four-wheel drive robots.

4 Motor Driver Kit PCB

Once the motor driver is complete, we’re going to connect the motors to the driver and the driver to the builder base. This is done as per the project notes on the Quantum Integrate wiki, so it’s easy to follow.

If you’ve 3D printed your own robot chassis parts from my previous project, you’ll need to assemble your chassis and install the motors before you add the driver.

Original Robot Car Chassis

Connect the two wires from each motor to each of the motor terminal blocks as follows:

  • Front Left – M1
  • Front Right – M2
  • Back Left – M3
  • Back Right – M4
Installing the 4 Motor Driver Board

Then connect the motor driver to your builder base using the following pins:

  • XLAT – GP1
  • GSCLK – GP0
  • BLANK – GP2
  • SIN – GP3
  • SCLK – GP4
  • GND – GND
  • 5V – 5V
Quantum Integration Builder Base

I’m going to put the original wheels back on for the first part of the project and we’ll then look at expanding the functionality for the mecanum wheel movements.

Adding Original Wheels To The Robot Car

Assembling The Joystick Controller

We’ve got our robot car built, now let’s assemble the joystick controller to control it with.

The joystick controller is the last PCB kit to assemble, and it features two two-axis joysticks with pushbuttons as well as a third pushbutton in the centre. It’s also got an onboard voltage regulator, so it can be powered directly using a 9V battery.

Joystick Kit Assembled

To add our builder base, we need to remove it from the plastic housing and screw it onto the brass standoffs provided on the joystick PCB.

Removing The Builder Base PCB

One thing to be aware of is that the battery holder is right up against the terminals on the builder base, and so is the joystick cover on the other side. So you need to use some flexible or 90-degree terminals to fit in alongside them.

Installing The Builder Base On The Joystick PCB

Quantum provide a 3D printable housing for the joystick as well. I’ve printed that out in white PLA to put the PCB, builder base and battery into. The screws for this housing are also included with the joystick PCB kit.

Installing The Joystick PCB In The Housing

The back cover is then held in place with two more screws. The controller can be switched on and off using the slide switch at the bottom and the green LED is illuminated when the controller is on.

Joystick Controller Complete

Programming The Robot Car

Our robot car and joystick are now complete, so we can move on to programming them.

I’m going to start by testing that the system is receiving all of the inputs from the Joystick controller correctly. To do this I created a basic app that takes the three hardware objects, the two joysticks and the centre pushbutton, and displays their outputs on our app dashboard.

I also created the controller’s firmware and mapped the hardware objects to the pins that they are connected to on our controller’s builder base.

Quantum Integration have a similar project where they map the outputs to some analogue sliders if you’d like to try this as well.

With the app running, it looks like all of the axis are working correctly. We’re also able to see when each of the three buttons are pushed.

Joystick Output Testing

So now we can add our robot car to the app so that the joystick controller’s outputs drive the car.

I’m going to use Quantum Integrations base app for their robot car as a starting point, you can download the app and the firmware from their project page and this can then be imported into your server.

Importing The Mecanum Car App

You should then see the following app.

Robot Car App, Forward and Backward

This app takes the Y-axis of each of the two joysticks and maps the output to drive the left and right sets of wheels in pairs. So the left joystick drives the left two wheels and the right joystick drives the right two wheels.

There are also three dashboard buttons, drive left, drive right and drive forward which enable the car to be controlled from the dashboard.

We’ll also need to upload the firmware to our robot car’s builder base, again this can be downloaded from the Quantum Integration project page.

We don’t need to worry about the joystick as we did this for the test we ran previously. We can then run the app and try out our robot car.

Lastly, we’ll need to assign the hardware objects that our app is going to use.

Assign The Hardware

Controlling The Robot Car

Now that our app is running, we can switch on the controller and the car’s power supply and try it out.

Pushing forward or backward on the left joystick drives the left wheels forward or backward and similarly for the right joystick and the right wheels.

To drive forward in a straight line, push both joysticks forward. To turn slightly push one forward at a time, and to turn on the spot push one forward and one backward.

Mecanum Wheel Car

We can also use the buttons on the dashboard, which we can access through our phone, to control the car rather than the joystick. These buttons don’t give you as much control as the joysticks do as they’re just on and off signals, not analogue signals, but you get the idea.

Using The Mobile App To Drive The Car

Adding The Mecanum Wheels & Omnidirectional Movements

Now that we’ve got the basic robot car working, we’re going to look at adding the mecanum wheels. I’m going to replace the wheels on the robot car each with a mecanum wheel.

There are two different wheels, they are a mirror image of each other. They’re usually labelled with an LH or an RH on the inside of one of the hubs. You need to make sure that the wheels on the front and back are opposite hands so that they create a sideways reaction force when the rotate in opposite directions.

This is how I’ve installed them into my car.

Mecanum Car Top View

You might need to use an adaptor to connect your wheels to your motor shafts. I used a 3D printable one by Pro Know.

Next we need to add some logic to the app to drive the wheels on one side in opposite directions when we want the car to move sideways. We could use the x-axis on one of our joysticks but I thought that it would be easier to use the joystick pushbuttons. So you push the left joystick to move left and the right joystick to move right.

I wrote a custom function block to produce a forward and backward signal when a button input is triggered. I connected the input to the left joystick button output and the forward and reverse outputs to our four motors. I then duplicated the function block for the right side as well.

Adding The Mecanum Wheel Controls

Let’s save and run the app and see if it works. We don’t need to worry about the firmware as we’re using the same hardware that we used previously. Just make sure that the functions are mapped correctly and then run the app.

Driving The Robot Car

Our car is now able to move forward and backward, turn in either direction and move sideways without turning.

Mecanum Wheel Car Running

Let me know what you think of the mecanum wheels and this mecanum car in the comments section. Are you going to try to build your own mecanum car?

Michael Klements
Michael Klements
Hi, my name is Michael and I started this blog in 2016 to share my DIY journey with you. I love tinkering with electronics, making, fixing, and building - I'm always looking for new projects and exciting DIY ideas. If you do too, grab a cup of coffee and settle in, I'm happy to have you here.


Please enter your comment!
Please enter your name here

Latest posts

I Built A 4-Bay Raspberry Pi 5 Based NAS

Last year, I built a Pi-based NAS as cheaply as possible using a Raspberry Pi Zero 2W. It was a great project to learn...

Is The New Orange Pi 5 Pro A Good Raspberry Pi 5 Alternative?

Today we're going to be taking a look at the Orange Pi 5 Pro. This is a new SBC from Orange Pi that is...

Which NVMe Hat Is The Best For A Raspberry Pi 5

If you don’t know already, I’ve been selling these 3D printed cases for Raspberry Pi’s online for a few years now. With the launch...

Related posts