Project 2 - Measuring the distance of an object using ultrasonic sensor and also smoothen the sensor data using moving average filter
Project Overview
This project focuses on implementing code for measuring the distance of an object using the Ultrasonic Distance Sensor (28015 Ping) and applying a Moving Average Filter to smooth the sensor data.
Goals
- Distance Measurement: Accurately measure the distance to an object in inches using the Ultrasonic Distance Sensor.
- Data Smoothing: Use a Moving Average Filter to reduce high-frequency noise in the sensor readings.
Key Highlights
- Distance Calculation: The project involves calculating the distance based on the time it takes for the ultrasonic waves to travel to the object and back.
- Data Filtering: Implementing a Moving Average Filter, which averages a set number of recent data points to produce a smoother output, thus enhancing the reliability of distance measurements.
Deliverables
- Distance Measurements: The primary output will be the calculated distance to the object, displayed in inches.
- Filtered Data: A refined version of the sensor data that eliminates noise and provides a smoother output using the Moving Average Filter.
Expected Outcomes
- Understanding Ultrasonic Sensors: Students will gain hands-on experience with the Ultrasonic Distance Sensor (28015 Ping) and learn how it operates.
- Hardware Setup Knowledge: Students will learn how to connect two Arduinos to the sensor and manage data flow.
- Data Processing Skills: Participants will become familiar with techniques for filtering data, specifically through the Moving Average Filter, and understand its importance in obtaining accurate measurements.
This project not only teaches the practical application of ultrasonic sensors but also emphasizes the significance of data processing in real-world applications.