Fight Detection in Software

Hi all,
Been playing around with ways of sensing whether the user has grabbed the steering wheel, without using any hardware.

My solution was to calculate the derivative of the WAS values, and compare them to the PWM value. If PWM is high but the WAS is not moving (or vice versa), it indicates that either something is broken or the steering wheel is being turned. Either way the system should be disabled under this condition.
As you can see in the video it works fairly reliably, and can be set to be more or less sensitive using the encoder counts value. I’m yet to test it successfully with u-turn, the extreme wheel movements tend to cause disengagement. However, I never did get u-turn to work well on the combine. I will refine the code when I’m testing it on the tractor.

Here’s my proof of concept algorithm, placed into autosteerPID.ino

  angleD = abs(steerAngleActual - steerAngleLast);     
  dCompare = abs((angleD * steerSettings.Kp) - pValue);    
  
  if ((dCompare > steerConfig.PulseCountMax) && (fightDetTimer < millis() - 5000) && abs(steerAngleError < 5)) steerKillCount++;
  if (dCompare < 10) steerKillCount = 0;
  if (steerKillCount > 10) {steerEnable = false; steerKillCount = 0;}

  steerAngleLast = steerAngleActual;
13 Likes

Good work, as much as I like wiring in extra sensors the inferred mathematical detection method is preferred as it gives everyone the chance for steering wheel disengagement.

ACS712 works well but you still have to set it high to keep uturn from popping it off.

I have a feeling you are on the right track! Cool Idea.

Funny, i was just thinking about this as i am creating an autosteer wizard. Very inspiring and this will feed the minds. Great work Charles!

We should be able to do this directly in AOG. Perhaps add it in with the panic stop code.

1 Like

I only work with hydraulic valves and use a pressure sensor (pressure switch) connected to the “remote” input. It works very well if the sensor is in the Ls line, but this is not always possible. For example, in the Lexion combine there is a CC system without Ls (constant pressure in the system) in the valve block I used a swing valve connected to the L, R outputs of the orbitrol. And in such a configuration there is a small problem with the speed of reaction, if we turn on the AS, the proportional valve is faster than the shut-off valves and when we are far from the line, the stroke is high and it disconnects the AS. It would be nice to have a slight delay, e.g. 1 second operation of the remote input. Then all the valves would close, the pressure equalized and the sensor could work well with less pressure.

You could easily tweak your arduino code to do that!