Hi all,
I'm new to this forum , I'm currently working on one of my projects in which I'm using a micrcontroller (Infineon C167) to capture the output signal from a speed sensor, this sensor is producing a digital pulse (not PWM) depending on the changes of frequency, e.g. 10Hz = 4mph. I managed to simulate the speed sensor output and the response frequency is 0 to 135 Hz representing from 0mph to 60mph. But I'm struggling to derive an algorithm using C language for the microcontroller to calculate the speed, can anyone help please? plus can I also calculate the RPM with a known speed?
I'm new to this forum , I'm currently working on one of my projects in which I'm using a micrcontroller (Infineon C167) to capture the output signal from a speed sensor, this sensor is producing a digital pulse (not PWM) depending on the changes of frequency, e.g. 10Hz = 4mph. I managed to simulate the speed sensor output and the response frequency is 0 to 135 Hz representing from 0mph to 60mph. But I'm struggling to derive an algorithm using C language for the microcontroller to calculate the speed, can anyone help please? plus can I also calculate the RPM with a known speed?