## how to measure speed using rotary encoder bought from cytro

Digital Fiber, Photoelectric, Laser Range, Optical, Temperature, Rotary Encoder, Ultrasonic, Gas, Gyro, Accelerometer, FlexiBend, Flexiforce, Compass......

### how to measure speed using rotary encoder bought from cytro

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.
useful84

Posts: 5
Joined: Tue Dec 29, 2009 1:02 pm

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

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.
~> How to ask QUESTIONS the SMART way in FORUM? <~

sich

Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

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

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.

shahrul

Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

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

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.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my

ober

Posts: 1455
Joined: Wed Apr 15, 2009 1:03 pm