Troubleshooting and Tips - MyLab-odyssey/ED4scan GitHub Wiki
Some tips and tricks to get you up and running...
CAN controller initialized?
Check whether the CAN controller (MCP 2515) is really initialized by the software. Load the CAN_receive.ino
file (from Arduino > libraries > MCP_CAN_lib_15 > examples) and run it.
When you get the Message "MCP2515 Initialized Successfully!" the controller was found.
If the init fails ("Error Initializing MCP2515...") check if the used Chip Select (CS) of the board is corresponding with the code
#define CS 10
or pin 9 on some boards.
If the init still fails, please check if your CAN shield uses the ICSP header for the SPI bus and if this is fitted on the board:
Wiring correct?
When the CAN controller is working and you do not get CAN messages with the CAN_receive.ino
, you have to check the wiring of the ODB2 to CAN shield connections.
Find test points on the shield so you can measure the connection with a continuity test of a multifunction meter. It is a good idea to fit extra headers on the test points and check the pinout against the schematic:
Sparkfun CAN shield:
1 Check jumper pads for ODBII setting
2 Use spare connections for testing (maybe fit a header)
CANdiy shield:
See pinout and schematic. You only need to fit one RJ45 connector - so use headers for CAN2 to be flexible.
OBD2 connector:
In most diagnostics gateway units pin 4 and 5 (chassis GND and signal GND) are already connected. Also some shields (like Seeedstudio CAN shield) have the connection set up. So in most cases make connections to OBD2 pins 4, 6, 14 and if you need external power pin 16.
If you want to buy a cable, you have to get the proper one for the intended CAN shield. Most shields use the OBDII to DB9 wiring scheme. Please check yourself:
Check CAN levels if necessary
The CAN bus has dedicated voltage levels for a logical high (idle) and a logical low.
With an active bus you see 3.5V (or slightly lower when the voltage meter is slow) on the CAN-H line and about 1.5V (or sightly more) on the CAN-L line.