Grade control

So my dozer is a 24 v. I have a valve now that i can add to the hydraulic system which is a closed center pressure and flow compensated. If i understand you right. I could run this on/off valve with a cytron instead of relays? It has 24 volt coils is their any problem with that?
Thanks

The cytron MD13S is rated 6 to 30V
I am now wired like this, only power from usb:
ValveControlshematic
I think it will also work with a PCB with only a arduino and cytron installed.

I levelled sand for a 40x120 ft slab today, all in full auto, it made a great job, I will test more in September with a 3ac field to level.

Are you already able to export a levelling map from optisurface back to opengrade?
What are the possible output formats?
I am looking in buying the software.
I will also try to learn this Python stuff!

We will level most of ours field in the nexts years since we have an uncle who owns a JD9520 with a 20 ft blade and Trimble GPS. Currently he has his maps made externally, all with Optisuface.
If we can make it work I will be able to level with my 14ft blade.

I looked a little bit at his screen while they were levelling and it seem to be really basic for the price it cost!
The GUI was only a map with colours depending the cut/fill and was no changing while cutting. Maybe this is doable in opengrade?

1 Like

A bit back I was working on some variable rate stuff. I was able to control the color of the applied area with a scroll bar. All this did was give the third term in each section a value between 0 and 255. Then a given color was set to draw the sections, say red, at that color. Gave a nice display, Saying that, could not AOG map the elevations with the color just the same. Could not each gps fix be applied a color to be seen in the map. If two colors were chosen, you could display a large range of elevations. Just thinking out loud.

2 Likes
1 Like

@Pat the output formats are shapefile, agps file (which is basically a text file with lon/lat/original elevation/proposed elevtaion/cutfill values) and some trimble .gps binary format. It now works to import back with the agps file (need to do some work on parsing it properly still), only stupid thing is one needs to convert back from easting/northing to lon/lat. So I’m now looking into the shapefile, which should be XY data to start with. But it should be doable both ways, just worried about losing accuracy in the coordinate transforms, but maybe that’s not an issue.

As for hardware, I’ll solder together one extra PCB (kaupoimod2) that I have around, basically just to hold the cytron in place + the power relay so I can drive the valve through the PCB power. I guess one can drop the 5 volt stuff, unless it would make sense to put in the AD converter as future option for draft control…

@KentStuff good idea, need to take a look at the applied area drawing code! I’ve been struggling bit with the opengl bit, hopefully some time to work on that this week.

3 Likes

We did the reverse conversion, thanks to Brian it was already in the code. With a bit of fine tuning and Brian sending me back to “the school of the obvious”, precision was spot on. It is now part of the main code in the kml writer. Here is the link to the original question:

Also search for background and section to kml in the forum.

3 Likes

I now managed to get the data quite easily from .agd file. Just the test data I’m using is not in WGS84 but ETRS89 coordinates so having bit of offset there as I was using some laser scanning data that was publicly available for testing. Also need to figure out setting the main benchmark correctly in Optisurface so the design ends up in the right place, the benchmark is now off as well in the testing dataset.

I’m using the pyproj package to do the transformations, need to run some benchmarks to check that it works OK. I think it would be easy to have a python converter that created the text file for opengrade.

I was browsing through the variable rate stuff and that’s basically what this will end up being if we export the design from outside, maybe would make sense to combine efforts at some point. Need to take a look at @SK21 rate control app as well for inspiration, then we could have opengrade app that runs alongside AOG?

But that’s maybe next things, I think the crappiest visualization I can come up with is just using a color coding and putting big vertices on the 3D view. Next could maybe be the background image, since making the png out of the elevation data is quite straightforward…

So when using an on/off valve with cytron, the cytron is just switching on for longer or shorter periods. basically just a switch?

Hi
Yes it act like a solid state relay, like @baraki 's Mosfet. It should be no problem unless someone have an other thought about this.

The delta value form blade height vs target height is enough if there are no big steps or big change in grade. This will keep the code very simple since there is no heading to calculate. Half to the time the point is ahead, the other half behind.
I think there is no need to improve the code on the OpenGrade side, but maybe someone will make a nicer aduino code(better written).

@nut I didn’t understood the python code so far, how to use it. Do you think we may eventually write a program (,exe) converter with visual studio? Select input file, press execute, voila! This could be more user friendly, maybe python is easy once you understand it!

I will try to find an .agd file in the next days, the one I have (from an email that was not intended for me!) is a .gps.
Seeing all this progress I now hope to be able to level in September with an Optisurface map! :grin:

1 Like

You guys that are working on this full 3d leveling. How much harder would it be to run two receivers and valves through the same computer? Just something ive been thinking about.

I think dual GPS will be the next step, It should relatively easy. Maybe with same setup than AGopenGPS?
I want to mount dual antenna to one of mine tractor next winter so I will learn more about it!
To give a fixed angle to one side should be easy, to adjust to the points at each side a little more complex but douable. I think there is already some heading stuff in the code.

1 Like

@Pat for testing purposes I attach one .agd file that I created for testing here. The landform design is 100% bogus since just wanted to export something to test on.testfile_agd.agd.txt (24.0 KB) There’s also the script generated Contour.txt file part (it’s missing the header)Contour_edit.txt (53.4 KB) and the script itself used looks like this with some comments what the parts do:

Load libraries
from pyproj import Proj
import numpy as np

Read the agd file skipping the first row and taking only the 5 first colums. It creates a matrix out of those values

data = np.transpose(np.genfromtxt(‘veikko_edited3.agd’,delimiter=‘,’,skip_header=1,usecols=(0,1,2,3,4),missing_values=‘’,filling_values=-1))

Save individual columns with a new name for sake of clarity

latitude = data[0]
longitude = data[1]
altitude = data[2]
proposed = data[3]
cutfill = data[4]

Create a projection object for the correct zone (35 north) and coord system:

myProj = Proj(“+proj=utm +zone=35, +north +ellps=WGS84 +datum=WGS84 +units=m +no_defs”)

Convert lon/lat to east/north:

easting,northing = myProj(longitude,latitude)

Create correct size column to fill empty with -1 and take offsets as the minimum integer values

empty_column = -1*np.ones(easting.size);
offset_easting = int(np.min(easting))
offset_northing = int(np.min(northing))

Create a matrix with the new data as columns:

data_back = np.column_stack((easting-offset_easting,empty_column,northing-offset_northing,altitude,latitude,longitude,proposed,empty_column,empty_column))

Write header data and then write the matrix of new data at once to a new file

g = open(‘Contour_edit.txt’,‘w’)
g.write(‘$Offsets\n’)
g.write(str(offset_easting)+‘,’+str(offset_northing)+‘,35\n’)
g.write(str(len(easting))+‘\n’)
np.savetxt(g,data_back,delimiter=‘,’,fmt=‘%10.10f’)
g.close()

I think we can integrate the parsing to the main program, maybe into the load/save field dialog directly. Python is just dead easy to use for the development of parsing and editing the files, so I intended to do the prototyping with that because you don’t need to compile anything.

@kansasfarmer so you mean like dual antennas at either end of the blade? Could be tricky depending a bit on the tilt mechanism, it’s a different setup if you have individual cylinders to control or one for height and one for tilt?

2 Likes

This is what it looks like in opengrade, the coordinates are off as I transferred to the default offsets for the sim…

image

2 Likes

So the agd file is from the landform program? And you are importing that file through your python contour builder? Then this is opened in AOG (opengrade)? Is this correct?

1 Like

Yes, that’s how it works for now. I’ll try to do the same thing for shapefile as well.

1 Like

Messed around with the code to see if I could get it to draw different colors based on the elevation above and below the base 100. Yes you can. This is an extreme for just testing. All it does is compare the altitude to the 100 and adjust the color of each point based on the difference. Here is a snap shot of it.

image

This is it drawing the width of the blade. Not dots but lines.

image

I’ve given the elevation a slide bar and modified the gradiants to smooth it out.

image

4 Likes

Wondering how the elevation is calculated. This might be a question for Brian. I assume the lines are the proposed elevation so driving along the line either in autosteer or manual , how exactly is the target blade elevation calculated from the current gps position?
Most survey software that I have looked at have a cut/fill to surface feature so driving anywhere on the surface will display elevation cut/ fill. Not quite sure how the calculations work I believe the 3 closest points are used to calculate target. So even for leveling a large area, there are only three or four elevation points any 3 are used in the calculation. The elevation points could be entered in the software or collected with the machine/implement, negating the need for external software for simple leveling jobs. Larger jobs could be imported as tin files or surface files. Not to side track you just a thought.

1 Like

In opengrade, there’s always a separate target line that you originally drew by hand inthe software. Now we’re bringing that target from an external tool. As you’re driving, it’s just seatching for the nearest point to you current location and taking the delta between actual elevation and the target.

For flat surfaces there’s the laser mode that @Pat added

1 Like

Another step. Below are three images. First is just a short “survey” with the red cut and the green fill. The second, I’ve clicked the contour button once and it just shows the cut. The third, I’ve clicked the contour button again, and it shows just the fill. All based on the line drawn in the lower cut/fill profile line. Just thought it interesting to see just one or the other.

image
image
image

And this is your edited file ran through the same steps. Notice they are further apart, they all have the same heading. And I think my green is a little weak.

image

3 Likes

So that’s getting the heading from the contour file to draw the tool orientation correctly? I just filled that with zeros…

1 Like