Transmissive optical encoder's output signals

Thread Starter

nqchanh194

Joined Jul 5, 2013
27
Hi all, I've got a problem about the working principle of transmissive optical encoder.
Please refer to the attached image.

As you can see, in the situation like the image, the amount of light that each photodiode of the pair for each channel receives is equal, so both output signals are at low logic level.

If we continue to move the encoder so that the photodiode B(+) stays within the window while the photodiode B(-) is still within the bar. Therefore the output signal on channel B switches to high logic level because the photodiode B(+) gets more light from emitter than the photodiode B(-).
In case we remain this situation unchanged for a long time (a few minutes for example), the output signal at channel B is still high level. Is that right ?

Hope you light me up. Thanks.
 

Attachments

BillB3857

Joined Feb 28, 2009
2,570
Since the encoder is designed and used to detect and quantify motion, if it is left in a stationary position, the signals will remain in the state they were in when motion stopped, which could be any of four combinations. As the encoder senses motion, a simple encoder will produce an output signal known as a quadrature output. That means you would see two square waves that are displaced by 90 electrical degrees from each other. One simple use of the quadrature output is to send one signal to the COUNT input and the other input to the UP/DOWN control line of a reversible counter. One direction of movement on the encoder will cause the counter to count up and the opposite direction will cause the counter to count down.

EDIT: After reading your original post again, I see that you are asking about the two photo diodes in channel B. The logic block will handle that and I really can's answer how it functions. Maybe others have more info about how that particular configuration works. Do you have a manufacturer/part number for the particular encoder?
 
Last edited:

cmartinez

Joined Jan 17, 2007
8,220
I think that the reason they're using two photo diodes per channel is so as to minimize noise. In your diagram, each pair is connected to a comparator, that way some hysteresis is added to the circuit, minimizing false triggering when one of the diodes is at the very edge of the optical window. This is really not necessary if the later logic circuit (the one that checks each channel's output) is fast enough, of if the diode's signal is made to behave like a schmitt trigger. In that case, only two diodes are necessary instead of four.
 

Thread Starter

nqchanh194

Joined Jul 5, 2013
27
In fact, I mean that I want to significantly reduce current consumption of encoder which is up to tens of mA. This does not suit an application using a battery cell.

The final aim is to detect the transition between a bar and a window.
So I intend to periodically enable encoder by a short pulses to decline current consumption.
This means that a particular position might be consecutively detected several times because the scanning speed is extremely higher than the moving speed of encoder. Here I use a microcontroller like MSP430 from Texas Instrument.

And what I hope to get at channel A or B is just a rising edge corresponding to the window position and nothing in case of the bar position.
So that's why I asked you that in case encoder in the position described in the previous post, if I enable it again while encoder hasn't changed its position, whether I can get a rising edge on channel B ? Or I have to remain the enabling state until the encoder has already passed at least a pair of a bar and a window ?

Thanks.
 
Last edited:

MikeML

Joined Oct 2, 2009
5,444
I was objecting to the fact that the diagram does not represent the quadrature alignment of the optical axes of the two channels. The diagram shows the two channels being displaced by the pitch of the fingers in the encoder wheel, while in reality they must be displaced by 1.5 * the pitch.
 

cmartinez

Joined Jan 17, 2007
8,220
In fact, I mean that I want to significantly reduce current consumption of encoder which is up to tens of mA. This does not suit an application using a battery cell.

The final aim is to detect the transition between a bar and a window.
So I intend to periodically enable encoder by a short pulses to decline current consumption.
This means that a particular position might be consecutively detected several times because the scanning speed is extremely higher than the moving speed of encoder. Here I use a microcontroller like MSP430 from Texas Instrument.

And what I hope to get at channel A or B is just a rising edge corresponding to the window position and nothing in case of the bar position.
So that's why I asked you that in case encoder in the position described in the previous post, if I enable it again while encoder hasn't changed its position, whether I can get a rising edge on channel B again ?

Thanks.
Well, your logic should periodically check for the state of each channel, and not just for rising or falling edges if you want to minimize power drain... In that case I would use a two diode encoder... But I think you might also find this interesting, it's a line of encoders (by Austria Micro Systems) that work by analyzing the orientation of a magnetic field. They're far more resistant to dirt and vibration than the optical ones, and they'd probably consume less power. Some of them promise a power drain of only 3 mA, while some others consume as much as 23 mA, not bad when you consider that each LED in your optical encoder would probably burn at least 10 mA, plus whatever your logic circuit and sensor also demand. Plus, some of them not only work incrementally, but they also have an absolute position serial digital output, and have a 0 to 5V analog output representing speed (RPM) or absolute position.
If you are developing a project from scratch, I'd seriously consider the magnetic encoder option.
 

