The
third area for improvement focuses on what wasnt implemented,
as apposed to what was. It stems from my (in hindsight) inexperienced
assumption that the duration required to turn the Rover through
a prescribed angle (say 90º) would be consistent As it
turned out, it wasnt!
When turning YogiCubs wheels always rotate through 45º. Having
reached this, individual wheels are driven to turn the Rover through
the desired angle of turn (whether 90º, 180º, 360º, or whatever).
My downfall was having no way to accurately measure this. I assumed
it could be measured as a time based event rather than a controlled
event.
YogiCubs turning relied on a calculation involving Rover
dimension, wheel circumference, motor speed, and time. Assuming
all of these factors are consistent during operation no problem.
Rover dimension and wheel circumference dont change. Time
for the most part is relative, and we perceive it as being consistent.
This leaves motor speed as the culprit. It does change quite considerably
during operation and this renders any time-based calculation useless.
As it turns out, (a no-brainer in retrospect) motor speed varies
with available battery power and wheel resistance. The less battery
power the slower the wheel will turn. Therefore less distance traveled
during a specified time period. The more resistance applied to the
wheel, the more power required to turn it, slightly reducing the
motors speed. I cant win.
Conclusion
Build a Rotation sensor into a Wheel assembly to monitor actual
wheel revolutions as they happen (as apposed to predicted). Even
better, have two (mounted to wheel assemblies on either side of
the rover) and have the RCX average out the two readings for more
accurate turning. This will enable consistent interpretation of
a calculation based on Rover dimension and wheel circumference only.
We dont need to worry about motor gearing and speed
simple.
|