Reading data from tractor CAN-bus -- Problems when connected to tractor

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear all,

 

I have developed two identical PCB's which need to communicate with each other via CAN-protocol.

I was able to let them communicate with each other on a bitrate of 500kbits/s.

 

After this project I wanted to continue my adventure with CAN. So at home I have a tractor (Fendt 415) which is equipped with  a CAN-bus.

the following picture shows the joystick, which is placed in the cabin, with buttons on it. these buttons are read into a controller and are sended on to the CAN-bus. 

I want to intercept those messages, so I'm able to power other electric things (electric seeder machine) when pushing the buttons onto the joystick.

 

Image result for fendt joystick

 

I didn't only developed a two PCB's with AVR microcontrollers, but also a carrierboard for a AM335x System On Module. 

So first of all I connected my AM335x to the tractor, setted the correct bitrate = 100 kbits/s.

 

commands:

ip link set can0 up type can bitrate 100000
ifconfig can0 up
candump can0

So after searching for a while, I found the CAN ID and data for the buttons.

 

ID= 61F

Data button 1 ==> 15 33 1E  CA 80 00 00 00

Data button 2 ==> 15 34 1E  CA 80 00 00 00

Data button 3 ==> 15 35 1E  CA 80 00 00 00

Data button 4 ==> 15 36 1E  CA 80 00 00 00

 

So this was allready a major step in my project.

Now I don't want to use the AM335x into the tractor, this due to financial reasons.

I would like to use the microcontroller PCB's which I have developed before. 

This board exists out of an ATMega644P, MCP2515 and MCP2561.

 

The following step in my project was to bench test the can-bus. So I connected my two PCB's to each other and setted the bittiming to 100kbits/s (for this I used the following calculator https://www.kvaser.com/support/c...), created one sending node and one receiving node.

CNF1 = 0x03

CNF2 = 0xb6

CNF3 = 0x04

 

When the Sending node sends the following data:

15 33 1E  CA 80 00 00 00

And the receiving node receives it, the receiving node will set output PB1 high.

 

When the sending node sends the following data:

15 34 1E  CA 80 00 00 00

And the receiving node receives it, the receiving node will set output PB1 low.

 

All of this worked, until I connected the receiving node to the tractor. The receiving node doesn't detect any message (debugged it with atmel ice).

Due to this I thought that the problem was the bittiming.  So because of this I tested all the CNF settings which are in the link I posted above.

No setting of the bittiming made me able to read data into the microcontroller.

 

Does anybody know what the problem can be? Is it the bittiming? if so how can I solve this?

(The code is very long, this is why I don't post it. Also I'm sure the code isn't the problem, because it works correctly when bench testing)

 

Kind regards,

Toon Mertens

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So what basic hardware tests have you done to ensure that the signals from the tractor are actually reaching your MCU pins intact?

 

An oscilloscope would be the obvious choice ...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I don't have an oscilloscope any more. I'm asking a friend to use his logic analyzer.
But I think the signals reach my MCU intact, because I can read the signals with my Ti AM335x. (Used the same cable).

Kind regards.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TMJJJ wrote:
But I think the signals reach my MCU intact, because I can read the signals with my Ti AM335x. (Used the same cable).

Think about it: that just shows that the cable is OK - doesn't it?

 

It tells you nothing about what happens between the end of the cable and your MCU pins - does it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes thats wright.
I thought because it worked onto the bench I could say that the connection between the cable and mcu is good. And due to the Ti AM335x I could say the cable is good. But, I will wait for the logic analyzer before I continue. Then I'm 100% sure

Thanks.