Well, I figured out where most of the ticks went.
The odometry divider cannot be set to anything below x/2, even after scrapping the traces, it seems to be hardwired to x/2.
So I took the signal from the
brushless board and connected the odometry outputs to some transistors as level shifters and those to some free analog inputs on the
arduino.
That doubled the tick count to 300.
I tried connecting the odometry output directly from the drivers but I couldnt get that to work.
Now, turns out half of them are being scrapped in software for some reason.
This is the interrupt attachment, its set to CHANGE:
Code:
attachInterrupt(pinOdometryLeft, OdometryLeftISR, CHANGE);
And this is the first thing the ISR does:
Code:
void OdometryLeftISR(){
if (digitalRead(pinOdometryLeft) == LOW) return;
So the interrupt routine is effectively set to RISING as far as I can tell, which discards half the ticks.
Im assuming this is necessary if using the frequency divider because the signal is no longer symmetrical ????
Now we are up to 600.
Im still mising half the ticks, but Im happy with the detective work so far