Shop OBEX P1 Docs P2 Docs Learn Events
car's VSS reading — Parallax Forums

car's VSS reading

DiemasterDiemaster Posts: 9
edited 2008-09-23 19:48 in BASIC Stamp
hello i'm trying to get the stamp to read a VSS or·Vehicle Speed Sensor to make a "automatic" out of my manual tranny. i am trying to have it shift off of speed and eventualy load. i dont know how i would even start to codesoming like that. i'm preaty sure it's the standard 4000 pulses per mile but how do i change that into MPH to store in a varible? all my programs so far have been simple and i've never had to time or convert anyting like this.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-09-23 02:13
    Start by finding out just what the signal is. What voltages and how many actual pulses there are. Draw up a flow chart or plan of what you have and how you plan to get what you need then convert it to a math formula with integers only. Come back and let us know what you came up with.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • SRLMSRLM Posts: 5,045
    edited 2008-09-23 04:07
    Do it the traditional way (since you're using the BS2): write down your task. Break it down into sub tasks. Break those down further, until you get small, managable steps to work with.
  • DJSandbergDJSandberg Posts: 56
    edited 2008-09-23 05:47
    Diemaster,

    You can go to this site: http://www.discounttire.com/dtcs/infoTireMath.dos and determine the number of revolutions per mile based on your tire size.

    Then multiply this number times the gear ration of your differential. This will tell you how many times the driveshaft turns in a mile.

    An easy way to determine the pulses per tire revolution is to mark your tire with chalk where it meets the road. Push the car until the chalk mark is at the bottom while using a scope or logic probe hooked to the speed sensor to see how many pulses per tire revolution. To increase accuracy, push the car farther to get more counts.

    A vehicle with an automatic looks at vehicle speed and throttle opening. Newer cars also use engine temperature. You may have a throttle position sensor that you can take a reading off if your vehicle is older. Many newer cars produce a digital output for the throttle positon. Either way, you will have to convert that signal into something the Stamp can read. For example on an analog (older) throttle sensor, you will need an ADC (analog to digital) Converter.

    If you have the speed and throttle position, you can calculate which gear the car should be in. For example: You are getting 50 pulses per second at 25 miles per hour. Your range of speed is 0-100 so that makes your range of pulses per second 0 - 200.

    Your throttle opening range is 0% to 100%.

    You manually drive the car and determine how you want the Stamp to drive the car. Then you figure out a mathmatical formula to determine which gear to be in. You can use the DEBUG command and read what the Stamp sees while you are driving. Then put it on a grid or spread sheet. The rest is sending control signals to the shifter and clutch to actually make the gear change.

    Like the man says, break it into pieces.

    Daryl
  • SRLMSRLM Posts: 5,045
    edited 2008-09-23 19:48
    Best have a passenger in the car to do the debugging or driving, you don't want to do both at the same time.
Sign In or Register to comment.