Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

position or speed encoders

Status
Not open for further replies.

seyyah

Advanced Member level 2
Joined
Oct 7, 2001
Messages
646
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Activity points
6,233
What type of encoders are there? What are the properties of incremental encoders ? What's the difference than absolute encoders?
 

At the incremental encoders, as like the mouse of the PC, it is not a limited the freedom of move.
At the absolute encoder, you can turn or move the measuring surface only between A and B. The space between A and B is coded. Usually at the end of the space is a stopper.
 

Linear and Rotary Encoders by Thomas E. Kissell Industrial Electronics said:
One of the major drawbacks of the incremental encoder is that the number of pulses that are counted are stored in a buffer or external counter. If power loss occurs, the count will be lost. This means that if a machine with an encoder has its electricity turned off each night or for maintenance, the encoder will not know its exact position when power is restored. The encoder must use a home-detection switch to indicate the correct machine position. The incremental encoder uses a homing routine that forces the motor to move until a home limit switch is activated. When the home limit switch is activated, the buffer or counter is zeroed and the system knows where it is relative to fixed positional points. The absolute encoder is designed to correct this problem. It is designed in such a way that the machine will always know its location.

More info at: [url]https://zone.ni.com/devzone/conceptd.nsf/webmain/9BCCE7934DACF1298625680700573BC0?OpenDocument[/url]

And, absolute encoder is more expensive compared to incremental encoder.
 

So, absolute encoders are not suitable for continous rotating operation right?
 

Both types of encoder can be used for position feedback of rotational motion application.

When you use incremental encoder, in your software, you need to memorize the number of pulses (and hence counts) received from the encoder. With the number of counts, you can calculate where is the position of your rotor now. So, if the power supply (to encoder or to controller) is lost (for a second or few miliseconds), the controller will lose the counter value and therefore, it will not know where is the rotor position after the power is recovered. In certain applications, you need to initialize the rotor position again before you could continue operating the motor.

When you use absolute encoder, you do not need to count the pulse, as the feedback signal from the encoder itself already contains the information of rotor position.

Incremental encoder is preferred because it's cheaper compared to absolute encoder. Another reason (but need to confirm ...) is probably the interface (to controller) of absolute encoder needs more wires.

One of the challenges in sensorless or positionless control of motor is to initialize the 'start' position. This is important because the controller needs the info to turn on the correct phase.
 

Ok i understood the incremental encoder. I asked the absolute encoder. You said that we know the position of the rotor. So you know only the position between 0-360 degrees. If you use the motor on a car for example, you can't know how much you go or how many revolutions did it take. You must count and save the revolutions right?
 

For both an absolute encoder and an incremental encoder, yes, you need to poll the encoder data over time to know exactly how far you've gone or how fast you're currently going.

But it is not as tough as it may look. Take a look at figure 2 (the waveform) of
**broken link removed**

The example's high resolution absolute encoder requires 11 bits of binary data to encode an entire revolution in absolute form. To know where the encoder is accurately placed requires all 11 bits.

But if you need to know instantaneous speed, that can be accomplished by monitoring a single data line. If the sixth bit generates 32 bits per revolution, then 32 counts gets you one revolution. The instantaneous speed could be determined by calculating the time between pulses on that bit line and determing the change in position in time. Integrating the lowest significant bit will provide high accuracy of instantaneous speed -- but requires lots of sampling to do so. On the other hand total travelled distance could be approximated within one revolution by simply looking at the highest order bit. (One pulse = one revolution).

Error checking is accomplished by correlating pulses (just in case you think you are getting false counts). Bit 10 has twice as many pulses than bit 11, Bit 9 twice as many as 10 and so on. An error checking scheme would poll to verify that there is not error associated with missed counts, by verifying different bit lines give the expected total number of counts.
 

incremental encoders just have slots and an opto interrupter which detects the number of pulses so it is used in speed measurment and position control, you can use two channel inc-encoder for the direction detect and third channel as index pulse to reset the counter.
the disadvantage of these encoders that when you use it in position control you must initialize the machine you control by returning the controlled machine to the zero position when you turn the power on.

absolute encoders are used usually for position control because it has multi channel output with coded channels (BCD or gray code) every code refers to a position for the shaft so you do not need to initialize it on power.
 

hi everyone!
I'm using rotary encoder (2000 pulses/rotation) but misscount occurs sometime (Roto hasn't turn but my uP counts):cry:.
I thinks my alorithms has problem.

if (OldLevelA && !PhaseA) then
{
if (PhaseB) then
Counter++
else
Counter--
}
OldLevelA = PhaseA

How to prevent misscount occurs?
Thanks!
I have to use uP 89C51 (don't use high speed counter)
 

Hello Farmer,
I think you are right.
The algorithm is not correct.
Supose that A is high and B is high. Now consider a little vibration in the axis, rotor or anything your encoder is conected to. The oscilation could be small, as to not change the B phase state. So, every time you sense a negative edge in A you are incrementing Counter.
The encoder algorithm needs to remember the A edge and count up or down in the B edge.

Hope this helps.

Best regards
 

To count use A and B separately. Don't relate one to other. You can use both of them or only one of them. To decide increment or decrement watch for if the same phase comes 2 times. When the same phase occurs two times, then revert the counting direction.
 

On my system i noticed that noise comes into cables that connects encoder and MCU board and counter counts pulses even if nothing happens! Also vibration can make false counting as stated before.
 

Electrical noise can cause false counts. You should troubleshoot the noise and eliminate it somehow, preferably at its source.

Vibration can cause the reading to jump back and forth slightly. When the vibration stops, the reading should be correct. If the reading becomes incorrect, then your decoding logic is wrong or too slow to accurately follow the vibration. Or perhaps your encoder is not designed to handle that much vibration.
 

jorgito said:
Hello Farmer,
I think you are right.
The algorithm is not correct.
Supose that A is high and B is high. Now consider a little vibration in the axis, rotor or anything your encoder is conected to. The oscilation could be small, as to not change the B phase state. So, every time you sense a negative edge in A you are incrementing Counter.
The encoder algorithm needs to remember the A edge and count up or down in the B edge.
Hope this helps.

Best regards

Thx for replying
Do u means "The encoder algorithm needs to remember the A level and count up or down in the B edge"?

My friend give me same idea.

if (oldA && !phaseA && B) then
{
count ++
}

if (!oldA && phaseA && B) then
{
count --
}

OldA = phaseA

Do u think it work well?

i'm testing again.
 

Hello Farmer,

Think on the position counter as a finite state machine yoou could implement in harware or software. Here is a table that tells you what to do with your present an past encoder outputs. You can get past values using a couple of flip flops or the same way you are doing right now.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top