Thread Starter

nqchanh194

Joined Jul 5, 2013
27
Well, your logic should periodically check for the state of each channel, and not just for rising or falling edges if you want to minimize power drain... In that case I would use a two diode encoder... But I think you might also find this interesting, it's a line of encoders (by Austria Micro Systems) that work by analyzing the orientation of a magnetic field. They're far more resistant to dirt and vibration than the optical ones, and they'd probably consume less power. Some of them promise a power drain of only 3 mA, while some others consume as much as 23 mA, not bad when you consider that each LED in your optical encoder would probably burn at least 10 mA, plus whatever your logic circuit and sensor also demand. Plus, some of them not only work incrementally, but they also have an absolute position serial digital output, and have a 0 to 5V analog output representing speed (RPM) or absolute position.
If you are developing a project from scratch, I'd seriously consider the magnetic encoder option.
Actually, I intend to make the stuff like a digital calliper, but capacitive technology which is often applied in this case seems really so theoretical and difficult that I can do.
However, as you've already said, if using an optical encoder, the problem is effect of dirt, water, etc between the encoder and code strip/code wheel as well as current consumption of emitter on encoder.
 

cmartinez

Joined Jan 17, 2007
8,220
Actually, I intend to make the stuff like a digital calliper, but capacitive technology which is often applied in this case seems really so theoretical and difficult that I can do.
However, as you've already said, if using an optical encoder, the problem is effect of dirt, water, etc between the encoder and code strip/code wheel as well as current consumption of emitter on encoder.
Let me get this straight.... you're trying to build a highly accurate, very short range encoder? Just like a linear output capacitive (or inductive) sensor?
 

Thread Starter

nqchanh194

Joined Jul 5, 2013
27
That shouldn't be that hard....

So your requirements are:
  • Low cost
  • Low power drain
  • Direct contact
  • Portable
  • LCD display? analog/digital output???
Anything else I'm missing here?
The strict requirements is low power consumption, I expected 3mA or less for average because I use a battery cell as a supply source.
About other parts such as LCD display, MCU, they're all right now. I'm stuck in choosing sensor.
I expect the sensor cost is not more than $10 USD.
And it's great to get the direct contact to manufacturers.
^ ~ ^
 

Thread Starter

nqchanh194

Joined Jul 5, 2013
27
Well, your logic should periodically check for the state of each channel, and not just for rising or falling edges if you want to minimize power drain... In that case I would use a two diode encoder... But I think you might also find this interesting, it's a line of encoders (by Austria Micro Systems) that work by analyzing the orientation of a magnetic field. They're far more resistant to dirt and vibration than the optical ones, and they'd probably consume less power. Some of them promise a power drain of only 3 mA, while some others consume as much as 23 mA, not bad when you consider that each LED in your optical encoder would probably burn at least 10 mA, plus whatever your logic circuit and sensor also demand. Plus, some of them not only work incrementally, but they also have an absolute position serial digital output, and have a 0 to 5V analog output representing speed (RPM) or absolute position.
If you are developing a project from scratch, I'd seriously consider the magnetic encoder option.
Have you ever tried a hall sensor ?
 

GopherT

Joined Nov 23, 2012
8,009
In the original post, there is no clear indication of which photodiodes are connected to each input of the two comparitors. I would assume it is a quadrature output but, maybe this topic could be clarified if the entire datasheet could be posted.
 

cmartinez

Joined Jan 17, 2007
8,220
Have you ever tried a hall sensor ?
What I meant by direct contact was that the sensor would have direct physical contact with its intended target... but direct contact to manufacturers would be another positive advantage...
Yes, a hall sensor would probably be a good idea (I just thought of that last night, but I was too tired to write another post before going to bed... ha h ha...), I've used both linear and digital output sensors in the past and I can tell you they're cheap and highly reliable. I suggest you look at the stuff made by Allegro MicroSystems, you might find something interesting there.
If you only need 1/2 mm resolution at 20 cm (40 divisions), that means that you'd need a resolution of only 6 bits, which would give you 64 divisions... there are some extremely cheap A/D converters out there that could help you with this... maybe you could place a magnet on your target and measure its distance to a linear output hall sensor interfaced to one of those A/D chips...
It's just an idea...
 

alfacliff

Joined Dec 13, 2013
2,458
that sensor resolution would be multiplied by the threads or gears on your tool, such as a 4 bit resolution on a #4-40 thread screw gives you 16 counts per revolution, and .025 inch per count.
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
Also the resolution of a typical quadrature output may be further increased by either x2 or x4 by counting the leading/trailing edges of one or both pulses.
Max.
 
Top