CanBus for Beginners - Super Simple

Looking into this more closely , sorting my steer engagement, I notice this ISO-Bus .ino only registers itself then reads?

Yep exactly thatā€™s all you need the ISO-BUS for is to pick up the steering engage signal. And youā€™ll only get it after you claim address on the bus.

Just have to use that message in the main code to engage. Or if itā€™s a separate Arduino use that message to operate an output pin connected to steer switch input on the main Arduino.

1 Like

Great! Does it pick up disengage? I assume so.

Iā€™ve got two on the main arduino at the moment but ISO-Bus might actually be better on the machine one as that is doing less stuff. Send via a pin, as you say.

No, only the signal to engage and if it doesnā€™t engage there will be another one like 3sec after.

Disengage has to come from the V-Bus

Oh hang on, there should be a ISO message to stop, but you would normally just move steering wheel?

Yes, but I was hoping it would tell AOG? Maybe that isnā€™t necessaryā€¦

I need to get this roof plate back in the tractor so I can test messages again!!

Itā€™s plugged into a 12v adapter and a tablet on the lounge floor at the moment! :grimacing:

ā€¦and Iā€™m waiting for another CAN bus adapter. For an ESP32 this time, just out of interest. To try their embedded CAN interface.

2 Likes

Ok, picking up on what your putting downā€¦ I put my test gear on a SCR had a play and found the solution haha.

To sum up my latest Fendt thinking:

  • K-BUS and ISO-BUS on the machine controller, Use the ISO engage message via a pin to the steer engage button pin.

  • The curve command both ways is all sorted on the main Arduino via V-Bus. You should keep AOG min steer speed set to Zero (Hopefully thatā€™s possible) as the tractor will automatically handle this and reengage automatically when you start moving again.

  • The next puzzle pieceā€¦ Like everything on the Fendt if you donā€™t ask you donā€™t get.
    First step At the same time your sending the curve message (or maybe every secound time), you must send a 2 byte message {0x5, 0x19} to the steering department via V-Bus and this will ask for the current steering state.
    Fendt_Navagation_Test_STOP.ino (2.8 KB)
    Second step There will be a 3 byte message from the steering department via V-Bus ID:0x0CEF2CF0 {0x5, 0x20, 0x01} all the time. All we want is the message {0x5, 0x20, 0x00} that pops up 3 times in a row when the steering man moves from active to stopped, so we just use this message to switch off AGO ready for the next engage.
    Fendt_F02C_8BIT_2CF0_6BIT_STOP.ino (3.6 KB)

Easy peesy, but give it a try and see what you come up with.

3 Likes

Good research yet again!! Hopefully tonight Iā€™ll be able to get it in the tractor and test for real.

Thinking about engagement, does it actually matter if AOG even knows steer is disengaged? Could it be just left on in AOG and let the tractor do itā€™s. stuff. Itā€™s only sending messages that will be ignoredā€¦

Iā€™ll try both ways. Lots of testing.

Remember the only way to reset the tractor is to send messages not intended to steer, so you have to disengage AGO to reset it, but youā€™ll get it sorted in testing :+1:.

I was wondering if it was possible to engage and disengage from the left steer button (0x88).

You can pick the left steer button up on both ISO or K-Bus.

But you canā€™t get the teach-in (software generated) version from K-Bus.

If thatā€™s what you were asking?

Tested messages again yesterday, tractor was parked in the back wasnt able to drive though.
What i saw leads me to believe these are signed 16 bit values .

Controller: [ 0x05, 0x09, 0xCC, 0x0A, 0xCH, 0xCL ]
ECU:        [ 0x05, 0x0A, 0xCH, 0xCL, 0xEH, 0xEL, 0x00, 0x00 ]

0xCHCL requested value
0xEHEL current value

Just a thought, but if its related to ISOBus TIM, this would be radius of 0.25 km-1/bit.

If controller sends data[2] = 0, ECU will stop responding and controller can be disconnected from bus without an error.
data[2]: 0 disabled, 2 enabled, 3 request steering

Anybody to confirm this?
A dump of current values with corresponding wheel angles would be very helpfull.

Iā€™ll hopefully be able to test this tonight.

Iā€™ll give both your findings a try. Using signed 16bit then it would add more resolution and make scene I think the Fendt uses the full range lock to lock so maybe -128/127 should be -32,768/32,767.

Using the whole range of that resolution would explain the big jumps in that 2nd byte of data that i have been confused about. The WAS and GPS navigation move alot between messages have to drop a few numbers off the end so i can keep up haha.

Iā€™ll measure the true wheel angle on a few machines and then we can compare to see if its related to radius or just calibrated stop position.

data[2] findings makes scene too

@g33k You are 100% correct on the signed 16 bit values, here is a recording from hard lock right slowly to hard lock left. V-Bus Data.txt (45.4 KB) Manually measured wheel angle at 40 deg on hard lock.

This also proves that Fendt data is big-endian rather than the normal little-endian.

I realize that since the CAN messages were never documented and are proprietary it doesnā€™t really matter that the values or big endian, but it still surprises me to see it. I wonder how common this is in the automotive industry. EDIT: a bit of reading suggests that youā€™ll find both across the industry. So Ag companies are not the only ones.

1 Like

How did you measure the angle?
According to your data the ratio is linear with 0,00125 deg/bit. This resolution is more than overkill

Angle gauge on tyre/rim to axle basically, just the average of both sides (as the inner tyre turns sharper than the outer). I just done the mathā€™s to get 0,00125 deg/bit and put that in the code as a reference. Havenā€™t tested but i would say if i calibrate 30deg as hard lock the deg/bit would be around 0,00100 deg/bit ish.

I know this is way overkill, thatā€™s why i didnā€™t even think about it. Was only when you said its still 16bit. Then it all made sense, a very different approach than the standard ISO or Danfoss system. But hey maybe thats why Fendt is the best haha.

1 Like

Ah, was wondering about the precision of the ratio.
Did you check with multiple/intermediate angles? Otherwise the ratio might be linear since you made it to be.

So if Iā€™ve got this right this means we can use 16 bit WAS and target curve data?

I wasnā€™t able to do any testing on my setup last night unfortunately but should be back on it tonight.