Virtual Turn sensor for electric motor

Code dedicated to the electric motor and its disengagement in the event of an error accumulating on the setpoint.

Define a new virtual steering wheel rotation sensor that can be adjusted in the AgOpenGPS parameters.

During self-steering, the WAS evaluates the error in the WAS setpoint (wheel angle sensor): If the error is maintained or reduced, this can be considered normal. But if the error increases more and more, it is an abnormal situation: such as the steering wheel being taken over manually or the steering sensor having a problem.

This code checks the evolution of the error and accumulates an index according to the abnormal situation.
The result is that it stops the autosteer if the value of the steering wheel rotation sensor is greater than the index.

Depending on the quality of the AgopenGPS response and the hardware, we can set the value of the turn sensor between 30 and 60.

Because it is based of number of error the autosteer will be disengaged with 0.6-1.2s and it will be link according your electric motor and reactivity setting

In case you are not satisfied you can set off turn sensor to cancel the function

if you can test it can you report your setting ? or report that it is not good

Due to my experiance I think the most dificult is on line with very few modification … that probbably we can add 1-0.5% error comparaison

File available

for Switch mode and autosteer stop (code from @m_elias ) permit to use Switch in this case

9 Likes

Note the compiled HEX is NOT up to date on my repo

1 Like

Small update and first feed back

Probably not the best but give a level more of safety in case of
need to adjut steering more aggresif on the line than soft to try to control the steering

In 24V the time to disconnect can be burn the fuse if you use voltage transformer
so less agressivity with max load for that can be a solution

Files for version AOG 5-to 5.6 are located here

Update
add 1% of 1% to kill very low modification

Tip: that it will work with an efficiant starting turn that make a significant error growing

release updated
Release update coeficiant · Entropiemaximun/AOG-electric-motor-release-by-virtual-Turn-sensor · GitHub

Hello everyone.
Does the AIO board 4.5 need to be modified to use this code?

Yes

you can find the lastcode in the last release

don’t hesitate to feed back your result

Normally soon i will update with some improvement with collaboration of @Daniel

1 Like

This firmware update saved me a lot of work. No need to fix my faulty turn sensor now.
JD 6920s, hydraulic steering (Hydraforce), KaupoiMOD (nano)

Thanks!

2 Likes

Thanks I hope this can be consider on next release

Also i update last one that we improved with @Daniel

Danie mode can be activate by Danfoss function

  • add delay at start autosteer 1.5s
  • Cancel function at low speed <1km/h
  • Cancel for small angle daniel : 0.5° bric bric : 1.5°

cancel value based

  • Daniel: proportionality sum with value of angle
  • BricBric: count of error
3 Likes