Controlling Bogballe / KRM spreaders

Evening all,

I’ve just bought a new Bogballe M35W fertiliser spreader. I wanted to control it through AOG.

I wrote a piece of python to convert the machineData and autoSteerData PGNs into the Bogballe serial protocol, allowing me to control the sections and input machine speed to the box.
Here is my code

I hope someone finds this useful. It would be interesting if anyone has a ZURF box that they can try it on, to test backward compatibility. It is currently developed on my TOTZ unit.
I will be updating the code quite frequently as I get ready for the spring campaign.

Video of the system
Note the turn-on delays between AgOpenGPS and the TOTZ. This is calculated by the TOTZ based on forward speed and number of active sections, and does not represent any significant delay in the bridge software.

7 Likes

Hello CQuick, Congratulations on the project., I have always wondered how fertilizer spreaders do section control, do they do this by delaying the fertilizer falling on the tray? I mean, by changing the shooting angle?

Yeah it’s done by changing the drop point. By dropping the product later in the disc’s rotation, it’s thrown more towards the back of the machine than the sides, reducing the overall spread width. I’m not sure if it’s possible to reliably exclude a middle section of the spread pattern though. It’s such a fuzzy product to apply!

As my machine only spreads 24m wide it doesn’t have the variable pattern function, instead it just adjusts the rate on each side based on the number of sections active.

1 Like

So, can you apply it this way?

Sounds like a great project! I have a bogballe with the zurf box, i don’t have section controll on it but I was planning to use the remote switch pin in the jack plug to switch it on and off on the headlands using aog. This sounds like a much better option. Do you have the serial port connected to the machine section control arduino?

Sorry for not replying sooner!
The serial port on the box is connected via a USB → RS232 dongle on the tablet PC. There is no need for the section control arduino. Just something like this

Ok thanks I think I understand this better now. So does the python software run in the background of the tablet then collecting the speed and section data from the ag open program? How would I need to set it up to work without section control (one section really)?

Yes that’s right, it just runs on the PC in the background and sends what it can hear to the spreader box, in a language it can understand.

The protocol is written so that there are always 8 sections. A workaround would be to edit my software to write the first section bit from AOG to all 8 sections in the bogballe command. But it would be a bodge.
Is there a reason you specifically need it all as 1 section or would 8 still work for you? You can control them all as one using the manual on/off button in AOG

Unless there was a MachineConfiguration PGN added to AOG. Then it would be easy to write software like this that can handle any number of sections, machine width, etc.

But that’s one for @BrianTee_Admin and the other devs. Perhaps coming in v6? :wink:

If it works with 8 sections that is fine. I was just thinking because I haven’t got section control on the spreader. It is section control ready but that is all.

If it’s section control ready then this should work with the full 8 sections from AOG
At least, I hope so.
Please let me know any feedback from your testing

Thanks for your help! I will let you know how I get on when I get a chance to test it.

1 Like

Ok so I had a go at this today with no success. How do I get to the point where I select the com port? When I open the file main there is a black window opens for a split second and disappears. When I open the code with the python program and select run at the top of the screen it brings up an error saying line 2 module “serial” not found. I am probably doing something daft :sweat_smile:

ah, forgot to mention that bit!
You’ll need to have the pyserial module installed too.
Open the python console, then type pip install pyserial

Then open my script and it should work

Whenever I type this in it is bringing up Syntax error: invalid syntax?

Try directly in the command prompt
python -m pip install pyserial

Been a long day!

Looking good now! It is now asking me to select the com port so I will try this again tomorrow when I am back in the tractor. Am I selecting the com port for the output to the spreader or the auto steer usb? Thanks for all your help!

You need to select the COM port of the RS232 converter to the spreader box

Is there something else I need to do? What is the rs232 converter? I have just got the wire off ebay to connect from the zurf to USB. When I select this com port and press enter the python screen remains open and nothing seems to happen. I haven’t been able to get any speed day etc on the zurf yet. I have selected the serial speed input on zurf I don’t think there is anything else to do at this end?

Is the networking switched on in AgIO?
Maybe try setting the ip address in that screen to 127.0.0.1 too and see if that works