Odometry

A single ball bearing shaft encoder is mounted to the front drive-shaft, which was disconnected from the transmission and reattached to the encoder.  This mod makes Tarzan a 2WD car, but it seems unlikely that 4WD is more important than nice odometry.

The front differential has 3:1 gearing so every wheel rev turns the encoder 3x.  The quadrature encoder therefore emits 12000 clicks per wheel rev.  It sounds like a lot but MCU1 appears to have no trouble with the interrupt rate.  If higher speeds (beyond the ~1.5m/s I've tested at so far) result in problems with too many interrupts per cycle, I'll simply remove the quadrature decoding and reduce from 12000 to 3000 clicks per wheel rev.  

The goal of distance odometery is better than 1% error.  Testing starts in the next few days to determine how close this goal is.

Some design data for the encoders.
* encoder model = US Digital S5S-1000-B (ball bearing, 1000CPR, single-ended, 5-pin latching connector, $69.36ea + shipping)
* 1000CPR means 1000 stripes around the full circle, which gives 4000 directional transitions per rev when read in quadrature, which I'm doing.
* cable and connector to be ordered elsewhere/when after body & pcb avail
* connectors (Molex 14-60-0052 AWG24, 14-60-0054 AWG26, 14-60-0056 AWG28)

Passive wheel encoder design info:

Case 1 - Lowest Speed = 0.1 m/s
* wheel speed = 0.1 m/s / 0.5 m/rev = 0.2 rev/s
* sample time = 20 ms
* counts/sample = 12000 counts/rev * 0.2 rev/s * 0.02 s/sample = 48 counts/sample, consistent with about 2% speed control

Case 2 - Top Speed = 4.5 m/s
* wheel speed = 45 * 0.2 = 9.0 rev/s
* counts/sample = 45 * 48 = 2160, which requires a 2-byte integer to represent for rs232 serial transmission