Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Connecting bicycle to a computer

Status
Not open for further replies.

bannor32

New Member
Hi everyone. I'm currently working on a project that would allow me to interface my stationary bike with commercial computer games. I have a reed switch sensor and magnet on the bike, with two wires leading from the sensor. I took apart an old digital gamepad I had, and soldered the two wires to one of the buttons of the gamepad. Every time the wheel on the bike goes around it trips the sensor and it simulates the joystick button being pressed. This works fine as far as that goes, but what I really want to be able to do is use my bike to play car racing games. In the racing games I would be holding the button down continually to accelerate, so when I am trying to use the bike it acts as though I am just pushing the button rapidly. This results in my car moving about 20 miles per hour, and in me getting annihilated in the race. Just wondering if there is another method of sending a steadier or more prolonged signal, so the button thinks it is being pressed for longer. When I am pedalling as fast as I can I want the game to think the button is being held down. Any suggestions would be appreciated.

Regards,
Dennis
 
Bicycle computer controller

hello everyone,
Bannor32 -Hows the project coming along?
Ive wanted to connect an exercise bike to my pc for a long time now but I know very little about electronics so my projects never gotten of the ground.
My one idea was to use video games where the speed of the car/bike/etc is controlled via the analog y axis. After reading about joysticks over at Howstuffworks.com it seems that the x and y axis are simply variable resistors -the harder you push on the stick the higher the resistance.
If i could figure out how to increase resistance by peddling faster then I could make my car/bike speed up.
My first idea is low tech -simply use a mechanical tach and use the "needle and gauge" as a variable resistor. If you've seen the graphics at howstuff works -then imagine your basic mechanical speedometer I think you could combine the two into one unit
My second plan plan would be to use some kind of sensor (perhaps a hall switch?) to convert the rotation of the wheels into varying levels of resistance -This is where im stuck Can anyone help?
 
Bike speed

Ages ago quinjet and I had a go at this, we had a working circuit.
A reed relay on the frame, triggered by two magnets on the spokes, equally spaced so as to give two pulses per rev.
It should get you started :wink:

from an old email I said:
Pin 11 is the inverting input of an op-amp, we are setting this to a voltage mid-way between the power rails – this gives the op-amp a definite threshold which the non-inverting input on pin 1 must cross to switch the op-amp’s output.
The reed switch will connect pin 1 to 0v when it ‘makes’ (magnet close-up) and allow the 10k resistor to pull pin1 all the way up to 9v when the reed ‘breaks’.
We can now force pin 1 to go both sides of the voltage set on pin 11. These three 10k resistors are all non-critical; if you have 6k8 (6.8k – we use the multiplier in place of the decimal point) or 22k – anything around there will do.

Also changed is the output circuit – the original drove a current meter, we want a voltage, so dump the mA meter and connect pin 8 to 9v. Pin 10 connects to pin 5 and this produces the voltage. It wouldn’t hurt to leave the 12k resistor in for now and just watch the voltage across it. This whole output section of the IC is just acting as a buffer for the voltage across the charge pump capacitor (your 1.0uF)

When testing with your motorised wheel can you watch the effect on the output. If it shoots from 0v to 9v while the wheel is spinning I would suspect the speed of the wheel is too high. We can adjust the circuit easily later for this.
I think the maximum input frequency will be 100Hz ???
 

Attachments

  • JoyBike.gif
    JoyBike.gif
    5.7 KB · Views: 750
Connecting Bicycle to computer

Thanks for the schematic.
Ok let me see if i got it straight when the magnets pass over the reed switch it sends a signal to the IC -then the IC puts out a Variable voltage?Is this an analogue signal? I was planning on replacing the pot in a joystick so i guess I need an analogue output?
Where would I connect the joysticks supply voltage? How about the voltage out?
Thanks alot for your help
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top