OmniPlotBot: Build an Omnidirectional Robot

Omnidirectional (sometimes called holonomic) vehicles can travel in any direction on demand, without turning.

I was inspired to build one because my partner needed to send away to have large-format sewing patterns printed, and I thought it would be neat if we could print them ourselves without a big, bulky plotter or printer. Instead of the paper traveling through a machine, why not have the machine roll over the paper? I’m still pursuing this project, but along the way I built a fun omnidirectional robot controlled by an iOS app.

I thought it would be fun to write up a how-to in case anyone else would like to experiment with a holonomic robot.

Prerequisite Knowledge

None. This was the first robot I ever built. I’m a front-end developer who primarily works in JavaScript, I’ve never taken a CS class and have no experience with Robotics, Arduino, ESP32, C++, or iOS development. I simply forced my way through this project, a fact that’ll probably obvious to anyone who does have education or expertise in those areas.

My intended audience is my past self, before I had any of the knowledge I’ve accumulated in the process of putting this robot together. This is the tutorial I wish I’d had when I started.

Materials

These are the materials I used to build my robot, along with some links to purchase. There are probably cheaper, better, or just different options out there — your mileage may vary. This is the equipment list I settled on after some experimentation.

Hardware Overview

The basis of the robot are its three omni wheels. Omni wheels are special in that they can roll like normal wheels but also perpendicular to the normal rotation.

The main board I used for the robot is an ESP32 S3 with built-in Bluetooth LE, which we will use to send commands to the robot from the iOS controller app. While I originally used an Arduino Nano as the brain of the robot, I eventually switched to a more powerful ESP32 S3 because the Arduino struggled to handle both the bluetooth communication and the logic necessary to smoothly run the stepper motors.

We'll be using three stepper motors, each paired with a Big Easy stepper motor controller. Stepper motors are special in that their rotation is divided into a specific number of "steps" and rotate a single precise step at a time. In this case, the motors have 200 steps per rotation and using the Big Easy driver can utilize 1/16th "micro-stepping" to effectively have 3200 steps per rotation. This allows us to control the movement of the robot with a great deal of precision, a feature that will come in handy if we want the robot to work as a plotter in the future.

If our wheels are 58mm in diameter (182mm circumference) and the motors have 3200 steps per rotation, then 3200 / 182 = 17.5 steps per millimeter. That's precision!

I used a battery from BatterySpace, but you could skip the battery and power the robot with a 9.6v external power supply.

The ESP32 is powered by 5v, so we will need to use a step-down converter to reduce the 9.6v to 5v.

Assembling the Base, Wheels, and Motor

  1. Attach the mounting brackets to the base. If you’re using the triangular base I linked to in the materials list, you can attach the mounting brackets to each end of the base. If you’re building your own base or using a different shape, ensure that the brackets are positioned 120° from the adjacent bracket.
  2. Attach each stepper motor to a bracket.
  3. Attach an omni wheel to each stepper motor.

You should now be able to roll the chassis around in any direction, a preview of how the robot will move when it’s completed.

Mounting the Battery

The 9.6v 3300mAh battery from BatterySpace conveniently fits very well on the underside of my triangular base platform. To build the enclosure, I used the thinnest aluminum sheet Home Depot had for sale. This material is great because it can be scored with a utility knife and snapped to make cuts, almost like plexiglass but bendy.

Wiring the Integrated Circuits

1. Stepper Motors to Big Easy Drivers

👀 See Diagram

  1. If you’re using them, solder the screw terminals to the Big Easy boards.
  2. Mount the Big Easy boards to the base.
  3. Connect the stepper motors to the Big Easy board. The four wires from each motor should be attached in sequence to the two A and two B terminals on a respective Big Easy board.

2. Power to Big Easy Drivers

👀 See Diagram

Connect the battery’s ground and positive leads to the GND and M+ terminals on the big easy board.

3. ESP32 to Stepper Controllers

👀 See Diagram

  1. Connect the DIR and STEP pins of the first big easy board to the 4 and 5 pins of the ESP32
  2. Connect the DIR and STEP pins of the second big easy board to the 6 and 7 pins of the ESP32.
  3. Connect the DIR and STEP pins of the third big easy board to the 16 and 17 pins of the ESP32.
  4. Connect the SLEEP pin of all three big easy boards to the 18 pin of the ESP32.

4. Power to ESP32

👀 See Diagram

The battery's 9.6v is too much for the ESP32's 5v input, so we need to connect the battery's ground and positive leads to the voltage step-down converter, then from the converter to the ESP32's GND and 5V pins.

Firmware

You can download the robot's firmware from this GitHub respository.

The firmware was developed using the Arduino IDE, and later the Arduino plugin for VSCode. Either can be used to connect to the ESP32 S3 and upload the firmware. Ensure that your IDE has support for the ESP32 S3 Dev Module, and connect your computer to the ESP32's rightmost USB port before uploading.

Controller App

You can download the robot's controller app from this GitHub respository.

The controller app is developed using XCode, so you will need a Mac to build and run the app on an iPhone. You can also run the app on your computer as an iPad app if you have an Apple Silicon-based Mac or in the simulator.