Read CAN Bus data from a single device , not present in the CAN Network of a tractor

Hi all,

i'm struggling with the following: I need to get the correct CAN bus addresses that a tractor sends when a lever is pushed forward. The lever itself is this :

The oranje flipper is working with CAN bus , the brown connector has the 12v+ , GND, CAN H (yellow) and CAN L (green) wires.

I have an arduino UNO with a MCP2515 shield connected, all works fine, i can read the CAN data from the bus in the tractor, but it has an huge amount of data flowing trough so it's difficult to know on what address and what data is being sent when the flipper is activated.

Therefor i got a flipper as a part, i connected my board to the CANH and CANL, gave it 12vDC . The tractor works at 500kbps , ive tried 8 MHz and 16 Mhz, but initialize as ' OK'
Tried the end resistor 120 Ohm on and off

But i cannot read any data , am i missing something here?

Your Uno is too slow to be used as a proper CAN bus analyzer.
So, find a proper device that can capture all messages (A CANable adaptor with the SavvyCAN software might do the job) then,

  1. Capture packets for 10 seconds without the switch present.
  2. Repeat the capture with the switch connected.
  3. Repeat again with the switch being actively turned on/off.

Look for new IDs that only appear in step 2 and 3.
Filter on those ID and look for data patterns that change when you operate the switch.

If none of that works and your goal is to operate the switch using an Arduino, then gently pull the switch apart and see if you can simply switch the contacts using an Arduino controlled relay.

Your topic has been moved. Please do not post in "Uncategorized"; see the sticky topics in https://forum.arduino.cc/c/using-arduino/uncategorized/184.

Ok, sorry.

I can hardly believe that this is true. The UNO handles the CAN network in the tractor extremely well, at a rate of 300-400 messages/ second.

And no, i can't alter the switch, it needs to be done within the CAN network.

Not an expert - perhaps the lever needs an init / cue from the tractor ?

Is your goal to add a feature that is only available on a more expensive version of your tractor and do it in a clandestine way to avoid breaking your warranty/lease/service agreement?

If so, are you confident that the feature has already been enabled within the control unit?

Well , not meant to be rude, but all these steps were taken in consideration, and it's actually the dealer itself that wants this upgrade for a very specifick task.

So please , re-read my initial post because i don't think you have.

Sounds like a tough situation! Have you double-checked your connections and baud rate settings? It might also be helpful to consult technical documentation for the tractor or try using a CAN bus analyzer tool. Keep experimenting and troubleshooting—you'll get there!

An official dealer will have access to the manufacturers documenation, programming tools and a CAN bus anaylzer.

Is your goal to avoid paying for their services?

Well, maybe i have to explain it a bit clearer, so you get the picture.

No , i'm not avoiding to pay the dealer, the dealer pays me to come up with a solution. Since the manifacturer doesn't provide any information about how their CAN bus system works (no one does).

We need to add functionalities to the tractor (for example, add a button in a diffferent location) , something the factory does not provide as a standard option, but the client wants it. When it comes to warranties, that is handled with the dealer and it's customer.

Trust me, i have CAN bus analysers here, but they tend to work worse then the MCP2515 , that i can program to my needs. I even wrote a can bus sniffer program in windows that handles the extended ID's allot better then a 'official' sniffer. I'm not a rookie as you might suggest.

Anyway, focus on the problem, not on the questions around it.

That's the whole problem , there is no technical information shared from the factory, so the dealers have no clue. But you're right, never give up haha.

since you seem to have a decent amount of equipment and resonable knowledge, why not make a 'sniffer bridge' between the unit and the tractor CAN since all works there...

with a UNO you can just about make one of those assuming the busload is not very high. I know coz I done a similar project before! :wink:

that way you can know hopefully identify the CAN messages the unit is tx'ing and the corresponding values that it outputs when operated.

hope that helps....

Well actually that's how i started, and i've thought i found the addresses i needed within the network, but i can't reproduce them into the network. Therefor i wanted to test the switch outside the network so i'm 100% sure we got the right ones.

Try swapping CAN_H and CAN_L. The MCP2515 modules I have seen have three different value of crystals. Without your code and schematic I am very limited on answering your question.

That's the first i've ever heard :grin: But, no luck . Thanx.

That number should match the number on the crystal, the silver thing. It should be stamped in the top for example 16.00 for 16 MHz. Also do you have any of the filters turned on? Once you know what range the messages are you can set the filters so the hardware will filter out the ones not wanted. This takes a tremendous load off of the processor.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.