From USB to Field System — Battery-Powered ESP32 Water-Quality Monitor
Students move beyond a USB-powered classroom demonstration and build a protected, independently powered embedded system: managing energy, protecting components, conditioning analog signals, integrating digital and analog sensors, and collecting data that can be tested rather than merely displayed.
Learning Objectives
- Distinguish voltage, current, resistance, power, and battery capacity — and explain why a load draws current rather than a battery forcing its maximum current through every component.
- Use a multimeter to measure DC voltage, resistance, and continuity.
- Explain the functions of a switch, fuse, buck converter, pull-up resistor, and voltage divider.
- Adjust a buck converter before connecting sensitive electronics.
- Read a written wiring netlist and construct the circuit methodically.
- Install Arduino libraries, read digital and analog sensors, and combine sensor code.
- Format timestamped Serial output as CSV and import it into a spreadsheet.
- Design controlled tests and distinguish precision, accuracy, calibration, noise, and outliers.
- Improve a prototype using soldering, screw terminals, heat shrink, cable management, and strain relief.
Lesson Sequence
- From USB to field system — compare a USB LED circuit with a protected field-monitoring system; map energy and data flows.
- Electrical quantities and multimeters — measure voltage, resistance, and continuity; relate voltage, current, power, and capacity.
- Battery safety, switches, and fuses — build the protected battery-side circuit and pass the first inspection gates.
- Step-down conversion — wire and adjust the LM2596 buck converter to a verified 5.00V output.
- Powering the ESP32 independently — power the ESP32 through 5VIN and verify operation with Serial Monitor.
- Digital temperature sensing — wire and program the DS18B20; explain OneWire and the pull-up resistor.
- Conductivity and analog input — read EC raw ADC, voltage, and estimated conductivity; compare controlled samples.
- Turbidity and voltage dividers — build and verify a 10kΩ/20kΩ divider before connecting GPIO2.
- Integrating all three sensors — combine power, wiring, libraries, and code into one functioning system.
- CSV and timestamps — use millis(), fixed intervals, CSV headers, and spreadsheet import.
- Controlled testing — design and perform a fair comparison among water samples.
- Reliability and calibration — analyze variation, noise, outliers, precision, accuracy, and calibration limits.
- Permanent assembly — replace temporary wiring with a labelled, insulated, strain-relieved harness.
- Demonstration and evaluation — demonstrate the system and evaluate it against measurable success criteria.
Assessment
Full MYP criteria coverage: Criterion A through system research, component-function and hazard analysis, and a design brief; Criterion B through block diagrams, a wiring netlist, annotated designs, and test plans; Criterion C through safe construction with six documented inspection gates, working code, and a troubleshooting log; Criterion D through criterion-based testing with repeated data, graphs, limitations, and proposed improvements.
Unit Purpose
This is the classroom unit behind the environmental monitoring vessel: the same power chain, the same sensors, the same netlist discipline — taught as a complete Grade 9 MYP Design unit. Students finish with a battery-powered ESP32-S3 water-quality monitor that they built, verified, tested, and can defend with data.
Try it first: the ESP32-S3 Circuit Sandbox lets students wire this exact netlist virtually — inspection gates included — before touching real hardware.
MYP Framing
Key concept: Systems · Related concepts: Function; Resources · Global context: Scientific and technical innovation
Statement of inquiry: Reliable electronic systems depend on how energy is protected and converted, signals are conditioned, and data are tested before being trusted.
Inquiry questions — Factual: What are voltage, current, resistance, power, analog signals, digital signals, common ground, and polarity? Conceptual: How does the arrangement of components affect the reliability and safety of an electronic system? Debatable: Is a sensor reading useful if the sensor has not been calibrated?
Final Design Challenge
Student teams construct and program a battery-powered ESP32-S3 water-quality monitor that must: receive power from an external 12V source; include a main switch and a fuse on the positive line; reduce the battery voltage to a verified 5.00V supply; power the ESP32-S3 through 5VIN and GND; measure water temperature, electrical conductivity, and turbidity; protect the turbidity input with a resistor voltage divider; take readings at a defined interval and output them as CSV; demonstrate organized, labelled, strain-relieved wiring; produce repeatable data with controlled water samples; and explain the limitations of uncalibrated environmental sensors.
Safety by Inspection Gates
Six mandatory inspection gates structure the build: unpowered inspection (polarity, fuse, no exposed copper), continuity check (no shorts between rails), buck converter verification (4.9–5.1V before the ESP32 is connected), turbidity divider verification (below 3.3V before GPIO2 is connected), teacher-present first power-up with sensors added one at a time, and a final permanent-wiring inspection. Students don’t move forward until the evidence is on the table — which is precisely the habit the unit exists to teach.
The Common-Ground Rule
Battery negative, buck converter IN− and OUT−, ESP32 GND, and every sensor GND must share the same electrical reference. A signal is meaningful only when the sender and receiver agree on what “zero volts” means.
What’s in the Download
The complete unit pack: the unit overview with full wiring netlist and success criteria, plus fourteen lesson plans and fourteen matching student handouts — system mapping, multimeter skills, battery safety, LM2596 setup, external power, DS18B20, EC conductivity, turbidity voltage divider, three-sensor integration, CSV and timestamps, controlled water testing, reliability and calibration, permanent assembly, and the final demonstration.