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

Postby useful84 » Mon Apr 05, 2010 5:43 pm

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
Freshie
 
Posts: 5
Joined: Tue Dec 29, 2009 1:02 pm

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

Postby sich » Tue Apr 06, 2010 5:39 pm

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? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

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

Postby shahrul » Sun Apr 25, 2010 11:00 pm

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.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

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

Postby ober » Wed Apr 28, 2010 1:43 pm

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
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm


Return to Sensor

Who is online

Users browsing this forum: No registered users and 7 guests

cron