Grade control

You just need an open center valve to let the oil circulate back into the tractor?

1 Like

so even with a closed center tractor i would need an open center valve?

Yeah, if you want to run it through the tractor control valve. Just set the flow to a good value and you’re good to go if you don’t need huge flow. If you want load sensing, you need to have power beyond and a closed center valve.

2 Likes

Did some testing with exporting importing, now I’m able to export from OpenGrade the surveyed points from the Contour.txt file and upload into a design tool. The test here is with a “desktop survey” driving back and forth with the simulator and clicking the altitude up and down. Looks like this in optisurface:

image

Then for the sake of testing I just set the target to the mean of the altitude and bring that back to OpenGrade:

image

I just bluntly set -1 for the heading, lat/long etc. values that I didn’t need.

As for the offset values in the file, what’s the third number? Am I correct in my hunch that it’s the UTM zone? Are the headings etc. needed elsewhere in the code?

Here’s the python code:

#Here we read in the Contour.txt used in surveying the area
#Read offset for northing and easting from header, then read data into an array
import numpy as np
f = open(‘Contour.txt’,‘r’)
lines = f.readlines();
f.seek(0);
offset = tuple(map(int, lines[5].rsplit()[0].split(‘,’)))
n_points = int(lines[6].rsplit()[0])
data_in = np.transpose(np.loadtxt(f,delimiter=“,”,skiprows=7))
f.close()

#Move data out from the offset
easting = data_in[0]+offset[0];
northing = data_in[2]+offset[1];
altitude = data_in[3];

#Dump XYZ into a file to export into an earthworks planning tool
data_out = np.column_stack((easting,northing,altitude))
np.savetxt(‘export.xyz’,data_out,delimiter=‘,’,fmt=‘%10.5f’)

#Create empty column for filling the not needed data like long / lat etc.
empty_column = -1*np.ones(easting.size);

#Create a data array with target as the mean altitude for testing purposes
data_back = np.column_stack((easting-offset[0],empty_column,northing-offset[1],altitude,empty_column,empty_column,-np.mean(altitude)*empty_column,empty_column,empty_column))

#Save to a new contour file
g = open(‘Contour_edit.txt’,‘a’)
for i in range (0,7):
g.write(lines[i])
np.savetxt(g,data_back,delimiter=‘,’,fmt=‘%10.5f’)
g.close()

4 Likes

What kind of tractor @kansasfarmer? We have a few JD on tracks, 8320T, 8410T & 9400T. I took a look at the PWM signal going to the valves on the back and my plan is to control the JD proportional valves myself with an Arduino/PWM driver. As long as you don’t touch the SCV control in the cab while the valve is unplugged from the wiring harness, the tractor does not throw a code.

2 Likes

I started thinking if we could use this approach that @canadaboy25 has implemented for steering bang-bang valve for the blade control as well: Added pulse/on-off/bang-bang valve support to AgOpenGPS

2 Likes

JD 8400. Didnt know that you could tie into a tractors valve like that. Makes sense i guess

1 Like

Proportional will be the best for sure, the proportional cetop costs around 200E.

Yes, not that costly. Have on/off valve on the leveller already so though I’d give it a shot with a simple relay card by doing sort of “poor man’s PWM” by pulsing the relays, or then maybe just go for the Cytron straight away.

Also uploaded the python notebook to github and added lon/lat calculation!

Relays will fail quickly, with frequent switching, the contacts will burn out quickly. I had this problem when controlling a 6 way valve and I use it:

Good point. Maybe smarter to go directly with pwm as I even have one spare Cytron, could build that on v2 PCB and have A/D convertor ready for possible draft control of the blade.

@kansasfarmer I am going to mount a prop valve on my blade, I wasn’t satisfied with my bang-bang valve.
I will use a Hydraforce SP10-58C prop with a M+S Hydraulic PRTA40 priority valve.
blade prop valve

2 Likes

