1. Some members were not receiving emails sent from XJbikes.com. For example: "Forgot your password?" function to reset your password would not send email to some members. I believe this has been resolved now. Please use "Contact Us" form (see page footer link) if you still have email issues. SnoSheriff

    Hello Guest. You have limited privileges and you can't "SEARCH" the forums. Please "Log In" or "Sign Up" for additional functionality. Click HERE to proceed.

Math help needed for speedo pulses...

Discussion in 'XJ Modifications' started by nimitz, Jan 25, 2007.

  1. nimitz

    nimitz Member

    Messages:
    228
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    McHenry, IL, US
    I'm starting a new thread because I need a specific answer and I don't think anybody will see it at the bottom of the other one.

    Working on creating an auto-cancel unit that handles LED lights and will replace the stock system without needing the load balancers.

    I've got all the data I need except one piece - how many pulses the distance sensor in the speedometer would count off for 150 meters. That number shouldn't change regardless of speed - you reach 150 meters faster or slower but it's still a count for 150 meters.

    I blatantly have some serious issues with math - I'm "mathlexic" among other things. But I'm fantastically good with computers and electronics. (Now that I found my damn schematics and dug into my turn signal and realize that there's no canceling "solenoid" in the switch. :oops: )

    So if someone can figure out the number for me all that would remain would be to prototype, program, and test. (And I have prototyping parts on the way.)

    Would someone mind giving me that figure please?
     
  2. wdenny

    wdenny Member

    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Kansas City
    nimitz,

    I think I can help. If my memory of geometry serves me correctly, you should follow a method close to this one.

    150 meters / Wheal Circumfrance in meters = Wheel Revolutions

    Wheel Revolutions / #Wheel Revolutions per 1 Motor Rev = Number of Motor Revolutions

    I think: 1 motor revolution = 1 pulse.

    Now, it will make a difference what gear you are in, as the gearing changes the Wheel revs per motor rev number. However, if you wanted to be extra thorough, you could get this measurement in 1st and 2nd gear and split the difference.

    However, I have an alternate solution. You meantioned that you were good with electronics, and there may be a simpler way to do an autocancel. Ride the bike from a stop to 150 meters a couple times and time it. Get a general time for this distance from a stop or a turn. Then use a very cheap and easy 555 timer IC and configure it as a one shot timer. This is how I am designing the autocancel on my bike. Then you won't even have to bother with the pulse problem.

    Another thought would be to set the signal to blink continually, with a 555 in line that is only activated when tripped by a pulse from the spedo. This would solve the problem of the signal running for a certain amount of time while stopped and then shutting off before the turn is complete.

    Let me know how it works out for ya. Would love to see your schematics as well.
     
  3. Fraps

    Fraps Member

    Messages:
    712
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Kitchener, Ontario, Canada
  4. nimitz

    nimitz Member

    Messages:
    228
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    McHenry, IL, US
    Thanks for the info.

    I'm actually working on handling the timing in software. Basically I'll count the pulses while doing a ten-second count then if I haven't reached the right amount of pulses I'll keep counting pulses until I do. All within a DO-WHILE running the flasher circuit.

    And yes I'll post schematics as soon as I get the second revision of them drawn up. I wish there was a good schematic program for the Mac that didn't cost a bundle or didn't suck. :-(

    I did figure out that this could be done a much easier way though - in case you missed the previous thread.

    You could add an accelerometer to the circuit. If the bike is tilted more than X degrees or the bike has forward motion more than X amount then start a ten count. That would simplify the circuit and the programming.
     
  5. nimitz

    nimitz Member

    Messages:
    228
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    McHenry, IL, US
    That link confirms what I discovered last night and that the auto-cancel works on a grounding switch principle. Thanks for the info!
     
  6. wdenny

    wdenny Member

    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Kansas City
    Timing in software eh? What's the poison? ARM,PIC,Basic STAMP? You sound like my kinda biker.

    I was going to voice the accelerometer idea before, but wasn't sure of what lengths you were willing to go to. Since complexity isn't a problem, I would totally recomend going with the accelerometer. BUT! Not on the tilt axis. I would but it on the same axis as the centerline of the bike. This way, if you are stopped, the signal flashes, until the bike starts moving, then timer kicks in as the accelerometer moves backwards. If you are moving and decide to signal for a turn, the timer doesn't kick in until the bike starts to slow down.

    Not that I think you jerry rig things, but if the cost of a sensors is a problem, I once rigged a system like that (dual direction accelerometer) from old thermostat parts. Some spring filament and some mercury switches and you're good to go. Assuming you don't mind riding with mercury on your bike. Another way to go is a bent piece of tube and ball bearings.

    It sounds to me like you are more than capable of handling the project and I am excited to see how it comes out.
     
  7. nimitz

    nimitz Member

    Messages:
    228
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    McHenry, IL, US
    Basic Stamp for the moment. I'll move to something more complex further down the road.

    Actually you can get a two-axis accelerometer for about $30 so that allows a test for both a tilt condition of the bike and forward motion. The tilt is necessary in my opinion for an already moving turn otherwise you get an immediate ten-count. And how many of us slow down enough to affect the accelerometer before a highway off-ramp? ;-)

    *nod* I've seen the ball-bearing one. Price isn't really the issue here but I'd like to try and replicate the existing system before doing something more complex. That and I'd like to try and keep this within a certain budget for other rider's sake.

    The biggest problem is the usual one - time. :-/
     
  8. wdenny

    wdenny Member

    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Kansas City
    An excellent point. I hadn't thought of that. Two heads are better than one.

    A side note, I was thinking. Not sure how many I/O's you got left, but since you are already dealing with the pulse from the speedo, might be kinda cool to work in a flashing brake light as well. As you slow down it blinks slower and slower, (1 per rev below 3600rpm). Could be an easy subroutine and upgrade for later.

    By the way, I never asked, you have LED signals or are you working with filaments style?
     
  9. nimitz

    nimitz Member

    Messages:
    228
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    McHenry, IL, US
    Indeed.

    Holding on that one. Have a friend doing single board computer development. He wants to maybe hook me up with an onboard computer system.

    The whole point of this exercise, beyond getting back to my component-level roots, is so I can replace the turn signals with the LED ones I just bought and not have to use load resistors.

    I suppose I could use relays and not change out the auto-cancel but this is much more rewarding. :)
     
  10. kevineleven

    kevineleven Member

    Messages:
    800
    Likes Received:
    8
    Trophy Points:
    18
    Location:
    Columbus, Ohio
    I think it'd be easier to just shut the blinker off after I make my turn.
     
  11. nimitz

    nimitz Member

    Messages:
    228
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    McHenry, IL, US
    But not nearly so much fun for some of us. ;-)
     
  12. kevineleven

    kevineleven Member

    Messages:
    800
    Likes Received:
    8
    Trophy Points:
    18
    Location:
    Columbus, Ohio
    I can relate, math is just not my thing, nor is electrical.
     

Share This Page