DIY AutoSteer with AgOpenGPS - Page 179 - The Combine Forum
 1214Likes
 
LinkBack Thread Tools
post #1781 of 2024 (permalink) Old 05-19-2019, 04:13 AM
Senior Member
 
Join Date: Mar 2018
Location: South Bavaria
Posts: 165
Mentioned: 8 Post(s)
Quoted: 70 Post(s)
Quote:
Originally Posted by lylevd View Post
Ive almost got mine working but I think there may be a bug. I am using an ESP32 with the Autosteer_ESP code posted on github but i cannot get a steering angle reading. I have selected " byte input_type = 0; //0 = No ADS installed, Wheel Angle Sensor connected directly to ESP at GPIO 4 (attention 3,3V only)". I uploaded a small sketch to read and print GPIO 4 values and it works perfectly. I have spent hours looking through the code and have not spotted the problem. Anybody have any ideas on how i should proceed?

Lyle

Hi, the problem is GPIO4 (pin of ADC2) can only be used as ADC if WiFi is disabled. So use another free ADC Pin which is not connected to ADC2, or like most do, use ADS1115.
The internal ADCs of the ESP have a bad reputation, so using the ADS is really the better idea.


https://docs.espressif.com/projects/...ital-converter

BrianTee likes this.

Last edited by Weder; 05-19-2019 at 04:15 AM.
Weder is offline  
Sponsored Links
Advertisement
 
post #1782 of 2024 (permalink) Old 05-19-2019, 06:10 PM
Senior Member
 
