Robot with Mecanum wheels

I’m coaching my son’s middle school robotics team and the kit includes mecanum wheels which are a kind of omni-directional wheels. It’s very useful to be able to scoot the robot around in all directions when competing in a challenge. I had never used mecanum wheels so before showing the kids how to use them in their robot, I wanted to build myself a little platform to try out mecanum wheels for myself.

I found an awesome blog post on building a mecanum wheel robot by Dejan so I went to work building my own based on his plans. I’m really happy how it turned out.

I 3D printed and assembled the wheels. The body of the robot is thin plywood glued together. I used A4988 stepper drivers and Nema 17 stepper motors. I first prototyped the electronics on a breadboard, then wired everything point-to-point on a protoboard. Maybe I’ll do a PCB later to clean it up.

The circuit is meant to be powered by 12V so I dug around my house and found that the battery from my small Bosch drill was 12V! I downloaded a battery holder model from Thingiverse, cut off the wall mount portion using Tinkercad and epoxied 2 spade terminals to make a perfectly fitting battery connector.

For the control system, I used a wireless USB gamepad that I already had. It was easiest to read the USB gamepad with a simple Raspberry Pi program written in Node.js and send it over I2C to the Particle Photon. The Photon runs the control logic program to read the gamepad inputs from I2C, decide what direction to drive the robot, and accelerate the wheels to the target speed. I was able to quickly iterate by tweaking the program in Workbench, flashing the new version OTA and driving the robot around to try out the changes. I used the AccelStepperSpark library to generate the stepper outputs. The acceleration is not perfectly tuned as sometimes the steppers start skipping as you can see in the video, but it’s good enough for my purposes.

Here’s the robot in action!

The wheels work best on a slightly grippy surface, hence the foam tiles.

There were plenty of mistakes along the way. I’m very glad there were 5 stepper drivers in the pack because the first thing I did was plug one upside down and let the magic smoke out. :joy: It also took me a bit of trial an error to tweak the stepper motor current limiter, leading to a melted power cable.

As usual, a project like this seem like it will never work until it just does. I encourage you to go out and build cool things. Push your limits, persevere and you’ll achieve great things!

8 Likes

@jvanier this is such a cool project! I’m glad you shared the “behind-the-curtain” details of things going off the rails since I’ve rarely had a project go perfectly first time :roll_eyes:

2 Likes

This is SO COOL! How long did the project take you from start to finish?

1 Like

I split the project into small objectives. I worked on the project mostly during evenings so when I finished one of the steps, I stopped for the night.

  • Figure out how to connect the stepper motor to the driver and make it step
  • Set up the Raspberry Pi so it boots as fast as possible and runs a Node.js program as a service
  • Write the Node program to send the gamepad input over I2C
  • Write a Particle program to make a stepper run at a fixed speed

The big tasks were building the body and wiring the circuit. I did those over the weekend.

I’d say all in all, it took about 30 hours over the past month to finish the project.

2 Likes

Amazing project! I admire the building skills you have. The robot moves in a very peculiar way, I like that.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.