PAReX Home

Phoenix Area Robotics eXperimenters

Home Club Info Web Log Meetings Events Rules Articles Links

August 07, 2002

Encoder Inside a Servo Part 2

After developing the PCB based internal wheel encoders sometime ago (See Part 1 and Part 3), I finally got back to debugging them.  The robot's behavior was very erratic, I was getting better results using timers for my turns.  With the aid of an oscilloscope I started looking at what was coming out of the encoders. The black trace represents the left encoder, while the green trace is the right encoder. The left encoder wasn't too bad, the front end needs de-bouncing, which could be done either in hardware or software. The right channel looked awful, with glitches and random pulses. I disassembled the servo and discovered that the foil tape on the gear had started to peel and paint chips had fallen off the tape and the gear. pic0001.jpg (50227 bytes)
My mistake was using a cheap paint that was brushed onto the gear and apparently didn't stick.  So I stripped the gears down and started over.  This time I sprayed the gears flat black with spray paint and applied 4 small strips of white tap ( I couldn't find my silver pinstripe tape I used before).  I also applied epoxy each edge of the tape so it wouldn't peel off. pic0002
Once the gears were completed and back in the servos, I hooked it up and got the following outputs.  At first glance things look pretty clean, but then I realized the left channel was only putting out 1 pulse for every 4 pulses on the right side.  Thinking the tape fell off I took the servo apart again, but everything looked ok.  Then I realized the PCB with the reflector sensor was sitting higher up on the servo, then the right one was. pic0003.jpg (57532 bytes)
The remedy was easy.  Since the whole sensor was on a PCB, I popped it loose and oversized the hole in the servo case a little more, so I could move the PCB around. pic0005
With the servo running, I moved the PCB around till I got a good signal,  then glued the PCB in place. pic0006
Here's what the final signal looks like on the scope.like this one  Now I have a pair of nice clean pulse trains coming from my encoders and can continue debugging the firmware. pic0004.jpg (50227 bytes)
Posted by Kelly Small at August 7, 2002 09:54 PM
Comments