I have this hall effect sensor that is measuring the speed of a shaft... the sensor puts out about a 1k signal when the shaft is at full speed... The hall sensor (i'm told) makes a square wave, exactly like a PWM... Now I'm going to drasticaly chage shaft sizes, but i cant modify the sensor and i need the sensor to act like the same as it did w/ the smaller shaft... So i want to make a pic deal to take the signal coming in, the adjust it to what it 'should' be then output that on a pwm
So I was planning on taking the signal coming in, sample it (count 1 high wait for 1 low, counter++), do this for a set amount of time (.125 seconds), take my counter and divide over time (pulses per second) then adjust the that value (i can do the shaft size change math) and set the PWM to a correct value...
Is that a pretty good way to go about it ? Or does anyone have anything better ?
Thanks
-Kyle
So I was planning on taking the signal coming in, sample it (count 1 high wait for 1 low, counter++), do this for a set amount of time (.125 seconds), take my counter and divide over time (pulses per second) then adjust the that value (i can do the shaft size change math) and set the PWM to a correct value...
Is that a pretty good way to go about it ? Or does anyone have anything better ?
Thanks
-Kyle