The Combine Forum banner
881 - 900 of 2,032 Posts
OK disregard my last post. its not quite correct

Brians code is correct

Edit: deleted most of this post as it was incorrect, code is a bugger, one word out of place it will still compile but strange things happen.
 
You're a much better programmer then me! That is the problem. Lines should be....

workSwitch = digitalRead(WORKSW_PIN); // read work switch
steerSwitch = digitalRead(STEERSW_PIN); //read auto steer enable switch open = 0n closed = Off
switchByte = 0;
switchByte = steerSwitch << 1; //put steerswitch status in bit 1 position
switchByte = workSwitch | switchByte;

SetRelays(); //turn on off sections

Otherwise steerSwitch will always be zero - or always on.

The switchByte is the combination of what the workSwitch and the steerSwitch are and are sent back to AgOpenGPS, but only the work switch is actually used.

Sorry sorry sorry!
This seems to have fixed the issue. Thanks!
 
I installed a system on a New Holland T6.155 today and realized that there was a Steering Angle Sensor already on the tractor. I tapped into the wiring connector (over right front wheel) in case anyone else is needs to know which is the signal wire it is the red one (two green wires labeled 2014 and 2095 and one red wire in this connector). This is not the the 3 pin connector labeled Front Axle. The wires do run into the cab through the firewall but I was too lazy to follow them all the way into the instrument cluster/fusebox so I ran a separate cable.
 
I installed a system on a New Holland T6.155 today and realized that there was a Steering Angle Sensor already on the tractor. I tapped into the wiring connector (over right front wheel) in case anyone else is needs to know which is the signal wire it is the red one (two green wires labeled 2014 and 2095 and one red wire in this connector). This is not the the 3 pin connector labeled Front Axle. The wires do run into the cab through the firewall but I was too lazy to follow them all the way into the instrument cluster/fusebox so I ran a separate cable.
Is your signal stable? I tried that and was useable but to be accurate the arduino wanted the signal referenced to its own ground & 5v. Also the tractors steering ecu would throw a fault if arduino was turned off when tractor was on. Was going to power arduino from tractor ignition but ended up being easier to add sensors, got mine from a Range Rover suspension, work good.
 
Did you buy a lottery ticket, WTalen? You are one lucky guy to find something like that. I wish my Kubota had that installed as I swear the hardest part of this is doing the steering sensor.
 
Is your signal stable? I tried that and was useable but to be accurate the arduino wanted the signal referenced to its own ground & 5v. Also the tractors steering ecu would throw a fault if arduino was turned off when tractor was on. Was going to power arduino from tractor ignition but ended up being easier to add sensors, got mine from a Range Rover suspension, work good.
I put my multimeter on it and the voltage was nice and stable but if you only feed the signal wire to the arduino the steering angle number jumped around the 0 mark by about 0.4 degrees. The other issue is that if you set steer 0 to whatever it is when you are actually driving straight there are not equal readings on full right compared to full left. This might have something to do with Ackerman geometry but at least when AOG tells the tractor to drive at 0 degrees steering angle I'm driving straight ahead. So not as stable as it should be if I look at Brian's youtube videos. His steering angle reads rock solid. It goes back to that single point grounding thing I guess. That will be my next project.

Did you buy a lottery ticket, WTalen? You are one lucky guy to find something like that. I wish my Kubota had that installed as I swear the hardest part of this is doing the steering sensor.
Pretty blessed I guess as I haven't found a horseshoe stuck up anywhere yet. On the other two tractors I put wheel angle sensors on (the older tractors from the 70's and 80's) I would agree that it's tricky to find a place to mount them and then to figure out how to make the sensor read the full steering range without breaking anything. The first one was trial and error and then the second one I realized that I could use a little simple math and a measuring tape to find a spot. I measured the distance from the center point of the kingpin to where I wanted to mount the ball joint (grease zerks sometimes work too ;). That distance becomes the radius that the lever of the wheel angle sensor needs to be. In this case I had to lengthen the the lever arm of my Princess Auto steering angle sensor so that it would be 6cm instead of the 3ish cm it was. This might be blatantly obvious to some of you on this forum but I felt pretty smart for having realized it.
 
Discussion starter · #887 · (Edited)
His steering angle reads rock solid. It goes back to that single point grounding thing I guess. That will be my next project.
Yes, New Holland would have made sure the ground goes back to their single point ground. Single point grounds and ground loops are 90% of the thought into a circuit design. Always be thinking, what are my paths and is there more then one. One might be a better ground, but according to Kirchhoffs current law, there will still be current flowing (and noise) thru all of them.

An option you can try is follow back to where they ground the sensors etc, and hook your grounds to that place too.
 
You can cancel out the akerman geometry error easily. map the sensor counts/degree going left to match right. Its then just a if else statement to get steeringPosition
Can help if you need it, but will need sensor readings.
Andrew
 
Having a pain of a time fitting the standard headlight sensor as a steering angle sensor on our 4WD Versatile. I'm using an Easysteer motor for the steering and it has 2 hall sensors on it that I could use for encoding the position (as well as detecting operator intervention). Has anyone done this and is there code for using this sort of thing? I've seen references to encoders being used with the steering wheel itself, but not this. And would pulling the motor off the wheel or intervening it then require a recalabration?

I'm guessing this dual hall sensor is part of how the original Trimble system detects steering angle. The nice part is that it would make it much more portable.
 
Discussion starter · #890 ·
Having a pain of a time fitting the standard headlight sensor as a steering angle sensor on our 4WD Versatile. I'm using an Easysteer motor for the steering and it has 2 hall sensors on it that I could use for encoding the position (as well as detecting operator intervention). Has anyone done this and is there code for using this sort of thing? I've seen references to encoders being used with the steering wheel itself, but not this. And would pulling the motor off the wheel or intervening it then require a recalabration?

I'm guessing this dual hall sensor is part of how the original Trimble system detects steering angle. The nice part is that it would make it much more portable.
If it has a steering hydraulic orbit motor, the trouble with them is they never are back in the same place again when you go back to straight. They slip so 0 degrees after a couple turns is no longer 0 degrees.

If you put the steer sensor right above the articulating center and mount the body on the front half of tractor, then swing the sensor with the back half of the tractor. Play around with arm lengths so full turn to full turn uses most of the sensor stroke. Use small tie rod to connect them. You can also go to a machinery dealer and look at a few tractors to see how the are installed.
 
Well, everything is in the tractor and just trying to set up and calibrate steering. I'm getting weird issues in the Autosteer setup window.

When I first power up the autosteer arduino, I get a somewhat sane number and then it jumps when I press either up or down to adjust the raw number to 0 to run the wizard.

One sensor starts at -75 and jumps to -310 on key touch, another test sensor starts at +110 and jumps to +460. After this jump, I can adjust the number toward 0 again and it stays stable, increasing by 1 for each +1 I give it. But the adjustment can only go so far as it jumps to 1 as soon as I reach +255 of adjustment (presumably an integer variable).

What the heck is going on here? I'm kinda dead in the water as it can't zero out and go through the wizard to figure the step values.

Also, do I need a physical steer switch or can't that just be the button on the UI? I don't have the work switch enabled either as we're doing those things with hydraulics manually at this point.
 
Well, everything is in the tractor and just trying to set up and calibrate steering. I'm getting weird issues in the Autosteer setup window.

When I first power up the autosteer arduino, I get a somewhat sane number and then it jumps when I press either up or down to adjust the raw number to 0 to run the wizard.

One sensor starts at -75 and jumps to -310 on key touch, another test sensor starts at +110 and jumps to +460. After this jump, I can adjust the number toward 0 again and it stays stable, increasing by 1 for each +1 I give it. But the adjustment can only go so far as it jumps to 1 as soon as I reach +255 of adjustment (presumably an integer variable).

What the heck is going on here? I'm kinda dead in the water as it can't zero out and go through the wizard to figure the step values.

Also, do I need a physical steer switch or can't that just be the button on the UI? I don't have the work switch enabled either as we're doing those things with hydraulics manually at this point.
It is possible to set the zeropositionzero manually in arduino code. I had to do this as using 2 sensors for 4WS. but you may have found bug in latest code. I had to go back to 2.6 as also had trouble with Youturn relays when implement drawbar set too long. will have to wait for Brian to have time to check.

