The Combine Forum banner

21 - 40 of 212 Posts

·
Registered
Joined
·
131 Posts
CQuick, I haven't heard of the style you mentioned either! Our sprayers use the old 3way style that Torriem mentioned. Not much different than a regulating ball valve when it comes down to it.
 

·
Registered
Joined
·
5,856 Posts
One for rate and one for the autosteer(and everything else that it is currently doing)!

Then it just becomes necessary to grab speeed and width information, either from the autosteer arduino or directly from AOG. If I move pins around I should be able to find enough space to run a comm line between arduinos.
Yes, i 100% agree. Sorry bout that!

I've started on the AgOpenGPS rate class and settings window :)
 

·
Registered
Joined
·
5,856 Posts
So i think by making my life hard, and yours a lot easier, i can save a lot of data to be sent and get potentially lost/confused.

Do you want AgOpenGPS to do all the calcs based on section width, speed, how many sections are on and the desired set rate, and just send flow rate required, and the section control byte that say which sections are on 5 times a second?

Then all you have to do is turn on off the sections with the section control byte, and PID the flow.
 

·
Registered
Joined
·
4,014 Posts
Discussion Starter #24 (Edited)
Would AgOpenGPS handle calibration then, and then only give the rate controller arduino a desired ppm set point for flow? I think on my sprayer the calibration routine (I don't think I've ever done it since our existing calibration seems close) is something like hold the pressure at 40 psi with one segment on, and then measure the volume at a nozzle with a pitcher, and put that number into the computer, which calculates a conversion constant.

Also the arduino rate controller may want to send numbers back to AgOpenGPS, such as the current flow ppm, total pulse count (total gallonage), etc, for display. Also for calibration, the arduino is likely going to need to read pressure from a transducer.

As I see it, the rate controller will need to be changed into different modes (calibration, run, etc) on command from AOG.

Thinking on it, I believe favor the arduino doing more of the work instead of AOG. This work would include calibration of actual rate to ppm, holding a desired actual rate set point, etc. For example, instead of AOG calculating the desired ppm, maybe AOG should just send the actual desired rate to the arduino and let it figure it the ppm and so forth. This is pretty much how the ISOBUS architecture works, for example. Coverage mapping and variable rate control (which run in the monitor) are separate from the actual implement rate controller (which stays on the implement). In my opinion this separation keeps more modular and makes it easier to adapt AOG to run with other forms of rate control, including a drill.

I'm sure there are lots of ways of architecting it. Just rambling on a cold winter day.
 

·
Registered
Joined
·
131 Posts
I think AOG should let the user set the desired rate, and display the actual rate(and maybe pressure?). Let the slave arduino take speeed and relay(And desired rate), compute the flow with flowmeter input, and get the pressure. This makes the whole setup more modular, as Torriem mentioned.

Right now, I have the autosteer arduino set as a master, and it passes the speeed and relay variables to the slave arduino through I2C. Slave reads flowmeter using Torriem's class(hope that is alright, if not let me know), (got to add in pressure), currently has a hard-coded target rate to compare against, does some magic formulating and sends back to the master the liters per hectare that is currently be applied. Slave also adjusts the valve using a proportional delay with the millis() function.

I think we need to decide on what format AOG sends the data in(I am currently assuming it will be appended onto the current string of data that the autosteer code gets) and what format it will take it back(same way?). Does that even make sense? haha

It rained all day so I put some work in to clean up and do some changes. Found out my other usb cable is bad so can't test at this time *facepalm*.

Hopefully this works, untested code:
https://github.com/warrenseely/Liquid_Rate_Control/tree/1
 

·
Registered
Joined
·
131 Posts
The only problem with that setup is, you then need an autosteer module to do rate control.

Well if that is the only problem I must be doing ok haha

I am not quite following what you are saying though......

I intended to pass the data to/from AOG through the autosteer arduino to a slave arduino via I2C. Then all AOG would need to do would be to display the rate and maybe let the user enter a target rate. The autosteer arduino would only pass a couple variables from AOG to the slave, and from the slave back to AOG. Also only one USB hookup to tablet required.

I put all the files I am working with in the git link, including an older(last month) version of the AOG arduino code with a couple statements to send/receive the data to/from the slave arduino.
 

·
Registered
Joined
·
5,856 Posts
We'll figure out the communication part, no prob. Once a stable version of the flow control works, its very easy to slip it into any code jacket. But, as this program grows every stream needs to be identified with header, and ideally should be a footer too. USB will certainly be replaced by ethernet, so even more important then.

AgOpenGPS outputs on the relayRate port the following: 2 id header bytes equal to 32760, then the relay on off byte, then the speed in km/h * 4 byte, then the hi and low byte of the setRate * 10.

Decoded like so:
Code:
   //Data Header has been found, so the next 4 bytes are the data
    if (Serial.available()> 3 && isDataFound)
    {  
      isDataFound = false;    
      relay = Serial.read();   // read relay control from AgOpenGPS     
      groundSpeed = Serial.read()>>2;  //actual speed times 4, single byte
  
      // sent as 10 times value in liters per minute, LPM * 0.264172 to get US GPM
      rateSetPoint = ((float)(Serial.read() << 8 | Serial.read()))* 0.1;   //high,low bytes

      //reset watchdog as we just heard from AgOpenGPS
      watchdogTimer = 0;
    }
