Figures my first blog would have something to do about computers and or electronics, or even worse, both. You gotta start somewhere so why not something I know best, or at least I think I know best.
So, I'm currently working on this robot with my partner in crime, Zeb Evans, and we need to keep track of how far the robot moves. This isn't the simplest of tasks, but it can be done, and has been in the past. We've decided to take apart an old mouse, the kind that use a ball for detecting the relative motion.
First I pulled out the guts of the mouse and kept the PCB and the two encoder wheels.

Fig. 1 - Dell Mouse PCB and Encoder Wheels
Rather than go into the principal of operation of the mouse and the encoders, I found the following excerpt from 123 Robotics Experiments for the Evil Genius.
The particular mouse I am using had one little difference than what the book had described. The IR phototransistors are actually dual phototransistors, meaning there are two transistors in each packages. So depending on which rising edge is triggered, first between the two, it is possible to determine which direction the encoder wheel is turning.
Once I had an idea of how this all worked, it was time to come up with some sort of test rig.
Step 1. Solder some wires onto the mouse PCB to supply +5V, Ground, and outputs from the phototransistors. After soldering the wires onto the PCB, I went ahead and connected it up on a breadboard to test the connections.

Fig. 2 - PCB, Top and Bottom superimposed
Step 2. Mount the encoder wheel to a motor to control rotation of the encoder wheel. For this I used a Tamiya planetary gear box mounted onto some erector set parts.


Fig. 3 & 4 - Planetary gear box motor with encoder wheel attached.
Step 3. Okay, as it turns out, the motor spins much too fast to pick up each rising edge. The way I see it, i have a couple of options here. I can (1) slow the motor down, and/or (2) create my own encoder wheel with fewer slots in it. Rather than slow the motor down, and ultimately the robot that it will drive, I chose option 2.
I need a break so I'll continue this in Part II.
~Clark