Keep pedaling if you want your computer to stay on | Arduino Blog

Appeals to nature notwithstanding, humans didn’t evolve to sit in desk chairs all day slouching in front of computers.Nor did we evolve to handle constant and near-unlimited access to delicious, calorie-dense foods.It isn’t surprising that so many people are at less than ideal health levels.

But how can one work up the motivation to get lots of exercise every day? ZiedYT achieved that by making his computer turn off whenever he stops peddling his bicycle.Zied was inspired by a similar project from Linus Tech Tips published several years ago, in which a bicycle turns the input shaft of a generator that powers the computer.In Linus’s setup, peddling powers the computer.

But Zied’s implementation is different and a lot more accessible.Rather than actually powering the computer, the bicycle simply controls software running on the computer and that software simulates the effects of power loss.For that to work, Zied needed the software running on the computer (written in Python) to monitor, in real-time, the speed of the bicycle’s back wheel.

The bike’s rear hub sits on an exercise stand, so the user can pedal in place while “sitting” at their computer.The hardware for speed monitoring consists of an Arduino and a Hall effect sensor.The latter responds to magnets attached to the bike’s spokes with 3D-printed mounts.

The Arduino communicates with Zied’s software via serial and the software makes the computer behave like it is losing power if wheel speed drops below a set threshold.When that happens, the screen starts dimming and sound gets quieter.If speed drops too low, the computer will shut down altogether and the user will lose any unsaved work.

But if they pedal fast enough, they can use the PC like normal.

Read More
Related Posts