I.Objective
II.Parts and Devices
III.Hardware Installation
IV.Circuit Connection
V.Software Installation
VI.How to play

Mecanum Wheel Robot Car Full Package (with 18650 batteries)

Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

Mecanum Wheel Robot Car  Kit Metal Chassis

Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

18650 batteries (3.7V) x 2

Battery charger

(the metal chassis kit don’t include the batteries,click it to buy it separately)

Above robot cars are controlled by Arduino. if you have raspberry pi board, actually the robot car can also be controlled by Raspberry Pi. You can visit the following link to learn basic movement with raspberry pi.
link- https://osoyoo.com/?p=31428

Download PDF Tutorials:

If you received 2x model X motor driver and black acrylic board, please download the V1.1 manual.
https://osoyoo.com/manual/V1.1metal_mecanumcar.pdf

If you received 2x model X motor driver and transparent acrylic board, please download the V1.2 manual.
https://osoyoo.com/manual/V1.2metal_mecanumcar.pdf



Mecanum Omni wheel is a very powerful wheel technology which allows robot car make omni-directional movement( parallel shift to left and right).

In this project, we will show how to use Arduino to control an Osoyoo Brand Mecanum wheel robot car.

OSOYOO Mecanum Wheels Robotic Car Chassis x 1 (2xleft-wheels/2xright-wheels and Motor x 4)
OSOYOO MEGA2560 board fully compatible with Arduino
OSOYOO V1.3 Wifi Shield x 1
OSOYOO Model X motor driver x 2
OSOYOO HC02 Bluetooth Module
OSOYOO battery box x 1
18650 batteries(3.7V) x 2  (the kit don’t include the batteries,click it to buy it separately)

Specifications:



STEP1. Install the metal holder on metal chassis with 16pcs M3.5*12 screws, M3.5 rubber rings and M3.5 nuts.

STEP2. Installing 8pcs M3*6 screws as per the following red box.

 

STEP3. Install the jackscrews on al-alloy coupling, please tighten jackscrews to fix the al-alloy coupling on motor.
The shaft from the motor has a flat area on it. Make sure that the jackscrew was positioned on this flat, and tightened both screws on the shaft.

STEP4. Install the 4 mecanum wheels on al-alloy coupling with 4pcs M2.5*10.

There are two types of Mecunum wheels, left and right Mecunum wheel; the difference between them is the orientation of rollers. For A mecunum wheel, as shown below, rollers are orientated from lower right to upper left. Rollers for B wheels are installed in the opposite way.

A correct configuration requires each of four wheels is set in the way as shown below, where the rotation axis of each wheel’s top roller points to the center of the platform. Please notice that all the dynamic analysis and prewritten codes are based on this configuration.


STEP5. Install the 16pcs M3 plastic pillars and screws on acrylic chassis.

STEP6.Install 1pcs osoyoo mega2560 board, 2pcs model x motor driver board and 1pcs voltage meter on acrylic chassis with 12pcs M3 plastic nuts.

STEP7.Install battery box with 4pcs M3x10 screws and nuts.

STEP8.Install the acrylic chassis on metal chassis.Please note the front and back of acrylic chassis and metal chassis.

STEP9. Insert OSOYOO wifi shield into arduino Mega2560 board as following pictures.



Before connect wires, make sure you have inserted OSOYOO Wifi Shield onto MEGA2560 board already.

STEP10. connect 4 motors to 2 model X driver board as per the following pictures.

STEP11.Front Model X board IN1,IN2,IN3,IN4 pin connect to D22,D24,D26,D28

Caution:
When insert/remove the 6-pin parallel cable plug into Model X 6-pin male socket,  please hold the black plastic pin-holder to do operation. Never drag the wires to pull the plug out of the socket, otherwise it will damage the wires.

STEP12. Left Model X board IN1,IN2,IN3,IN4 pin connect to D5,D6,D7,D8.

STEP13.connect the voltage meter to left model-x motor driver board with 3pin female to female cable.

STEP14. Connect two model x motor driver board with 2pin XH2.54 female cable, connect XH2.54 female cable and the DC cable from 18650 battery box to right model x motor driver board.



Open-source Arduino
Software(IDE)
Download Arduino IDE here:
https://www.arduino.cc/en/Main/Software?setlang=en
7 zip is a free zip
utility that un-zips zip files
Download 7zip here for free
https://www.7-zip.org/

Step 1: Install latest Arduino IDE (If you have Arduino IDE version after 1.1.16, please skip this step). Download Arduino IDE from https://www.arduino.cc/en/Main/Software?setlang=en , then install the software.

Step 2: Download https://osoyoo.com/driver/mecanum_metal_chassis/for_mega2560/metal-2560-lesson1-reverse.zip, unzip the download zip file lesson1-reverse.zip, you will see a folder called lesson1-reverse.zip.

(or Download https://osoyoo.com/driver/mecanum_metal_chassis/for_mega2560/metal-2560-lesson1.zip, unzip the download zip file lesson1.zip, you will see a folder called lesson1 .)

Step 3: Connect mega2560 board to PC with USB cable, Open Arduino IDE -> click file -> click Open -> choose code “lesson1.ino” in lesson1 folder, load the code into arduino.

Step 4: Choose corresponding board/port for your project,upload the sketch to the board.


Disconnect Arduino from PC, put battery into battery box. When you put the car on the ground and turn on the switch on OSOYOO Uart WIFI shield V1.3 and the switch on battery box if you install battery box for 18650.
The car should Forward→Backward→Left turn→Right turn→
Right Parallel Shift→Left Parallel Shift→
Down Left Diagonal→ Up Right Diagonal→
Up Left Diagonal → Down Right Diagonal, then stop.

We have two type of motors. Most of our cars are made of Type A motors and a few of them are Type B.  Type B motor rotates at reverse direction of Type A motor.

After running Lesson 1 code, the Type A car will move

Forward→Backward→Left turn→Right turn→
Right Parallel Shift→Left Parallel Shift→
Down Left Diagonal→ Up Right Diagonal→
Up Left Diagonal → Down Right Diagonal

If you Mecanum  car doesn’t move as per the above sequence, then your motor might be Type B. When type B car is running lesson 1 default sketch, its moving sequence is:

Backward→Forward→Right turn→Left turn→
Left Parallel Shift→Right Parallel Shift→
Up Right Diagonal→Down Left Diagonal→
Down Right Diagonal→Up Left Diagonal

It is important to test whether your car is Type A or Type B. Our default code in all the 5 lessons   are designed for Type A motor.

If your car is Type B, then you need use reversed sketch code as following, otherwise the project might not work properly:
Lesson 1 reverse sketch: https://osoyoo.com/driver/mecanum_metal_chassis/for_mega2560/metal-2560-lesson1-reverse.zip 
Lesson 2 reverse sketch: https://osoyoo.com/driver/mecanum_metal_chassis/for_mega2560/metal-2560-lesson2-reverse.zip
Lesson 3 reverse sketch: https://osoyoo.com/driver/mecanum_metal_chassis/for_mega2560/metal-2560-lesson3-reverse.zip
Lesson 4 reverse sketch: https://osoyoo.com/driver/mecanum_metal_chassis/for_mega2560/metal-2560-lesson4-reverse.zip
Lesson 5 reverse sketch: https://osoyoo.com/driver/mecanum_metal_chassis/for_mega2560/metal-2560-lesson5-reverse.zip