This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Speed Measurement for Cars

Hi Folks!
I'm working in a digital panel for rally cars, with some pressure, temperature, engine and car speed and other things. My problem is: I need to measure car speed with a sensor plugged into the gearbox (it gives me 4000 pulses on each kilometer). If I do a measure every 1 second I can get the car speed with some calculus. But how I can do a 1 second interrupt using timer 0 or 2 (I'm using C517 from infineon and timer 1 is measuring engine speed). My program is written in C. Any suggestion will be extremelly apreciated.
Thanks !!
Luis

Parents
  • You are right. I can measure period instead of frequency. In a 16 bit counter is ok to measure down to 15 pulses/second that gives me about 15 km/h. Some of our cars originally can measure only from 20km/h. And for sure my car cannot run at 921600km/h that corresponds to a 1 machine cycle. I think it's more clear now to me and I can figure out a routine to do that.
    Thank you a lot for now!!!!
    Luis

Reply
  • You are right. I can measure period instead of frequency. In a 16 bit counter is ok to measure down to 15 pulses/second that gives me about 15 km/h. Some of our cars originally can measure only from 20km/h. And for sure my car cannot run at 921600km/h that corresponds to a 1 machine cycle. I think it's more clear now to me and I can figure out a routine to do that.
    Thank you a lot for now!!!!
    Luis

Children
No data