Buy from OSOYOO | Buy from USA | Buy from UK | Buy from DE | Buy from IT | Buy from FR | Buy from ES | ここでご購入を! |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Buy from OSOYOO | Buy from US | Buy from UK | Buy from DE | Buy from IT | Buy from FR | Buy from ES | ここでご購入を! |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
In this lesson, we will install an ultrasonic sensor on the robot car and program the car to keep some distance of object to move.
You must complete lesson 1 (assembling the car) before you continue on with this lesson.
No. | Picture | Device | Qty. | Accessories | Link |
1 | ![]() |
Ultrosonic Sensor | 1 | M1.4*8 Screw x 4 M1.4 Nut x 4 |
Click here to buy |
2 | ![]() |
Servo Motor | 1 | M2.2*8 Self Tapping Screw x 2 M2*4 Self Tapping Screw x 1 |
Click here to buy |
3 | ![]() |
Mount Holder for Ultrasonic Sensor | 1 | M1.4*8 Screw x 4 M1.4 Nut x 4 M2*4 Self Tapping Screw x 1 |
Click here to buy |
4 | ![]() |
Buzzer Sensor Module | 1 | M3 Plastic Screw x 1 M3 Plastic Nut x 1 M3 Plastic Pillar x 1 |
Click here to buy |
5 | ![]() |
20pin 15cm Female to Female Cable | 1 | Click here to buy |
Step 1: Install the smart car basic framework as per Lesson 1 . If you have already completed installation in Lesson 1 , just keep it as is.
Step 2: Install servo motor at the front of car chassis with 2pcs M2.2 * 8 Self Tapping Screws as following:
Step 3: Install ultrasonic module to mount holder with 4pcs M1.5 * 8 screw and M1.5 nuts
Step 4: Install mount holder for Ultrasonic Module on servo motor with M2 * 4 Self Tapping screw
Step 5: Install buzzer module on car chassis with 1 pc M3 plastic screw, M3 plastic pillar and M3 plastic nut
Step 6: Connect SG90 servo motor to OSOYOO Motor Shield as following diagram (Remember : DO NOT remove any existing wires installed in Lesson 1 ) :
Step 7: Connect ultrasonic module with OSOYOO Motor Shield as below connection diagram:
Step 8: Connect buzzer module with OSOYOO Motor Shield as below connection diagram
Open-source Software(IDE) |
![]() |
Download 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 IDE (If you have IDE version after 1.1.16, please skip this step). Download IDE from https://www.arduino.cc/en/software , then install the software.
Step 2: Download sample code from Lesson 4 sample code , unzip the download zip file lesson4.zip, you will see a folder called lesson4.
Step 3: Connect OSOYOO Basic Board for Arduino to PC with USB cable, Open IDE -> click file -> click Open -> choose code “lesson4.ino” in lesson4 folder, load the code into OSOYOO Basic Board for Arduino. (Notice: Shut off your battery or Unplug your power adapter when upload sketch code to OSOYOO Basic Board for Arduino.)
Step 4: Choose corresponding board/port for your project,upload the sketch to the board.
Step 5: Ultrasonic sensor servo initial direction alignment
After power on the car, you will hear a long beep sound, then the servo will make some movement and finally stops at a direction for 2 seconds.During this first 2 seconds, you must make sure the Ultrasonic sensor(two eyes) is facing straight forward.
If it is not straight forward, you should turn off the car immediately and remove the sensor from servo, reinstall it and make it facing straight forward direction as following picture.
Otherwise the obstacle avoidance program will not work properly.After adjusting sensor direction, power on the car again. After hearing the long beep, the sensor should face front same as following picture. If its direction is not straight forward, turn off the car and do direction alignment again.
Turn on the car, move an object or your hand in front of the ultrasonic module, and then the car will move in some distance of object or your hand. when you close the car, the car will move back, just as it says don’t touch me.
When object or your hand leave the ultrasonic module, the car will stop moving.
DownLoad Url osoyoo.com
You must be logged in to post a comment.
What kind of nuts do you need to fasten the mount holder onto the ultrasonic sensor?
It uses M1.5 nuts to fasten the mount holder onto the ultrasonic sensor. It is packed with M1.5*8 screws.
Would M.16 or M.14 nuts work as well?
I’m asking because these nuts loosen over time, and they’re very hard to find when they fall.
Is it possible to find these online as replacements?
Hi, please provide your order No. and address.
I’ll send the replacement to you ASAP.
702-4109202-2332257
****
Missisauga, Ontario LPX 1P7
Canada
By the way, Is the replacement free?
and when can I expect these to arrive?
OK, I’ll send the replacement to you ASAP for free.
It will take 10-25 days to reach your side.
Elaine
everytime i try to upload the code to the basic board it say:savrdude: stk500_recv(): programmer is not responding
I had a similar problem with Lesson 2: IR remote controller. In the end, I removed the OSOYOO motor shield from the Arduino Uno. I was then able to load the sketch without any errors. After I reattached the OSOYOO motor shield, it worked with the IR remote controller. I’m currently having problems with Lesson 3, just like one or two others that have reported the robot car will not move, but with a little thinking and ingenuity given time, I’m hoping to solve that problem too!
hi, Alan,
do you mean that your lesson 2 works well but lesson 3 not working? Do you have any error message when you upload lesson 3 code?
The message I had for Lesson 2 was the same as Lausofia “stk500_recv(): programmer is not responding”. What I’ve discovered for Lesson 3 is that you need a full charge of the 9v battery to power the robot. The 9V ASDA battery that I was using was not run down a bit, so very little happened on the black line, Sometimes the robot moved forward a little, sometimes in circles as only one of the wheels responded. When I fully charged the Lithium Battery provided with the kit (by the way, an excellent idea to directly charge the battery now with a cable to a charging plug), I got a more solid reaction, and I viewed forward movement after it followed the black line, but some circulating motions too, which were not required. This did not last long though, so the battery required charging again. In my case, there is a direct relation between the weight of the robot and the battery charge to move it when coupled to the sensor. This may not be the case with other students following this course, as they might be able to run the robot car over a smoother surface than mine, hence less friction.
I’m also following the Udemy “Hands-On Robotics with Arduino, Build 13 Robot Projects” course. The instructor’s robot, which is similar to your robot car (but the course is not as sophisticated), is powered by two 9V batteries. Did the instructor decide to include two powered batteries as a result of previous experimentation? https://www.udemy.com/course/robotics-for-beginners-build-time-control-robot-from-scratch/
With Lesson 4 I switched off the battery (removing it). But I had the message “stk500_recv(): programmer is not responding” again, on downloading the sketch.
I removed the OSOYOO motor shield from the Arduino Uno and I was then able to download the sketch without any errors. After I reattached the OSOYOO motor shield, the robot car operated a little erratically at first, but then after several attempts of switching ON, observing, switching OFF again, and repeating the procedure, then, on switching ON, the electronics and sketch behaved as described in the FINAL TESTING section. Thank you!
based on your description, we believe your motor shield might be burned. please email us your order number and address to [email protected], we will send you replacement.
It seems that the UNO board has some problem. Please send your order number and address to [email protected], we will give you solution.
Hello, whenever I turn on the robot it moves forward continuously without doing anything. It also doesn’t ever stop.
Everything is plugged in the right ports the the wires are firm. What can I do to fix this?
are you talking about lesson 1 or lesson 4? check if your wires on the two sensors connect properly.