Air gap in high resolution optical encoders

As the resolution of optical encoders increases, the distance from sensor to disk decreases. In the incremental encoder industry, this distance is called the “Air gap”.  In the side view photo of an optical encoder above, the two red lines indicate the air gap between the sensor and disk  in a QD145 incremental rotary encoder.

In the photo below I have added a human hair to show perspective.

For more information on optical encoders, contact Quantum Devices  at (608) 924-3000.

Advertisements

Incremental Encoder Lathe Automation

I have been working on a project to automate a manual lathing operation for our incremental encoder/optical encoder line.

To keep things simple, thumb switches allow the set point, along with some offsets for fine-tuning, to be entered.

I am not completely finished with project, but in the video below you can get a feel for how the machine will mill down the incremental encoder shaft.  We have control of the tool position to within .0001”

Cable length considerations with Incremental Encoders

The QD145, QD200 and QR12 series of optical encoders have  28 AWG conductors in the standard flying lead cable.

This gauge of cable is excellent for tight bends and fitting in applications where space is a premium.  The conductors can easily handle the 250 mA max current requirement of the encoder.

A smaller gauge conductor means that there will be a limit to the length of the cable. This is due to the DC resistive loss in the conductor that causes a slight voltage drop.  The longer the cable, the greater the voltage drop.

This voltage drop reduces the voltage seen at the encoder.

For an incremental encoder with a 28 AWG cable operating at 5VDC,  this limitation occurs at 17.85 feet.

There are a few ways around this incremental encoder cable length limitation:

1)       Splice the cable and go with a larger wire gauge for longer cable runs.

2)       Increase the power supply voltage to compensate for the voltage drop in the cable.

3)       For Incremental only (Non-commutated Encoders) Quantum Devices offers a 26 AWG cable.  26 AWG conductors bring the cable length limitation to 28.1 feet.

For other options, or help in determining the right wire gauge or incremental encoder for your application, you can reach Jim at (608) 924-300.

How to calculate pulses per degree for an incremental encoder

When using an Incremental Encoder, you often have to know how many pulses there are per degree of rotation. This is a very straightforward math problem.

Pulses per Degree = Number of encoder pulses per rotation/Number of degrees in a circle

For a 5000 Line count incremental rotary encoder we divide 5000/360 to get 13.89 pulses per degree of rotation.

Calculating Degrees of rotation per pulse for an incremental encoder

If you want to find out how many mechanical degrees of rotation there are for one pulse, you would do the problem the other way:

  Pulses per Degree = Number of degrees in a circle/Number of encoder pulses per rotation

For a 5000 rotary incremental encoder we divide 360 by 5000 to get 0.072.

This means that there are  0.072 Mechanical Degrees of rotation for every incremental encoder pulse.

This calculation is often useful if you have a counter totalizing incremental encoder pulses over a given distance or rotation.

Help picking the resolution of an Incremental Encoder

I recently received an e-mail asking for some help picking the right resolution for an Optical Incremental Encoder.  I have removed the personal information and the drive/controller information, otherwise the e-mail is verbatim:

Hi,

I am using a  motor controller in dual loop velocity mode.

What resolution incremental encoder would I need if I wanted to achieve 1%
or better velocity regulation in the range of 0.1RPM to 230RPM on the output
shaft of the gearbox.

The velocity control loop on the controller runs at 1kHz.

I have used your online calculator and it says 600k lines is this correct?

Here was my response:

I think I see what you are after, but you are missing  some information.  The Encoder calculator on the web site is a bit too simple for what you are trying to do.  It is really meant to be a quick conversion tool to find out of your Incremental Encoder is going to violate controller input frequency limitations, and the like.

The ability of the system to regulate to a given speed will depend on more than just the line count of the encoder. The real question that needs to be answered before we can determine Incremental Encoder resolution is “How many pulses are needed per update?” this is a question that will need to be asked of the Drive manufacturer/supplier, but I am sure they will have further questions about the motor size  and loading as well. 

