refresh (or manipulate) canbus signals with arduino and mcp2515
I wanted to control and test an eberspaecher D5WS ECU with my scanmatic china clone but... yes... but - it did not run (mostly).
So I started investigation(oszilloscope, logic analyzer, can-utils) and found that the Scanmatic SM2pro china-clone does only 1.2V on dominant can state... to less for my ECU - it does respont... sometimes and the response was... to less for my Scanmatic. to avoid this "unable to connect" I simply put two MCP2515 boards to an arduino nano and did a signal-refresh.
- 2x mcp2515 board (8MHz)
- 1x arduino nano or similar
- some wires
- arduino mcp2515 library https://github.com/codeljo/AA_MCP2515 (patch in the baud rate 83333bps)
-
MCP2515 A INT --> arduino Int0 (nano = 2)
-
MCP2515 A SCK --> arduino SCK (nano = 13)
-
MCP2515 A SI --> arduino MoSi (nano = 11)
-
MCP2515 A SO --> arduino MiSo (nano = 12)
-
MCP2515 A CS --> arduino pin 10
-
MCP2515 A GND --> arduino GND
-
MCP2515 A VCC --> arduino VCC ***
-
MCP2515 B INT --> arduino Int1 (nano = 3)
-
MCP2515 B SCK --> arduino SCK (nano = 13)
-
MCP2515 B SI --> arduino MoSi (nano = 11)
-
MCP2515 B SO --> arduino MiSo (nano = 12)
-
MCP2515 B CS --> arduino pin 9
-
MCP2515 B GND --> arduino GND
-
MCP2515 B VCC --> arduino VCC ***
special! if you are using 3.3V arduino and standart MCP2515-board with TJA1050 you will have to split the power into 3.3V for MCP2515 and 5V for TJA1050
-
open [your sketchbook folder]/libraries/AA_MCP2515/src/CANBitrate.h and change
...
constexpr Config Config_8MHz_50kbps { 0x03, 0xb6, 0x04 };
constexpr Config Config_8MHz_125kbps { 0x01, 0xac, 0x03 };
...
-
to
...
constexpr Config Config_8MHz_50kbps { 0x03, 0xb6, 0x04 };
constexpr Config Config_8MHz_83k3bps { 0x01, 0xBE, 0x07 };
constexpr Config Config_8MHz_125kbps { 0x01, 0xac, 0x03 };
...
-
save ... done.
- overwrite single values to change the data
- switch baudrate by hardware-switch or by autobaud