← All projects

STM32 Smart Irrigation System

Live

EMBEDDED · BARE-METAL C · STM32F103 (CMSIS)

An automatic plant-watering controller written straight to the registers — no HAL, no RTOS, under 4 KB.

What it is

A controller that keeps a plant watered on its own. It continuously reads a soil-moisture sensor and drives a pump only when the soil dries past a threshold — with hysteresis so the pump doesn't chatter, and a hard safety limit so it can never run forever. It's written bare-metal on an STM32F103: every peripheral is configured by hand from the register map, with no vendor HAL and no RTOS.

How it works

Why it's built this way

Going HAL-free is deliberate: it proves I can read a reference manual and bring a chip up from a blank flash, and it keeps the image tiny and fully understood. The integer-only filtering and the safety FSM reflect real embedded discipline — no floating point where it isn't needed, and never trust an actuator without a fail-safe.