I've uploaded all the new autosteer and rate Arduino codes, along with the AgOpenGPS solution. It will be important for the code to be able to differentiate between data and settings. Everything runs at 38,400 baud now too

Its tough to integrate into an existing interface, but a first shot at it anyways.

Code is on the nightly build. Bit more triple checking and it will be promoted to a new version and on the real AgOpenGPS git
https://github.com/farmerbriantee/AgOpenGPS_Dev/

 

·
Registered
Joined
·
131 Posts
NOW I am getting to be on the same page as you are Brian. Excellent video.

My problem was that I was viewing it through the lense of using the autosteer AND the rate control concurrently since that is my end goal. However, as you pointed out that is not necessarily what will actually suit other users. Apologies! I am getting there, slowly..... Now what you were saying makes MUCH more sense in terms of integration.


So then suppose we want to run both autosteer AND rate control concurrently. What are your thoughts on the hookup to AOG? Two USBs?
 

·
Registered
Joined
·
131 Posts
On another note, most of the emphasis here on rate control has been through the use of a flowmeter. Turns out that pressure sensor-based flow control is just about as accurate (probably moreso considering nozzle flow rates are subject to pressure). Any preferences? Just food for thought.
 

·
Registered
Joined
·
5,856 Posts
So then suppose we want to run both autosteer AND rate control concurrently. What are your thoughts on the hookup to AOG? Two USBs?
Yes. No problem doing that at all. I had an IMU on a usb, the autosteer on a usb, and the GPS on another, and the webcam on another usb while recording video of everything. Driving thru the field all working just fine.
 

·
Registered
Joined
·
1,350 Posts
Wedge just made a ah ha moment in my opinion. Every nozzle is rated on speed and pressure giving you your target gpa. Flow is a after thought of the combined nozzles or nozzle. It does not matter if it is pwm nozzles or conventional it would work for either. As a example, I used to do lots of hand gun backpack work. After some experience you got the feel of the pressure on you backpack pump in relation to your walking speed. Still highly inaccurate compared to a field sprayer, but I could still put down my product with relative accuracy. Never had any flow meter.
In a field sprayer application, what if I guy used pressure and speed to do the target gpa and a flow meter to detect problems(future upgrades)? So running along at 5mph at 30 psi doing 5 gpa would need x amount of gpm, not doing the math, too tired but you get the idea. Now if flow meter readings are off and pressure is right you know you have a problem, plugged nozzles broken etc. Is there any commercial system that uses both pressure and flow?
 

·
Registered
Joined
·
131 Posts
Pressure is extremely easy to get as well. Just a 0-5v analogRead() and map it.

I really like the idea of both though. As Beerwiser mentioned, it would be great for troubleshooting on the go! How many people can see all their nozzles from the cab? I know I cannot.....

Formula is super easy to do as well. Scroll to bottom of page link.
https://support.agleader.com/kbp/index.php?View=entry&EntryID=1816#how

Coding time!
 

·
Registered
Joined
·
5,856 Posts
The tricky part of flow is density and viscosity. Recalling my days working on heart lung bypass and dialysis machines, pressure needs a consistent medium, and a consistent Pd in order to get a reasonable flow solution.
 

·
Registered
Joined
·
4,014 Posts
Discussion Starter #35
I think most rate controllers (here in north america anyway) use flow for setting the rate, not pressure. I've never told my monitor anything different when I switch nozzles.
 

·
Registered
Joined
·
131 Posts
I think most rate controllers (here in north america anyway) use flow for setting the rate, not pressure. I've never told my monitor anything different when I switch nozzles.
From what I have been able to find, North America uses primarily flow while pretty much all our friends across the pond use pressure. It has been a couple years since I set up our Ag Leader so I do not recall if nozzle flow was a variable. I know it was on our old flexicoil controllers. It also is taken into account for any calibration we do on the system. We haven't changed anything on the controller when we swap between sprayers either(one has 0.2gpm vs. 0.3gpm nozzles) and it has not shown any obvious difference other than the 0.3 takes noticably higher speed to get all the nozzle internal valves to pop due to pressure.
 

·
Registered
Joined
·
5,856 Posts
Well if you're using differential pressure across a restriction and integrate it, that is flow.

Every time my sprayer tank empties, its a volume/flow confirmation cycle - it always says 417 gallons. Flowmeters are ridiculously accurate.
 

·
Registered
Joined
·
4,014 Posts
Discussion Starter #39
Pressure is measured in bar, pascals, or psi. In the case of psi, what we want to measure is psig, which is gauge pressure, relative to air pressure. We actually want all pressure measurements to be relative to ambient pressure. I imagine your transducer is measuring against ambient, not vacuum.

As for bar and Pa, you can convert them easily. 1 bar is 100 kPa, or 10,000 Pa.
 

·
Registered
Joined
·
4,014 Posts
Discussion Starter #40
By the way if any of your know of an affordable pressure transducer that can measure between 0 and 5psi with a high degree of accuracy, let me know. With such a unit it would be quite easy to make a tank volume measuring unit, a wee bit cheaper than the commercial one discussed on the forum a while back. Pure water is about 0.036 psi per inch of height. If your flow meter is accurate, as Brian's is, you can calibrate the water height to volume as you run a talk out.

I asked an ebay seller once if the transducer he was selling had a data sheet so I could see what the measuring resolution was. He wrote back and said, "what's a data sheet." Sigh.
 
21 - 40 of 212 Posts
Top