So, I got this idea buzzing in my head about counting people in airports. You see the queues, right? Sometimes they’re massive, sometimes empty. Seemed like knowing the actual flow could be useful for somebody, maybe the airport folks themselves, I don’t know. I wasn’t trying to sell anything, just tinkering, like I do.

Getting Started – The Idea

First off, I thought, how simple can I make this? Didn’t want some fancy AI camera stuff, too complex, too many privacy headaches. Nah, keep it basic. Like those beam counters you see in small shops. Someone walks through, count goes up. Simple.

So, I figured I’d need some kind of sensor and a little brain to do the counting and maybe store it. A Raspberry Pi seemed like the obvious choice for the brain – cheap, easy enough to mess with. Had a couple lying around anyway from other projects that didn’t quite pan out.

Putting Pieces Together

Okay, hardware time. I ordered a few infrared (IR) beam break sensors online. You know, the transmitter and receiver kind. Cheap ones first, naturally. Big mistake. Half of them didn’t work right out of the box, the other half were flaky. You get what you pay for, lesson learned again.

Eventually found a pair that seemed reliable enough for my little experiment. Hooking them up to the Pi’s GPIO pins wasn’t too bad. Just needed some jumper wires. Fired up the Pi, got into the terminal. Standard stuff.

Coding it Up (Sort Of)

Then came the software part. Python’s my usual go-to for these Pi projects. It’s straightforward. Wrote a basic script. Essentially:

  • Watch the pin connected to the IR receiver.
  • If the beam gets broken (signal drops), wait a tiny moment to make sure it wasn’t just noise.
  • If it’s a real break, increase a counter.
  • Log the count with a timestamp to a simple text file.

Sounds easy, but you know how it is. First version counted way too fast, picking up glitches. Added some debouncing logic – basically, making sure the beam was broken for a short, set time before counting. Then it wasn’t sensitive enough. Fiddled with the timing values for ages. Trial and error, mostly error.

Testing and Reality Checks

Got it working on my workbench. Walked my hand back and forth through the beam. Click (well, metaphorically), the count went up. Felt pretty good.

Now, how to make it like an airport gate? Set up the sensors across a doorway in my house. Wider gap. Alignment became a pain. Those cheap sensors needed to be perfectly lined up. A bit of tape, some cardboard shims… looked terrible, but it worked. Had my family walk through. Counted them accurately, mostly. Sometimes if two people went through shoulder-to-shoulder, it only counted one. Limitation of the tech, I guess.

Powering it was another thought. For testing, just used the standard Pi power brick. But in a real airport? Can’t have wires trailing everywhere. Battery pack? How long would it last? How often would someone need to change it? Started seeing why this might be trickier than it first looked.

And placement? You’d need permission, find a spot with power, make sure it’s not blocked, deal with thousands of people walking past, not just my family in the hallway. The scale is completely different.

Final Thoughts

So, yeah. I built a little foot traffic counter. It sits on my shelf now. It works, technically. But taking that little gadget and making it reliable, scalable, and actually usable in a massive, busy place like an airport? That’s a whole different ball game. It involves way more than just connecting a sensor to a Pi. You got maintenance, networking, dealing with the environment, getting approvals… makes my little home project seem pretty small. Still, it was a fun thing to figure out.