Elliptical Street View Controller – Arduino USB Adapter

  • report
    Disclaimer
    Click for Disclaimer
    This Project is over a year old (first published about 4 years ago). As such, please keep in mind that some of the information may no longer be accurate, best practice, or a reflection of how I would approach the same thing today.
  • infoFull Project Details
    info_outlineClick for Full Project Details
    Date Posted:
    Jun. 09, 2020
    Last Updated:
    Jun. 09, 2020

This is actually a rather old project of mine that I meant to post about a long time ago, but didn’t get around to it until now. I believe I originally built this around October 2013, but my original notes on this build are pretty sparse.

Idea

The idea for this was pretty simple; I wanted my elliptical machine to control Google StreetView running on a computer, to where walking forward on the machine would translate into moving forward in the street view webpage. I also wanted to be able to easily adjust the POV of the Street View with a hand-held controller, so I could change direction without needing to step off the machine and go to the computer.

Even with the little bit of knowledge I had of electronics and programming at the time (I hadn’t really started learning to code much at this point in my life yet), I knew this should be very easy to accomplish with a microcontroller, a sensing circuit, and a little bit of code.

Execution

Elliptical to USB Keyboard Input Adapter (Arduino Powered)

Demo Video

You can also find the video here.

Hardware

This project is comprised of just a handful of components:

  • Arduino Leonardo (Microprocessor) (brain and keyboard emulator)
  • Automobile Power Mirror Control Switch (got in parts auction)
  • Resistors, capacitors, etc.
  • Shift Register (drives LED counter display)
  • 7 Segment LED Display (counter)
  • Red and green LEDs
  • 3.5mm mono jacks (to connect to the elliptical)
  • Radioshack enclosure
  • Push buttons (for adjusting step-to-keyboard press ratio)

My favorite part of the build was integrating the recycled automotive power mirror switch. Even though I built this 7 years ago or so, I can still remember sitting down and reverse engineering the pin mappings on it, since I couldn’t find a wiring diagram and really wanted to integrate it. There is something really fun about reusing scrap components in a way that is far outside their original intended use, especially as inputs (I feel like Foone would be proud of me).

Here is my assembled adapter box, connected to the original elliptical display unit via 3.5mm cables, and to the computer via USB:

Elliptical to USB Keyboard Input - Passthrough With Guthy Renker Fitness Display

Software

The software side of things is fairly simple. A tiny routine, written in C++, runs on the Arduino. It listens for button presses, as well as polls an analog sensor tied to the elliptical output in order to sense steps.

The way that my specific elliptical (an old “Guthy-Renker Powertrain”) talks to its LCD readout / console display is with a single wire, and a variable resistance. During a few tiny parts of each step, the resistance of the wire falls to almost zero (closed circuit) and allows current to flow, and during the rest of the step, the resistance approaches infinity (open circuit) allowing no current to flow. I use this by reading the change in voltage (as a proxy for resistance, V=IR) with the Arduino’s analog input pin. A certain number of voltage changes equals a certain number of steps, which I translate into a keyboard press to move along the Street View image.

Since the Arduino Leonardo has built-in support for HID emulation, sending keypresses to the computer over USB is easy as including Keyboard.h and using something like Keyboard.press(KEY_UP_ARROW);.

There is extra logic for adjusting how many steps equal one keypress, as well as handling the shift register for driving the LED counter.

Gamification as Motivation

For me personally, a big part of why I’ve struggled with staying motivated to exercise is the lack of an immediate goal. To clarify, my long-term goal has always been to lose weight and stay in shape, but each time I exercise, I never see any part of that goal reflected in the immediate result of what I just did.

For a certain percentage of the population, the release of endorphins, or other physical stimuli and feedback loops, is the immediate goal that provides motivation to exercise. For me, this has never been the case; I have never gotten that positive experience that so many others describe, and exercise has always been something that taxes my body in an uncomfortable way.

To solve my motivation problem while building this project, I decided to implement a game for myself. The rules were simple:

  • I had to pick a real route, one that I would be interested in taking in real life
    • Completing this route in Street View would be the long term goal
  • Each time I exercised, the following rules applied:
    • I had to resume street view from the same place where I stopped my previous exercise session
    • As much as possible, I tried to keep freeways off limits, as that felt like cheating, since you would not be able to jog / bike on those in real life
    • Fun Rule: In order to end an exercise session, I had to make it (or at least try to make it) to a place that would be a resting place in real life. For example, hotels, motels, camp grounds, and rest stops would all be acceptable spots to end a session at
      • This was something that I felt added a lot to the gamification aspect and addressed my motivation issue; it gave me a short-term, immediate, and achievable goal to aim for each session. I also felt that it pushed me a lot harder than a simple time limit, since a distance goal requires a specific amount of movement, whereas a time limit does not dictate that.
  • Progress along the route was tracked with all of the following:
    • Spreadsheet (start address, end address, and all exercise stats)
    • Custom google map to visually show progress along route
    • Calories also tracked in dieting app

Plans for the Future

Ideally, I would love to reboot this project sometime in the future. If I was going to go for my dream project, it would be to focus on the software side; I think you could easily turn a variant of this idea into a profitable SaaS product.

For example, instead of requiring specific exercise equipment or sensors for tracking input, you could use the accelerometer of a phone to track movement. The input could be fed into a street view program, VR games, etc. This would allow for extreme flexibility; you could theoretically design a piece of software that would work with any stationary exercise equipment (treadmill, elliptical, bike, rower), and have multiple mini-games with progress tracking. Throw in the requirement of a monthly subscription, and you have a nice monthly revenue generator.

You could also greatly expand on the gamification aspect; track your progress on multiple routes, gain XP, unlock achievements and “powerups”, etc.

This topic (VR exercise) fascinates me a great deal, and is something I think needs to be talked about more. Unless we make some big changes to public transit and focus on increasing pedestrian areas while reducing roads (which we should be doing), it will continue to get harder and harder to find open areas to jog / bike / stroll. Especially areas that are not crowded with people. As such, VR exercise might eventually become a more frequent alternative to the real thing.

Since this interests me so much, I have collected (and continue to collect) related projects and resources, as a shared Google doc. Feel free to check it out, and if you think something is worth adding, drop a comment below, or email me (see top menu bar for contact info).

Leave a Reply

Your email address will not be published.