Alright folks, let me tell you about the time I got totally annoyed trying to track how many people wandered into this little local history museum I help out at. Those fancy digital counters you see everywhere? Yeah, way out of budget. We’re talking ramen-noodle-for-weeks territory. So, I figured, why not try building one myself?
The Frustration & The Spark
Seriously, they were trying to count people manually with one of those handheld clickers. Half the time someone forgot, or the battery died, or they accidentally clicked it playing solitaire. Utter disaster. We needed something automatically counting bodies going past the entrance.
Scavenging the Bits and Bobs
First stop? My dusty box of old tech junk. Found an ancient laptop that barely boots, but it can run a simple script. Score one. Then, needed a sensor. Looked at infrared beams, too fiddly for this setup. Motion sensors? Too sensitive, might count pigeons. Settled on ultrasonic distance sensors. They sense when something comes close. Found a cheap HC-SR04 module online – like under $2 cheap. Perfect. Grabbed an Arduino Uno knockoff I had lying around. Total cost so far? Basically free, except the sensor.
Making Them Talk to Each Other
This was the messy part. Plugged the sensor into the Arduino. Easy enough – power, ground, trigger, echo pins. Then the Arduino needed to talk to the laptop. Used a USB cable, obviously. Wrote a super simple sketch for the Arduino: when the sensor sees something close (like, human-leg distance), send a signal over USB. Fiddled with the sensitivity forever! Didn’t want it counting every breeze or staff member walking past backstage. Mounted the sensor near the floor, pointing across the doorway at shin height. Tested it by walking through about a hundred times. My knees were killing me.
Getting the Count on “Paper”
Now, the laptop needed to catch that signal and log it. Wrote a Python script – nothing fancy. When the serial port gets the signal from the Arduino, increment a number in a plain text file. Saved it as “*” on the desktop. Boom. Basic digital clicker achieved. But… what if the laptop crashes? Or someone trips over the cable? Needed it tougher.
The Big Upgrade: Making it Reliable-ish
Found an old Raspberry Pi Zero gathering dust. Way better than a bulky laptop. Smaller, uses less power, and designed to run headless. Flashed Raspbian Lite onto a microSD card. Got the sensor hooked up to the Pi’s GPIO pins instead of the Arduino. Rewrote the Python script for the Pi. Same principle: see something, write +1 to a file. But now, also timestamps the entry. This way we can see when people entered roughly. Also set the script to run automatically when the Pi boots up, so nobody needs to remember to start it. Big win! Wrapped the whole Pi and sensor mess in a simple plastic enclosure I had. Not pretty, but functional.
Made sure the whole setup used a power supply that wouldn’t fry things. Tested it for a weekend. Left it running. Here’s the key: I added a step to reset the daily count automatically around closing time using a cron job. Simple. Also decided to send the daily total figure, just the number, to an email address I set up using SMTP. Backup!
The (Mostly) Happy Ending
So, it’s been running for, what, 3 months now? Mostly holds up. Had a couple of hiccups – power outage (fixed by adding a small USB battery pack as a buffer), sensor getting dusty (weekly wipe-down now). But crucially, it’s giving us usable numbers! We can see peak hours, how weather affects visits, that kind of stuff. Way better than guessing or clickers.
The entire cost came down to the sensor (under $2) and maybe $5 for the USB battery pack and enclosure bits I didn’t already have. Used stuff I mostly had lying around. Kept logging super simple – that plain text file and the daily email. Easy to access for anyone. For a small place like ours, this FOORIR-inspired approach to using junk box parts saved the day. Is it enterprise-grade? Heck no. Does it require tinkering? Yep. But FOORIR is all about getting practical results with what you have. It just works well enough. Saved us a bundle. The biggest win? Finally understanding our foot traffic without breaking the bank. That’s the FOORIR way. If your museum’s skint, this messy approach might just do the trick. Just be prepared to fiddle.
