Machine Zones/Sections

Hello AgOpenGPS,

I am new to AOG but as you can see by my name not new in years! In a former life I was in at the start of microprocessors building a grain handling system 40 or more years ago using a RCA 1802 8 bit processor the same processor that was used on the Voyager space probe. A very reliable chip as my system, as Voyager, (hopefully although we will never know), is still working.

We use John Deere guidance on our tractors and combine and it would be nice to use the same on the sprayer but JD are not too helpful when it comes to retrofit other manufactures kit. Therefore I have been looking else where and found AOG.

What I am trying to do is individual nozzle control on a 24 metre sprayer, 48 nozzles. The pressure control system works fine so I will leave that alone. The reason I want individual nozzles is that some of the pre-emergence chemicals hit the crops quite hard leaving struggling over sprayed patches. The sprayer has air operated nozzles and I intend to operate pneumatic valves via a can bus thus minimising the wiring. That bit I sort of have sorted, the part I am having trouble with is getting the output from AOG.

I have installed AOG and downloaded the latest section control onto a Nano which does 10 sections. Looking at the data being sent via the com port it seems the sections are in the 12th and 13th byte of the data with a maximum of 16 bits hence 16 sections. It looks like AOG can do up to 64 sections if you use zones and in the simulator they all seem to operate separately on screen.

My question is that when I have zones selected I get no output from the com port am I doing something wrong?

Your not missing anything, if the system completely failed you would want all sections on so you could limp through.

The output going high turns off the section, also since this leaves the relay off longer it does not die as quickly.

1 Like

Thank you for your reply. I possibly didn’t explain myself very well. At the moment I am only running the simulator with a Nano in a USB port with Machine_USB_v571 installed and led’s on the section outputs. That works with the simulator up to 10 sections fine. Looking further at the output from the USB plug directly I can see that two bytes are used giving a max. of 16 sections. On the section setup screen on the simulator in the bottom left hand corner there is a picture of a seed drill if you click on that it takes you to zones. This I read gives a max of 8 zones with a max of 8 sections per zone, total max 64. With a 24 metre sprayer at 0.5 metre nozzle spacing I at present am looking at 48 nozzles, therefore set up 8 zones with 6 sections per zone. When I run the simulator all 48 switch on and off individually correctly on screen. The problem is that with this setup I get no output from the USB port and that is looking at the data directly on the port.

Any ideas?

I see the ino files for machine modules is not updated to accept, they only listen to PGN 0xEF and not for PGN 0x7F that is used for 64 sections.

One of the problems with 64 zones is that its limited with IO ports on a Nano. One solution can be to use a shift register, but its not made ino file for that yet. And no gerber files for a board with shift registers.

Edit: You can find the information about the PGN’n here: AgOpenGPS_Boards/PGN 5.6.xlsx at master · farmerbriantee/AgOpenGPS_Boards · GitHub

Thanks Bullhill, that all makes sense not that I am up to speed as to USB protocols something to get my head around. I fully understand the limitations as to the number of Nano outputs available but because I intend to send the data in one form or another by a CAN bus the lack of pins won’t be a problem. Hopefully multiple Nano’n and MCP2515’s down the boom will all work with just 4 wires daisy chained down the boom but time will see if that is possible with 48, 12volt, 0.4A coils all “sparking” away merrily.
Back to the machine module if there is any one able to give me some pointers as to how I get the contents of PGN 0x7F into registers on a Nano I would be grateful. My programming skills are probably good enough to move them on from there.

The pgn for 64 sections is 229.

Using Machine_USB_v5 here:
AgOpenGPS_Boards/ArduinoModules/USB at master · farmerbriantee/AgOpenGPS_Boards · GitHub

Add this code to receive the pgn:



Machine_USB_v5.ino (12.0 KB)

Also zones have to be set up for the pgn to be sent out.

Great SK21 I will let you know how I get on. The weather in the south of the UK is good for spring drilling hence I have been ordered out of the office to sit on a tractor seat. Be back on the project asap.