jes notes Index Gallery . Signed Distance Functions Shaft passers Snap issues

2025-12-14

Last modified: 2025-12-14 10:30:40

< 2025-12-13

Tractor

I've connected up the Arduino etc. to the tractor and am trying to get it working.

The good news is that smoothly ramping the throttle signal is working (although it may want a variable rate, it wants to ramp slowly at lower throttle positions because it's more sensitive there).

The bad news is that as soon as you start driving, the signal from the hall effect sensor starts glitching, see https://www.youtube.com/watch?v=GciPnvafAc0

So one idea is to add a capacitor to try to keep the power supply more stable.

Another idea is to work around it in software. Currently I'm saying that if the difference between the min and max value of last 150ms is more than N then I say you're changing gear and I reset throttle output to 0.

But maybe I could say something like "if the median of the last 5 values is more than N away from the median of the 5 values 150ms ago", then I'll cut the throttle signal? So then a spike shorter than 3 samples will get ignored?

I need to guard against 2 different types of failure mode:

  1. you move the lever really slowly and don't trigger my detection
  2. my detection triggers when you move the lever, but the gear hasn't yet changed, and then throttle goes back to 100% and then you move the lever a tiny bit more which I don't detect but suddenly slams it into gear

There's also a possibility that in response to small moves in gear lever position I could provide small changes in throttle pedal value?

Or another idea is that I only allow throttle to be nonzero when the gear lever is firmly into "forward" or "reverse" territory? One issue is that my signal actually peaks with the lever in neutral so this doesn't work, but if I rejigged the locations of things I bet it could work. But then annoying if the hardcoded thresholds ever have to change.

< 2025-12-13