CanBus for Beginners - Super Simple

Is it possible to use a 16mhz and a 8mhz mcp2515 board together when i change it in the code?
(I’m Trying the Massey Project)
Cause my 16mhz is sending just fine but my 8mhz is stuck at:

Entering Configuration Mode Successful!
Setting Baudrate Successful!
MCP2515 Init Okay!!
MCP2515 Library Mask & Filter Example…

But when i switch the Code my 8mhz is having Errors Sending and my 16mhz is stuck at:

Entering Configuration Mode Fail Entering Configuration Mode Failure…
MCP2515 Init Failed!!
MCP2515 Library Mask & Filter Example…

Yes.

Have you swapped the mcp2515 boards (and obviously altered MHz setting) to see if the fault stays with the Arduino and code, or the board?

Put the 2 in 8mhz within the code, I think that the 2 should be at the same frequency, otherwise the one with 16 would send twice the data in the same time, which makes the other lag or tick.

No. The clock frequency in the setup code must reflect the clock frequency on the can bus adapter.

…from my previous setup. Arduino code with an 8MHz and a 16MHz mcp2515 fitted. Both on 250KBPS busses.

// CAN stuff-----------------------------
       if (KBUS.begin(MCP_ANY, CAN_250KBPS, MCP_8MHZ) == CAN_OK) {
    Serial.println("KBUS Initialized");
  }
  else {
    Serial.println("KBUS Initialization Error");
    while (true);                                            // freeze on fail.
  }

if (ISOBUS.begin(MCP_STDEXT, CAN_250KBPS, MCP_16MHZ) == CAN_OK) {
    Serial.println("ISOBUS Initialized");
  }
  else {
    Serial.println("ISOBUS Initialization Error");
    while (true);                                            // freeze on fail.
  }
1 Like

Are you using one Arduino and two shields?

Or Two Arduino & Two Shields?

Can you show us the program / programs you are loading?

I am using one Arduino Uno with a Canbus Shield (16mhz) and a second Arduino Uno with a Mcp2515 Board with 8mhz.
On my 16mhz Shield is the Massey Code from Project 3 running and on the 8mhz board is the show all can Messages Programm running.

But I think my 8mhz board isnt working correctly, because when I read the bus on our 6155r the 16mhz shield shows me all Messages just fine, but my 8mhz shows me nothing.

I’m going to wait for my second 16mhz shield.

She ain’t the prettiest girl in town but works! Tore apart a old KaupoiModV2 PCB and put in MCP2515 and BNO085 modules. First testing with this setup with analog WAS with the Danfoss PVEA-CI valve and trying to do minimal edits to the V5.1 ino…

image image image

4 Likes

Here’s a layout what it will look like. Got the CAN WAS today, so will probably just leave out the AD converter and run the wiring something like this, the valve already has dual connectors so easy to daisy chain. Trying to find a reasonable priced J1939 pressure transducer or an automotive CAN steering angle sensor for the disengage, then could get rid of all the separate wiring.

image

1 Like

MCP2515 plus transceiver 2551…
STW J1939 pressure transducer

As for CAN I’m using the cheapo breakout board that has the TJA1050 transceiver on board.

Looks like most of the pressure sensors are above the 200 eur price point, which is quite much for something to just turn off the autosteer… Was looking as the Gefran KHC, it’s the same brand as the WAS and that was somehow reasonably priced. Hopefully the hydraulic sensor is as well…

Works all nice and dandy already on the virtual tractor test setup, so comms side should be good. Funny to see how close the PID settings are and how much tuning is still needed.

Hi. I am trying to connect AGO to my Fendt 516 S4. I have tried the first metode with arduino, canbus shield and potmeter with success. But when I try to run with AGO I get error-code in the varioterminal, gyro is not calibrated. Varioguide is not unlocked so is there any way to calibrate gyro or change something in the code?

Unplug the gyro in the roof. (Check if there is anything else on the plate in the roof too)

Did you try the Arduino test in the tractor or on the bench?

What code are you trying to use?

The code disappeared when sensor got unplugged and there is nothing else in the roof. I did the first test with pot in the tractor. The code I’m trying now is from the dropbox link you shared March 2. Gyrocode delete did not help. Autosteerbutton in tractor just flashing.

Ok, forget I shared that folder. So the wheels turned in the manual test (Arduino with pot) ?

Now with AOG you have it connected to V-Bus and your WAS is reading from the CAN?

What have you done with the connection to ISOBUS ?

When the autosteer button flashes, it means it’s waiting for steering to engage. If your not connected to ISOBUS you can just use a button connected to the Arduino running the AOG program on V-Bus

Yes the wheels turned in the first test with arduino and pot. I have only connection to the v-bus, and a switch connected into pin 6 on the Arduino. I am not sure where I can see if WAS is reading. I just have one Arduino Uno and one can-shield. I am new to AOG, Arduino and can-bus so bear with me:)

Ok, are you using v4.3 (the older AOG)?

Open Settings and in the Auto Steer Port “From Auto Steer” should have numbers it

Thanks for good answers I will look into this tomorrow?