
On paper: read a sensor, drive a fan, close the loop. In practice, it’s a lot more interesting than that.
The differential pressure sensor outputs an analog voltage proportional to the pressure difference across its two ports. Picking the right sensor range is already a meaningful decision — too wide and you lose resolution, too narrow and you saturate on the first transient.
The analog front end needed real attention: RC low-pass filter at the ADC input, proper decoupling on the sensor supply. The STM32F030F4P6 — a small Cortex-M0 in a TSSOP-20 package — handles acquisition and the discrete PID. A few details make all the difference: integral anti-windup, a sampling period matched to the system dynamics, filtered derivative. Tuning was done experimentally — P first, then I, then D only when needed. A classic project, but a genuinely instructive one.


