Lab 4: Measuring Distance with an Ultrasonic Sensor

Lab exercise No. 4 consists of 2 parts:

Deliverables:

Important

You will submit a joint lab report after completing both parts.

  1. Submit a complete lab report that includes your activities from both parts of the lab!
  2. 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.
  • 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
  • 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

        Important

        If 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!
    • Discussion:
      • Discuss your results appropriately
    • Conclusion