Go Down

Topic: Can not receive CAN DATA from Arduino UNO with MCP2515 Module. (Read 42410 times) previous topic - next topic

jevoswang

I use 2 sets of uno + mcp2515 + tja1050, and the transmission is normal. So, the hardware is good. However, one set did not respond to obd2.

jevoswang


I tested successfully. I know the problem is there. 1. The oscillation frequency of MCP2515 should be set correctly. Mine is 8Mz, 2 TJA1050's resistance is 120 ohms, and JUMP should be plugged in.

sa_rafatnia

Hi
I decided to use the steering angle sensor in vehicles to collect the steering angle with a high sensitivity ratio. For this purpose, I use a steering angle sensor with 6002 sockets from Bourns. The sensor has not calibrated and I haven't seen any change in sensor outputs, despite all the calibration packages I sent. In this respect I'm trying to receive CAN DATA from Arduino UNO with MCP2515 Module. I can only receive data using a CAN-L and CAN-H pin. I tried my connection form in different combinations and the result was the same but i receive this messages from can bus,
Standard ID: 0x1E5 DLC: 8 Data: 0x00 0x00 0x00 0x20 0x00 0x00 0x00 0x5C
Standard ID: 0x1E5 DLC: 8 Data: 0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x7C
Standard ID: 0x1E5 DLC: 8 Data: 0x00 0x00 0x00 0x60 0x00 0x00 0x00 0x9C
Standard ID: 0x1E5 DLC: 8 Data: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3C
Standard ID: 0x1E5 DLC: 8 Data: 0x00 0x00 0x00 0x20 0x00 0x00 0x00 0x5C
Standard ID: 0x1E5 DLC: 8 Data: 0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x7C
Standard ID: 0x1E5 DLC: 8 Data: 0x00 0x00 0x00 0x60 0x00 0x00 0x00 0x9C
Standard ID: 0x1E5 DLC: 8 Data: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3C
Standard ID: 0x1E5 DLC: 8 Data: 0x00 0x00 0x00 0x20 0x00 0x00 0x00 0x5C
Standard ID: 0x1E5 DLC: 8 Data: 0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x7C
Standard ID: 0x1E5 DLC: 8 Data: 0x00 0x00 0x00 0x60 0x00 0x00 0x00 0x9C
which are constant and i haven't seen any change in sensor outputs. I understand that, firstly i have to send a reset message and after that the "calibration" set message. The reset message is done by sending a single byte with the value 3 as integer to the sensor! but i dont know how do that? Could you give me some advice about how to fix it? Thank you in advance for all your help. I am using coryjfowler library " https://github.com/coryjfowler/MCP_CAN_lib ".

hugo_a_garcia

I remember that loopback worked even if wrong MHz was selected. Did you make any progress?
After a long time, I finally got it the board from Joy-It CAN Module working using Cory's examples.

Notes:

1) The oscillator is 16Mhz and not 8Mhz as stated on the product page.

2) VCC and VCC1 MUST be connected:
       VCC is connected to 3.3V or 5V
       VCC1 is connected to 5V

The transceiver is a MCP2562 and not a TJA1050 THUS VCC1 can be directly connected to the 3.3V on the Arduino. This is well explained in French by Jean-Luc at:

http://www.locoduino.org/spip.php?article268

---
Thank you all of you for your comments and follow-up.
---

saidi1933

hello,

please, i have a question about the difference between CAN and DeviceNet protocols.
does the work in the same way ie the same data frame on the softwer side, and the same level of expansion on the hardwer side.

turbozob

I would say DeviceNet is CAN but with different or modified communication frame. It is used for Allen-Bradley hardware.

From SSW-07 DeviceNet Communication Manual:

Only the definition of how to detect errors, create and transmit a frame, are not enough to define a meaning for the data transmitted via the network. It is necessary to have a specification that indicates how the identifier and the data must be assembled and how the information must be exchanged. Thus, the network elements can interpret the transmitted data correctly. In that sense, the DeviceNet specification defines exactly how to exchange data among the devices and how every one must interpret these data. There are several other protocols based on CAN, as CANopen, J1939, etc., which do also use CAN frames for the communication. However, those protocols cannot be used together in the same network.
The man who asks a question is a fool for a minute, the man who does not ask is a fool for life. -Confucius

semtools

Hey ,
I want to work on the same project, I'm new to this field so I'm going to ask some stupid questions hh
 I will use a MCP2515 + Arduino Uno + LCD, please, I want to know how I should connect the MCP2515 with the OBD port ?
thank you for your answers

ashiq9946237

I am trying to connect an ELM OBD scanning device to Arduino using an mcp2515 module but am not able to receive data sent by the device.  Have tested the connection with two Arduinos and MCP modules  with one acting as transmitter and other as receiver which works fine. But when I replace the transmitter with the ELM OBD device no data is received. Need help with this connection.

Go Up