Monday, January 5, 2009

Scribbler Encoder Success!

Happy New Year! On January 3, 2009, my buddy erco announced, "Success! I made several test runs with the finished encoders today, and it's quite rewarding to see the Scribbler actively correcting itself to drive a straight line. I posted a video... which shows the robot driving a small square and ending up pretty close to where it started. I have finished the encoder hardware installation to my satisfaction, but my software is very preliminary."

Here are photos of erco's encoder installation. As he explained, he built it on a tiny piece of single-sided perfboard in a non-standard way as you can see in the photos. The board is a tight fit between two molded ribs in the top body shell. The encoder sensor is mounted in a raised position on the non-copper side so that it can stick through a mostly square hole in the case. All other components are mounted on the copper side so that he could flush-mount the non-copper side to the housing inside using a drop of hot melt glue. The Optical gap between encoder and wheel is ~0.150. erco aligned the sensors to read the outer rings of his encoder wheels, and mounted it horizontally from axle in the top body shell. Each encoder circuit has 3 wired connections: +5V, ground, and output. He disconnected photocells on the front of the Scribbler to use the encoders. Photocells are also mounted in the top body shell on a small green PC board under a black plastic light shield. Nothing was removed, erco just unsoldered the green wire from P4 on the circuit board to disconnect all 3 photocells. The green wire becomes the ground connection for both encoders. He connected the left encoder output to pad P3 and the right encoder output to pad P1 on green photocell PC board. Stamp-wise, the left encoder is IN2 and the right encoder is IN0. The +5V connection is taken from the 6-hole "Hacker Port" header on main PC board.

See erco's impressive video below. With the pattern on the floor, you can clearly see the Scribbler keep itself running straight and it returns almost perfectly to where it began.
Photos and video courtesy of erco.


Thursday, January 1, 2009

Piezo Film Vibra Tab Mass as Encoder

Another experiment in the Scribbler wheel encoder project that erco and I are working on.

This slightly dark video is a proof of concept video using the Piezo Film Vibra Tab Mass Sensor as a possible wheel encoder on the Parallax Scribbler. It uses the Scribbler's wheel spokes to trip the Vibra Tab as the wheel rotates. It is like a playing card in the spokes of a bicycle wheel.

The Scribbler's wheel has 8 spokes on each side, actually 8 high spots and 8 low spots. That is 16 positions for one turn of the wheel. The wheels are 3-1/8" in diameter (approximately). The circumference is computed with the formula, circumference = pi times diameter, or C= π d. The circumferece is 9.82" or 9-13/16". For each 16th a turn, the wheel has travelled 0.614" or 5/8".

An issue might be the time the Vibra Tab is bent during contact with each spoke. I don't know yet if it sends one message when it bent or continuous messages.

But, as the video shows it does work (at least in concept).

Parallax Scribbler Encoder Project

A friend of mine, erco, from the Parallax Forums and I are working on an encoder project for the Parallax Scribbler. A wheel encoder keeps up with the turns of a wheel. It "counts" the rotation speed by reading teeth (like a gear), notches, or black and white stripes with an optical or mechanical reader. By doing this, you can tell how fast a wheel is turning and how far it has turned (for example, if the wheel turned once and you know its circumference - you know how far you have traveled). This lets you measure the distance the robot has traveled and lets you correctly keep it running in a straight or curved direction. The thread of our discussion on the forum for this project is here.

As a benchmark, my buddy, erco, wrote a simple test program to show how the Scribbler runs forward and backward through a range of speeds. This is a video of my Scribbler running the test program. This shows the difficulty of the Scribbler running straight consistanly through its speed range. Prior to the test, I reset the Scribber with its original program. There is no correction via the Scribbler Program Maker GUI by the calibration routine. The calibration routine lets you make a single correction to one motor to equalize its speed to match the other motor.

As you can see, the Scribbler does not run very straight without some sort of correction.