Previous in Forum: rotary engine   Next in Forum: "Green" Falling Star?
Close
Close
Close
5 comments
Rate Comments: Nested
Participant

Join Date: Dec 2007
Posts: 2

Rotary Encoder

12/10/2007 1:08 PM

how to measure rotary encoder disk speed and direction using labview

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
Technical Fields - Architecture - New Member Popular Science - Weaponology - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Electrical Engineering - New Member Engineering Fields - Electromechanical Engineering - New Member Hobbies - Fishing - New Member Hobbies - Target Shooting - New Member Hobbies - Hunting - New Member

Join Date: Dec 2005
Location: Clemson, South Carolina
Posts: 1722
Good Answers: 18
#1

Re: Rotary Encoder

12/10/2007 2:55 PM

Go to National Instrument website, or their Motion Control card for PCI bus. To do this with a general purpose data acquisition and control card, it's rather involved.

Quadrature encoders have two channels in 90o phase quadrature. Let's say phase A goes high before phase B does. That indicates motion in one direction. When phase B goes high before phase A, that's motion in the other direction.

Each count of one phase will give 1/4 of the resolution of the resolution that a quadrature encoder is capable of. Since direction is desired, each state of the two channels, 0,0; 1,0; 1,1, and 0,1 must be monitored, which also gives the maximum resolution of the encoder.

Let's say the encoder has a basic resolution of 256 counts per channel per revolution, then the resolution is 1/1024 +/-1 (e. g. 1/(4 X 256) +/- 1) of one revolution when quadrature encoding is used.

Let's also say that the above encoder is used in a system that can run as high as 2400 RPM (40 revs per sec). That means that the encoder states can occur at a rate of 40,960 per second. That also means that your data acquisition system must be able to sample each input at a rate much higher than that (theoretically about 7 times the maximum signal rate for waveform reconstruction), such as 500,000 samples per second. One reason for this is to minimize errors when performing position control and the motor/load "rings" at that position until it damps out.

If you can't tell by now, there's a lot to learn.

__________________
We have met the enemy and he is us . . . Walt Kelly
Register to Reply
Guru
Engineering Fields - Electrical Engineering - New Member

Join Date: Oct 2007
Location: Sour Lake, TX 30°08'59.68"N 94°19'42.81"W
Posts: 675
Good Answers: 13
#4
In reply to #1

Re: Rotary Encoder

12/12/2007 10:58 AM

I had to detect some digital signals, on 18 channels, with a random apparition. In LabView you can sense the digital 1 or 0 by sampling ALL the chanels at a certain speed. Bill explained it to you. I discovered that some acquisition boards will allow you to a timing feature, in DAQmx timing, called change detection. You can select triggering on high transition, low transition or both. It acts as an interrupt, records a pulse apparition when it happens, and reduces your actions to a lower rate for your high speed rotation.

__________________
Bridge rule #1: Nobody is as good as he thinks about himself nor as dumb, as his partner thinks...
Register to Reply
Guru

Join Date: Sep 2007
Location: Wrong end of the yellow brick road in Oz
Posts: 930
Good Answers: 15
#2

Re: Rotary Encoder

12/10/2007 11:12 PM

Ok, you have a rotary encoder and a copy of LabView.

What IO modules do you have? and the software to talk to them?

Do you have the Interface for rotary Encoders?

Whats the "project" your attempting to use them in?

__________________
Qn, Whats the differance between a Snake and a Onion? Ans, No one cries when you chop up a Snake
Register to Reply
Power-User
Canada - Member - BC Born, Alberta Raised, Quebec (poutine) crazed... Engineering Fields - Aerospace Engineering - An airplane is just a bunch of beams... Hobbies - Model Rocketry - Had fun as a kid...fun stuff Hobbies - CNC - dreaming of cutting Engineering Fields - Control Engineering - PID ME!

Join Date: Aug 2006
Location: Montreal, CANADA
Posts: 368
Good Answers: 10
#3

Re: Rotary Encoder

12/11/2007 7:50 AM

The easy way is pay for whatever module you're missing...sorry I'm a bit out of date with labview and have only used a student edition in school

If you're experimenting or learning about encoders, I'd suggest building your own labview program with a light display that represents the different channels on the encoder. From here you can put together some simple switches to find the direction (does A go high then B? vice versa? Does A go low then B? Vice versa?) and derive positions. Speeds is simply the position in a certain time so you can decide how often to calculate speed.

I think a good exploration "the hard way", while a bit time consuming, really helps with the understanding and makes it easier to customize and design things without depending on 'blackbox' tools that you have to pay extra for.


Good luck!

__________________
kkjensen
Register to Reply
Guru
Popular Science - Biology - New Member Hobbies - Musician - New Member APIX Pilot Plant Design Project - Member - New Member Hobbies - CNC - New Member Fans of Old Computers - ZX-81 - New Member

Join Date: Jan 2007
Location: Centurion, South Africa
Posts: 3921
Good Answers: 97
#5

Re: Rotary Encoder

12/16/2007 7:24 AM

The same way a mouse detect the speed and direction of the mouse wheel. (ball mouse)

The 2 sensors should be offset at 120 degrees.

the way the pulses come through will be either 1 2 0 or 1 0 2

actually easy.

__________________
Never do today what you can put of until tomorrow - Student motto
Register to Reply
Register to Reply 5 comments
Copy to Clipboard

Users who posted comments:

Bill (1); Hendrik (1); indel (1); kkjensen (1); Snaketails (1)

Previous in Forum: rotary engine   Next in Forum: "Green" Falling Star?

Advertisement