Buy from US | Buy from UK | Buy from DE | Buy from IT | Buy from FR | Buy from ES | Buy from JP |
In this lesson, we will add 5 black/white tracking sensors to the framework built in Lesson 1. If you have not completed installation in Lesson 1, please review Lesson 1
The software in this lesson will read data from these 5 black/white tracking sensors and automatically guide the smart car to move along the black track line in the white ground.
Hardware Installation:
Step 1: Motor driver(Model-X )pin installation.
Start the installation from previous status of Smart Car Lesson 1 . If you have installed Lesson 2 or 3 no need change anything, just keep the hardware wire connection as is.
Step 2: Remove screws on copper pillars and install 5pcs tracking sensor modules at the front of lower car chassis with 5pcs M2.5 plasctic screws, M2.5 plastic pillars and M2.5 plastic nuts. Make sure that every sensor head is over the gaps at the front side of lower car chassis so that the sensor can detect black lines in white ground.
Step 3: From left to right, connect the D0(D zero) pin in tracking sensor module to A0, A1, A2, A3, A4 pin in UNO board. Use 1pin male to 5 pins female jumper wires to connect VCC and GND of 5pcs tracking sensor modules. Connect VCC of tracking sensor module to 5V in UNO board, GND to GND. As the following photo shows (Remember : DO NOT remove any existing wires installed in Lesson 1 ):
Step 4: Fix the screws on copper pillars to connect upper chassis to lower chassis.
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 Lesson 4 tracking smart car sample code from https://osoyoo.com/driver/v2smartcar-lesson4.zip , unzip the download zip file smartcar-lesson4.zip, you will see a folder called smartcar-lesson4 .
Step 3: Connect UNO R3 board to PC with USB cable, Open Arduino IDE -> click file -> click Open -> choose code “smartcar-lesson4.ino” in smartcar-lesson4 folder, load the code into arduino. (Notice: Shut off your battery or Unplug your power adapter when upload sketch code to Arduino.)
Step 4: Choose corresponding board/port for your project,upload the sketch to the board.
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 on when sensor is above white ground, and the signal LED will turn off when the sensor is above black track
Prepare a black track (the width of the black track is more than 20mm and less than 30mm) in white ground. Please note, the bend angle of track can’t be larger than 90 degree. If the angle is too large, 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.
DownLoad Url osoyoo.com
You must be logged in to post a comment.
I am having some trouble with this lesson. The car seems to run away from black, rather than trying to stay on the black track. It treats it like a wall. Is this code related or something in the sensor set up? I have double checked all the wiring connections.
Thank you.
Do you adjust the sensitivity of tracking sensor modules before running? Are you willing to send a video and send to my email: [email protected]?
Could incorrect connections damage the IR sensors permanently? Mine are not working after working b4. I accidentally put the pins incorrectly. I fixed it, but the IR sensors are not working.
What do you mean “after working b4”? Do you test Lesson 1 or other lessons?
Do you adjust the sensitivity of tracking sensor modules before running? Are you willing to send videos or photos to my email: [email protected]?
bonjour,
j’ai un problème avec le robot, il ne détecte pas e noir mais que 2 sur 5 detectent mes doigts… je n’arrive pas a ajuster la sensibilitée.
comment faire ???
cordialement
Please follow the following step to 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 on when sensor is above white ground, and the signal LED will turn off when the sensor is above black track