Encoder Disk Sensor Assembly

Greetings everyone. I should have joined this forum long ago. Anyway, I am working on a project using the Protobot Kit. I’ve scavenged a few parts and came across one that I really want to use. I took an encoder disk sensor assembly out of an HP deskjet printer. It took a little while for me to find any information about it, and finally dug up this site in German: http://www.wiki.elektronik-projekt.de/elektronik/agilent_q9846

It has an illustration which helped me decipher the pins. Now, I’ve been out of electronics for a long time, so I am lacking the proper expertise and equipment to really know what I am doing, so I’m looking for some guidance from those more skilled.

Based on the information from that site, do you think that I might be able to utilize that part? I was wanting to use it to track distance traveled by the robot. I made the assumption that channel A would be the emitter and channel B would be the receiver. On the assembly, itself, I have identified the wires. It has a five pin connector and the fifth wire is not used.

It has an illustration which helped me decipher the pins. Now, I’ve been out of electronics for a long time, so I am lacking the proper expertise and equipment to really know what I am doing, so I’m looking for some guidance from those more skilled.

Based on the information from that site, do you think that I might be able to utilize that part? I was wanting to use it to track distance traveled by the robot. I made the assumption that channel A would be the emitter and channel B would be the receiver. On the assembly, itself, I have identified the wires. It has a five pin connector and the fifth wire is not used.

You will probably be able to get this to work with VEX, but probably not without some additional parts. I don’t read German, but using some of the on-line translators yields this:

So, you’ll want to run it at 3.3V, which will require at least a dropping resistor (around 150Ω), or a voltage regulator. A voltage regulator is the safer way to go, so perhaps something like this (yes, this is overkill, but it would work).

A and B are both outputs - they feed the two “quadrature” signals that can be tracked by the processor and converted to position information. (See this document or [this page for a bit more info).

You can probably connect A and B directly to the Vex microcontroller inputs. One goes to a digital I/O port, the other to an interrupt port.

My only concern is that the Vex inputs have a weak pullup to 5V which exceeds your Vcc voltage of 3.3V. It is possible (though unlikely) that the encoder outputs could be damaged - impossible to tell without a real data sheet. If you want to be paranoid, then you could add a pair of “clamping diodes” on the A and B outputs to prevent them from being pulled above 3.3V.

When I get some time later today, I’ll try to draw up a quick schematic for you.

Cheers,

Wow. Thank you for all the information. I think that I over simplified things in my mind. I would like to get back into electronics more, and this class project is certainly helping. I’ve had fun. I’m a web developer by trade, so I deal mainly with programming (EasyC is driving me crazy. I’d rather use a plain text editor!).

EasyC does have a built-in text editor

OK, so here are some drawings to walk you through the hookup:

1st, here is a basic wiring diagram showing you what signals need to go where. If you hook it up like this, though, it’ll be fed 5VDC which may burn it out, so this diagram is just a starting point:
[ATTACH]1596[/ATTACH]

2nd, here is the simplest hookup that I’d be comfortable with. This adds a 150Ω dropping resistor to get the voltage down in the neighorhood of 3.3V. This depends entirely on the load being a fixed 12ma at 3.3V.
[ATTACH]1606[/ATTACH]

3rd, this is an upgrade to a 3.3V regulator. This will ensure the voltage going to the encoder is 3.3V under all circumstances.
[ATTACH]1611[/ATTACH]

If the above circuit does not work as-drawn, then you may want to add some resistors to the A & B channels. These 1KΩ resistors serve two purposes: They pull the signals down from the 5V supply to prevent possible damage from the Vex controllers internal pull-up resistors. And, they pull the signals up toward the 3.3V rail to help raise the encoder’s “high” voltage (about 1.5V) to be closer to what the PIC processor is looking for (about 2V).
[ATTACH]1616[/ATTACH]

This is a bit of guesswork based on observed specs translated to English, so no guarantees. Let us know how it goes,

  • Dean
    Agilent Q9846 diag2.png
    Agilent Q9846 diag1.png
    Agilent Q9846 diag3.png
    Agilent Q9846 diag4.png

Hm. I must be completely missing it. I’ll look through the menu system again. Thanks for the heads up.

Thank you very much for this. Very helpful and more help than I expected. I’ll pick up the parts that I need and see what I can do with it.

Well, I think that it’s a bust. It was worth the experimentation, though. I got it wired up easily enough. The assembly was on a small board with wiring, so that helped. I ended up using a 150 Ohm resister in place of the voltage regulator (couldn’t find one locally). I got it wired up and integrated into the system. The emitter was working. I could see a small red light underneath, but I was getting no readings from either of the outputs. I even used a piece of black plastic to slide in there to see if I got any reading. Nothing.

I’ll have to abandon it for the moment, and get the other parts of my code working first. As a side note, I scavenged to curved circuit boards with three tact switches each. I’m using them as bumpers using bolts and springs. Works pretty good.

I suspect the outputs are not quite hitting a high enough voltage to get the Vex microcontroller to register a ‘1’. According to the German website, they outputs hit about 1.5V, and the PIC microcontroller is looking for at least 2V. Sometimes you get lucky, but I guess not this time.

Cheers,

  • Dean

All too true. Would have been nice to have had it work, but I knew that it might be difficult, especially since I couldn’t track down a data sheet.

I do appreciate all the help. Very kind of you to take the time and to make those illustrations. Perhaps over the Summer, I’ll revisit the encode and see what I can learn.

ChrisKa: If you would rather be using a text editor and have easyC Pro it has one built in. You can just type code like you could with any other text ide. You can also drag blocks into the text to format the functions.

Thank you for the info. Unfortunately, I was only provided the easyC, not the Pro edition. That probably explains why I could never find the text editor. :slight_smile: