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.
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.
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
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.