It is easy to see that a motor without a load is easier to regulate than one with a dynamic (changing) load.  Therefore the size of the motor (and it’s inertia)  and the size of the load (and it’s inertia) will need to be taken into account.

With all that being said, we can do some quick math to get a feel for what we do know about the application.

Before I get started, one major thing to note here is that it appears that you are asking for regulation to occur on the output of the gearbox.  I am guessing that the Incremental Encoder is on the motor side (input) of the gear box, so there will be a scaling factor of the input to output ratio that will need to be taken into account along with the following math:

We know that you want to regulate speed within a range of 0.1 RPM to 230 RPM.

Taking the maximum speed of 230 RPM:
230/60 = 3.83 RPS  (Revolutions per Second)

We also know that the drive does a loop update rate of 1000 times/sec  (1Khz)

1000/3.83 = 260.89   updates per Revolution

360 Mechanical Degrees in a revolution

260.89/360     .72469 loop Updates per Degree at full speed.   (Or  1.379 Degrees traveled for every update)

Taking the minimum speed of .1 RPM:
0.1/60 = 0.00167 RPS
1000/ 0.00167  =  600,000 updates per revolution
600000/360 = 1666.67 Loop Updates Per Degree at minimum speed.

After this we really need to ask is “What can the drive do?”  At the top speed we will travel over a degree before the drive can update the loop for any error component.  In the minimum speed example, the drive will not see a change in count over 1667 loop updates. How does the drive handle this? 

To see what this means in Incremental Encoder pulses vs Drive Loop Updates we can take the highest line count encoder we currently provide, a 20,000 LC QR12:

20,000 pulses/360 Mechanical Degrees = 55.5 pulses per mechanical degree

if we use the encoder “post quad”, we can look at the edges of channels A and B pulses to 4x our resolution to 80,000 edges
80000 edges/360 Mechanical Degrees = 222.22 Edges per mechanical degree

For 260 RPM:
55.5 Pulses per degree/.72469 updates per degree = 76.58 pulses per loop update
using edges:
222.22/ .72469 = 306.33 edges per update

For 0.1 RPM:
55.5 Pulses per degree/1666.7 updates per degree = .0333 pulses per loop update (or 30.03 loop updates per Edge)
using edges:
222.22/1666.7 = 0.1333 edges per update  =  0.1333 Edges per update (or 7.5 loop updates per Edge)

Just taking a very rough look at it, a 20,000 line count incremental Encoder appears to have more than enough data per update to give the drive a good idea of how fast the motor is turning at the high speed, while at the slow speed the drive has to wait for several loop updates to pass until it sees even one edge of the Incremental Encoder Signals.

Will the drive be able to regulate at this lower speed without falling out of the 1% tolerance? My guess is probably not, but only the drive manufacturer can answer that for sure.  I am also wondering if 1% regulation is really needed at these slow speeds.

Keep in mind that these numbers would also need to be scaled by the input to output shaft ratio if the encoder is on the input side to the gearbox and the RPM’s above are actually referring to the output shaft speed.

Can the application tolerate being out of the 1% specification momentarily while the drive recovers?  If so, your focus should likely be on loop response time.

At the very least I am guessing tuning the loop to accommodate for both full speed and slow speed may be difficult.

I hope this helps,

Jim

Using an Optical Encoder to show RPM on a PLC

.

I have interfaced a 200 line count QD145 optical encoder to a DL06 PLC.  The PLC’s inputs are set up in high speed mode to receive the incremental quadrature pulses coming from the optical encoder.

.

CT174, the designated high speed up/down counter is used to interface to the encoder.  By default  inputs X0 and X1 are used for the A& B incremental signals, without having to code them to the counter.  Input X2 is designated as the reset, and may normally be connected to the index pulse of the encoder.

For an RPM application we will not be needing X2.

To calculate RPM with  an optical rotary encoder we use this formula:

RPM = (Frequency X 60)/ Line Count

Since frequency is “cycles per second” we set up our high speed timer on rung three to give us a count total every second;  this is our frequency.

Rung four is where all the heavy lifting happens:

After the high speed timer has timed out to one second, we load the PLC’c accumulator with the value from the counter (CT174). This will be our frequency, or the number of optical encoder counts that we have accumulated in one second.

We then multiply that value by 60, which uses our one second total to convert to the number of pulses occurring in a minute.

And we divide that total by 200, the line count, to get the RPM of the optical encoder.

We move the value to V2500, a location that we can pick up with the screen.

C3 is then used to reset the timer and counter and start the process over again.

.

.

Optical encoders that can be used to find RPM can be found at http://www.quantumdev.com

For help with optical encoders in your application,  E-mail the author at jmiller@quantumdev.com

.

Optical Encoder Incremental Signal Measurement

While most of us are familiar with how to measure something in mechanical degrees, incremental optical encoder signals are measured in electrical degrees.

360 electrical degrees is the period in which a signal completes one high to low transition.  This can be in any sort of waveform, but for encoders electrical degrees are usually used when referring to digital signals

Why Measure in Electrical Degrees?

We measure Incremental Optical Encoder signals in electrical degrees because this gives us a number that is not depended on other information.  If you were to talk about the high time of your encoder signal being 10 milliseconds, It doesn’t say anything about the quality of the signal unless you also talk about total cycle time.

An electrical degree specification gives us information about the signal with just one number.

Incremental Optical Encoder Symmetry

The ideal output for an incremental channel is a waveform with a 50/50 duty cycle.  This specification is termed “symmetry” and called out in electrical degrees.  Ideal symmetry is one where the high and low times of a channel are each 180 electrical degrees.

Some oscilloscopes will have a way to measure electrical degrees directly by setting a  full cycle to 360 degrees. In this post I am going to assume that your scope doesn’t have that feature and calculate electrical Degree symmetry measurements using the high, low and cycle durations as measured in time.

In the photo above the duration of a full cycle is 50.00 uS.

In this next photo we adjust the cursors to check the High time of the A channel we see that it is 24.80 uS

To find what this time would be in electrical degrees, we calculate as:

(high time/ cycle time) *360

Or

(24.80 uS/50.00 uS)* 360  = 178.56 Electrical Degrees

To find the low time you could measure it and again repeat the calculation (substituting in Low time for high time, but as long as the high time measurement was done carefully it is just as easy to subtract the high time from 360 Electrical Degrees to get the low time in Electrical Degrees.

360 – High pulse in electrical degrees = Low pulse in electrical Degrees

Or

360 – 178.56 = 181.44 Electrical Degrees

Note that to get the most accurate measurement you will want to widen out the cycle as far as possible.

Channel B is measured in the same way.

Incremental Optical Encoder Minimum Edge Separation.

Minimum A to B edge separation is an important measurement as the more time you have between the edges, the easier it is for a drive or controller to “see” the data coming in. This is particularly true with older equipment and when running at high speed.

Ideal A to B edge separation is 90 electrical degrees.  To find edge separation in an incremental optical encoder look for the smallest separation between adjacent edges of all six edges within an overlapping set of  A & B cycles.

To change from time to electrical degrees, we use a calculation similar to the one used for symmetry.

(Smallest Measurement/cycle time) *360 = Minimum Edge Separation in Electrical Degrees.

or

(12.00 uS/ 50.00 uS) * 360 = 86.4 Electrical Degrees Minimum A to B edge Separation


Video of an incremental optical encoder being tested for Symmetry and Minimum Edge Separation.

If you have any questions, I can be reached at jmiller@quantumdev.com.

For Optical Encoders with excellent  symmetry and edge separation go to Quantum Devices Encoder page

Quantum Devices Inc. is a leading manufacturer of optical rotary encoders their main website is at www.quantumdev.com They can be contacted via e-mail at info@quantumdev.com.