We say this with the greatest respect, but [Joel] — your exercise routine is horrible! Kudos for getting up and doing something, but 108 trips up and down the stairs? That sounds like torture, not exercise. Even [Joel] admits that it’s so boring that he loses count, and while we’d bet that he isn’t likely to restart the routine when that happens, it’s still annoying enough that he built this clever little lap counter to automate the task.
We kid, of course; any exercise is better than no exercise, and the stairs offer few excuses for skipping the daily workout. To bust the boredom problem, [Joel] toyed with a couple of ideas for toting up his laps before landing on a beam-break optical system with sensors at the top and the bottom of the stairs. Worried about the potential for false triggering by swinging arms and legs, he searched for ideas for bounceless switch circuits in the old “Engineer’s Notebook” by [Forrest Mims] and found a circuit close enough to modify for his needs. Each sensor setup has a high-output red LED and a phototransistor on one side of the stairwell, and a retroreflector on the opposite wall. Breaking the beam switches off the LED on that sensor and switches the other one on, to save on battery power.
The sensor’s flips and flops are counted and displayed on a three-digit seven-segment LED; [Joel] offers no detail on the counter itself, but with [Mims] as his muse, we suspect it’s something like the three-digit BCD counter circuit a few pages on from the bounceless switch circuit. The lap counter is shown in action in the brief video below.
I had the same problem.
I go to the gym and walk around the jogging ring and get so lost in thought I lose track of how many circuits I make.
…so I bought one of those mechanical click counters on eBay for $3.
Works for any repetitive action with long-ish reps.
If you wire up a sensor in the middle you can divide the output by 2 and be done at half the cost.
The problem gets worse with age. A mechanical click counter is a quick and easy solution that I also used, but finally settled on a retro-reflective counter like Joel’s. My stairs have a lot of ambient light that interferes with a simple beam-break sensor so I used Vishay’s TSSP4038. It’s a very low cost IR receiver made to detect continuous 38kHz light. My 38kHz IR transmitters are a pair of old TV remote controls from a thrift store. Even though the beam is invisible, it is very easy to align – and you just can’t get much cheaper!
For years I’ve been putting off a planned project where I would have a BLE beacon and a phone, and the phone would monitor signal level from the beacon, and thereby count laps as the two devices get closer and further, with reasonable hysteresis. Depending on activity, I might have the beacon on me and the phone stationary or the other way around.
But while I bought a BLE beacon, I keep on procrastinating programming the Android side, partly because I am dreading the UI for multiple configurations for multiple sports and partly because I dislike Android programming. Ideally, I would like it to work running laps around our indoor track, where I expect to lose BLE signal at the far end, for rock climbing laps (where signal should be clear from bottom to top), and for swimming laps (where water may interfere, though the beacon IS waterproof). I think there is some github project for a swim version already, so maybe I could just adapt that. I would want a giant numeric display adapted from my Giant Stopwatch Android app, with both time and lap count.
If you’re more familiar with HTML and javascript, you could try the web bluetooth interface, https://developer.chrome.com/docs/capabilities/bluetooth
Then the app is simply a web page
Another option for the stair thing, without having to buy any new hardware, would be some OpenCV code on a phone. One easy solution would be to prop up a phone on one side with camera pointed at a wall, and monitor for large rapid back-and-forth changes in the field of view (i.e., you appearing and disappearing) while ignoring small changes as well as changes that aren’t back-and-forth (e.g., someone turning on the lights).
A solution with slightly more hardware but probably more robustness would to put a phone on one side and hang a printout of an arUco marker on the other side. When the arUco marker disappears for the right number of frames (you might want to ignore one or two frames in case of some glitch), you know someone passed in front of it. Recognizing arUco markers in OpenCV is really easy–if you have an Android phone, you can start with the OpenCV Android library demo for QR code recognition and change to arUco for faster recognition (I assume). You should check for a specific arUco marker ID, to avoid false positives.
On terms of phones, and if you’re willing to carry one with you during the exercise, you could use the barometric sensor in the phone. They’re easily precise enough to show clearly distinguishable values for the bottom and the top of stairs. With a bit of signal filtering you should get number of laps, lap times, how far you’re going up vs. how fast you’re going down and do on.
That’s a nice idea. You might also need take into account atmospheric pressure changes during a long exercise period.
Waiting for the cat to see the red spot and get into the count. :) Admittedly I’m in crowd with the just get a clicker and slap it at each loop.
But a bounceless (light beam ) switch that toggles? I have a feeling that could find some more uses. hmm, have it drop a pellet for the cat, at each completion.
The cat will be your fitness reminder in no time.
Honestly I’d probably be too lazy to even get a clicker and just average time a few days worth of stair climbs and then find a song to do them to.
Bottom line? If it helps keep you on track with things, I’d definitely go with it!
[Joel], my knees are exploding on your behalf.
Running laps I count in HEX on one hand: index to palm is one. All four is F. I guess if you’re really athletic, that could get you to FF, but maybe by then, need one hand to take a drink of water.