Why
Because sitting for long periods of time without any breaks is not good for your overall health
Doesn't most smartwatches do this?
Yes, but on my smartwatch it's too easy to dismiss the notification and ignore it. With this approach, I can't ignore it until I actually stand up.
How it works
The cushion contains a layer of Velostat. Velostat is conductive but has a resistance that decreases when pressure is applied to it. Using that information, we know that a change in resistance will affect the change in voltage (Ohm's law). So we connect this to a voltage divider and feed that to a comparator to compare agaisnt some stable voltage.
On the microcontroller, we wake up and poll this circuit every 8 seconds (the max time we can use the watchdog timer to sleep). Everytime someone is sitting we mark it as a hit. After 225 hits in a row (225 * 8 = 1,800 seconds which is 30 minutes), the buzzer goes off. If nobody is sitting, then it's a miss. After 7 misses in a row (7*8 = 56 seconds) we reset all the counters back to zero.
Is it useful?
Yes! I've been dogfooding my gadget, and it's amazing to see how often the alarm goes off when I didn't even notice 30 minutes have went by. Especially during gaming sessions, where I would easily spend an hour sitting. This has also been useful when I'm stuck in a long Teams meeting.
Hey Dave, got your tip, thanks a bunch. Nice build, and a great idea -- I should probably build one myself. Wrote it up for the blog, should publish soon. Thanks!