This is great! Right now this is way to advanced for my coding skills but I will take a look at it and make a survey. How much points/Ha/meters you think we can drive before there are to much points?

Yes mines burned out after 8 hours of levelling.

1 Like

I talked with a guy who does leveling for a living and he recommended 10-15 meter between passes when surveying. If we ha 1 hz saving and say 12 kph speed, that would be 3000 points / ha. I’ll try to do a test by creating a field of some tens of ha to see how it works. The optisurface guys recommended exporting in a 5 meter grid so that would be 4000 p/ha.

The python code will manage that for sure, don’t know if there’s trouble elsewhere.

For the visualization, I try to make a line in the heading direction and draw the profile along that, now it’s bit messed up to read as you jump from a line to another.

Another thing to add could be some kind of max cut limiter or a nudge upwards if the blade goes too deep.

2 Likes

Okay, some updates again. Tested making a 100 hectare field, i.e. 1 km x 1 km with 5 meter resolution, so in total 40 000 points with some made up profile, just a constant slope.

image

It’s now creating the Contour.txt file completely from scratch, also can do the coordinate transform from lon/lat to UTM quite easily, so with small edits to the script should be easy to use all sorts of survey data. Maybe could aid in visualization if it was just the map mode with colour for the altitude. @BrianTee_Admin maybe knows how easy/feasible it would be just to render it as a surface from the point values, I’ve no experience with the graphics side of things…

1 Like

@nut Can you give the meaning of each point value in the contour.txt file?

ex: 0.698,0.004,28.968,100.01,53.4365372,-111.260047,99.9999502,100.005,0.2
easting?, heading?, northing?, altitude, ?, ? , height of the red line(-1 when none), height of green line(-1 when none), dist from previous point? or speed?(0 for first and 2th, -1 for last)
red line is the target cut height
green line is the recorded line (when pressing the rec button)

You mean max cut per pass?
We could probably code something in opengrade to record the green line when it goes deeper than the field height(4th value) or his previous value and use the green line value to set the max deep for this pass. Or just use this green line value to show the “work in progress” in a 3d view.

1 Like

Yes, that was the idea that one could limit so that it doesn’t try to cut something like 30 cm at a time. I think some of the commercial stuff has like a nudge button so you can temporarily add 5-10 cm to the blade height as long as the button is down.

As I understand it goes like this:

$Offsets
offset_easting, offset_northing, UTM zone
number_of_points
easting-offset_easting, heading, northing-offset_northing, altitude, latitude, longitude, cut_altitude, last_pass_altitude, distance
easting-offset_easting, heading, northing-offset_northing, altitude, latitude, longitude, cut_altitude, last_pass_altitude, distance

The offsets are there probably to keep the precision as the integer part is a very large number. The UTM zone is needed to do the conversion correctly to lon/lat. So the actual easting/northing values are the offset plus the value in the list. The last “distance” item I don’t know what it’s used for, same goes for the heading.

2 Likes

what is the priority valve for kindave its own load sense circuit? is the way you have it drawn goin to circulate oil through scv even when valve is not operating?
thanks

hi,
Yes the M+S Hydraulic PRTA40 priority valve will send only the amount of oil needed to the prop valve. When the prop valve is in neutral all the oil will go back trough the EF port with minimal pressure raise.

My Valtra have a gear pump and use a danfoss OLS priority valve for steering and all the excess flow goes to the working hydraulics.

I have now all the parts, I should be able to test it next week.

Would you mind telling a bit about the OptiSurface application? Did I understand correct that you are using a trial version? Are you planning to use a licenced copy if all goes well? How is the trial copy restricted, time limited or feature limited or something else?

I feel the planning tool being an essential part of field levelling but haven’t seen any open source applications. OptiSurface I happened to see “live” at our neighbour’s field. Or I only saw the tractor working on the field where planning was done with OptiSurface and the driver was quite happy with the app capabilities.