Me456 Workshop1
Me456 Workshop1
11.03.2025
Goal:
The first assignment is about familiarizing with ultrasonic sensor and Arduino programming. A
simple code to move robot on a square path and reading ultrasonic sensor distance will be
implemented.
Prelab:
• Obtain one of the suggested sumo robot kits. Make sure you have at least one HC-SR04
sensors.
• Assemble robot parts by following instructions.
• Follow the instructions and complete an introductory example on interfacing HC-SR04
ultrasonic sensor at: https://projecthub.arduino.cc/Isaac100/7cabe1ec-70a7-4bf8-a239-
325b49b53cd4. Another tutorial at:
https://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/.
• Follow an Arduino motor control tutorial: https://www.youtube.com/watch?v=YkfBtjs8uWg
• Each group bring your kits and one notebook computer with necessary programs installed at
the Workshop to be held during the class time.
1
Hint:
Your codes will call the following functions:
• Serial.println() function sends text data which can be seen at “Serial Monitor”. Use 115200
baud transfer speed.
• You can define separate functions for forward, backward, left and right turns.
2. [+5 pts]. Ultrasonic sensor has a limited accuracy. Obtain a “calibration chart” of the ultrasonic
distance sensor. Using a tape measure, put the robot in front a wall at distances from 5 to 250
cm. Use the distance increments in the table below. Record the actual (by tape measure) and
the value given by the sensor. Plot a “calibration curve” and find a best-fit polynomial. Assess
the overall accuracy of the sensor (non-linearity error).
From distance (cm) To distance (cm) Increment (cm) Total measurements
5 20 1 16
25 100 5 16
110 250 10 15
3. [+4 pts] Prepare a short report (2-4 pages) explaining your codes, calibration chart and results.
Give a discussion on robot’s performance. Also record and submit a video of your robot
performing the assigned tasks. Submit your reports within one week of the workshop.