Embeeded RPM sensor calculation programming assistance

AI Thread Summary
The discussion focuses on calculating RPM using a Hall effect sensor with a 50% duty cycle on an Altera DE0 board running at 10MHz. The user has converted RPM limits to RPS by dividing by 60, resulting in a frequency range of 1.6 to 166.6 Hz. They are polling a digital input to record timestamps when the signal changes state, counting clock cycles until the signal returns to low. The user seeks clarification on whether dividing the tick count by the CPU frequency and then multiplying by 60 will yield the correct RPM calculation. Assistance is requested to confirm or correct this approach.
Sparkypedia
Messages
15
Reaction score
0
Hi

i am doing a side project of displaying RPM speed on the Altera development board DE0 which i have running at 10MHZ.

i have got a digital input from a hall effect sensor that has a frequency range from 1.6 to 166.6 Hz.

the signal incoming has a duty cycle of 50%

to calculate the RPM so far the RPM limits of 100rpm to 10000rpm have been converted to RPS by dividing by 60 which has given the above frequencies.

to calculate the time taken i an polling this pin, when is changes to a logic level high the time-stamp of the processor is recorded, from here every tick (clock cycle) is counted up until the signal returns to a logic level low the amount of tick counts is stopped and stored as a variable.

from this value how do i calculate the RPM, thoughts so far have been to divide this value by the CPU frequency (10MHz) to give Hz and then multiply by 60 to give RPM, but I am am not sure if this is correct.

all help with this issue greatly appreciated
 
Engineering news on Phys.org
I'm sorry about the threads heading, I was in a hurry when I typed it up.
 
Hi all, I have a question. So from the derivation of the Isentropic process relationship PV^gamma = constant, there is a step dW = PdV, which can only be said for quasi-equilibrium (or reversible) processes. As such I believe PV^gamma = constant (and the family of equations) should not be applicable to just adiabatic processes? Ie, it should be applicable only for adiabatic + reversible = isentropic processes? However, I've seen couple of online notes/books, and...
I have an engine that uses a dry sump oiling system. The oil collection pan has three AN fittings to use for scavenging. Two of the fittings are approximately on the same level, the third is about 1/2 to 3/4 inch higher than the other two. The system ran for years with no problem using a three stage pump (one pressure and two scavenge stages). The two scavenge stages were connected at times to any two of the three AN fittings on the tank. Recently I tried an upgrade to a four stage pump...
Back
Top