loading

Since I can remember I always wanted to build a mecanum wheel robot. The mecanum wheel robotic platforms available on the market were a little too expensive for me so I decided to build my robot from scratch.

Like no other robot meacanum wheel robot can move across without any difficulty. This feature makes it unique and allows for easy maneuvering in tight spaces without the need to rotate in place.

Well, it's time to get down to work!

Parts needed in this project:

  1. Arduino Mega 2560 x1
  2. TB6612FNG Dual Motor Driver Carrier x2
  3. HC-06 bluetooth module or similar x1
  4. Breadboard (min size) x1
  5. Li-Po batteries: 7.4V 1800 mAh and 11.1V 3000 mAh x1
  6. SKYRC iMAX B6 Mini battery charger x1
  7. DC motor 12V x4
  8. Mecanum wheel x4
  9. Jumpers and cables
  10. Nuts and bolts
  11. Chassis made of plastic

Step 1: Building Robot Chassis

The first thing to do was to cut a piece of plastic plate (153x260 mm). In the next step I screwed the dc motors placed in a metal tube to the plastic base. Instead of 2 metal tubes you can also use 4 metal holders for dc motors. The last step in robot chassis construction was fitting the wheels.

Step 2: Fitting the Mecanum Wheels

Mecanum wheels should be fitted in the correct way. A correct configuration requires each of four mecanum wheels is set in the way as shown in above picture. The rotation axis of each wheel's top roller should cross the center of the robot chassis (point C).

Step 3: Connection of Electronic Parts

The brain of the system is Arduino Mega 2560. As a motor driver I used two TB6612FNG dual motor driver carriers. This motor controller has sufficient range of acceptable input voltages (4.5V to 13.5V) and continuous output current (1A per channel). Robot is controlled via bluetooth using Android application. In this project I used a popular inexpensive bluetooth module HC-06. The electronic system is equipped with two power sources. One for supplying the DC motors (LiPo battery 11.1V, 1300 mAh) and the other to supply Arduino and bluetooth module (LiPo battery 7.4V, 1800 mAh).

All connections of electronic modules are the following:

  1. Bluetooth (e.g HC-06)-> Arduino Mega 2560
    • TXD - RX1 (19)
    • RXD - TX1 (18)
    • VCC - 5V
    • GND - GND
  2. TB6612FNG Dual Motor Driver -> Arduino Mega 2560
    • RightFrontMotor_PWMA - 2
    • LeftFrontMotor_PWMB - 3
    • RightRearMotor_PWMA - 4
    • LeftRearMotor_PWMB - 5
    • RightFrontMotor_AIN1 - 22
    • RightFrontMotor_AIN2 - 23
    • LeftFrontMotor_BIN1 - 24
    • LeftFrontMotor_BIN2 - 25
    • RightRearMotor_AIN1 - 26
    • RightRearMotor_AIN2 - 27
    • LeftRearMotor_BIN1 - 28
    • LeftRearMotor_BIN2 - 29
    • STBY - Vcc
    • VMOT - motor voltage (4.5 to 13.5 V) - 11.1V from LiPo battery
    • Vcc - logic voltage (2.7 to 5.5) - 5V from Arduino
    • GND - GND
  3. TB6612FNG Dual Motor Driver -> DC Motors
    • MotorDriver1_A01 - RightFrontMotor
    • MotorDriver1_A02 - RightFrontMotor
    • MotorDriver1_B01 - LeftFrontMotor
    • MotorDriver1_B02 - LeftFrontMotor
    • MotorDriver2_A01 - RightRearMotor
    • MotorDriver2_A02 - RightRearMotor
    • MotorDriver2_B01 - LeftRearMotor
    • MotorDriver2_B02 - LeftRearMotor

Step 4: Arduino Mega Code

The full code for this project is available at GitHub: link

The Arduino program checks in the main loop - "void loop()" whether the new command (character) has been sent from Android app via bluetooth. If there is any incoming character from bluetooth serial the program starts execution of "void processInput() " function. Then from this function depending on the character a specific direction control function is called (e.g. for "r" character function "void moveRight(int mspeed)" is called). From a given direction control function each motor is set to the desired speed and direction of rotation by function "void motorControl" so that the robot move in the desired direction.

You can also use my other code example for Arduino Mega 2560 that allows you to control a mecanum wheel robot using voice commands: link. Additionally you will need to download BT Voice Control for Arduino app from Google Play.

Step 5: Control of the Mecanum Wheel Robot

