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

Mecanum Omni direction wheel is a very interesting wheel 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 to make some basic movement including go forward, backward, left turn, right turn, parallel left shift, parallel right shift etc.

This lesson also shows you how to install the chassis of this car and connect Arduino control signal wires to two model-X (L298N) driver board. This installation will be the start point of our other lessons.

OSOYOO Mecanum wheels robotic car chassis x 1 (2xleft-wheels/2xright-wheels and Motor x 4)
OSOYOO Mega2560 board fully compatible with Arduino UNO/Mega2560 x 1
OSOYOO V1.0 Wifi shield x 1
OSOYOO Model X motor driver x 2
OSOYOO battery box x 1
Model X to Model X connection white cable (2 pin XH.25 female to female) x 1
18650 batteries(3.7V) x 2 +charger (the kit don’t include the batteries,click it to buy it from osoyoo store separately)

Picture 1: Size dimensions


Video made by our France Customer for Basic robot car assembly

Picture 2: Chassis screw location map (view from top)

Step 1) Install Cooper standoff on the chassis

Follow the picture below to install 4 copper standoff on the positions of the blue lines first, then fasten the 4 motors onto the 4 standoffs. Make sure the motor directions must be correct(exactly same as picture)!

Picture 3: Motor fasten screws location map (view from bottom of the chassis)

Picture 4: Motor installation guide map

Step 2) If you have already installed motor and standoff in Step 1, please skip this step and go to Step 3

The four motors have  two types of standoff positions:

Type  A have standoffs installed on the RED wire  side of the   motor (see picture 5 top two motors)
Group B have standoffs installed on the Black wire side of the motors(see picture 5 lower two motors)

Picture 5: distinguish  two type of motors

Picture 6: Type A and Type B motors location map in chassis

Picture 7: Wheel installation map

Step 3) Connect wheels to the motors

The Mecanum wheel has some sub-wheels on the main wheel. The four Mecanum wheels  have two types by the sub-wheel directions. Check the type A wheel and type Wheel by following picture 8 left side . You must 100% sure that correct type of wheel is installed into correct position as per   picture 8 right side, the rolling direction of each wheel will determine the whole car moving directions showed in the picture.

Picture 8: Two types of Mecanum wheel and their installation position in the car

Picture 9  different rotation combination of 4 wheels will result in different car movement directions. Following pictures shows how they works.

Step 4) Install Mega2560, Model X boards(L298N), Wifi shield  onto the chassis

Picture 10: MEGA2560, Model X, voltage meter  guide

Picture 11: Battery box installation location

Picture 12: Wifi shield installation guide



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.

Picture 13: Connect Model X board (L298N) to  front motors

Picture  14: connect another model X board(L298N) to rear motors.

Picture 15: Connect Front Model X pins to MEGA2560

Note:  wire(purple wire) is connected to D22 which is located on the SECOND female hole from right in following picture 10. Many people treat the first hole as D22. THIS IS WRONG.

Picture 16: Front Model X board IN1,IN2,IN3,IN4 pin connect to D22,D24,D26,D28

Picture 17: Connect Rear model X control pins to Mega2560

Picture 18: Connect Model X to Voltage meter

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/mecanum-2560-lesson1.zip, unzip the download zip file lesson1.zip, you will see a folder called lesson2 .

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.

After running Lesson 1 code, the car will move

Forward/Backward
Left/Right Turn
Right Parallel Shift/Left Parallel Shift
Down Left Diagonal / Up Right Diagonal
Up Left Diagonal / Down Right Diagonal

If the car does not move as per this sequence , you need check the wire connection.