Overview
In this introductory article, we’ll explore a custom Mecanum wheel robot (Zeus Car) using an Arduino microcontroller and an ESP32-CAM module for real-time vision and navigation capabilities. Mecanum wheel robots can move in any direction, making them perfect for tight spaces. By combining the Arduino’s ease of use and the ESP32-CAM’s impressive camera features, you can design a robust and flexible robot that can navigate complex environments and perform a wide range of tasks.
This Mecanum Wheel Robot Kit was sent by SunFounder. You can control the 360° omnidirectional movements of the Robot in all 8 directions using IR Remote or Mobile App. It can perform difficult movements such as left and right drift. With 2 obstacle avoidance modules and an ultrasonic module, it can realize obstacle avoidance function. The bottom is mounted with an 8-channel circularly placed grayscale module, which allows the car to follow the line in any direction. The Robot has WS2812B IR LED, which can be controlled with IR Remote to generate cool lighting effects.
This project encourages you to learn more about Mecanum wheel robots and the exciting opportunities they provide. Keep reading to discover the parts, how to put them together, the programming, and the uses of this inventive robot.
What is Mecanum Wheel Robot?
The term “Mecanum Wheel Robot” refers to a type of mobile robot that uses Mecanum wheels to achieve omnidirectional movement. Mecanum wheels are a unique type of the wheel, invented by Bengt Ilon in 1973, that allow for movement in any direction without the need for turning. The Mecanum Wheel can be divided into left-hand and right-hand wheels that are mirror images of each other, depending on the angle of 45°.
Each wheel consists of a series of rollers, mounted at a 45-degree angle to the wheel’s axis. This design enables the robot to move not only forward and backward but also laterally and diagonally.
A Mecanum wheel robot typically has four Mecanum wheels, one for each corner of the robot’s chassis. By varying the speed and direction of each wheel’s rotation, the robot can achieve a wide range of movements. For example, to move forward, all four wheels would rotate in the same direction. To move sideways, the wheels on one side would rotate forward while the wheels on the other side would rotate backward.
Mecanum wheel robots are used in various applications, such as material handling, logistics, search and rescue operations, and warehouse automation. They are particularly useful in environments where space is limited or where the robot needs to navigate around obstacles.
SunFounder Mecanum Wheel Robot
Recently we got an Arduino & ESP32 CAM based Mecanum Wheel Robot from SunFounder. They named this Mecanum Wheel Robot Zeus Car. It can perform all the Mecanum Wheel Robot functions as explained above.
Let’s have a look at the hardware that comes in the Kit.
1. Arduino UNO Board
The Arduino UNO R3 board is a microcontroller board with 14 digital I/O pins (6 can be PWM), 6 analog inputs, 16 MHz ceramic resonator, USB connection, power jack, ICSP header, a reset button, and is powered by ATmega328P.
Connect it to a computer via USB or power it with an adapter or battery to start.
2. Zeus Car Shield
The SunFounder all-in-one expansion board for Arduino includes various module ports (motor, light bar, obstacle avoidance, grayscale, ESP32 CAM, ultrasonic) and a built-in HS0038B IR receiver.
It also has a built-in charging circuit with a PH2.0-5P interface and an estimated charging time of 130 minutes.
-
- Reset Button
-
- Press this button to reset the program on the Arduino board.
-
- Charge Port
-
- After plugging into the 5V/2A USB-C port, it can be used to charge the battery for 130min.
-
- Battery Port:
-
- 6.6V~8.4V PH2.0-5P power input.
- Powering the Zeus Car Shield and Arduino board at the same time.
-
- Power Switch
-
- Slide to ON to power on the Zeus Car Shield.
-
- IR Receiver
-
- This is an HS0038B IR receiver with the signal pin connected to pin 2 of the Arduino board.
-
- Grayscale Module Related
-
- Grayscale adjustment potentiometer: used to set the reference voltage for Omni grayscale module
- Grayscale Port: Used to connect Omni Grayscale module.
-
- 3 groups of indicators.
-
- Charging Indicator: This indicator lights up after plugging in the USC-C cable for charging, the color is orange.
- Power Indicator: Turn the power switch to ON, the power indicator will light up, color: green.
- Battery Indicator: Two indicators (orange) represent different battery levels. When both D3 and D4 indicators are off, you need to use the USB-C cable to charge. When charging, these two indicators will flash.
-
- Ultrasonic Port
-
- To connect the ultrasonic module, both Trig & Echo pins are connected on pin 10 of the Arduino board.
-
- Camera Adapter Port
-
- The Camera Adapter Board port.
-
- Obstacle Avoidance Port
-
- Used for connecting two IR obstacle avoidance modules, the signal pins of the two ports are connected to Q0 and Q1 of 74HC165.
-
- RGB LED Strip Port
-
- For connecting 2 RGB LED Strips, the three pins of the strip are connected to 12, 13 and 11 respectively.
-
- Upload Switch
-
- ESP32-CAM and Arduino board share RX and TX pins, so when uploading code you need to toggle this switch to Upload mode(Right on the diagram) to unoccupy the ESP32-CAM first. When you need to use the camera, you need to toggle this switch to the other side so that the ESP32-CAM can communicate with the Arduino board.
-
- Motor Port
-
- 4 groups of motor ports.
3. ESP32 CAM
The ESP32-CAM is an incredibly compact camera module featuring the ESP32-S chip, priced around $10. In addition to the OV2640 camera and multiple GPIOs for peripheral connections, it also offers a microSD card slot, which can be used for storing images captured by the camera or for holding files to serve clients.
This module is capable of functioning as the smallest standalone system and boasting a deep sleep current as low as 6mA. With its wide range of potential uses in various IoT applications, the ESP32-CAM is well-suited for smart home devices, industrial wireless control, wireless monitoring, QR code-based wireless identification etc.
4. Camera Adapter Board
The Camera Adapter Board, as the name implies, is an expansion board for the ESP-32 CAM, used to expand the ESP32-CAM so that it can be secured to the robot, and can be easily wired.
Also because the geomagnetic chip QMC6310 is susceptible to interference from motors, we put it on this camera adapter board to keep it as far away from the motors as possible.
The QMC6310 is a three-axis magnetic sensor that combines magnetic sensors and signal conditioning ASIC on a single chip. Utilizing advanced magneto-resistive technology and a custom 16-bit ADC ASIC, it provides low noise, high accuracy, low power consumption, offset cancellation, and temperature compensation. With 1° to 2° compass heading accuracy and an I²C serial bus, it offers easy interfacing.
5. Omni Grayscale Module
The Omni Grayscale module is designed for line following and edge detection, featuring omnidirectional capabilities. This means that its 8 TCRT5000 sensors are arranged in a circle, enabling the detection of black lines in any direction.
Such a configuration allows robot cars like the Zeus Car with Mecanum wheels to follow lines at different angles without needing the car’s front to face forward.
To adjust the module’s sensitivity in a given environment, the VREF value can be modified. On the Zeus Car Shield, the blue potentiometer is used to adjust the VREF pin’s value.
6. Ultrasonic Sensor HC-SR04
The HC-SR04 is an ultrasonic distance sensor that offers non-contact measurements ranging from 2 cm to 400 cm with an accuracy of up to 3 mm. The module features an ultrasonic transmitter, receiver, and control circuit.
For ease of use in your measurement projects, simply connect 4 pins: VCC (power), Trig (trigger), Echo (receive), and GND (ground).
7. IR Obstacle Avoidcance Module
The IR obstacle avoidance module uses a pair of IR transmitting and receiving components. It emits infrared light, which, when reflected by an obstacle, is received by the receiver tube, causing the indicator to light up and output a low-level signal. The module has a sensing distance of 2-40cm and excellent anti-interference ability, with the detection distance being shorter for darker objects.
The sensor detects a 2-30cm range against a white wall. The module operates when the enable pin is at a low level, and the jumper cap controls the EN pin. To control the EN pin through code, remove the jumper cap.
The factory-set detection distance may not be suitable for all light environments, so it’s necessary to adjust the actual detection distance before use.
The module features two potentiometers: one for modifying the transmitting power and the other for adjusting the transmitting frequency. By adjusting these two potentiometers, you can fine-tune the effective distance of the module.
8. RGB LEDs Strip
The RGB strip consists of 4 RGB LEDs, capable of creating any hue by blending the three primary colors: red, blue, and green.
These 5050 RGB LEDs are connected in a common anode configuration. Each LED functions as an independent circuit and can be cut along the switch without harming other components. The strip is made of an FPC board and features a double-sided adhesive backing, allowing for easy bending and secure placement as desired.
9. 18650 Battery
SunFounder offers a custom battery pack comprised of two 18650 batteries, each with a 2200mAh capacity. Featuring a PH2.0-5P connector, the battery pack can be directly charged when connected to the Zeus Car shield (Arduino Mecanum Wheel Robot).
10. 18650 Battery
The TT DC motor features a 1:48 gear ratio and includes 2 x 250mm wires with an XH2.54-2P connector. These motors can be powered by 3 to 6VDC, with higher voltages resulting in increased speed.
Keep in mind that these are basic motors without built-in encoders, speed control, or position feedback. They simply convert voltage input into rotational motion. Motor performance may vary, so if precise motion is required, a separate feedback system is necessary.
Assembling the Car
Let us assemble the Zeus Car kit and build Mecanum Wheel Robot using Arduino & ESP32 CAM.
The kit includes a comprehensive Assembly Manual, featuring easy-to-understand diagrams and illustrations. Each step is thoroughly explained to ensure a smooth assembly process for the Zeus Car. By utilizing the Arduino and ESP32 CAM, you can effortlessly assemble a fully functional Mecanum Wheel Robot.
Download the assembly instruction manual from the following link. The manual in PDF form here is also included in printed form in the kit.
It took me one hour to assemble all the components together and finally I was able to assemble the Mecanum Wheel Robot using the easy guide instruction manual.
Here is the top, bottom, left and right side view of the Assembled Robot.




