Pages: [1]   Go Down
Author Topic: How to connect this rotary encoder  (Read 413 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 2
Posts: 226
#include˂baby.h˃™
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It has 4 IR diodes with the black/white pinwheel and colored wires shown. There are no markings on it.

I tried 5V to red through 10K and black to ground. Measured Green and Blue with o-scope probe and just detected a stead 1.8V when turning.


* encoder.png (17.01 KB, 481x571 - viewed 17 times.)
Logged

0
Offline Offline
Shannon Member
****
Karma: 207
Posts: 12205
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That diagram must be wrong, the 200 ohm resistor should be the series resistor for both IR emitters,
suggesting green as +5, but the 10k resistors are then not right for green as +ve supply.

if you wire the power correctly there should be about 10+mA flowing (indicating the emitters are functioning).

If no current flows its definitely wrong.
Logged

[ I won't respond to messages, use the forum please ]

0
Offline Offline
Full Member
***
Karma: 2
Posts: 226
#include˂baby.h˃™
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mark, I think you are right! I could not see the orientation of the diodes and assumed they'd be radial, but it makes more sense drawn this way.

I still am not sure how it's supposed to work? Or maybe just supplying voltage and probing the signal lines is not the right way to measure it?
Maybe also I do not need the 10K resistor on the supply?

Here is an updated image.


* encoder2.png (30.43 KB, 1002x1189 - viewed 9 times.)
Logged

0
Offline Offline
Full Member
***
Karma: 2
Posts: 226
#include˂baby.h˃™
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After thinking about this again and calculating the current through a 200 ohm resistor, I get 25 mA. I'll try the measurement again tonight and see if I did not already blow up my expensive encoder smiley
Logged

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1676
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Those LEDs are paired, right ?

Then probably one LED lights up the disk.
A dark section will do poor reflection, a light section will do good reflection.
That reflection will then be picked up by the other "diode".
You'll need one wire for the LEDs and one wire per receiving "diode" for your Arduino to see which one is seeing the light at a moment.
And of course you need the common (maybe ground, but might as well be a VDD ("plus") wire).

In this case, both of your schematics would be incorrect.
« Last Edit: May 02, 2013, 02:55:05 pm by MAS3 » Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

0
Offline Offline
Full Member
***
Karma: 2
Posts: 226
#include˂baby.h˃™
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not sure what paired means? There are two on each side (4 total) and were about the size of a surface mount resistor. I just do not recall their orientation.

The encoder is a packaged commercial product and I tried to draw how the traces went on the visible side of the PCB. It is laid out a little different in that, for example, the green trace actually goes to a via and the trace is picked up on the other side to the "diode", but those are the paths.

I could imagine current flowing through the red line, through the diodes and series resistor to ground, and emitting infrared light. There is a pinwheel that the "diodes" face that has alternating black and silver radial lines. So it seems that the IR detectors would either turn on or off depending on if light was received, and alternately ground the green and blue lines.

There are no other devices to the unit.

I'll give it a try in a couple of hours, but if it does not work, then I'm just lost...
Logged

0
Offline Offline
Full Member
***
Karma: 2
Posts: 226
#include˂baby.h˃™
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just plugged it into my Arduino the logical way and loaded the Encoder example and it worked! Thanks.
Logged

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1676
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, you got it working.
The resisitor in your drawings has to be either in the red line, or in the black line, but doens't make sense to have it between those 2 diodes.
It can very well be that this resistor is actually placed between the diodes, but not connected that way.
But you've got it working, that's what's important.
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Pages: [1]   Go Up
Jump to: