Support for servo engagement motor in Autosteer_USB_4.3.10

first post here, so please be gentle to me…
A good friend of mine is farmer and so I implemented the AgOpenGPS autosteering on his Fendt based on Andreas Ortners base PCBA. I added a modelism servo to control the engagement of the wheel servo motor like shown here:

STL parts

CAN control not ready yet, but unfriendly cold days will come soon… :wink:

Right now it’s just controlled by the steer switch input, so when you switch the steering on, the small servo will engage the big one and the other way round. For that I made some very small and straightforward adds to the Autosteer_USB_4.3.10.ino I would like to share with you.

Autosteer_USB_4.3.10.ino (25,8 KB)

I added code to 5 locations in the code, all marked with // Engagement Servo. It simply sends one digital pulse on D5 (see #define in line 61) for switching on and another one for switching off. So, just one, but this works fine with my LX3325MG servo. Pulse lengths may have to be adjusted to your needs (lines 36+37).


  • Pulse input of servo to D5 (I added a 1k resistor in series, because I’m a litte by scary by experience…)
  • 5V supply by DC/DC step down converter - maybe you already have a suitable one or use something like this DC/DC step down

That’s all. Feel free to give any feedback :sweat_smile:


Cool to see my idea continue …
I used a very inexpensive plastic gear servo. It was a mistake, it lasted about 200hrs.
I have since dismantled it.
Maybe the model you are using is more solid.
Have fun .

Hi Tooki,
so, you designed all the plastic parts? Congrats, very good work! I especially like the easy integration in AOG - just one digital output!
My servo is a metal-gear one, but that’s not the main issue to my mind. Sometimes the teeth of the two gears don’t snap in correctly and the mechanism is under force. Will see, if it’s possible to add some kind of spring element somewhere to prevent the small servo from being overloaded.
I’ll keep you tuned!

1 Like

Hey @GoRoNb this is exactly what I am trying to implement. Your ino file doesn’t upload, but I was trying to put my sero.write(120); in the steer button check in the loop() however this isn’t working… I put a digitalWrite high and low and hooked a relay up for testing and it worked as expected but the servo doesn’t.

Was the same arduino running the servo as the rest of the code?

EDIT: Hey @Tooki57 how did you implement this? Did you use the same Arduino to activate the servo as the autosteer code?

Answer to my own question. I found out there is a small delay required for the servo to get to the required position. Of course delays aren’t good!!! but I’ll give it a try.

   for (pos = 180; pos >= 00; pos -= 1) 

Just adjust the delay till the servo goes the full degrees required. If I didn’t give enough delay the servo jumped when I attached it the next time.

Do you have to detach it each time? I’m using a servo output in my combine, I attach the IO at the beginning of the sketch and leave it.

That probably works. I noticed the servo jitters if I don’t. So detaching in between let’s it rest.

Curious how you are doing it. Do you use the same Arduino or another one? Do you also have to do a delay()?

I use the same Arduino, I modified the USB sketch. I use IO 5 and no delay like yours because I’m not detaching after commanding the position.

I have added a delay, allowing time for the servo to engage my gears before outputting PWM, otherwise it jumps/bounces and the gears lose their mesh (very noisy).

Your jitter could be because of servo voltage level, I have a small step down board dedicated for the servo and that way I can tweak the voltage so that it’s quiet.

Oh, this is an old system I made, only to learn and test CANBUS on my Fendt.
I was using a 2nd arduino to read the CAN and drive the servo.
I don’t use any of this anymore.

1 Like

So you are taking a stepped down 12V instead of just feeding the servo off of the Arduino’s 5V.?

Yes, I don’t want the servo’s power surges to cause instability. For testing it worked, but with a little higher voltage it also activates faster, but a little more yet and it started twitching/buzzing.

1 Like