Hardware HELP :: I Want To Make an excercise bike to play Mario Kart on Switch, example in post

xbmcuser

Well-Known Member
OP
Member
Joined
Sep 8, 2007
Messages
211
Trophies
1
Location
United Kingdom
XP
1,583
Country
United Kingdom
Some guy at a gym has managed to get 2 player Mario Kart switch attached to a tilting excercise bike. see youtube vid below

What would be needed to convert an excercise bike to play like this any tips?

sys-con, ant+, 8 bitdo wireless usb adapter?

I have non tilting excercise bike but want to mount switches in the right place for steering, and weapon actions. want to peddle backwards for reversing too.


 
Last edited by xbmcuser,
  • Like
Reactions: Deleted User

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,796
Trophies
3
XP
28,412
Country
United Kingdom
Depends upon the bike and depends upon how you want to do it.

Attaching a bunch of arcade/fighting board switches to the handlebars and then cannibalising a controller to wire those into the relevant buttons (be it the actual buttons or debug points within the controller) is easy enough. All those things people do to make rapid fire controllers, adapt controllers to USB, controllers for disabled people/young kids wanting to play with parents and controls to automatically play games are what you will be doing here. https://learn.adafruit.com/usb-snes-gamepad/overview for a general idea -- for all the advances in controllers over the decades they are still switches and analogue sensors and you can replicate that. Theoretically you could mechanical linkages to press buttons but... don't use mechanical linkages, and some kind of solenoid is not going to be much better.

Using pedals might be harder. Two main choices depending upon the bike

If it is your utterly basic resistance band on a wheel deal then you will have to add stuff to sense the motion, and this might also be easier for the second case.
If you have one that spits out some data to a display on the screen then you might be able to tap into that in either the display part (they tend to be rather custom data so might be more annoying, especially if you are asking this sort of question) or tap the sensor part -- I imagine most use hall effect sensors and a magnet on the wheel these days (if it sees 1 pulse it knows the wheel has rotated once assuming there is the one magnet, better designs will be more magnets) but you might still find a dynamo one wherein a dynamo (basically a motor in reverse) taps off the wheel in some form to spin and generate a voltage. A dynamo will generate a voltage, and reverse it when going backwards, depending upon the speed you go so you can use that to make minimums or turbo boosts as necessary. Either way you feed the data into something like a teensy++ or arduino which can do things like calculate speeds and choose to press the accelerator only when you are pedalling fast enough or detect you are going backwards and make sure to press whatever combo is necessary to reverse.
You can buy hall effect kits for things these days but a cheapo bike pedometer might also have enough gear and wires already to do things, if you are good it might also have a data out you can play with but I will skip that one for now.

I would say you will want the teensy/arduino stuff in there as it will also allow you to adapt it for a little old lady or dude with calf muscles looking like they kick down trees for a living.

You say leaning is not a thing for yours. OK but I will note you can always put the bike on something that does lean (you could probably do it with a few load cells and two sheets of decent ply* or metal if you wanted -- a standard human + bike makes for a fairly decent load at the size of the average sheet of ply while still not likely to tip things over) and much like the pedals you can tap that off to calculate relevant controls. I don't know how much Tony Hawk ride controllers go for these days but they might be able to scavenge something if load cells are not your thing, as might a wii remote, but you will likely be programming something more serious in those cases and figuring out how to make it work.

*weld or bolt two H shapes out of angle iron or box tube, two bearing surfaces in the middle at each end so they pivot (nothing drastic -- a gate hinge set might even do), at least two load cells (one for either side, probably four or maybe 6), some stops or springs to prevent things from getting too out of hand (though load cells themselves can take quite a bit if you want them to) and you have your tilt setup.

Depending upon how much money you want to spend on this I would consider doing a prototype board first. Just something basic like tap off all the points on the controller and make a quasi fighting game/arcade board with some kind of spinner (be it arcade, or two plates with a rod in the middle with your HE sensor you drive with a drill) to simulate the wheel before adapting that. Arcade switches if they come in a form you want are also quite nice as they tend to be somewhat shielded where a basic bag o bits is going to get shorted the first time someone drips sweat onto the thing.
It should be no great hassle to wire up three or so sets of switches for each button for people to either grip the crossbar or the vertical bits, though you might want to figure out a dominant one for the turning controls.

I will note though that most games are built for controllers and if you thought racing wheels detracted from top scores then this will be worse, especially if you are going in for the leaning thing. Not so bad for human against human but AI is a whole other thing.
 

xbmcuser

Well-Known Member
OP
Member
Joined
Sep 8, 2007
Messages
211
Trophies
1
Location
United Kingdom
XP
1,583
Country
United Kingdom
@FAST6191 That is one of the best replies I have ever seen, brilliant write up, many thanks!

Love your ideas for tilt/lean hacking.

Spent the last 30 minutes googling: load cells, box tubes, magnet sensors, hall effect and adafruit. Looks like I have a lot to learn.

Thinking about it more I think running CEMU or Yuzu would allow me more control over the controls.

I was thinking using ant+ dongle for peddling.


Also I think a PC emulator I can then use in proper VR with my vive headset.

I also discovered that the ring fit already allows steering, maybe hack one of these or a wimote for tilt when mounted on to handle bar.





then use big arcade switch buttins fir drifting and weapons throw.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,796
Trophies
3
XP
28,412
Country
United Kingdom
For PC/emulator input then you can skip the controller wiring part and go straight for a teensy++ or something similar -- they have USB and act as a keyboard/mouse if you want them to. Getting it to pretend to be a keyboard is also probably the second or third thing a tutorial will teach you after getting a light to blink, and there must be half a hundred how to convert one type of input to keyboard out type projects on the cool things they have been used for pages. Also means you can rock up to anything that allows you to configure inputs and set it up accordingly.

I also neglected to think of a more basic option last time for pedals. You can use the hall effect sensor (or even dynamo) to liven up a circuit -- this is to say A button (which I am assuming is accelerate) will only do anything when this counter is above a certain frequency* (you should be able to buy a kit that does frequency sensing) or voltage in the case of dynamos (have a relay or transistor that only turns on at a certain voltage and either allows a button to work or functions as it by just allowing power through). Not quite as fun as direct feedback/input but still an option.

*back to the programmable chip thing then for the little old lady vs tree kicker (assuming basic rolling resistance increase is not on the cards) you could have say 5 input pins and just a rotary switch select the input. The code then will look like if pin 1 is greater than 60 times a minute then liven it, pin B be 90 and so and so on to allow some measure of competition or difficulty adjustment. Changing voltage is even easier -- the classic schoolboy resistor divider but with a variable resistor will do this for you.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Veho @ Veho: Why does Psi have PMS?