Lab 4: Measuring Distance with an Ultrasonic Sensor
Lab exercise No. 4 consists of 2 parts:
Lab 4: Part 1 - Measuring Distance with an Ultrasonic Sensor
During the first week, you will connect a small Ultrasonic Sensor to a Raspberry Pi computer to collect and write distance measurements to file. You will also perform a sensor calibration and explore the sensor’s capabilities
Lab 4: Part 2 - Measuring Distance with an Ultrasonic Sensor
During the second week you will finish up lab activities from the first week, add an LED to the circuit to produce a distance warning, and will use your setup to calculate the velocity of an object.
Lab 4: Understanding Your Code
Deliverables:
You will submit a joint lab report after completing both parts.
- Submit a complete lab report that includes your activities from both parts of the lab!
- Attach your modified code as an appendix to the lab report.
Tips for writing your lab report
Here are a few suggestions for what to include: (You must still include ALL rubric items for full credit)
- Background
- Provide background about
- the Raspberry Pi
- Ultrasound sensors and their measurement principle
- Include relevant equations for distance and velocity.
- Provide background about
- Methods: (Make sure that you describe the methodology you used to create the data for ALL presented results. )
- Describe your methodology for calculating distance.
- Include or reference the code used.
- Describe all experiments you conducted for distance measurements
- Describe your methodology for calculating velocity.
- Include the relevant portions of your code
- Describe all experiments you conducted
- Include Photos/ schematics of your setup (if applicable). Do the same for acceleration
- Describe your methodology for calculating distance.
- Results
- Lab 4.1 Deliverables:
- Graph with linear trend-line for measurements and estimate of offset.
- Minimum and maximum distance as described in the lab document
- Uncertainty of the system as described in the lab document
- How fast can you sample as described in the lab document
- Lab 4.2 Deliverables
Results for your velocity calculation
ImportantIf you were not able to do the velocity calculation during the lab, you should do the following:
- Calculate velocity based on the collected distance data for the moving object.
- If you don’t have that let me know.
- Update your lab 4.2 code as if you were to calculate the velocity and submit as part of methods AND clearly explain in the methods that velocities were calculated offline after the lab!
- Calculate velocity based on the collected distance data for the moving object.
- Discussion:
- Discuss your results appropriately
- Conclusion
- Lab 4.1 Deliverables: