Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: arducyclo

  1. #1
    The floppy drive is no longer obsolete. AmEv's Avatar
    Join Date
    Nov 2010
    Location
    Idaho, USA
    Posts
    3,052

    Default arducyclo

    I've had the idea for a while now:

    An Arduino-based bicycle control system. It would control blinkers, lights, and possibly a couple other things, such as a speedometer.

    The bicycle itself is a blue K2 (I believe model 500), and it''s in need of a few minor repairs. Other than that, it currently works, and it hits ~30 like a charm.

    The Arduino itself will be in a waterproof case. It will be velcroed underneath the seat, as that's a secure location for it. LEDs will be extensively used in this.


    Pix to come
    Two years. They were great. Let's make the next ones even better!

    Tri.fecta

  2. #2
    Fox Furry crenn's Avatar
    Join Date
    Apr 2005
    Location
    In the shadows behind you
    Posts
    4,067

    Default Re: arducyclo

    Sounds like a good project and reasonably easy as well! If you need help, just post in the thread and I'll see what I can do!
    Antec Sonata II | Pioneer DVR-212
    Good news! You can follow my website or follow me on twitter!

  3. #3
    Moderator TLHarrell's Avatar
    Join Date
    Jan 2012
    Location
    Morgan Hill, CA
    Posts
    1,143

    Default Re: arducyclo

    If you want to go a little overkill with wiring, look into chasing everything inside the frame. If you wire up a much smaller AVR chip instead of a full blown Arduino board, you could easily fit it through a small hole. Rig up some supercaps to power everything, and charge the system from a small stepper motor mounted on the frame at the crank. Completely invisible would be awesome.
    I have a hammer! I can put things together! I can knock things apart! I can alter my environment at will and make an incredible din all the while! -Calvin

  4. #4
    The floppy drive is no longer obsolete. AmEv's Avatar
    Join Date
    Nov 2010
    Location
    Idaho, USA
    Posts
    3,052

    Default Re: arducyclo

    Naw, I want this to be easily upgradeable and replaceable.

    I am planning on having it generator/rechargeable battery-run, though.

    Not a bad idea, though. Zip ties and phone cord will suffice, though.
    Two years. They were great. Let's make the next ones even better!

    Tri.fecta

  5. #5
    Mostly a nutcase CorsePerVita's Avatar
    Join Date
    Mar 2008
    Location
    Oregon!
    Posts
    426

    Default Re: arducyclo

    Would be curious on the speedometer thing.

  6. #6
    The floppy drive is no longer obsolete. AmEv's Avatar
    Join Date
    Nov 2010
    Location
    Idaho, USA
    Posts
    3,052

    Default Re: arducyclo

    Well, I've got an old magnetic-style system that has no sensor. Got the magnet, receiver, and cables. Just not the sensor itself.

    That's taken care of.


    What I'd need help with is, interfacing it with the Arduino, and calibrating it for 26" tires.
    Two years. They were great. Let's make the next ones even better!

    Tri.fecta

  7. #7
    Moderator TLHarrell's Avatar
    Join Date
    Jan 2012
    Location
    Morgan Hill, CA
    Posts
    1,143

    Default Re: arducyclo

    This should get you on the way... equations available for calculating RPM to MPH. http://endless-sphere.com/forums/vie...p?f=28&t=16114 Should be easy enough to put that into an Arduino. Count the "blips" as the wheel rotates on an input pin. Number per minute will give you RPM.

    As far as a sensor, just find a simple reed switch. It'll close when the magnet passes it. In the case of a magnetic ring type sensor, it may trigger twice per revolution, so you'd have to test that and divide accordingly.

    26-inch tire
    1 mph = 12.93 rpm
    1 kph = 8.10 rpm

    10 mph (16 kph) = 129 rpm
    11 (18 ) = 142
    12 (19) = 155
    13 (21) = 168
    14 (23) = 181
    15 (24) = 194
    16 (26) = 207
    17 (27) = 220
    18 (29) = 233
    19 (31) = 246
    20 (32) = 259
    21 (34) = 272
    22 (35) = 285
    23 (37) = 297
    24 (39) = 310
    25 (40) = 323
    26 (42) = 336
    27 (43) = 349
    28 (45) = 362
    29 (47) = 375
    30 (48 ) = 388
    Last edited by TLHarrell; 08-03-2012 at 03:58 PM. Reason: Added link
    I have a hammer! I can put things together! I can knock things apart! I can alter my environment at will and make an incredible din all the while! -Calvin

  8. #8
    The floppy drive is no longer obsolete. AmEv's Avatar
    Join Date
    Nov 2010
    Location
    Idaho, USA
    Posts
    3,052

    Default Re: arducyclo

    It's a magnet-activated switch. Confirmed with a multimeter.

    When the magnet hits the switch, there's a loop. No magnet, open circuit.

    I was almost thinking counting the time between "on" states.

    So, grabbing that info, inverting the formula, should give me the time in between "clicks" for speed.



    *Oh, and the switch is already mounted on my bike.
    Two years. They were great. Let's make the next ones even better!

    Tri.fecta

  9. #9
    The floppy drive is no longer obsolete. AmEv's Avatar
    Join Date
    Nov 2010
    Location
    Idaho, USA
    Posts
    3,052

    Default Re: arducyclo

    OK, here's what I'm thinking:

    The main three purposes of the Arduino is brakes, turn signal, and speedometer.

    Brakes: I'm going to install switches inside the brake lever areas. When the switch is released, it turns the back red LEDs from medium-brightness to full-brights.


    Turn signal: I think having an Arduino do the turn signal on the bike will be better, as the relay-capacitor styles will wear off after a while. Just a little delays.


    Speedometer: This is where math comes in. Time between "ticks" will be directly related to the RPM, and thus, FPM, and thus, MPH. Probably going to just use a dual 7-digit LED display, powered by some sort of LED driver. Save ports on the 'duino.

    Now, the tricky part is, figuring out how to lock the display and 'duino down to the bike.
    Two years. They were great. Let's make the next ones even better!

    Tri.fecta

  10. #10
    Moderator TLHarrell's Avatar
    Join Date
    Jan 2012
    Location
    Morgan Hill, CA
    Posts
    1,143

    Default Re: arducyclo

    Locking it down isn't a problem if you run most of the stuff inside the tubes. The battery/cap to run it from could be in the seat tube easily enough. Yeah, I know you don't want to do it that way, but it'd be more secure.

    I was thinking a dual 7-segment display would be the way to go too. See if you can rewrap your handlebars so only the main part of the display sticks out. I suck at handlebar wrapping. Probably take it to a shop and have them do it. Bonus is that it'll cover your wiring too. You should be able to get a display from Sparkfun or somewhere similar that has a display capable of taking data by two-wire connection. Less pins.

    For driving the LEDs, simply run them in series/parallel groups up to your operating voltage. Switch them with a transisitor from your Arduino pin.

    For brakes, I'd figure a microswitch at the brake caliper itself would be easier to mount. Or you could put one along a cable where it runs along the frame. Bend the metal trigger into a ramp, and secure a split sinker (for fishing) or something similar along the cable so it pushes against the switch.

    Needed pins: (not incl. ground)
    Brakes (1)
    Turn Signals (2)
    Speedometer (2)
    Brake Trigger (1) (multiple switches can be wires in series)
    Turn Signal Buttons (2)

    You need 8 signal pins. A full Arduino board is overkill. See if you can wire it on a smaller chip. Saves money, and is easier to stash on the bike.

    Entirely up to you though... just tossing out ideas. If I were to do it, that'd be the way I'd go.
    I have a hammer! I can put things together! I can knock things apart! I can alter my environment at will and make an incredible din all the while! -Calvin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •