Group project for the "Laboratorio di elettronica per la robotica" course (University of Trento, Dept. of Industrial Engineering). A greenhouse monitoring and control system built on a Raspberry Pi Pico: it measures temperature (PT100 + Wheatstone bridge) and ambient light (two photodiodes), then drives a ventilation fan in PWM proportionally to light and lights a 6-LED bar proportionally to temperature.
Authors: Federico Leonardi and Michele Zanella — June 2026.
Division of work: Federico covered light measurement, motor driver, and power consumption estimation; Michele covered the breadboard build, the PT100 circuit, and the Raspberry Pi Pico firmware.
Three signal chains, all read by the Pico's internal 12-bit ADC:
- Temperature: PT100 → Wheatstone bridge → differential amplifier (uA741) → ADC0
- Light: 2 photodiodes → 2 transimpedance amplifiers (uA741) → ADC1, ADC2
- Actuation: Pico → 6 LEDs (digital outputs) and Pico → PWM → ULN2003A driver → DC fan motor
The PT100 (R(T) = R0(1 + αT), R0 = 100 Ω, α = 3.85×10⁻³ °C⁻¹) sits in a Wheatstone bridge (Vcc = 10 V, R2 = R3 = 10 kΩ, R4 = 100 Ω), balanced at 0 °C.
The bridge's millivolt-level differential output is amplified ×100 by a uA741 differential amplifier (Rin = 10 kΩ, Rf = 1 MΩ), producing 0–3.3 V over a 0–88 °C range — matched to the Pico's ADC full scale.
Each SFH203P photodiode (Isc = 9.3 µA typ. at 1000 lx) feeds a transimpedance amplifier (Rf = 330 kΩ), giving up to ~3.07 V at full light — again matched to the ADC range without saturating.
6 LEDs turn on progressively as temperature crosses six thresholds. The fan is driven in PWM (1 kHz) through a ULN2003A Darlington-array driver, at a duty cycle proportional to the averaged light reading, with hard cutoffs below 15 °C (off) and above 32 °C (full speed).
firmware_pico.py — MicroPython running on the Raspberry Pi Pico. It reads the two ADC-derived signals, converts the PT100 bridge voltage back into a temperature in °C, drives the LED bar, and sets the fan PWM duty cycle every 500 ms.
- Power consumption: measured 965 mW at full load vs. an estimated 1.1 W — the design was accurately (and conservatively) sized, with the gap explained by the DC motor drawing less current under PWM than its worst-case rated estimate.
- Bridge output accuracy: measured vs. theoretical V+ voltage matched within 2.52% across the tested temperature range.
- PWM signal: verified on the oscilloscope at a stable 1 kHz across the full 0–100% duty cycle range.
- Component tolerances (bridge resistors, PT100) and the uA741's input offset voltage/bias currents introduce a small systematic deviation between theoretical and measured values — more noticeable on the higher-gain PT100 stage than on the transimpedance stages.
- Full report (bill of materials, analytical sizing, additional oscilloscope captures, demo videos) available on request — this repository contains the circuit design, firmware, and key results.








