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.