Skewed Encoder Waveform

I received this e-mail from a potential customer who is trying to determine why his Encoder waveform doesn’t look right.  His name has been changed to protect his identity.

Hi Jim

I have just come across your Web page on RPM calculation using an optical encoder and oscilloscope. I was keen to test out this method of RPM calculation so rigged up my little encoder and oscilloscope without hesitation. I don’t seem to be getting a nice wave wave form across my display, its rather skewed. Could you just point out where I’m going wrong?

Really enjoyed reading your articles. Look forward to hearing back from you soon.

Eddie

Eddie’s photos are below:

Hi Eddie,

I would love to say the problem is that you aren’t using a Quantum Encoder….

But instead it looks like you are just missing a ground reference for the scope.   There is usually a little black alligator clip hanging off the side of the scope probe. That clip needs to be attached to the signal common on the encoder (black or negative on the power supply)

The red arrow below indicates where the ground clip should connect to the scope probe.

The reason your waveform looks  skewed is because the absence of a ground reference causes the scope to pick up ambient 60 Hz noise (it is everywhere, outlets, lights etc.) and couple it with your encoder signal.

Connecting the scope ground to the incremental encoder signal common will clear that right up.

Below is a picture of a scope probe with the ground clip.

Take care,

Jim

Jim Miller is a Design/Application engineer working for Quantum Devices Inc.

He can be reached at (608) 924-3000, or via e-mail at jmiller@quantumdev.com.

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”

QD145 Incremental Encoder IP-66 Sealing Option

Quantum Devices Inc. has a mounting option that allows for IP-66 sealing of the QD145 Incremental Encoder.  There are two o-rings in the clam shell design; One o-ring seals the encoder to the mounting surface (usually a motor), and the other o-ring seals the end bell housing that covers the encoder.  This is a popular, inexpensive, option for customers who may not need the IP-66 sealing,  but want some sort of end bell protection over the encoder.

The use of potentiometers in Incremental Encoder Design

Recently I decided to catalog the competitive Incremental Encoders that have populated the shelves surrounding my desk.  In doing so, I was surprised to find that many of our competitors use potentiometers in their designs.

I can understand why they need to use potentiometers.  In most designs the potentiometers are used to balance the raw analog signals produced by the Incremental Encoder sensor.   A potentiometer is the perfect component for this, you fire up the Incremental Encoder during test, lay a scope probe on it and dial the value specified by Engineering.  For most encoder designs, the only other option is to guess at some resistor values hoping that you don’t have to solder and unsolder resistors too many times until you hone in the correct signal, as that would be a very time consuming process.

While I can understand the use of Potentiometers, the reason that I am a bit shocked by their ubiquity in competitor’s designs is that potentiometers are inherently a much less reliable component.  A resistor is all one solid piece, but a potentiometer (which is a variable resistor) has a resistive track and a movable wiper that slides along to vary the resistance value. Moving parts are inherently less reliable than a non-moveable part.

Here are a few of the PCBs from various manufacturers ,  the potentiometers are circled in Red:

 

This next one is my favorite.  Thirteen potentiometers!

I am proud to say that Quantum Devices Encoders do not use potentiometers in their Incremental Encoder designs.  The reason we can avoid potentiometers is because of our patented phased array sensor that provides perfectly balanced complementary signals right from the sensor.

Other incremental encoder sensors suffer from having their active areas in different locations along the length of the sensor. Since the light source spreads light unevenly over the sensor, some active areas receive more light than others creating signal imbalances.

In Quantum Devices Incremental Encoders the photosensitive areas of each channel are interlaced with each another,  so all active areas receive the same amount of light.  This eliminates the need to balance any signals, which in turn eliminates the need for potentiometers in the design.

Below is an drawing of the phased array sensor Red indicates Channel A active areas, Blue indicates channel B active areas.

Optical Encoder Waveform Triggering

.

Seeing Encoder Quadrature with a two-channel scope

.

I received an e-mail from a customer concerned about the  “out of control” optical encoder signals he was seeing on his Oscilloscope.

The photo below shows the type of signal he was seeing:

The encoder in question was a 10,000 Line Count optical encoder. I noticed that he was running relatively slowly, about 100 RPM.  At that speed a lot of BLDC motors will show some degree of motor cogging, which is irregularity in rotation due to the magnetic fields in the rotor.

The customer was also triggering on an incremental channel (A&B) and not the index (Z) channel .

I am sure he had omitted the index as he wanted to see if the A&B incremental encoder signals were in quadrature.

