Interfacing a 5Volt Incremental Encoder to 12 Volts


Interfacing to an Incremental Encoder using an optoisolator

When I chose the PLC that I wanted to build incremental encoder applications around, The DL06 seemed like a perfect low cost option, but what I failed to notice was that it had a minimum 12V input requirement to turn on the DC inputs. No problem, I thought, I’ll just get production to build me some of those 5-26V incremental encoders that are so popular with the kids now days.   I realized that plan was flawed once I saw how busy the production schedule was. It appears that word has gotten out that the QDI series of encoders are a great positional feedback option.

So what could I do? I already had 5V incremental encoders mounted on the motors. This carried the added bonus of the commutation tracks already being phased, meaning I didn’t have to worry about timing the Com tracks of the incremental encoder to the BLDC motor.

If only there was some way to turn a 5V signal into a 12V signal…

Well there is. You can use a device called an optoisolator, sometimes called an optocoupler, or photocoupler, although there are technically differences among these devices.

Here are some of them from my component stash. They seem to often come in white packaging.

My guess is that the white color is for better optical properties internal to the device, as white is much more reflective.

Looks like I only have one black sheep left in my flock.

An optoisolator consists of a light source on one side (usually an LED), and a phototransistor on the other.  It should probably be mentioned that the “tail end” of an optoisolator can also contain other devices, like an SCR,  Triac, or varistor. For what I needed, the transistor style output would work just fine.

Each side of the device is electrically isolated from the other so there can be a 5 volt potential on one side and a 12 volt potential on the other, each having a separate a ground.

I also needed to use at least a 100 ohm resistor on the cathode side of the LED.   This was done to limit the current though the optoisolator in order to keep from burning out the internal LED.   The inputs on the PLC already have built in internal resistance, so no resistors were needed there. I just wired it in series between the +12V source and the input. The PLC’s common was wired to ground.

Below is a down and dirty”trial run” at interfacing to the PLC.

There is sometimes a need for a customer to separate out incremental and commutation signals with separate voltage supplies.  Usually this is the case if the signals are running to two different devices, each with separate grounds.  For example, having a drive and a controller that are separated by a great distance.

For these custom designs we have used the optoisolators internal to the encoder.  Here they are in a smaller surface mount package.

While optoisolators can be a good solution to an incremental encoder  voltage-interfacing problem, ordering an encoder like a 5-26 Volt QD145, or QD200 and NOT having to mess with interfacing makes a lot more sense.

You should also keep in mind that there is a real delay using devices like this that can result in positional error. For demonstration purposes, or slow movers, this may not matter, but if you are trying to keep a the reigns tight on a control loop, 20 uS or so of delay may be too much.

To find your multi-voltage encoder answers go to

Jim can be reached at:


About Quantum Devices Inc.
Quantum Devices, Inc. (QDI) Barneveld, WI, was established as a Wisconsin corporation in October 1989, as an outgrowth of activities in the general area of optoelectronics. The main goal of QDI is to provide customers with a complete source for all stages of product design and development, starting from concept to a marketable commodity. These products include application specific Silicon Photodiodes, Optical Encoders and Light Emitting Diodes (LED) for commercial, industrial and medical applications. QDI's photodiodes and LED's are used in instrumentation for photosynthesis and photobiological research, biomedical and medical instrumentation for measuring blood sugar levels (glucometer), oxyhemoglobin and pulse rate (pulse oxymeter). One of the most dramatic products developed at QDI was the application of LED lighting systems for use as the light source for Photodynamic Therapy (PDT). Sales of QDI products include both domestic and international markets. Quality and reliability are very important concepts in maintaining our company wide commitment to overall product performance. Quality simply means continuous process improvement. We are committed to continually increasing our product excellence through increased quality and reliability. Quantum Devices, Inc. is ISO 9001 certified and the ISO Standard will provide the guidance for the vital function of maintaining our commitment to constantly improve our product quality. Quantum Devices is now proud to introduce it's new line of rotary encoders. Incorporating QDI's patented sensor technology, our QPhase™ Family of Encoders feature high resolution, increased frequency response and superior reliability over temperature (0 to 120 degrees C). QDI incremental and absolute encoders set a new standard and are backed by a 2 year factory warranty. We invite you to request an evaluation unit, additional information or price quotations. Mission Statement Quantum Devices is dedicated to the principle that light provides the power for all life on earth. We believe the quality, delivery and control of light is essential to the wellness of man and his advancement into the future.

2 Responses to Interfacing a 5Volt Incremental Encoder to 12 Volts

  1. Wow, incredible blog format! How long have you ever been blogging for? you make blogging look easy. The full look of your website is magnificent, let alone the content material!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: