Connect with us

Exercise Bike "approving" power to TV???

Discussion in 'General Electronics Discussion' started by mcdonsco, Jan 4, 2015.

Scroll to continue with content
  1. mcdonsco

    mcdonsco

    2
    0
    Jan 4, 2015
    I have a father in law living with us who is massively overweight (at one point was 500lbs)...we've taken him into our guest house to "manage" his weight loss...problem is due to hip issues (and weight) he can only ride a gym bike, no treadmill (can't walk well etc).

    He sits in a recliner ALL DAY AND NIGHT watching tv...gets on the gym bike here and there, but we have trouble getting him to do it regularly.

    I was wondering how I could hook things up, if there is a way to do it, so the TV can only be on if the exercise bike is moving...I dont want/need the bike to power the TV, just "approve" the TV getting power as long as its moving.

    Were not looking to force him to do full on workouts, but more just keeping him moving, so long as its moving, even slowly, the TV can be on...stop moving and it shuts off.

    Anyway to do this?
     
  2. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Absolutely.
    Multiple ways of doing it.

    First and easiest would be to probe around the bike to see if there are any electronics that you could potentially tap into to use as a 'control' signal.
    If not, you can connect electronics to the bike to determine if it's currently being peddled.

    Regardless of the bike portion of the circuit, the portion controlling the TV could be a simple relay. The downside here is that the TV will be subject to multiple 'power failures'. This could potentially cause damage to the TV set, so please only do this with a cheaper set.

    As you explore your options, you can also disconnect any video feed to the TV. This would simply cause a black screen or static, and would not put the set in Harm's way. You could also incorporate a more thoughtful circuit, so that your father in-law can 'charge' the TV as he peddles, and watch the TV later... You could go as far as requiring the bike to be peddled for 1KM for every 15-minute of TV usage.

    The options here are endless! Tell us ideally exactly how you want it to function and we can go from there.
     
  3. mcdonsco

    mcdonsco

    2
    0
    Jan 4, 2015
    "You could also incorporate a more thoughtful circuit, so that your father in-law can 'charge' the TV as he peddles, and watch the TV later... You could go as far as requiring the bike to be peddled for 1KM for every 15-minute of TV usage"

    That would be PERFECT...How can I do that?
     
  4. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    What kind of electronics experience do you have?

    You can go about this one of two ways:
    Discrete components, or a microcontroller. (Like a PIC, PICaxe, Arduino, BASICStamp, AVR... list goes on)

    I'll go into more detail that will be based on not modifying existing bike electronics.
    Step 1) Make a wheel-encoder.
    This is simply a disk with a pattern of black and white stripes on it. There is a light, and a light detector placed next to each other (with a divider to block direct view of each other) that is them aimed at the disk. As the white part passes by the device, it picks up the reflection of the light, as the black part passes by, it looses sight of the light. When this disk is rotating, the device will send 'pulses' that can be read like a tachometer in a car. This disk will either be taped directly on the spinning wheel, or attached to any other rotating part of the bike.

    Step 2) Detect and store the pulses of the encoder (This is where you branch off)
    Discrete components:
    Using some basic components, each pulse gets sent to a Capacitor which will charge as the pulses are received. This is very basic and won't be as accurate, but will still work to a limited extent. You can either start the timer immediately and begin discharging as soon as he stops pedalling, or you can start to discharge when the TV is turned on. Note that the capacitor will self-discharge, so if he stops pedalling and goes to get a drink before watching TV, he may have lost a couple minutes. When the capacitor gets low enough, the TV will turn off. This would also require some fine-tuning to change how fast the capacitor charges or discharges so you can adjust how much pedalling is required for how much TV time.
    Microcontroller:
    Unlike the analogue approach above, you can count each and every pulse sent, and store it forever* in a microcontroller. They can also be programmed so that exactly 1200 pulses allow for 15 minutes. This has the added benefit of allowing your father to do a marathon, having a nap, and watching TV later... as his earned TV time won't slowly drain away. This is also much easier to adjust, simply reprogram or adjust the dial to change how many pulses are worth 15-minutes. The draw-back here, is that in addition to building a circuit, you also need to program your microcontroller. It's a little more difficult for beginners, but allows you much more freedom for adjustments and modifications later.

    Step 3) Controlling the TV.
    I am unsure how things are hooked up, but you can interrupt the TV a few different ways. Simplest way would simply bo to cut-off power, or to cut-off the signal from the CableBox. The choice here is yours, but I would strongly urge you to interrupt the signal so that you don't continuously cut-off the TV power unsuspectingly. There are some special chips made specifically for routing and controlling AV signals... of course, more information on the father's TV would be ideal... ie.
    -How many 'sources' are connected? (Wii, Cable-box, DVD-player)
    -What cable is used for each 'source'
    This will tell us how many sources we need to interrupt, and what we will need to do so. Interrupting HDMI will be different than Component cables.

    Step 4) Tamperproofing.
    If your father knows his way around the TV, he may simply bypass your hard-work. Start thinking of ways you can prevent this. Perhaps by creative uses for Glue, or making connections in a project box that is locked up.


    *Note that storing the number of pulses forever requires that you either; A) Never remove power from the microcontroller, or B) store the numbers into non-volatile memory which would require a couple of extra programming steps.
    Additionally, if using a microcontroller, you can expand on the functions as you think of new ideas. You want to show how much time is left? Add a number display. You want an administrator password to bypass or add time? You can do that too, just add some extra buttons.
    The more features you add, the more complex the code will get. So if you take this route, be sure to begin with the more basic functions required for the project before adding extras. Because it is programmed with your computer, you can simply disconnect the extra circuit, and put the old program back on if one of your extra features does not work.


    Resources for the OP:
    Wheel Encoder. Using a pre-made sensor. (Provided code can be ignored)
    http://letsmakerobots.com/blog/aniss1001/homemade-wheel-encoder
     
    chopnhack likes this.
  5. chopnhack

    chopnhack

    1,573
    354
    Apr 28, 2014
    Outstanding @Gryd3 :D
    You might want to consider mechanically transferring the spin from the bike to that locked box as well - there could be a potential for someone to just shine a flash light at the sensor :eek:
     
  6. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Lol, good call, but not a personal worry. I guess it would depend on the father's knowledge.
    If the Op's father is willing to shine a flashlight in at an awkward angle and flash it a few hundred times, I think he deserves a little TV time XD
    The idea is to have each rising or falling edge do the work. Otherwise simply turning the wheel so the white portion of the encoder is in front of the sensor would give him free time.
     
    chopnhack likes this.
  7. chopnhack

    chopnhack

    1,573
    354
    Apr 28, 2014
    LOL
    Ah, yes good point, you are looking at the "edges", not just a simple on/off. I guess then the OP could even create a point system for how fast he was pedaling - i.e. if the edges were coming in faster they might be worth more time as he exerted himself more! :D
     
  8. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    A little example math for the microcontroller, but also to see if tapping a flashlight button is worth it to earn TV time.
    Example numbers are based on values that will make this 'easier'
    ie. 28" Tire will require less rotations to travel the required distance, and lets only use 2 pulses per rotation. (Additional note to @mcdonsco, an alternative to the encoder, would be to use a hall effect sensor, then to fasten one or two magnets to a rotating part of the bike. You would get very similar results to using the disk. To cheat, you would need to wave a magnet by the sensor which would be harder to accomplish.)
    Each rotation would be roughly 88", which allows each pulse to be 44"
    There are 63360 Inches in a Mile, or 39370 Inches in a Kilometer.
    This works out to be 1440 Pulses per Mile, or 895 Pulses per Kilometer.
    These values will go up considerable as you add stripes on the encoder. As they are, I could tap an on/off flash light button to fake 2 Kilometers a minute. ... So I guess if you father wanted to cramp his hand up tapping the flashlight button he could do it ;)

    Edit: My 'flashing' math was wrong... 60 taps in 10s = 3 toggles per sec... So 895 pulses would take ~300 seconds. ... I CANNOT tap that button at 60times a second. Sorry for confusion.
     
    Last edited: Jan 5, 2015
    chopnhack likes this.
  9. profbuxton

    profbuxton

    15
    10
    Nov 22, 2014
    Oh how cruel, making him work for his TV!!. Talk about violation of basic human rights!! Is there really so much of interest on TV to watch all day??
    Maybe you could use a rowing machine instead of a bike. Low down more comfortable seating perhaps.
    Sounds like you have lots of complicated ideas to work on. Bon chance!
     
  10. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    lmao. Human rights can start and end at so many places it hard to get into that.
    I'm sure if this is constructed with success, there may be future exercise equipment modifications.

    If the op give us an indication of the current path he'd like to take we can get into more details ;)
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-