Join Date: Jan 2018
Location: P.E.I. Canada
Posts: 211
Mentioned: 2 Post(s)
Quoted: 84 Post(s)
Hey guys I've read through posts #1722 through #1731 a whole bunch of times and I have a pretty good grasp of what's going on with bit shifting and 10bit resolution vs. 16bit resolution etc. I've set up steer zero successfully matching counts per degree to actual degrees of wheel movement before and this was done pre-ADS1115 and post-ADS 1115. The only thing was this was done with either Princess Auto WAS or Delphi WAS. Now I have a different problem that I haven't figured out yet. I went back to my friend's NH T6.155 and decided to use the factory WAS along with the ADS 1115 because we broke the arm off the Princess Auto WAS (extended the arm but not enough) and because I wanted to get the factory one figured out. Here's the great part I have a super stable signal from the factory WAS (where I couldn't get one before) and I can get the Steer Zero to read correctly when the wheels are pointed straight ahead but when I turn the wheel full left or full right the degrees don't match it's like -15° at full left and +25°at full right (which at first I thought was a counts per degree problem) and I don't think that I can just adjust where the center of the range is on the factory WAS by changing its mounting position. This really frustrated me yesterday as I can set up the other WASs just fine.

So @apm you had offered a solution to this problem before. Do you still have an idea with what might be happening because it doesn't seem like there is a linear relationship between voltage (0-5V) and steering range (-55° to +55° measured with protractor) even though with the wheels pointed straight ahead I get a voltage on my multimeter of 2.5V. If I set my counts per degree to 1 while having max steer angle set to 55 here's what happens. I turn the steering wheel full left I get the reading -4090.20 and then full right I get 5368.80. So I guess the total range would be 9459 right? Which in theory would put the center at approximately 4729 which doesn't work, the center seems to be around 6588 when using the existing Weder AIO autosteer switch INO range of 0-13000. I can't for the life of me figure out how to get a range that is 9459. I tried opening the serial monitor in the Arduino IDE and got gobbledygook characters (this is before I figured out that I had to set the baud rate to read the values) so that is my next step. @kareldew how did you solve this? It should be as easy as 1, 10, 11 right

On a side note does the AOG code need to be modified so that we can use the Steer zero sliders and counts per degree to match the 16 bit range of the ADS1115? Thanks in advance for your help I will try to post a tutorial on the Wiki once I figure this out.

WTalen is offline  
post #1783 of 2024 (permalink) Old 05-19-2019, 06:48 PM
Senior Member
 
Join Date: Jun 2018
Location: Denmark
Posts: 107
Mentioned: 5 Post(s)
Quoted: 58 Post(s)
Quote:
Originally Posted by WTalen View Post
Hey guys I've read through posts #1722 through #1731 a whole bunch of times and I have a pretty good grasp of what's going on with bit shifting and 10bit resolution vs. 16bit resolution etc. I've set up steer zero successfully matching counts per degree to actual degrees of wheel movement before and this was done pre-ADS1115 and post-ADS 1115. The only thing was this was done with either Princess Auto WAS or Delphi WAS. Now I have a different problem that I haven't figured out yet. I went back to my friend's NH T6.155 and decided to use the factory WAS along with the ADS 1115 because we broke the arm off the Princess Auto WAS (extended the arm but not enough) and because I wanted to get the factory one figured out. Here's the great part I have a super stable signal from the factory WAS (where I couldn't get one before) and I can get the Steer Zero to read correctly when the wheels are pointed straight ahead but when I turn the wheel full left or full right the degrees don't match it's like -15° at full left and +25°at full right (which at first I thought was a counts per degree problem) and I don't think that I can just adjust where the center of the range is on the factory WAS by changing its mounting position. This really frustrated me yesterday as I can set up the other WASs just fine.

So @apm you had offered a solution to this problem before. Do you still have an idea with what might be happening because it doesn't seem like there is a linear relationship between voltage (0-5V) and steering range (-55° to +55° measured with protractor) even though with the wheels pointed straight ahead I get a voltage on my multimeter of 2.5V. If I set my counts per degree to 1 while having max steer angle set to 55 here's what happens. I turn the steering wheel full left I get the reading -4090.20 and then full right I get 5368.80. So I guess the total range would be 9459 right? Which in theory would put the center at approximately 4729 which doesn't work, the center seems to be around 6588 when using the existing Weder AIO autosteer switch INO range of 0-13000. I can't for the life of me figure out how to get a range that is 9459. I tried opening the serial monitor in the Arduino IDE and got gobbledygook characters (this is before I figured out that I had to set the baud rate to read the values) so that is my next step. @kareldew how did you solve this? It should be as easy as 1, 10, 11 right

On a side note does the AOG code need to be modified so that we can use the Steer zero sliders and counts per degree to match the 16 bit range of the ADS1115? Thanks in advance for your help I will try to post a tutorial on the Wiki once I figure this out.
My Factory WAS has 5 V supply but delivers signal between 0 V and 4,5 V, so check the voltage at max left and right again. It could be that you have 0 to 2,5 V to one side, but only between 2,5 to 4,5 V to the other side !
WTalen likes this.
LarsVest is offline  
Sponsored Links
Advertisement
 
post #1784 of 2024 (permalink) Old 05-20-2019, 03:19 AM
Member
 
Join Date: Jun 2018
Location: Belgium
Posts: 31
Mentioned: 0 Post(s)
Quoted: 16 Post(s)
Quote:
Originally Posted by WTalen View Post

On a side note does the AOG code need to be modified so that we can use the Steer zero sliders and counts per degree to match the 16 bit range of the ADS1115? Thanks in advance for your help I will try to post a tutorial on the Wiki once I figure this out.
I had the same but I solved this by setting the counts per degree really high till you see only two digits (an angle).
then set the wheels straight and zero it with AOG( don't forget to change Ardu code when using ADS)
I measured my max steering and it is 27 degree, left so in AOG it shood show -27 and right it is like 29 or so, again it shood show 29. In AOG mine give me 32° there is a small difference here. It works in a straight line for now but doesn't make uturns.

my Idea was to make a small calculator for counts, zero and max steering in both directions. Like buttons :My wheels are straigt (click), my wheels are max left (click) and my wheels are max right (click). and the calculator takes the number when you have clicked and gives you the numbers that you have to put in.
Its because the AOG counts calculator works only for one direction so it will calculate with one linear graf. If you are lucky with the settup of the potentiometer(WAS)( like turning the wheels lineair the WAS counts also lineair) you are good.

it could be that you mount the sensor not at the wheel hub but at the piston linkage or so and also not respect angle and lenghts of your home made WAS
that will give you a not lineair value so it is normal that it doesn't work good
I have this problem And it is why I have so much trouble setting it up.
Also it is this reason I beleave jd and others put their sensors at the knockle.
so a calculator can help a part of the problem and also make it easy to set up the counts per degree.

Hope you understand what I mean
WTalen likes this.
alex lan is offline  
post #1785 of 2024 (permalink) Old 05-20-2019, 09:31 AM
Senior Member
 
Join Date: Sep 2009
Location: S. AB
Posts: 3,566
Mentioned: 6 Post(s)
Quoted: 874 Post(s)
Sounds like AOG needs to be able to handle non-linear WAS. Stands to reason that except for perfect setups the zero angle position may not actually be 50% of the signal range. Might need a calibration with readings from several known positions to establish a response curve.
WTalen and alex lan like this.
torriem is offline  
post #1786 of 2024 (permalink) Old 05-20-2019, 11:17 AM
apm
Senior Member
 
apm's Avatar
 
Join Date: Mar 2018
Location: East Chapman, West Australia
Posts: 108
Mentioned: 4 Post(s)
Quoted: 45 Post(s)
Ok been a while since I had to map a WAS, but process is quite simple, if my memory is ok. was all done in the arduino ino. First must have a known and accurate 0 position. Then use the map function to correct the signal to be equal left and right.
This is just an example as I dont have my code with me and the numbers are fictional just to make the calc easier.
If 0 pos is 100 and turn left is 5 counts /deg, 20 deg left turn is from 100 to 0 on WAS. But 20 deg right is 100 to 150
int steerangle = analogread(A0); // get WAS value
steerangle = map(steerangle, 101,150,101,200); // will map right turn to be same counts as left.

Probably clear as mud, but if you study the map function it will be clearer.
WTalen and alex lan like this.
apm is online now  
post #1787 of 2024 (permalink) Old 05-20-2019, 09:04 PM
Senior Member
 
Join Date: Jan 2018
Location: P.E.I. Canada
Posts: 211
Mentioned: 2 Post(s)
Quoted: 84 Post(s)
Quote:
Originally Posted by LarsVest View Post
My Factory WAS has 5 V supply but delivers signal between 0 V and 4,5 V, so check the voltage at max left and right again. It could be that you have 0 to 2,5 V to one side, but only between 2,5 to 4,5 V to the other side !
Thanks Lars, I'll check the voltage on both sides and see what range it goes through.

Quote:
Originally Posted by alex lan View Post
...my Idea was to make a small calculator for counts, zero and max steering in both directions. Like buttons :My wheels are straigt (click), my wheels are max left (click) and my wheels are max right (click). and the calculator takes the number when you have clicked and gives you the numbers that you have to put in.
Its because the AOG counts calculator works only for one direction so it will calculate with one linear graf. If you are lucky with the settup of the potentiometer(WAS)( like turning the wheels lineair the WAS counts also lineair) you are good.
I like that idea it's similar to the steering wizard we used to have but on steroids.
Quote:
Originally Posted by alex lan View Post
it could be that you mount the sensor not at the wheel hub but at the piston linkage or so and also not respect angle and lenghts of your home made WAS
that will give you a not lineair value so it is normal that it doesn't work good
I have this problem And it is why I have so much trouble setting it up.
Also it is this reason I beleave jd and others put their sensors at the knockle.
so a calculator can help a part of the problem and also make it easy to set up the counts per degree.
Hope you understand what I mean
For this installation I really wanted to use the New Holland factory WAS it sits on top of the kingpin or "knuckles" just like the JD steer sensors do. Putting the correct length arm on the Princess Auto sensor is still the backup plan.

Quote:
Originally Posted by torriem View Post
Sounds like AOG needs to be able to handle non-linear WAS. Stands to reason that except for perfect setups the zero angle position may not actually be 50% of the signal range. Might need a calibration with readings from several known positions to establish a response curve.
Might need to do this in the future. Is this tricky to do when we are using the ADS1115. I'm going to give apm's suggestion a go and see if that might be a solution.

Quote:
Originally Posted by apm View Post
Ok been a while since I had to map a WAS, but process is quite simple, if my memory is ok. was all done in the arduino ino. First must have a known and accurate 0 position. Then use the map function to correct the signal to be equal left and right.
This is just an example as I dont have my code with me and the numbers are fictional just to make the calc easier.
If 0 pos is 100 and turn left is 5 counts /deg, 20 deg left turn is from 100 to 0 on WAS. But 20 deg right is 100 to 150
int steerangle = analogread(A0); // get WAS value
steerangle = map(steerangle, 101,150,101,200); // will map right turn to be same counts as left.

Probably clear as mud, but if you study the map function it will be clearer.
Thanks Andrew! I just read up on the map function on the Arduino site a little bit after you posted this. I will give this a try.
WTalen is offline  
post #1788 of 2024 (permalink) Old 05-21-2019, 04:17 AM
Member
 
Jmay.david's Avatar
 
Join Date: Jul 2018
Location: Australia
Posts: 31
Mentioned: 0 Post(s)
Quoted: 18 Post(s)
So I've seen the chatter about the new PCB board design and I've had a bit of a squiz at it. How does it work? Does Digikey create it and mail it out? For a first, experimental and educational build is it worth giving the PCB a drive? Or probably a bit safer to stick to the Arduinos at this stage?
Jmay.david is offline  
post #1789 of 2024 (permalink) Old 05-21-2019, 08:20 AM
Senior Member
 
Join Date: Jan 2011
Location: Mundare Alberta
Posts: 1,091
Mentioned: 2 Post(s)
Quoted: 285 Post(s)
I do not believe digikey makes pcbs. I need to get too, just haven't looked too much into where to get. Regardless, the PCB still runs on arduino, it is just an empty board when you get it. The nice thing is everything is well organized, filtered, isolated and just cool looking. Makes for a easy and clean install.
Jmay.david likes this.

You get what you put in and people get what the deserve. - Kid Rock

The more seriously you take things, the harder the rules become.

If it is broken, fix it. If it isn't broken, I'll soon fix that.
Beerwiser is offline  
post #1790 of 2024 (permalink) Old 05-21-2019, 08:26 AM
Senior Member
 
Join Date: Jan 2018
Location: P.E.I. Canada
Posts: 211
Mentioned: 2 Post(s)
Quoted: 84 Post(s)
Quote:
Originally Posted by Jmay.david View Post
So I've seen the chatter about the new PCB board design and I've had a bit of a squiz at it. How does it work? Does Digikey create it and mail it out? For a first, experimental and educational build is it worth giving the PCB a drive? Or probably a bit safer to stick to the Arduinos at this stage?
That is the goal of the PCB; one simple configuration, one arduino code, just plug it in configure and go. At this point you have to find your own PCB manufacturer (there are many to choose from), send them the file and have them print the board.

At Digi-Key you just upload the BOM file (bill of materials) and order it. Brian made a video of how to do that. There are a couple of parts that Digi Key doesn't stock so you would have to order them somewhere else.

Then comes the fun part of soldering the components on the board. As long as you don't hold the soldering iron like the lady in the stock photo below you'll be fine. Both Brian's and Ropecope's designs are on revision 2 or 3 due to a couple things that didn't fit quite right. If you are looking for "customer support" on the forum I think it is easiest if you build Brian's basic autosteer PCB. We had some discussion in the video meetings about the PCB and there is a company in China: allPCB (I believe) who is able to source all the parts and solder them to the board. Essentially you'd just order your board and plug it in and Bob's your uncle. I don't believe that arrangement has been finalized though.

If you're halfway good with a soldering iron I think the safer bet is to order a PCB because all the power supply issues and improper wiring connections are already taken care of. The goal of the PCB is to make AgOpenGPS DIY autosteer accessible for all who want to learn.

Attached Images
File Type: jpg soldering fail.jpg (101.4 KB, 25 views)
WTalen is offline  
Sponsored Links
Advertisement
 
Reply

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the The Combine Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome