Page 1 of 1

how to measure speed using rotary encoder bought from cytro

PostPosted: Mon Apr 05, 2010 5:43 pm
by useful84
how to measure speed using rotary encoder that i bought from cytron?


i am using IC PIC16F877A..

if i do a loop program for example:

int i=0;

i=i+1;

and i let the program count it

in 1 second,what is the possibly the value of i?

because i want to compare the value of i with the value of signal receive from rotary encoder in 1 second.

Re: how to measure speed using rotary encoder bought from cytro

PostPosted: Tue Apr 06, 2010 5:39 pm
by sich
what's the exact rotary encoder u bought? The value u'll get is highly depending on the type of encoder u r using and the rotation speed.

Re: how to measure speed using rotary encoder bought from cytro

PostPosted: Sun Apr 25, 2010 11:00 pm
by shahrul
That is rotary encoder give 5000 pulse per rotation.
Then you count how many pulse in 1s. ex give X value. Count 1s using interrupt.
After that, calculate rotation per second by
X pulse per second divide 5000 pulse per rotation.

Re: how to measure speed using rotary encoder bought from cytro

PostPosted: Wed Apr 28, 2010 1:43 pm
by ober
After you get the pulses per second, you need to convert into distance per second if you are calculating distance speed for example m/s.