Every mecanum wheel has free rollers, which make a 45 degree angle with the wheel's axis. This wheel design allows robot to move in any direction as shown in above figure. The blue and green arrows show the direction of the friction forces acting on each mecanum wheel. By moving all four wheels in the same direction we can get forward or backward movement. Controlling the two wheels on one diagonal in the same direction and other two wheels in the opposite direction we get sideways movement as shown in the second figure (move right).

You can download my Android app that allows you to control mecanum wheel robot from Google Play: link

How to use the Android app:

  • tap menu button or 3 vertical dots (depending on the version of your Android)
  • select the tab "Connect a device"
  • tap on the "HC-06" tab and after a while you should see the message "Connected to HC-06"
  • after connecting, you can control your robot
  • if you don't see your bluetooth device HC-06 tap "Scan for devices" button
  • on the first use pair your bluetooth devices by entering the default code "1234"

If you would like to see my other projects related to robotics please visit:

<p>Hi, how did you create the Android App? I would like to add some custom buttons. Thanks in advance!</p>
<p>hello, how do I run the code on the arduino? please help</p>
<p>how i control by robo by my android blue tooth???</p><p>do i need any extra app???</p>
<p>Hi, I appreciate these tutorial. I tried to connect my smartphone to bluetooth module but there is an error. They said 'read failed, socket might closed or timeout, read ret: -1'. I think I did all the things correctly. How can I connect bluetooth? My phone is galaxys4, android 5 version. Thx for reading</p>
<p>Hi, tap bluetooth icon (on your phone):</p><p>1 Do you see your bluetooth device HC05/06 on the list? If yes tap again on it's name and pair with your phone (type default PIN for your bluetooth module e.g. 1234)</p><p>2 If you still can not connect please check settings of your HC05/06 module - especially the baud rate (It should be set to 9600)</p><p>3 Make sure that your bluetooth module HC05/06 is compatible with 5V (some modules require 3.3V) </p><p>Check out these instructions If you don't know how to do it:</p><p>https://www.instructables.com/id/Arduino-AND-Bluetooth-HC-05-Connecting-easily/</p><p><a href="https://www.instructables.com/id/AT-command-mode-of-HC-05-Bluetooth-module/" rel="nofollow">https://www.instructables.com/id/AT-command-mode-of...</a></p><p><a href="https://www.instructables.com/id/Modify-The-HC-05-Bluetooth-Module-Defaults-Using-A/" rel="nofollow">https://www.instructables.com/id/Modify-The-HC-05-B...</a></p>
<p>Thank you So much!!! I Finally solved problem!! Have a great day!!</p>
<p>Hello, I lloved this project and built it up.But, with vex motors.</p><p>It is not working with this code. I searched and found they need frq by 127 instead of 255. I switched the values but still not working.</p><p>Is there any way you can help?</p>
<p>setting mspeed=255 means that the motor speed (and voltage) is maximal. By changing this value you change PWM and motor voltage and its speed (e.g. if you set mspeed=127 you will get about two times less output voltage and motor speed). Please make sure that you use two wire DC motors, this example does not work with servos! </p>
<p>hi, what are those wires that come from the center hole of the metal tube ? 4 of them are the alimentation for the motors but what are the other wires ? Thanks for the project,it's very interesting :) </p>
<p>Hi, these are the connectors from encoders - not used in this project</p>
<p>thanks :) </p>
<p>Thanks again i did all the connections but the bluetooth module isn't getting connected to the robot control app</p>
<p>At this link: <a href="https://www.instructables.com/id/RC-car-hack-bluetooth-controlled-via-Android-app/step2/Arduino-Code/#step3" rel="nofollow">https://www.instructables.com/id/RC-car-hack-bluetooth-controlled-via-Android-app/step2/Arduino-Code/#step3</a> it is explained how to connect for the first time with a bluetooth module using my Android app.</p>
<p>thankyou so much</p>
<p>thanks!!</p><p>i wanted to ask whether the 5v and the VCC in the circuit are the same.</p><p>also how to connect the multiple gnd and vcc to arduino?</p><p>can i use the 2 lines in top part of breadboard to connect gnd and vcc, and can i use the 2 gnd in power section of arduino together?</p>
<p>Yes all VCC = 5V, you can use breadboard to connect all GND and VCC pins (in two separate lines) and then wire single Arduino pin GND with breadboard GND line and single Arduino pin 5V with breadboard 5V(VCC) line.</p><p>All Arduino GND pins are connected together so it does not matter whether you use one or more GND pins available on the Arduino board. </p>
Can u pls send me some clear photos of connections of the circuit.<br><br>I'll be most thankfull to you
<p>I've added a wiring diagram showing how to connect bluetooth module with Arduino Mega - see step 3 </p>
Bluetooth (e.g HC-06)-&gt; Arduino Mega 2560<br>TXD - TX1 (19)<br>RXD - RX1 (18)<br>VCC - 5V<br>GND - GND<br><br>In this connection the end TX1 is named as 18 and the one with RX1 is named 19.<br><br>So, how should i connect the wires.
This is a very nice write-up. It can be a good starting point for building an more complicated system (e.g. one that uses other sensors and that can be made to do more complicated actions). I hope you continue to expand on this.<br><br>Do you plan to open source your Android app at some point? (Play says it's not compatible with my G6 so it won't let me install it.)
<p>I've updated my Android app. Now it works with the latest Android 6.0 </p>
<p>Yes I plan to develop this project. This Android App is quite old (I wrote it for my earlier project) To be able to install it you need a mobile phone or tablet with Android 2.2-4.4. I plan to write a new app specially for this project, but I have little free time (only weekends), so please be patient ;) Alternatively, you can use another of my Android application to control the robot via wifi - https://www.instructables.com/id/Omni-wheel-mobile-robot-IoT/ Wifi app works with the newest Android.</p>
<p>i am trying to do it.but its code is showing some errors .....</p><p>how to define serial1 in the code.please guide</p>
<p>Hi,</p><p>You probably compiled the code for different Arduino board in Arduino IDE. Please make sure that you have selected the Arduino Mega 2560 board before compiling the code.</p>
<p>o.k thanks a lot.now it is working.........</p>
<p>mhh.......that was the mistake............thanks a lot for correction:)</p>
<p>This work awesome</p>
<p>In your opinion, how well could these wheels scale if I wanted to build a larger robot that could operate in an off-road environment?</p>
<p>This video shows a sample industrial application https://www.youtube.com/watch?v=2O8Cj0XiRIM</p>
<p>This type of robot is rather not suitable for driving in difficult terrain (especially when driving across) see this video https://www.youtube.com/watch?v=_f_x0RgVzfc </p>
<p>Me encanta el proyecto...&iquest;donde se pueden encontrar esos motores y sus dos ejes solidarios?. Quisiera montar uno y que llevara detector de distancia de ultrasonidos para no chocar</p><p>Muchas gracias</p>
Where did you buy your wheels? On eBay they are really expensive.
<p>I bought them at AliExpress.com for 70$ (4 wheels)</p>
<p>Can you supply me with a web address?</p>
AndyMark is the primary parts provider for most FIRST robotics teams. They carry a ton of parts and are very reliable. Their mechanum wheels list can be found at http://www.andymark.com/Mecanum-s/53.htm
<p>sure, here is the link <a href="http://www.aliexpress.com/item/60mm-Aluminum-robot-kit-Compatible-Mecanum-Wheel-Set-2-Left-2-Right-basic-14159/2045792105.html" rel="nofollow">http://www.aliexpress.com/item/60mm-Aluminum-robot...</a></p><p>now they cost over 80$</p>
These types of wheels are pretty expensive! But its soon Christmas ;)
Nice robot platform! I'm going to have to keep this one in mind for my ultimate robot project, a robotic lawn mower. I wonder how well those wheels work on grass?
You do not want to use mechanum wheels on grass. They can rip it up if you move in a way that uses the individual rollers. You will get crud in the rollers which can impede the proper wheel function. Mechanum wheels are best used on surfaces that do not have any debris or anything that can become debris.
<p>Thanks for the kind words, I don't know how these wheels will work on the grass. I've just bought them and you know in my city is still raining so for the moment I have no way to check it out. Maybe I'll take the robot for tests to the park near my house at the weekend. </p>
<p>Demasiado bueno... l&aacute;stima que no manejo C, ojal&aacute; fuera en basic.</p>
<p>gracias</p>
Very nice!
<p>Thx!</p>
Nice, but this is more an RC car than a robot
<p>You're right, it is rather robot platform, but I didn't want to write too long and complicated instructions. I focused mainly on explaining how the mecanum wheel robot moves and anyone can add sensors and other things and expand this project.</p>
<p>my First RoboticsCompetition team used those last year they are very useful for maneuvering around enemy robots but they allow your robot to be pushed around by robots with standard wheels</p>

About This Instructable

35,889views

474favorites

License:

Bio: I'm an enthusiast of robotics :)
More by silver_a:Remote Controlled Smart Robotic Arm Inspector Roomba 4WD All Terrain Arduino Robot for Everyone  
Add instructable to: