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 | ここでご購入を! |
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 | ここでご購入を! |
(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
In this lesson3, we will add a 5-Point tracking sensor module to the robotic car built in Lesson 1.The software in this lesson will read data from the 5-Point Tracking sensor module and automatically guide the smart car to move along the black track line in the white ground.
OSOYOO Mecanum wheels robotic car chassis x 1 (2x left-wheels/2x right-wheels and Motor x 4)
OSOYOO Mega2560 board fully compatible with Arduino x 1
OSOYOO V1.3 WIFI shield x 1
OSOYOO Model X motor driver x 2
OSOYOO 5-Point Tracking sensor module
OSOYOO Battery box x 1
18650 Batteries(3.7V) x 2
You must complete lesson 1 (assembling the car), before you continue on with this lesson.
Start the installation from previous status of Lesson 1 . If you have installed Lesson 1, no need change anything, just keep the hardware wire connection as it is.
Connect GND pin of tracking sensor module to GND of wifi shield;
Connect VCC pin of tracking sensor module to 5V of wifi shield;
Connect IR1,IR2,IR3,IR4,IR5 pins to A4, A3, A2,A1,A0 with 7pin female to female cable as the following photo shows (Remember: DO NOT remove any existing wires installed in Lesson 1).
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/ |
Adjust the sensitivity of tracking sensor modules.
Turn on and hold the car and adjust the potentiometer on the tracking sensor with cross screwdriver until you get the best sensitivity status: the signal indicate LED light will turn off when sensor is above white ground, and the signal LED will turn on when the sensor is above black track.
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-lesson3-5point.zip , unzip the download zip file lesson3.zip, you will see a folder called lesson3 .
or Download https://osoyoo.com/driver/mecanum_metal_chassis/for_mega2560/metal-2560-lesson3-5point-reverse.zip , unzip the download zip file lesson3.zip, you will see a folder called lesson3.
Step 3: Connect Mega2560 board to PC with USB cable, Open Arduino IDE -> click file -> click Open -> choose code “metal-2560-lesson3A.ino” in lesson folder, load the code into Arduino as following.
Step 5: Adjust the sensitivity of tracking sensor modules. Turn on and hold the car and adjust the potentiometer on the tracking sensor with cross screwdriver until you get the best sensitivity status: the signal indicate LED light will turn off when sensor is above white ground, and the signal LED will turn on when the sensor is above black track.
Prepare a black track (the width of the black track must be between 20mm and 30mm) in white ground. Please be noted that the bend angle of track can’t be too sharp otherwise the car will move out of the track.
Turn on the car and put the middle of tracking sensor module facing over black track, and then the car will move along the black track automatically.
To get better tracking performance result, motor power(speed) value should be adjusted properly as per battery level. If motor power(speed) value is too high, your car might run too fast and easy to get out of track. If motor power(speed) is too low, the car might not even move.
To adjust the motor power value, you need change the 3 constants : MID_SPEED, HIGH_SPEED,LOW_SPEED in line 13,14,15 in mecanum-2560-lesson3.ino sketch file. Their default values are 70,80,60 which are good when batteries are fully charged.
After batteries are running low, you might need to increase the value of these 3 constants. You can gradually add or reduce 10 each time on these values and compare which values have best tracking performance.
DownLoad Url osoyoo.com