The Combine Forum banner
2,001 - 2,020 of 2,032 Posts
Hi,
I have eagerly been following the forum and have built the PCB v2 setup. Doing some initial testing today and it all seems to work great, only I have a problem with my proximity sensor for the steer switch. I have it set up to detect when the motor is against the steering wheel but it switches autosteer off when I want it on and on when I want it off. I was wondering what changes I need to make to the Arduino code to inverse this? Sorry I only have very basic understanding of the code in the IDE.

Many thanks for all the great information on here.
What proximity sensor are you using? You should use NPN NO
 
Discussion starter · #2,002 ·
Hi,
I have eagerly been following the forum and have built the PCB v2 setup. Doing some initial testing today and it all seems to work great, only I have a problem with my proximity sensor for the steer switch. I have it set up to detect when the motor is against the steering wheel but it switches autosteer off when I want it on and on when I want it off. I was wondering what changes I need to make to the Arduino code to inverse this? Sorry I only have very basic understanding of the code in the IDE.

Many thanks for all the great information on here.
You need to change this line:

//auto Steer is off if 32020,Speed is too slow, motor pos or footswitch open
if (distanceFromLine == 32020 | gpsSpeed < MinSpeed | gpsSpeed > MaxSpeed | steerSwitch == 1)

To this

//auto Steer is off if 32020,Speed is too slow, motor pos or footswitch open
if (distanceFromLine == 32020 | gpsSpeed < MinSpeed | gpsSpeed > MaxSpeed | steerSwitch == 0)

Change the steerSwitch == from a 1 to a 0.

Code:
 //Data Header has been found, so the next 6 bytes are the data
  if (Serial.available() > 6 && isDataFound)
  {
    isDataFound = false;
    relay = Serial.read();   // read relay control from AgOpenGPS
    gpsSpeed = Serial.read() * 0.25;  //actual speed times 4, single byte

    //distance from the guidance line in mm
    distanceFromLine = (float)(Serial.read() << 8 | Serial.read());   //high,low bytes

    //set point steer angle * 10 is sent
    steerAngleSetPoint = ((float)(Serial.read() << 8 | Serial.read()))*0.01; //high low bytes

    //auto Steer is off if 32020,Speed is too slow, motor pos or footswitch open
    if (distanceFromLine == 32020 | gpsSpeed < MinSpeed | gpsSpeed > MaxSpeed | steerSwitch == 1)
      {
       watchdogTimer = 12; //turn off steering motor
       }
    else          //valid conditions to turn on autosteer
      {
       watchdogTimer = 0;  //reset watchdog
       serialResetTimer = 0; //if serial buffer is getting full, empty it
      }

    //uturn byte read in
    uTurn = Serial.read();
  }
 
Discussion starter · #2,004 ·
Hello, my tractor has open center hydraulic circuit. To implement the hydraulic system I need the valve (SP10-47C). I have doubt how to attach to the tractor system. Is it connected in parallel or in line to the original tractor system?

I think you are on your own with that one. Best to talk to the equipment dealer or a mechanic that knows the machine well.
 
Hello, my tractor has open center hydraulic circuit. To implement the hydraulic system I need the valve (SP10-47C). I have doubt how to attach to the tractor system. Is it connected in parallel or in line to the original tractor system?
You should get hold of hydraulic schematics for your tractor, but in line can´t work as sp10-47C will block the oilflow.

You might get something out of reading this post: https://www.thecombineforum.com/forums/3316305-post1636.html

It´s from the time before PCB board so don´t look too much on the electronics ;)
 
Anyone else noticing nervous steering when on a sidehill? I have my autosteer settings set quite aggressive for cm-level tracking. When on a sidehill with 1.5° roll or more, steering gets nervous. This is also noticeable on the screen, the position seems to jump around, I should make a video to show you. The nervosity relates to the amount of roll. With 3° or more, the steering motor gets furious. It is not related to the 'bumpiness' of the field or speed of the tractor. I have normal steering within -1° to 1° roll in whatever field conditions. It's not often a problem, but in the worst cases it makes the steering go off the line.

