Next Broadcast

DIY Mario Kart Smart Bike

blurrypiano Code and Eng DK30 Fall 2021 1 3

Description

In the winter I bring my bike inside, put the back wheel on a roller, and proceed to look at it every day for 6 months and not ride it. For years I’ve been playing around with the idea of turning my stationary bike into a “smart” bike that can act as a controller for video games, and have made 2 attempts to do so. The first attempt was ultimately a failure, but a good learning experience, and on the second attempt (about 3 years ago), I actually managed to get something functional. My goal this time is to make something that doesn’t break, is easy to replicate, and fun to use.

Recent Updates

blurrypiano 4 years ago

Spent some time today setting up a raspberry pi with an N64 emulator and found my previous code for reading the bike controller inputs over usb and converting RPM and steering controls to input the game can understand.

Using a raspberry pi should be a lot simpler than always having to connect my laptop to the bike and tv. This way I can just turn it on and start riding with no additional set up.

blurrypiano 4 years ago

Connecting the components

I don’t like the current method to connect the components to the Arduino. The wiring is ugly and kind of a pain to deal with.

I was looking at some different connector options here, and it seems like what makes the most sense might to be use micro-b connectors? https://learn.sparkfun.com/tutorials/connector-basics/all

Alternatively, it’d be cool if I could make things wireless. But then I’d also need to add bluetooth|radio|wifi capability. And batteries too… that’s probably too much scope creep and I should start with just the micro-B connectors.

blurrypiano 4 years ago

Day 1: Finding stuff

I think it was like 3 years ago I last made the second prototype for Mario Kart bike (alias MKB2), so today was just trying to find what parts of it that still remain. I managed to find more than I originally expected since I do have a habit of salvaging parts from past projects when working on current projects… or just misplacing things in general. Thankfully it seems like a decent portion of this was still somewhat in tact.

I’ll need to do a more in-depth post mortem in the upcoming days, but I guess here are some early thoughts.

Potentiometer and gearing for getting steering input. This worked mostly well, there was a little play between the gears that could be tightened up.

The other downside is how applicable is this design for bikes with different dimensions, etc? Ideally it’d be one, maybe two steering adapaters that could be printed that would fit 90+ percent of bikes out there.

Steering mounted on bike This is how the steering mechanism would mount to the bike. This actually worked pretty well, just needs to be better designed to be more adjustable to work on a wide range of bikes.

Lazy susan This is how I implemented smooth steering. It’s litterally just two pieces of wood connected with a lazy susan bearing in between. Ya, like a lazy susan you find in a kitchen corner cabinet. They’re cheap, and it actually worked pretty well.

Control Board The old control board, a bit of a mess of wires and I’m not sure if any of this will be usable. 2 of the inputs here were used just for detecting wheel RPM, then the black, white and gray wires were used for the steering potentiometer, I think the black button on board was used to zero the steering control, and I’m not sure what the final input was being used for, maybe I just did it to have an extra button. But if the goal is mario kart that probably would have been used for using an item in game (so Z button if I’m remembering correctly)

RPM detector This was just an awful design. The Idea was that this would be mounted by the back wheel, with an IR emitter and IR receiver on either end. By blocking out the light for half the wheel turn, the arduino could detect the RPM for changes between the high and low signal. (The IR receiver isn’t shown here, I must have re-used it in some other project since this)

This was very finicky, used two inputs (1 for emmitter, 1 for receiver) on the board and required lots of wires. the idea behind the adjustable angle 3D prints were that they would be flexible and I could adjust there position easily to get the best signal. In practice, the plastic nuts wouldn’t hold tightly, things would shift while riding, and this was the main source of issues with this prototype.

Using a magnet based system in hindsight just seems like a strictly better solution. A magnet can be mounted on the wheel spoke, and then a magnetometer on the bike frame. This reduces the amount of wires, inputs to the bored, and seems like a much more robust design.

Estimated Timeframe

Oct 26th - Nov 3rd

Week 1 Goal

I’m getting a late start so week 1 will really just be a handful of days. The plan is to just revisit the last prototype I made years ago and do a bit of analysis on what went wrong, how the design can be improved, and to come up with a good project outline for what my must have requirements will be.

Week 2 Goal

Week 2 is the prototype and iteration phase. Start executing on the designs from week 1, find out what works and what doesn’t work fast, and iterate. By the end of the week I want to have a final version, or at the very least to have something mostly working with just a couple final items to tweak.

Week 3 Goal

Week 3 will be finishing any leftover work/fixes from week 2. If week 2 goes smoothly, then the extra time here could be spent trying to implement some “wish list features”, such as streamlining the user interface, and maybe some time improving the aesthetics of the 3D prints, etc.

Week 4 Goal

Project write up and review. One goal for this project is that other people are able to replicate and modify it easily to suit their own needs. So this week will be focused on writing detailed instructions on the necessary parts, and how to put things together. Cleaning up and sharing code for running the controller and plugging into an emulator, and the 3D models if anything was required to be printed this time. I also think making a short video showing the functionality of the bike and maybe some of the build process would be pretty cool, but time permitting.

Tags

  • mariokart
  • smart bike
  • bike