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 some questions about the tesla turbine: is a tesla turbine more efficient than a steam engine or a stirling engine ? about the discs of the tesla turbine warping because of the high speed rotations; does running the engine on a lower speed solve that or will the discs warp anyway after time ? what is the difference in efficiency between the tesla turbine running at high speed and running it at a lower speed ( as fast as possible but low enough to not warp de discs) and: i...
Thread 'Where is my curb stop?'
My water meter is submerged under water for about 95% of the year. Today I took a photograph of the inside of my water meter box because today is one of the rare days that my water meter is not submerged in water. Here is the photograph that I took of my water meter with the cover on: Here is a photograph I took of my water meter with the cover off: I edited the photograph to draw a red circle around a knob on my water meter. Is that knob that I drew a red circle around my meter...
Back
Top