Operating the Mecanum Wheel Robot (Source Code/Program
The ESP32 CAM and Arduino UNO Board comes with pre-programmed firmware. This mode is called Play Mode.The play mode is where we pre-upload the code to the Arduino board at the factory, and the Zeus Car can be remotely controlled by APP or remote control once it is turned on.
The following Github Repository contains the code for this Zeus Car. You may download the code and test everything as you want.
The code that can control all the functionalities of the Robot like Line Tracking, Line Follower, Obstacle Avoidance, Drift Left/Right, Move in All Directions, Rotate Left/Right is included in a single code under zeus_car.ino under the path of zeus-car-main\zeus_car.
Control Robot by Remote
The kit comes with a user-friendly remote control. Simply power on the vehicle and enjoy immediate control through the remote, making it an excellent option for users eager to experience the excitement of operating the vehicle right away.
Zeus Car can be controlled with a remote control by turning the car on and then pressing the buttons on the remote control directly. This method is stable and less susceptible to outside interference, but the control may not be as flexible.
Here is the Remote Switch which can be used to control the Robot. The buttons in the Remote have individual functionality as per the assignment in the image below.
- Stop: Stop all movements of the car.
- Compass Calibration: Turn on compass calibration.
- Line Track: Switching to line track mode.
- Follow: Switching to follow mode.
- Obstacle Avoidance: Switch to obstacle avoidance mode.
- Drift Left/Right: Drift to the left/right.
- Set Heading: After placing the car in one direction with your hand, click on this key to make this direction the front of the car movement. This allows you to quickly specify a direction instead of slowly rotating the car in that direction with other keys.
- Rotate Left/Right(Cycle/USD Key): Turn left/right
- Move in All Directions(1 ~ 9): Control the car to move in all directions.
- Pause: The function is basically the same as Stop, but if the head of the car is not facing the direction initially set, it will slowly move to the set direction.
Press the Remote buttons to move the Robot in all 8 directions.
The Robot can be operated in line following mode and can follow the line as shown here.
Place the Zeus Car on white surface and press the remote button. The Robot will move following the black line.
The Robot can also be operated in Obstacle Avoidance Mode. In this mode Zeus car will move forward. An ultrasonic module detects obstacles in front, if detected, the car turns left.
When the left obstacle avoidance module detects an obstacle, the car turns right, and when the right obstacle avoidance module detects an obstacle, the car turns left.
Apart from all this you can press all other buttons on the Remote to drift the Robot in left, right, forward, backward in any 8 direction. You may also start the cyclic motion of the Robot.
Controlled by SunFounder APP
To control Arduino ESP32 CAM Based Mecanum Wheel Robot from your mobile device, you must download the APP (SunFounder Controller) on your device, connect to the Zeus Car LAN, and then create your own controller on the APP.
Install SunFounder Controller from APP Store(iOS) or Google Play(Android).
Install this App on your mobile phone. After installation is complete, power on the Robot.
- Find
Zeus_Caron the WLAN of the mobile phone (tablet), enter the password12345678and connect to it.
Set the SunFounder Controller App as shown in the image below. Preset controllers are available for some products, so from App you can choose Zeus Car.
Connect and run the Controller. After the “Connected Successfully” message appears, click the button, then the camera footage will appear on the app, and now you can control your Zeus Car with these widgets.
Here are the functions of the widgets.
- Calibration(E): Turn on compass calibration.
- Stop(F): Stop all movements of the car.
- Set Heading(I): After placing the car in one direction with your hand, click on this widget to make this direction as the front of the car movement. This allows you to quickly specify a direction instead of slowly rotating the car to that direction with other widgets.
- Drift Enable(J): Activate the drift function.
- Move in All Directions(K): Control the car to move in all directions.
- Speech(M): Switching to speech control mode.
- Line(N): Switching to line track mode.
- Follow(O): Switching to follow mode.
- Avoid(p): Switch to obstacle avoidance mode.
- Control the Drection(Q): Used to control the head direction.
Using the Robot in Programming Mode for Learning
After you have experienced Play Mode, if you want to understand how each function is implemented, and then modify the effect according to your own ideas, you can come to read this programming mode carefully.
Every function in the programming mode chapter is made into a separate project, there are 17 of them. Each project has corresponding code and explanation, so you can see how each function works. This project uses the Arduino programming language, so you’ll need to install the Arduino IDE and related libraries before you can begin.
At the end you will be fully aware of Arduino & ESP32 CAM Based Mecanum Wheel Robot and learn how the Robot works and its applications.






