I knew that when triggering on an incremental channel, the oscilloscope triggers off of whichever ever edge happens to occur within the scopes timing window.  What the customer was seeing on the oscilloscope was overlapping screen shots of the incremental channels as the motor speed changed.

In other words, he was seeing the encoder report exactly what the motor was doing.

If the customer were to trigger on Optical Encoder channel Z (Index) with one scope channel, they could see a nice steady signal. If they wanted to check quadrature, they could then compare the phasing of A and then the phasing of B relative to where the index channel was located.


That’s a little bit of a hassle, it’s much nicer to see both A and B optical encoder signals on the scope at the same time.  The way to do this with a two-channel scope like the Tektronix TDS 210 we have, is to use the scope’s external trigger and trigger off of channel Z.

The video below compares the optical encoder signals being triggered off of channel A and then being triggered off of channel Z.


Jim is an Applications Engineer for the leading optical encoder manufacturer Quantum Devices Inc. He can be reached via E-mail at jmiller@quantumdev.com.


Inverted Flex Mount for QD145 Optical Encoder

O.

.Another way to mount an Optical Encoder

Instead of using an end bell,  a lot of our motor manufacturer customers recess the QD145 optical encoder into an extended motor housing and then seal the motor with an end plate.

This has the advantage of being a lower cost item to manufacture, as the  motor housing is often extruded  or cast.  Just making the housing longer and providing an end plate usually costs less than casting a separate end bell.

Conventional Motor End Bell

But the downside to a recessed motor housing is that mounting an optical encoder in a recess like this creates a problem when tightening the set screws to the shaft. It often has to be done through an MS connector hole, or blind, by reaching the Allen wrench around and under the encoder.

Cast recess in motor housing

Because of this, we occasionally get asked for a a version of our QD145 optical encoder that allows the assembler to  access the set screws above the body of the encoder.  The inverted flex mount turns the encoder upside down allowing easy access to the set screws that are normally underneath the encoder.

The QD145 inverted flex mounti9ng option is not currently listed on our web site, but can be ordered using the following part numbers under the mounting options:

Use an 06 Mounting option for the inverted 1.157″ Bolt Circle flex mount.

Use an 07 Mounting option for the inverted 1.812″ Bolt circle flex mount.

The wiring is changed internal to the encoder so that the QD145 maintains correct phasing for all channels.

Another option for a drop in recess mounted encoder is the JR12 Jam Nut style encoder which does not use set screws to secure the encoder to the shaft, but a compression nut instead.

Dimensions for the 07 version of the QD145 Inverted flex mount.


Understanding Incremental Encoder signals

Which incremental encoder wires should I use?

Channels A & B (Incremental Channels)

Use only A (or only B) for an RPM or counting applications where the rotation is either unidirectional, or where you don’t need to know direction.

Use A and B together to know direction. After two low pulses the next high pulse indicates direction.  This is due to the phasing offset between A and B of 90 electrical degrees, placing the signals in what is known as quadrature.

These signals can also be used to set up an up/down counter

Index pulse, also known as Z, marker, or I

Index pulse is a pulse that occurs once per rotation. It’s duration is nominally one A (or B) electrical cycle, but can be gated to reduce the pulse width.

The Index (Z) pulse can be used to verify correct pulse count

The Incremental Encoder Index pulse is commonly used for precision homing.  As an example, a lead screw may bring a carriage back to a limit switch.  It is the nature of limit switches to close at relatively imprecise points. This only gives a coarse homing point. The machine can then rotate the lead screw until the Z pulse goes high.

For a 5000 line count encoder this would mean locating position to within 1/5000 of a rotation or a precision of .072 Mechanical Degrees.  This number would then be multiplied against lead screw travel.

Commutation (UVW) signals are used to commutate a brushless DC motor. I always like to compare these signals to that of a distributor in a car. The commutation (sometimes called “Hall”) signals tell the motor windings when to fire

You would need to have encoder commutation signals if the motor you are mounting the encoder to has a pole count and there is no other device doing the work of commutation.  It is important to note that commutation signals need to be aligned or “timed” to the motor.


Single ended VS differential

These terms refer not to the waveforms of signals, but instead to the way the signals are wired.

Single ended wiring uses one signal wire per channel and all signals are referenced to a common ground.

TTL and Open Collector are types of single ended wiring.

Differential wiring uses two wires per channel that are referenced to each other.  The signals on these wires are always 180 electrical degrees out of phase, or exact opposites.  This wiring is useful for higher noise immunity, at the cost of having more electrical connections.

Differential wiring is often employed in longer wire runs as any noise picked up on the wiring is common mode rejected.

RS-422 is an example of differential wiring.

.