In the meantime make a new simple arduino sketch which looks at your sensor pin and serial.Print it. go for a drive get the tractor straight, find sensor value that drives straight. go back and add that number as steerPositionZero = -??? in autosteer.ino or Agopensteer.ino(whichever you use), then find in code where it looks to AOG to set steerPositionZero and comment it out.

You can work around the steer switch but really consider putting one in even if temporary, makes system much safer for quick disconnect.
just for testing either set switch state in Arduino or jumper the pin to gnd.
 
It is possible to set the zeropositionzero manually in arduino code. I had to do this as using 2 sensors for 4WS. but you may have found bug in latest code. I had to go back to 2.6 as also had trouble with Youturn relays when implement drawbar set too long. will have to wait for Brian to have time to check.

In the meantime make a new simple arduino sketch which looks at your sensor pin and serial.Print it. go for a drive get the tractor straight, find sensor value that drives straight. go back and add that number as steerPositionZero = -??? in autosteer.ino or Agopensteer.ino(whichever you use), then find in code where it looks to AOG to set steerPositionZero and comment it out.

You can work around the steer switch but really consider putting one in even if temporary, makes system much safer for quick disconnect.
just for testing either set switch state in Arduino or jumper the pin to gnd.
Yah, I had it jumpered to gnd as my workaround. Using an Easysteer so I'm pretty used to just jamming the motor forward on its tilt when it's not doing the needful.

I'll do the hardcoding of the zero in the ino on it, but I'm pretty sure it's happening at the GUI side given the initial value is sane until you click an + or - to zero it. I'll try the workaround but given the importance of the zeroing, I figured I was missing something in the setup that was causing this, I can't be the only one or maybe the version I have is buggy.

Not sure if that's going to give me the ability to run the wizard to set the clicks per degree.
 
Dont have to use wizzard to get points/degree. Can Calc it manually if needed, just turn tractor at steady rate, read sensor - zero point, calc from radius. But I think the wizzard still works as I used it after setting zero manually.
 
Discussion starter · #896 ·
Well, everything is in the tractor and just trying to set up and calibrate steering. I'm getting weird issues in the Autosteer setup window.

When I first power up the autosteer arduino, I get a somewhat sane number and then it jumps when I press either up or down to adjust the raw number to 0 to run the wizard.

One sensor starts at -75 and jumps to -310 on key touch, another test sensor starts at +110 and jumps to +460. After this jump, I can adjust the number toward 0 again and it stays stable, increasing by 1 for each +1 I give it. But the adjustment can only go so far as it jumps to 1 as soon as I reach +255 of adjustment (presumably an integer variable).

What the heck is going on here? I'm kinda dead in the water as it can't zero out and go through the wizard to figure the step values.

Also, do I need a physical steer switch or can't that just be the button on the UI? I don't have the work switch enabled either as we're doing those things with hydraulics manually at this point.

That wizard is a bit of disaster. If you're using that sensor at full range just set the count to about 8 or 9. Most settings are about just drive and see what happens. If that number is too low, it won't turn enough and when you do a u turn, it will go outside of it. Too high, wheels turn sharper and you will go inside the turn.



Following a line, if it turns too much and crosses the line, or never gets there (meaning not steering enough) just raise and lower it.
 
Dont have to use wizzard to get points/degree. Can Calc it manually if needed, just turn tractor at steady rate, read sensor - zero point, calc from radius. But I think the wizzard still works as I used it after setting zero manually.
That worked great, once I figured out that the angle reported in AIG is not the same as the ADC value that the Arduino sketch uses. I also remounted the sensor arm when I realized it was maxing out just slightly left of straight.

I set the steering Zero Position to the ADC value and diddled with the counts/deg and its working well now.

Thanks for the pointer, apm.
 
Hi I'm trying to get AOG to recognize my GPS reciever. It's a ublox m8t, but I can't get it to work. I've set the baud rates and the ports but when I try to connect I get No GPS message.
 
Discussion starter · #900 ·
Hi I'm trying to get AOG to recognize my GPS reciever. It's a ublox m8t, but I can't get it to work. I've set the baud rates and the ports but when I try to connect I get No GPS message.
Welcome to the forum Jordan! When you push Config/USB Ports and connect to the correct com port and set the correct baud and then push Connect, what does the text window show?

Is there another program that you can confirm there is output from the m8t?
 
881 - 900 of 2,032 Posts