CanBus for Beginners - Super Simple

You are correct that is 32bits long.

So convert it to Binary, take 29bits from Right to left. Convert that from Binary to Hex and see what you get? (CAN-ID)

Take the 4bits on the Left, Convert that from Binary to Hex and see what you get? (Priority)

I think thats the simple way?

1 Like

Had an extended drive around one of my frozen maize fileds tonight. Nice and bumpy and no IMU to smooth them out. The 724 ( via can bus with code using AOG’s PWM output to alter steer) was extremely well behaved. Really smooth steer and most surprising, headland turns were REALLY good.
Got two more BNO085’s ordered but the suspense is killing me so I think my 716 might loose it’s BNO085 tomorrow!!

Still got things to iron out in the code but it’s way more than promising!! :sunglasses:

3 Likes

I am sure i wont matter, as the library will send 29 bits anyway.

only 3 priority bits according to standard.

data[0] = 5; data[1] = 9; data[2] = steerState; data[3] = 10; if (steerState == 3){ data[4] = setCurve; data[5] = 152; }
I am very interested in how this data structured. Are you able to provide more information?

Nice, ive got two more BNO085’s on order too. You will know more than I do but i was using the set steer angle from AGO and map that to suit can message, not the PWM? Ive got visions of the steer board only containing a Nano, a CAN Shield, and a BNO085.

That is what I did first but it was very savage on rougher ground. So what I’ve done now is run a steer variable to mimic the steer angle then drive this steer variable up and down with the PWM value. Then I map this variable to CAN. I’m taking the WAS figure from can and, when the CAN isn’t steering the tractor I map the WAS value to the steer variable so even when not autosteering it always tracks the steering. This prevents big jumps when steer is engaged.

Hope that makes sense!

As for the PCB, yes, nano, can unit and BNO is all we need really.

Is it possible to run two can adaptors from one nano?

I’m thinking headland management…

[edit…]

I very much doubt I know more than you do! I know what I want my code to do but a catalogue of schoolboy errors frustratingly slows me down!! I’m getting better, i think! :grimacing:

2 Likes

Is there a brand you work with? You have quoted the Fendt message witch is different to the standard ISO Danfoss system. With everything I make my own rule book from experience as i go until there is a proven more simple method.

The Danfoss books in the CAN-BUS section here are sort of OK if you have a rough idea of whats going on.

I’ll work out how to explain / show my rule book tho.

I know exactly what you mean, and i thought straight away “hes onto something there” haha.

You can run two CAN adapters, you just run separate CS and INT pins. Can0 & Can1.

It is also possible just to run a second nano with output pins controlling inputs on the first (More for remote engage etc from the arm rest)

Why you need two CAN adaptors? Are not on the same network?

Exactly, direction is Vbus, button and command are Kbus. 2 separate CAN bus.

1 Like

There are 4 CAN systems on my 724. V-BUS, K-BUS, G-BUS and ISO-BUS. As @Tooki57 the joystick and associated controls are on the K-BUS.

[Edit… This image is actually more appropriate]

BUS1

1 Like

:flushed: I didn’t know, I learned a new thing :+1:

1 Like

I’ve learned more from, and as a result of AOG than from decades of being interested in Ag technology. :+1: :sunglasses:

If your reading this subject and interested I hope your CAN shields / test parts are ordered because all this talk is only just the start of more too come…

12 Likes

This is a very poor video of the 724 steering a headland turn via can-bus on very rough ground, with no IMU. (hence the heading instability)

Seems to stick to the curve a lot better than my other (wheel motor) system, even on just bouncy fix to fix!

… and if you noticed the odd bend in the worked area, this is why!! :joy:

7 Likes

Sus scrofa?

Had you seen what @pauluzs wrote in a previous thread: list of interesting PGNshttps://assets.danfoss.com/documents/53748/BC152886483811en-000201.pdf

(I do not find how to refer to a thread in Discourse…)
Danfoss publish very valuable doc!
More on PVED / CANBUS
https://assets.danfoss.com/documents/149583/BC187186484889en-000106.pdf

image

Yea he had this link https://www.isobus.net/isobus/pGNAndSPN it is OK for few hints of what to look for in general ISO-BUS stuff.

With the steering side of things there is the two Danfoss books:

These do have what is going on in the standard Danfoss PVED-CL (the steering controller version)

The PVED-CC is just a spool valve operator version, like the remote valves on the back of some tractors.

1 Like

why not use a complementary filter or maybe kalman to smooth the set point?

from Wilfried Voos J1939 book:
image

More specific to CAN vs J1939:

image
Arbitration field is 32 bits as Identifier is 11+18= 29 bits (In CAN 2.0B)