‘Tis soon to be the season when resolutions falter and exercise equipment purchased with the best of intentions is cast aside in frustration. But with a little motivation, like making your exercise machine a game console controller, you can maximize your exercise gear investment and get in some guilt-free gaming to boot.
Honestly, there is no better motivation for keeping up with exercise than taking classes, but not many people have the discipline — or the pocketbook — to keep going to the gym for the long haul. With this in mind, [Jason] looked for a way to control PS4 games like Mario Karts or TrackMania with his recumbent bike. In an attempt to avoid modifying the bike, [Jason] decided on a wearable motion sensor for his ankle. Consisting of an Uno, an MPU9250 accelerometer, and a transmitter for the 433-MHz ISM band, the wearable sends signals to a receiver whenever the feet are moving. This simulates pressing the up arrow controller key to set the game into action. Steering and other game actions are handled by a regular controller; we’d love to see this expanded to include strain gauges on the recumbent bike’s handles to allow left-right control by shifting weight in the seat. Talk about immersive gameplay!
While we like the simplicity of [Jason]’s build and the positive reinforcement it provides, it’s far from the first exercise machine hack we’ve seen. From making Google Street View bike-controlled to automatically logging workouts, exercise machines are ripe for the hacking.
I have an ESP32 checking hall sensors on the chain ring and sending the output to a digital potentionmeter connected in place of Logitech wheel pedals, so pedaling (back and forth) is seen by all racing games as normal wheel input. It works nice! ESP32, because it also outputs the data over BLE to my phone for Strava and Google Fit.
@ Jabberwock Would you be able to share that? I have been looking into the possibility of taking the nordictrack I found on the side of the road and pushing the data up to Strava or Google fit. I think what you are doing sounds great!
You mean the ESP32 code? Sure, but it is ugly… I am not much of a programmer, besides it is transplanted from an Arduino… you have been warned! :)
https://pastebin.com/s6MkFnzh
Thank you!
I wish I had the time/talent to modify our LifeFitness Elliptical to accept a USB stick or SD card to record my workouts (.scv) and later dump them into a spreadsheet. I’m sure more recent versions already have that capability. This seems like a workable alternative.
Look at the code I have pasted above. A large part of it is for the wheel potentiometer setup, which you do not need. Physically you just need to run three wires from the ESP to a hall sensor and attach a magnet to a moving part…
The beauty of the solution is that most of the work (i.e. recording, getting stats, etc.) is done by a smartphone app.
We found an exercise bike by the trash room in our apartment building with the screen torn off of it. Theres a torn wire just peaking out of a hole in the frame that I’ve been thinking of extending and hooking up to measure cycling time(if thats what the wire is for). This could be an interesting way to implement it.
One more note: it depends on the games you play, but for some racing games one pulse per crank revolution might be pretty unresponsive. Either you get stuttering or, if you program some fall-off (i.e. the key is programmed to be pressed for a bit after the impulse), you might have the acceleration on for about half a second after you stop pedaling. Of course, you can counter that with a brake, but in some racing games pressing both acceleration and brakes at the same time gives you quite interesting effects :)
Don’t the game programmers know that moonshine haulers would tighten up their left rear brake so they could do a quick 180 (degree turn) if the revenoors (Internal Revenue Service) was on their tail?