motion powered switch

My son is wanting to build a project where pedaling a bike allows the monitor of a computer to stay on

The idea is having a magnet is attached to the spoke of an exercise bike with a sensor attached to the fork. as the wheel rotates, the sensor sends a signal to the board which allows the video signal to pass through to the monitor. after 5 minutes of pedalling, you could stop pedalling for a minute and then the video signal is cut off. If you stop pedalling before 5 minutes is up, the video signal is cut immediately.

Does anyone have any ideas on how to best accomplish this?

The monitoring of the pedalling is easy. I am not aware of the best way to do the video switching.

You could use a magnet and Hall sensor, or use a reflective sensor with a reflector on the wheel.

You would need to use millis() for the timing, when you sense the wheel turning, record millis(). When no longer sensing, compare the difference in new time to the time period required.

You do not say what programming or electronics level you have. We need this to see how much help you require.

Weedpharma

I figure this could involve:

  • Bicycle generator.
  • Bridge rectifier and capacitor to derive DC.
  • Relay
  • Two NE555 (CMOS) timers, one to count 5 minutes, one to count the rest minute.
  • No Arduino :grinning:

I have only basic electronics skills.

This is something that I would need my 13 year old to assemble himself, either breadboard or I'll solder it up.

I like Paul__B's idea.

With further thought, the best setup would be that the child would ride the bike for XX amount of time, say an hour, which would generate say 3 hours of computer time.

Using a 12v bike generator to provide the signal. As long as the generator is supplying a power signal, the timer starts adding time to the "bank". This time can be displayed on an led timer to show how much computer time is available. when the pedaling stops, the bank stops adding time.

For the video side, I plan on using a simple VGA or HDMI a/b switch. When it is time to use the computer, the switch is moved from A to B and the timer counts backwards. when time runs out, the video signal to the switch is shut off via relay.

What do you think?