You turn

I just noticed that losing RTK/Kill Autosteer option stops the steering + my mower engine on AB line, but on recorded path it doesn’t. Would that be feasible @KentStuff ?!?

I think I’ll have to learn C# as it’s not fair of putting all this on you! :woozy_face:

1 Like

You can read the geostop or any other info from the machine module on the autosteer module. just read the pgn refer to what you need.

1 Like

Do you know what trigger you are reading to kill the steer? And is this machine board or autosteer.?

I apologise, I’m still learning the flow of everything.
If possible I wanted to try and do everything in the autosteer arduino.
From PGN 254 / 7 status byte I could see when guidance status gets set to zero (I’m not using external steering switch) or speed < xxx the motor is turned off by forcing WDT timeout, so I put my stop engine output in there as shown.

if ((bitRead(guidanceStatus,0) == 0) || (gpsSpeed < 0.01) || (steerSwitch == 1) )
{
watchdogTimer = WATCHDOG_FORCE_VALUE; //turn off steering motor

and stop my engine…

else
{
//we’ve lost the comm to AgOpenGPS, or just stop request
//Disable H Bridge for IBT2, hyd aux, etc for cytron
digitalWrite(AUTOSTOP_PIN, 0);

I plan to override my engine stop relay with a switch until its mowing, then release that switch, so that any loss in RTK etc will kill the steering and stop my engine. If I can grab PGN 239/byte 9 for the geostop in the steering module, would that be doable in your opinion?

1 Like

What above using the pwm2 to kill engine?
Pwm2 is high (5v ) when autosteer is on (I assume you are using cytron)

So as soon as autosteer is off engine shut down.

1 Like

Often wondered why the stop byte could not give a bit more information.
For example:
10000000, no gps
01000000, geofence breach
00100000, distance from line breach
00010000, min speed trigger
00001000, no rtk

probably can think of a few more. Then the Arduino could be adapted to do what it needed to. And any check of if it greater than 0 would cause a stop. Just a thought.

Back on the stop check and recorded path. If it is following a recorded path it is set to 1. Only a serious breach in the recorded path will break that. Might be something to look into.

Edit: Oh, and a stop byte should be a stop byte and not a go byte. Default setting should be 11111111 (stopped) only after all the checks clear, would you get 00000000. Any number greater than 0 would stop the system.

1 Like

Thanks everyone for the suggestions, very helpful.
I will play around with a bench set up to see what works best. It’s all good fun!!

Quick question, easy answer I hope!
AgDiag - how are you supposed to launch it?! I cannot see how in AOG and when I start it from file explorer, there is no data. :thinking:

Thanks in anticipation.

Just noticed that in an older version, it’s in the AgIo gear menu, but still do data…

AgDiag was deleted. It is no longer a function of AOG. There is quite a bit of information if you click the speed text (where it tells the speed). It will open a new form. Also in AGIO, if you click the expand arrow you can see some more information.

1 Like

Once again, thank you for your wisdom!
While you’re here, I do have the PGN spreadsheet, but do you know of a source of more detail of, for instance the allocation of bits within each byte of the messages, such as the status byte in PGN 254?

public class CPGN_FE
    {
        /// <summary>
        /// 8 bytes  autoSteerData - FE - 254 - 
        /// </summary>
        public byte[] pgn = new byte[] { 0x80, 0x81, 0x7f, 0xFE, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0xCC };
        public int speedLo = 5;  //speed is 16 bits,  This is the low part of that number.
        public int speedHi = 6;  //speed is 16 bits,  This is the high part of that number.
        public int status = 7;  //autosteer on = 1 off = 0
        public int steerAngleLo = 8;  //steer angle is 16 bits,  This is the low part of that number.
        public int steerAngleHi = 9;  //steer angle is 16 bits,  This is the High part of that number.
        public int lineDistance  = 10; //distance off line * 0.05 (128 = 0)
        public int sc1to8 = 11; //sections 87654321 1=on 2 =off
        public int sc9to16 = 12; //sections 16171514131211109 1=on 2-off

        public void Reset()
        {
        }
    }
1 Like

Brilliant, thank you! I will now start exploring the code to find more such info, then I won’t have to keep asking! :joy:

That is a rabbit hole that has no bottom. I started by just changing a few lines of code and see what happened. I crashed the code hundreds of times and sometimes, just had to delete the whole thing and start over. It is very interesting. It is ok to ask and “bother” us on the forum. If we can answer, we do. But there is more that I can’t answer than I can.

1 Like

I have a couple of Teensy 4.0’s lying around, so I’ve decided to make a policeman monitor to observe the GGA message coming in from gps, and the transmits from AgIO and the steering nano, so that I can pick up Fix status, geofence status and whatever else and use this to control the engine. Then I shouldn’t need to modify anything AOG related and it’s independent for safety.
When I end up fitting collision detection sensors etc, the Teensy can look after those too. The 7 hardware uarts give plenty of options for monitoring the streams etc.

1 Like

I use this a lot to convert between the byte forms when it isn’t a standard. Something to remember, these list start at 0, so 5 is 6, 6 is 7, etc. It catches me often.

2 Likes

Cheers for that :slightly_smiling_face:

Hi, I’ve been away, but just completed a flawless mow of 3 different recorded paths!
Just wanted to update on it. More than happy with the performance. :slightly_smiling_face:
@KentStuff thanks again. If you ever get the chance to do the resume recorded path, that would be the icing on the cake :grinning:

AOG-Micro2-20220817.zip

Here is one to try the resume. You need to be fairly close to the resume point for it to work right. Also, need to be past the wind up and actually started the path before resume will work also. Otherwise, it will find the closest point. It has a 4 meter window for build the wind up. If farther away than 4 meters, it will build a wind up. And, you never know where it will take you to get to the start point.

1 Like