Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
IoT & Embedded

Privacy-Safe Footfall Counter for Small Shops Using ToF Sensors

A final year project that builds a low-cost door footfall counter for small shops, pharmacies and cafes using time-of-flight distance sensors instead of cameras, plus a dashboard that turns counts into busy hours and conversion rates. No images are ever captured, so it suits owners and customers who do not want cameras analysing them.

Difficulty

Beginner

Achievable by one student in a semester with familiar tools.
Effort

1 semester · 2 students

Deliverables

7 to ship

3 optional extras

Suggested stack

ESP32VL53L1X time-of-flight sensorC++ with Arduino or ESP-IDFMQTT or HTTPSPostgreSQLPython or Node.js APICharting dashboard
A suggestion, not a requirement. Swap anything for what you already know.

What you should ship

  • A door-mounted counter that detects direction (in or out) using the multi-zone mode of a time-of-flight sensor and keeps running totals on the device.
  • Firmware that buffers counts during Wi-Fi or power outages and uploads them in order when connectivity returns, with no double counting.
  • A backend that stores counts in 15-minute buckets per door and exposes a small API for the dashboard.
  • A dashboard with hourly and daily footfall, busiest hours by weekday, and an optional conversion rate when the owner types in or imports daily sales counts.
  • A calibration mode that lets the installer set door width and mounting height and see live detections for testing.
  • An accuracy report from at least three hours of manually counted real traffic at a real shop door, including groups and people who stop in the doorway.
  • A one-page privacy notice that explains what the device measures and what it cannot measure.

If you have time left

  • Run two counters on a double door and merge their counts without double counting people who cross between zones.
  • Send a weekly WhatsApp or email summary to the owner with the busiest and quietest hours.
  • Estimate staff needs per hour from footfall and let the owner compare with the current rota.

The problem small shops have with footfall

A small shop, pharmacy or cafe knows its sales but not how many people walked in. Without footfall you cannot tell whether a slow day was fewer visitors or fewer visitors buying. You cannot plan staff for busy hours, test whether a new window display brings people in, or compare branches. Large retailers answer this with overhead people counters, but those cost far more than a corner shop will pay. The cheap alternative, a camera with a counting app, brings a different problem: owners and customers are uneasy about cameras analysing faces, and privacy law in many countries treats images of people as personal data.

What already exists and the gap

  • Xovis makes stereo 3D sensors for retail and airports with very high accuracy, priced at hundreds of euros or more per sensor before software.
  • Density and Butlr use depth and thermal sensors that avoid identifiable images, aimed at offices and larger buildings with subscription pricing.
  • Infrared beam counters sold cheaply online count beam breaks, cannot tell in from out and miscount groups.

The gap is a privacy-safe counter that knows direction, is honest about its accuracy, costs close to the price of a beam counter, and comes with a dashboard a shop owner actually reads. A single-door time-of-flight sensor is enough for most small shops.

What you build

  • Counter device: an ESP32 with a time-of-flight distance sensor mounted above the door, looking down. The sensor can be split into two regions of interest, so a person crossing produces a pattern that tells you the direction of travel.
  • Firmware: detection logic, a local counter, a ring buffer for offline periods, and upload over MQTT or HTTPS.
  • Backend: an API and a PostgreSQL table of counts per door per 15 minutes.
  • Dashboard: footfall by hour and day, busiest hours heatmap, and conversion when sales numbers are added.

Roles are simple: an installer who calibrates the device, and an owner who reads the dashboard.

The technically interesting part

Turning distance readings into reliable in and out counts is the real work. People walk at different speeds, pause in the doorway, walk side by side or carry large bags. You will build a small state machine per zone that tracks a person entering zone A, then zone B, and only counts when the sequence completes, with timeouts for someone who steps back out. Tuning thresholds against real data, and measuring the error honestly, is what makes this worth a final year project. Show your supervisor the raw traces of tricky cases (two people together, a child, a pram) and how the algorithm handles them.

How to evaluate it

  • Count accuracy against a human counting with a clicker for at least three hours at a real door, reported separately for in and out, and for single people and groups.
  • Offline reliability: cut Wi-Fi for two hours during trading and check that uploaded totals match the device totals exactly.
  • Cost: final bill of materials per door.
  • A short interview with two shop owners after a week of use: did they change anything based on the data?

Suggested plan

  1. Weeks 1 to 3: sensor bring-up, region-of-interest reading, logging raw traces.
  2. Weeks 4 to 6: direction detection state machine, tuned on recorded traces in a campus doorway.
  3. Weeks 7 to 9: offline buffering, backend API and database.
  4. Weeks 10 to 12: dashboard and calibration mode.
  5. Weeks 13 to 15: real shop trial, accuracy study and report.

Path to a product

The first customer is a pharmacy chain or a small clothing retailer with two to five branches that wants to compare them. Charge a one-time hardware price and a small monthly fee per door for the dashboard. Shopping mall managers are a later market because they want counts across many entrances. The same device fits libraries, clinics and university labs that must report visitor numbers.

Scope warning

Do not add cameras, face detection or demographic guesses: that defeats the point. Do not build a full point-of-sale integration; a CSV import of daily sales is enough. Do not try to track individual customer journeys inside the shop.

Learn what you need on Sefism

Get help with this idea

The counting algorithm is where most teams under-plan, so bring recorded traces if you have them. If you want a second opinion on scope, hardware choices or how to set up the evaluation before you commit, bring your plan and your bill of materials and we will pressure-test it together. New here? Create a free account first.

Ideas and guidance, not finished projects

These are project ideas and scoping guidance, published free for students to use as a starting point. I do not build, write, or sell final-year projects, and I do not complete coursework for anyone. Take an idea, make it yours, and build it.

Not sure this one fits you?

I help students pick an idea that matches their skills and their deadline, then scope it down until it is finishable. Guidance only, never done for you.

Discuss this idea
Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.