Engage AIO boards via CANBUS

Morning all

I’ve added some code so that you can use your tractor’s existing autosteer button to engage your all-in-one board, over CANBUS.

So, if you’re using a Baraki valve, or powering a 12v motor, you can use this to save you having to wire a little button in.

(Side note - you don’t have to pick anything like none, switch, or button in AOG; and those settings are still honoured if you want to use that button you wired in sometimes; this CANBUS engage is “in addition”)

That code is in the link below, in the CANBUSEnable branch. But, as full integration and support for different manufacturers isn’t in AOG yet (am doing some stuff with that tho), it needs edited to suit your configuration, so that means compiling it yourself with the Arduino IDE, VS Micro etc.

It’s the 4.1 firmware (which should also work on v2.x AIO boards), and it’s standard apart from the addition of the CANBUS stuff, so hopefully nothing will break. He said, optimistically…

The parts you’ll need to change specific to your machine are in CANBUS.cpp, specifically:

// AIO 2.x version board, pins 16 and 17, use CAN3
// AIO 2.x version board, pins 18 and 19, use CAN2
// AIO 4.x version board, pins 16 and 17, use CAN3
// 
// Change  vvvv
FlexCAN_T4<CAN3, RX_SIZE_256, TX_SIZE_256> TeensyCAN;
// Change  ^^^^

You’ll be changing that line beginning with FlexCAN - usually, you are using CAN3 if using pins 16 and 17 for the CANBUS connection, but on the offchance you’re on a V2.x board and using the bus labelled CAN2 on the board, then change it to CAN2.

Next, you need to pick the CANBUS code for your machine, and that’s in this section:

// UNCOMMENT ONLY ONE CANINFO LINE BELOW !!!

// CaseNH
//int CANInfo[3] = { 0x18FFB306 , 2, 0x10 }; // Case Puma CVX 160 2015, button behind joystick
//int CANInfo[3] = { 0x18FFB031 , 2, 0x10}; // Case Puma CVX 160 2015, steer button on armrest
//int CANInfo[3] = { 0x98FFB306 , 2, 0x10}; // Case Puma CVX 200 2015, button behind joystick
//int CANInfo[3] = { 0x98FFB031 , 2, 0x10}; // Case Puma CVX 200 2015, steer button on armrest
//int CANInfo[3] = { 0x14FF7706 , 0, 0x82}; // Case Puma CVX 165 2022, steer button on armrest (note, this is full byte, not bit)
//int CANInfo[3] = { 0x14FF7706 , 0, 0xB2}; // Case Puma CVX 165 2022, steer button on armrest (note, this is full byte, not bit)
//int CANInfo[3] = { 0x14FF7706 , 2, 0xC1}; // Case Puma CVX 165 2022, steer button on armrest (note, this is full byte, not bit)
//int CANInfo[3] = { 0x14FF7706 , 2, 0xC4}; // Case Puma CVX 165 2022, steer button on armrest (note, this is full byte, not bit)

// Massey Ferguson
int CANInfo[3] = { 0x45a , 1, 0x04 }; // MF headland management button
//int CANInfo[3] = { 0xCFF2621 , 3, 0x04}; // MF S-series steering engage
....

As per the comment at the top, you should only have one of these lines uncommented. It won’t do any harm if you get the wrong one, it just won’t work is all.

Below that section, there are codes for other manufacturers, but the info on that came from CommonRail’s CANBUS code and I’m hoping with the single-byte check that I’ve pulled the right one. If they don’t work, please set debugCANBUS to true and either post it here or log an issue on github enclosing the output.

Any questions or bugs (or even if it just works!), please let me know - cheers!

if you want to know how to work out a CANBUS ID for an existing button, watch this:

4 Likes

This one works also on Case Puma CVX 160 2014

@andyinv, thanks for that!!

1 Like

Any chance this would work in combination with fivefinishfarmers method for older CNH tractors? Maybe allow you activate the 6/2 valve without having to tap into the wire on the other harness?

Yes, if the button is on CANBUS.

{ 0x18FFB031 , 2, 0x10} is also the one for the newer Puma 165 CVX 2017, great to get those original buttons work!
@andyinv thanks again :wink:

2 Likes