Grade control

I would like to try it im in the process of getting a valve to install on Dozer. I already have RTK installed on blade for manual control. So only need the valve. by laser you mean totally flat without any slope in any direction?

Yes, totally flat
Its only a button “cboxLaserModeOnOff” and 3 lines of code!

in “OpenGL.Designer.cs” line 415

if (cboxLaserModeOnOff.Checked)
//in cm
cutDelta = (pn.altitude - ct.zeroAltitude)*100
else

I will work more on it next winter, maybe with with slope but I think this will be much more complex.
But right now I was looking for a fast way to make it work level from anywhere in the field.

1 Like

yep that has been a drawback when wanting to leval a pad or something and the survey line only reads like 13 ft each side.

To change this modify the line:

if (minDist < 15) // original number is 15(3.9 meter). I use 9000 (95 meter) meter2 = value
in OpenGL.Designer.cs near the line 526:

To make a full 3d I think one way is to find external software to make the map and after import something like one point per scare meter. OpenGrade is already always searching for the closest point (from the survey line) and if close enough it activate the light bar.

Here I have my modified OpenGrade
It have a valve output for on/off or prop valve (connect in autosteer port),
a laser mode(to level at same height from anywhere)
and an extended distance to level from the line (95m, 300ft)
Edit: removed the link to an old file.

1 Like

Thanks. Were did you get your proportional valve? My on/off directional control valve is coming from trausch dynamics.

I will test with a hydraforce SP10-57C or a SP10-58D, i have one of theses on my tractor for autosteer with AGopenGPS and the other is coming soon(ordered is January!).
These are the cheapest I fund here in Canada.
I will have to set it for open centre circuit. Best is maybe to add something like this if with closed centre:
https://discourse.agopengps.com/t/load-sensing-oc-steering/1599/42?u=pat

I’m done for spring, I will work with it in September, probably test before when I have some time!

1 Like

Where did you order it from?

1 Like

I checked on the hydraforce web site and called the Quebec distributor: MCS-Servo.
They sell direct to customers.
I clicked on the map here:http://hydraforce.com/distribution.html

1 Like

Nice work here, started reading through the source code as well. Have you already had any chance to use 3D design data? I’ve been now designing a few field with trials of Optisurface and WM Form, at least from optisurface you get a xyz file out quite easily.

Am I right in thinking, that just by setting the distance to nearest point range to a sensible value, the 3D design could be “uploaded” to opengrade by editing the Contour.txt? In the below snippet, I guess the northing and easting are defined as the offset point as point zero? What are the last five number, lon/lat + something else?

2020-July-09 12:05:16 AM
Points in Patch followed by easting, heading, northing, altitude
$ContourDir
asdfda Jul09
$Offsets
482724,5920826,12
115
0.503,0.004,-14.648,100,53.4360552,-111.260047,-1,-1,0
0.503,0.004,-14.648,100,53.4360552,-111.260047,-1,-1,0

Could I just write a script in python that converts the xyz file output into this format and be more or less good to go?

2 Likes

Answering to myself to keep some notes: The third last number is the target altitude, could create a target line my editing that by hand. Tried @Pat’s opengrade version and just make the arduino blink some lights, so far so good, setting up the relays next week as they arrive.

1 Like

Hi
@nut and others using my arduino code, I discovered that my arduino programs switch the relays only 5 times per second (5hz). This is because i used the code BlinkTheRelay from @BrianTee_Admin as base. To solve this you have to increase the loop frequency or remove the “SetRelays” from the timed loop. I have not tested this in the field yet but I think this will make the blade react nicer.

1 Like

I did some modifications to @Pat’s code, and it’s now on github.

Summary of changes:

  • Renamed section control to Blade Control and removed the unnecessary stuff, now only cutValue is sent to Arduino
  • Updated GUI so that you can track the values live in GPS data screen
  • Lasermode/cutValue functionality as before
  • New .ino which supports both on/off and propo valves with a toggle in the code
  • Arduino sends back status of cut valves in on/off mode, and direction and PWM value in propo mode

Next will focus on making a script to create the target line from spatial XYZ data so that one can import survey/levelling designs

4 Likes

Pat: were you thinking that the on/off valve would work a lot better now and a proportional valve would be unneccessary.
thanks

Does anybody know of a good valve that can be hooked up to a tractors SCV, that is set to constant.

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