I suspect it has to do with the correction of GPS position based on the changing roll values? These values steadily change and are very normal for what I can see. I have MMA8452 for roll and the antenna is in front, 150 or 180 cm high on the systems I use. The autosteer hardware setup was made in spring and so is the .ino of the arduino (Coffeetrac's ). I saw this behaviour from the start but it took me a while to link it to the amount of roll.
 
Anyone else noticing nervous steering when on a sidehill? I have my autosteer settings set quite aggressive for cm-level tracking. When on a sidehill with 1.5° roll or more, steering gets nervous. This is also noticeable on the screen, the position seems to jump around, I should make a video to show you. The nervosity relates to the amount of roll. With 3° or more, the steering motor gets furious. It is not related to the 'bumpiness' of the field or speed of the tractor. I have normal steering within -1° to 1° roll in whatever field conditions. It's not often a problem, but in the worst cases it makes the steering go off the line.

I suspect it has to do with the correction of GPS position based on the changing roll values? These values steadily change and are very normal for what I can see. I have MMA8452 for roll and the antenna is in front, 150 or 180 cm high on the systems I use. The autosteer hardware setup was made in spring and so is the .ino of the arduino (Coffeetrac's ). I saw this behaviour from the start but it took me a while to link it to the amount of roll.
Here you see what I mean:
 
I need some help/advice with vehicle settings. When going straight AB line all is quite good, but in u-turn it always goes off the line to the outside. My GPS antenna is almost above the front axle. The thing is that it seems to not turn as sharp in u-turn as it could.

I have played with all the settings - if I move antenna closer to rear axle or increase wheelbase about two times, it is better. But I think that it's something else and I shouldn't use wheelbase twice as big as actual. If I increase min turn radius two, three or five times the same thing happens, but not as evident. On Large u-turn tractor still goes on the outside, but it's a small distance. The same behavior, with same settings, is evident in simulator as well. It looks like software doesn't turn as sharp as needed for u-turn.

As you can see in the video, tractor goes off the u-turn. And when I stop, I can still turn the wheels more than what AOG commanded. For info, my max steer angle is set more than wheels can turn - so it's not a limiting factor.
 
...and I shouldn't use wheelbase twice as big as actual.
I can't answer your question, but I too find it strange to increase wheelbase to turn sharper. That would be backwards from real world. All other things being the same, usually Smaller wheelbase = sharper turning radius. But it may be that you need to start turning quicker and sharper with a larger wheelbase to get the same effects. That is my only guess.
 
Discussion starter · #2,015 ·
I can't answer your question, but I too find it strange to increase wheelbase to turn sharper. That would be backwards from real world. All other things being the same, usually Smaller wheelbase = sharper turning radius. But it may be that you need to start turning quicker and sharper with a larger wheelbase to get the same effects. That is my only guess.

It wants the wheels to turn over 60 degrees. That is a very steep steering angle. Can you steer the tractor manually thru the uTurn? As in, can you even physically drive the line you have set up?
 
It wants the wheels to turn over 60 degrees. That is a very steep steering angle. Can you steer the tractor manually through the uTurn? As in, can you even physically drive the line you have set up?
I tried to steer manually, but when I turn the steering wheel, autosteer disengages and uTurn shape disappears. I just remembered that I can try manual-autosteer or comment out encoder from Arduino - doh! :1:

From what I have observed, steer angle (in degrees) is somewhat arbitrary value for AOG - it's based on "counts per degree" and it doesn't matter how big or small actual numbers are. If AOG says it needs 30 degrees it will turn 30 degrees, or am I wrong to assume this? For my setup, 30 counts gave about 45 degrees when steering wheels are at maximum, but it was stable only at small speeds. So I adjusted counts per degree to get as stable as possible in as wide speed range as I would work. And currently, it's was stable up to 15 km/h and that's good for me.

But no matter the counts per degree, even with 30 counts and 45-degree steering angle, and low speed, the behavior was the same - tractor didn't turn as sharp as needed, or as sharp as it could in reality. You can see at the end of video, that I can turn wheels even more than AOG turned them. Also when I tried Stanley, it was even worse and went even more off the track. At the beginning of the video, you can also see that it goes inside uTurn. It's the same behavior - tractor doesn't turn as sharp as needed, though at that point steer angle is only half of the maximum.
 
I tried to steer manually, but when I turn the steering wheel, autosteer disengages and uTurn shape disappears. I just remembered that I can try manual-autosteer or comment out encoder from Arduino - doh! :1:

From what I have observed, steer angle (in degrees) is somewhat arbitrary value for AOG - it's based on "counts per degree" and it doesn't matter how big or small actual numbers are. If AOG says it needs 30 degrees it will turn 30 degrees, or am I wrong to assume this? For my setup, 30 counts gave about 45 degrees when steering wheels are at maximum, but it was stable only at small speeds. So I adjusted counts per degree to get as stable as possible in as wide speed range as I would work. And currently, it's was stable up to 15 km/h and that's good for me.

But no matter the counts per degree, even with 30 counts and 45-degree steering angle, and low speed, the behavior was the same - tractor didn't turn as sharp as needed, or as sharp as it could in reality. You can see at the end of video, that I can turn wheels even more than AOG turned them. Also when I tried Stanley, it was even worse and went even more off the track. At the beginning of the video, you can also see that it goes inside uTurn. It's the same behavior - tractor doesn't turn as sharp as needed, though at that point steer angle is only half of the maximum.
When I see your video it looks like your max steering is about 25 degree to one side. AOG have Zero at straight ahead. So when you talk about 45 degree I think it must be from max left to max right.

AOG have negative degree to the left and positive degree to right.

So if you doubble your counts pr degree, AOG can put the wheels right.(edit: half your counts)

Also watch Brians video.
 
When I see your video it looks like your max steering is about 25 degree to one side. AOG have Zero at straight ahead. So when you talk about 45 degree I think it must be from max left to max right.

AOG have negative degree to the left and positive degree to right.

So if you doubble your counts pr degree, AOG can put the wheels right.

Also watch Brians video. AutoSteer Settings From Default Config - YouTube

@LarsVest, 25 degrees you see in video is just in uTurn entry, just the initial turn to the left. When I'm in the middle of the uTurn (long right turn) just before I stop, AOG shows set and actual around 60-65 degrees. It is as I have set by "counts per degree". If I change counts, tractor steers the same, only AOG shows different max angle. But it still doesn't follow uTurn line. in AOG.
@BrianTee some million posts ago, I remember you wrote that simulator doesn't behave right if the antenna isn't almost on rear axle. Can you tell me why? And also what parameters influence the actual turning radius, besides "turn radius" in Vehicle settings?
 
@LarsVest, 25 degrees you see in video is just in uTurn entry, just the initial turn to the left. When I'm in the middle of the uTurn (long right turn) just before I stop, AOG shows set and actual around 60-65 degrees. It is as I have set by "counts per degree". If I change counts, tractor steers the same, only AOG shows different max angle. But it still doesn't follow uTurn line. in AOG.

@BrianTee some million posts ago, I remember you wrote that simulator doesn't behave right if the antenna isn't almost on rear axle. Can you tell me why? And also what parameters influence the actual turning radius, besides "turn radius" in Vehicle settings?
I was refering to the real life look out of the window at the end of your video, do your wheels really move 90 degree from left to right?

But I am wrong about doubling counts, it is the other way around. half the count pr. degree will display more degree in AOG
 
Discussion starter · #2,020 ·
@LarsVest, 25 degrees you see in video is just in uTurn entry, just the initial turn to the left. When I'm in the middle of the uTurn (long right turn) just before I stop, AOG shows set and actual around 60-65 degrees. It is as I have set by "counts per degree". If I change counts, tractor steers the same, only AOG shows different max angle. But it still doesn't follow uTurn line. in AOG.

@BrianTee some million posts ago, I remember you wrote that simulator doesn't behave right if the antenna isn't almost on rear axle. Can you tell me why? And also what parameters influence the actual turning radius, besides "turn radius" in Vehicle settings?

Turn Radius only affects how small of a circle it will drive. Based on wheelbase, a certain degree will create x meters of radius. Counts per degree affect how much the wheels turn. It's A/D reading divided by counts per degree, so the higher the counts per degree the less it will turn the wheels per degree requested. So wheelbase and counts per degree affect turn radius, the min turn radius setting and max steer angle setting affect how sharp it can turn.



When you turn your steering wheel to about 45 degrees, does AOG show about 45 degrees actual?



The antenna doesn't move in the simulator, so it is above the pivot axle. In a tractor you can put the antenna farther ahead so it needs to calculate where the antenna is relative to the pivot (back) wheels. Everything is based off the non steering wheels
 
2,001 - 2,020 of 2,032 Posts