Monday, December 11, 2006

Et Tu, Light Sensors?

I built a tube with a light sensor at one end and put a piston in there to see if I could get a linear response. I would call the success "minimal". The Lego light sensor just isn't made for (relatively) sensitive measurements like this.

So where does that leave me? As I understand the human vestibular system, there's really a ton of little binary touch sensors in there for the otolith to rub against. I can't use a ton of sensors with only 3 input ports, so I was going to measure the tilt more abstractly by comparing relative forces on just a few sensors. That's out, but I think I can still do better than the other two main balance systems out there.

(To reiterate: Checking to see if the robot is perpendicular to the ground is just wrong--not all vectors perpendicular to the local ground are anti-parallel to gravity. Using a gyroscope is better in that sense, but worse in a design and robustness sense. A robot should constantly be checking and responding to the real environment. A gyroscope is a form of dead-reckoning. As tiny errors build up, what exactly zeros it out? If the robot loses track of the gyro for a second, how does it recover? It's not that you can't fix these issues; just that you shouldn't have to.)

Here's the new idea: Rotation sensors. I mocked those early on because "the wheels need to rotate", but the sensor doesn't have to be on the wheel axle. It could be on the axle of a pendulum. When the robot tilts, it makes an angle to the still-vertical pendulum. That rotation can be captured.

There are a couple of practical matters:
  • Stock rotation sensors only read off every 22.5°, which is way too small. It should be possible to gear a rotation sensor so that it reads a smaller angle, though.
  • I'll actually need two of these to detect tilt in two directions. And I'll either need to make a "universal" pendulum that can tilt in both directions and report the angle in each or make two separate pendulums in a compact manner.
  • I don't own any rotation sensors, they are like $30 each and I'm already in some trouble for spending too much on projects before I've gotten my allowance, so I think I'll have to make my own rotation sensors.
  • A major pro- of this arrangement is that there's no need for complicated (for the integer-only RCX) trig, you can just multiply the number of rotational "clicks" times the number of degrees per click to get your tilt.
(Later: Just realized that a pendulum rotation system is also dead-reckoning. You have to keep track of the total rotation to know when you are upright. But at least it's a dead-reckoning from gravity and not from an initialized value. Also, while I'm actually going to pursue a system where the rotation is captured via alternating light and dark patches [pics as soon as I have something], you could also make it so the shaft encoder had a gradient proportional to the angle so it would be an absolute system, not a dead-reckoned one.)

No comments: