What we built
We built a single-passage counter with two infrared sensors, an STM32 and a local dashboard. The dashboard reports entries, exits and current occupancy separately. In the bench demo, a red banner appears at the configured limit and clears when the count drops.
Roles — I wrote and flashed the firmware. My collaborator handled the circuit, PCB, wiring and soldering.
What you can reuse
- Count passage events. Use the first trigger to determine direction, then ignore a second trigger within a short window for the same passage. Tune sensor spacing and the window together so the second trigger does not cancel the first count.
- Keep the counter on the device. An ESP-01S receives the state over serial and relays threshold or reset commands from the dashboard. To troubleshoot discrepancies, check the onboard LCD first and then compare it with the dashboard.
Validation scope
The footage simulates single-passage traffic by blocking the sensors by hand. Side-by-side traffic, closely spaced crossings and measurement at an actual entrance still need field testing.
Board design

The board brings together the STM32 module, LCD1602, Wi-Fi module and connections for local alerts.