Week 3 · Lesson 1 · 55 minutes
Read input ranges before choosing limits
I can use readings to choose a useful alert limit.
Planned lesson. Follow your teacher’s teaching order.
Task steps and checks
Collect readings only after the safety check
- If the sensors have arrived and the teacher has checked the unpowered circuit, record three bright and three dark readings from the approved LDR. Keep the distance and angle the same within each condition.
- If the teacher approves a potentiometer instead, record model low and model high. Label it SIMULATED INPUT. Dashboard sample numbers or browser predictions are practice, not sensor data.
Find a gap on the number line
- Find each minimum and maximum. If there is a gap, choose a lower ON and higher OFF limit in it. If ranges overlap or readings bunch near the top or bottom, ask for a setup check and repeat rather than forcing a threshold.
- Low range 850 to 920
- ON below 1400
- OFF above 1800
- High range 2300 to 2400
Check your result: ADC count means the board’s raw input number. For a 12-bit setup it can report 0–4095; this is not lux or a measure of accuracy.
Revised weekly handout pages: 7.
Materials
CampusLightAlert.ino, LDR divider or potentiometer, Serial Monitor. · Individual student workbook and evidence folder; paired hardware, individual answers
Resources
Vocabulary
- threshold
- a limit used to choose an action
See it
Watch
Watch how a light dependent resistor in a voltage divider gives a changing reading. Your ESP32 reports counts from 0 to 4095, so the numbers will differ.
LDR (LIGHT DEPENDENT RESISTOR) - Arduino tutorial #20YouTube
The video is on YouTube, which needs a VPN on most networks in mainland China. It is extra: the lesson works without it.
More examples and practice
Locate calibration in the original plan · 5 minutes
Locate the input-reading step in your plan. Save your own CampusLightAlert.ino copy. Build only the teacher-checked circuit and use the approved board/port profile.
Locate calibration in the original plan.
Model three readings per condition and ADC count limits · 8 minutes
The program reports ADC counts, not lux. The requested 12-bit count range is 0–4095, but count resolution is not measurement accuracy. Readings near the rails can saturate. Use repeated values from the actual setup.
Find the low and high ranges in the practice data and locate a gap on a number line. Discuss what overlapping ranges would mean. Work the practice example before revealing its solution.
Invented readings are low: 850, 900, 920; high: 2300, 2400, 2350. Are ON=1400 and OFF=1800 a plausible practice choice? What remains unproven?
Reveal reasoning
Yes: low readings are below 1400, high readings are above 1800, and ON is lower than OFF. This is a plausible choice for these invented ranges only. It does not prove lux accuracy or establish suitable limits for another setup; actual devices need their own readings and tests.
Students build/check and record high and low input ranges · 22 minutes
At one fixed setup, record three bright and three dark readings. With a potentiometer, record model high and model low instead. Keep the position and conditions consistent so the ranges mean something.
Complete page 7 with three actual readings per condition, ranges, a proposed limit and the reason. Label simulated input if used.
Practice
- Find the low and high ranges in the practice data and locate a gap on a number line. Discuss what overlapping ranges would mean.
- Complete page 7 with three actual readings per condition, ranges, a proposed limit and the reason. Label simulated input if used.
Compare ranges and choose justified thresholds · 15 minutes
Find the smallest and largest value in each condition. A useful gap allows lower ON and higher OFF limits between the low and high ranges. If ranges overlap or saturate, ask the teacher to adjust the setup and repeat measurement rather than forcing a claim.
Compare ranges and choose justified thresholds.
Identify any overlap or saturation · 5 minutes
Record the chosen limits and the reason based on your own data. Save the original readings; example code numbers are not a substitute for your measurements.
Why is a count of 2000 not a statement that the light is 2000 lux? Save the page and relevant evidence.
Why is a count of 2000 not a statement that the light is 2000 lux?
Week 3 Read and use the input
Do only the parts you did not finish in class. Write what really happened; if you did not test something, write NOT TESTED. This is one task for the week, and nothing else is due.
- Page 7: record three real readings for each condition, the ranges, your proposed limit and the reason. Label simulated input if you used it.
- Page 8: record real tests in the three regions using your limits. Save your version and write the evidence filename.
You are finished when: Pages 7 and 8 are complete and your code version is saved.
Why this matters: Limits chosen from real readings are what make your alert trustworthy.
- Hardware stays at school.
Revised weekly handout pages: 7, 8.
Choose limits from input readings weekly feedback guide
Task-specific feedback guide, not official IB descriptors or an automatic criterion grade.
- Calibration evidence
- Three readings per low/high condition, ranges and route labels are recorded honestly in ADC counts.
- Response logic
- ON is below OFF; low, high and between-limit behaviour are explained and tested.
- Version and explanation
- Own code and serial evidence support the selected limits and any measurement limitations.
| Band | Observable evidence |
|---|---|
| 0 | No usable readings or threshold explanation are available yet. |
| 1–2 | A few values or code edits are shown, but the input route, ranges or threshold reason is mostly unclear. |
| 3–4 | Readings and limits are present with some justification. One response region, state history or evidence reference needs clearer checking. |
| 5–6 | Repeated readings support the chosen ordered limits. The three regions are checked, the input route is labelled and code/serial evidence is saved. |
| 7–8 | The student uses measured ranges to justify limits and explains state retention, equality and any overlap or saturation. Tests and versions are traceable; simulated input and uncalibrated counts are not presented as physical light accuracy. |