Alright, so I needed a way to count folks coming in and out of this local outdoor festival we help organize. Looked at commercial options, way too expensive for our little budget. So, I thought, maybe I can cobble something together myself.

Getting Started – The Idea

I kicked around a few ideas. Cameras with people counting? Nah, too complex, privacy issues maybe, and needs lots of processing power. Pressure pads? People might step over them, wear and tear would be crazy outdoors. Then I remembered those simple beam sensors, like for garage doors. If you break the beam, it counts. Seemed simple enough.

So, the plan was: get a pair of infrared (IR) break-beam sensors, hook ’em up to a small brain like an Arduino, add a battery, and some way to see the count. Sounded easy on paper, right?

Putting it Together – The Messy Part

I ordered the parts online. Got a couple of IR transmitter/receiver pairs, a basic Arduino Uno clone, a cheap little LCD screen, wires, and a battery holder for some AA batteries. Found an old plastic container in the garage – figured that could be the housing.

First step, wiring. Hooked up the IR receiver to the Arduino’s input pin and the LCD screen. Powered the IR transmitter separately. Wrote some super basic code: if the beam is broken (signal goes low), add one to the counter, display the count on the LCD. Simple.

Well, not quite.

First test in the workshop, it seemed to work. But then, weird counts. Waving my hand fast sometimes didn’t register, sometimes it counted twice. Shadows seemed to trigger it occasionally. Okay, debugging time.

  • Added some ‘debounce’ logic in the code. Basically, told the Arduino to wait a tiny moment after a break before it could count again. That helped with the double counts.
  • Played with the distance between the transmitter and receiver. Had to find that sweet spot where it wasn’t too sensitive but would catch people reliably.
  • Realized bright sunlight could mess with the IR receiver. Angle adjustment helped a bit, tried adding a small tube around the receiver to shield it. Mixed results.

Then I tried putting it all in the plastic box. Drilled holes for the sensors and the LCD screen. Used a ton of hot glue to hold things in place and try to seal the holes a bit. Looked messy, but functional.

Testing in the Wild

Took it down to the park entrance path one afternoon. Set it up across the walkway, maybe three feet wide. Powered it on.

More problems surfaced.

Battery life wasn’t great with standard AAs, especially keeping that LCD lit. People walking in groups? Sometimes it only counted one person if they walked too close together breaking the beam simultaneously. And yeah, direct sunlight hitting the receiver later in the day definitely caused false counts.

Back to the drawing board, sort of.

Swapped the AA pack for a rechargeable USB power bank – much better life. For the sunlight issue, I made a better shield for the receiver, basically a longer piece of black plastic tubing. For the group counting problem… well, I couldn’t fully fix that with just one beam. I decided it was a limitation I had to accept. It would give us a rough idea, an estimate, not a perfect headcount. Good enough for what we needed.

Festival Day – The Real Deal

Come festival day, I set up two of these contraptions, one for the main entrance, one for the side entrance. I positioned them carefully, trying to shield them from the worst of the sun. Checked on them every hour or so, noted down the counts, reset the power banks if needed (though the bigger ones lasted most of the day).

It wasn’t perfect. I’m sure it missed some people and probably counted a few stray dogs or kids running back and forth multiple times. But hey, at the end of the day, we had numbers. Rough numbers, sure, but way better than just guessing. We could see which entrance was busier and get a general feel for attendance flow throughout the day.

So yeah, it was a bit of a hack job, lots of trial and error. But for a low-cost solution built from scratch, it did the job we needed it to do. Gave us some actual data to work with for next year’s planning. It’s not fancy, but it worked.