Modified 2020-07-17 by Peyton Strong
Modified 2020-09-11 by Dev Ramesh
Student version (unknown ref duckiesky_high_school_student/sac2-sensing-calibration)
Requires:
Hardware -
Basestation
IR sensors
Multimeter
Graph paper or a computer with Excel
Previous Lesson - Introduction to Sensors
Result:
Knowledge -
Understanding that sensors don’t provide readings in standardized units or scales
The the specific nonlinearities of the IR sensor
Equation of a line and its use for linear approximation
How to interpolate
Skills -
Modified 2020-08-28 by Peyton Strong
ISTE: 5.c.: Collect data or identify relevant data sets, use digital tools to analyze them, and represent data in various ways to facilitate problem-solving and decision-making.
Modified 2020-08-28 by Peyton Strong
By the end of this lesson, students should have a completed Voltage vs. 1/distance graph.
Modified 2020-09-03 by Garrett Warren
25 min: In depth explanation of the IR sensor
25 min: Activity graphing the inputs and outputs of the IR sensor to linearize it and interpolate values using the equation of the line
5 min: Wrap up and explanation of the bigger purpose of this exercise
Modified 2020-04-16 by Garrett Warren
Modified 2020-09-03 by Garrett Warren
Teacher Materials
Already completed Voltage vs. Distance and Voltage vs. 1/distance graph to compare with students’ graphs. Feel free to make your own, or there are links to example graphs below.
Projector/ slides to show graphs if needed.
Classroom Set Up:
Teachers can write a DO NOW on the board that says “Start thinking about what you already know about Infared Sensors. What does that name make you think of?”
Each student should have a multimeter either on their desk or ready to be passed out, along with their IR Sensor.
Modified 2020-04-16 by Garrett Warren
Modified 2020-09-03 by Garrett Warren
25 minutes
Hook:
Using the student book material or the links listed below, explain what Infared (IR) Sensors are and how they work.
It might be useful to review what infared light is and where it can be found. What environmental factors could potentially alter our drone’s IR readings?
Possible discussion question:
Will there be a higher voltage emitted when the sensor is closer to the surface or further away?
There will be a higher voltage reading when the sensor is closer to the surface, because the infared light bounding back will be stronger the less distance it has to travel.
Exercise: Have your students use the multimeter to measure the voltage from their IR sensors at different distances away from the floor or their desks. This video an example of students doing this. Either on a piece of graph paper or in an Excel spreadsheet, have them record and plot this data with “height above ground (cm)” as the x-axis and “IR sensor voltage (V)” as the y-axis to identify a relationship between the two variables (they will come out to be the inverse transform). Then, they can calculate the distance between the surface and the sensor by using only the voltage.
Modified 2020-09-03 by Garrett Warren
25 minutes
Analyze the Data
What does the graph show about the uses and limitations of the IR sensor?
A particular voltage has at least two potential distances associated with it. Point out that the sensor stops working past a certain distance.
Emphasize that we have to make the assumption that the sensor is within the useful range, and that we have to enforce that it stays within that range when flying, so there will be a height limit when flying the actual drone.
Present the _voltage vs distance) graphs in the IR sensor data sheet. The data sheet is like an instruction book for a sensor: it contains information about the sensor written by the designer. By familiarizing students with the data sheet for the IR sensor, the goal is to promote students’ self-efficacy to learn about other sensors on the drone and on other robots.
Finally, use the linearization shown in the data sheet (voltage vs. inverse distance) to find the actual mathematical relationship between voltage and distance. Highlight that the data takes on the shape of 1/x, and then show a graph of voltage vs 1/distance.
Voltage = k/distance + p
Exercise: Have your students convert their own plot to be voltage vs 1/distance to see how linear it is. Notice that there’s an offset towards the right side of the graph where 1/x is larger (distance to the sensor is smaller).
Modified 2020-09-03 by Garrett Warren
10 minutes
Exercise: Using their linear equations from the above activity, students can now predict Voltage based on a specific Height and vice versa by interpolating within the graph. Put different heights on the board and see who can calculate the Voltage first with the equation, and then have students test it on the actual IR sensor.
Remind students that even though they used the equation of a line to interpolate and estimate certain voltages and distances, that there are specific nonlinearities of the IR sensor.
Explain how they calibrated the readings by putting them into a graph so they can estimate data in the middle since sensors don’t provide readings in standardized units or scales. We will add an ADC (Analog-to-Digital Converter) to allow our Rasberry Pi to read distance from our IR sensor.
Useful Resources and References