Hello everyone,
I am working with a radar for some detection, and it happens to only have CAN transmission.
I wanna test that by sending the radar data to the arduino then print this data in my serial monitor. It summed up this way :
Radar (CANH/CANL pins) => Arduino => PC (through serial)
If I want get the CAN data, do I really need additional HW before the arduino ? Any way to do it directly ?
There are some inexpensive MCP2515 modules that will work very well with Cory Fowler's CAN library. From your question I am assuming you do not have much experience using CAN. You will need two setups so two Arduinos and two MCP2515 units. Then put the termination jumpers on each of the modules. Use a twisted pair of wires at least 1M long to connect them. You need to download Corry Fowlers CAN Library GitHub - coryjfowler/MCP_CAN_lib: MCP_CAN Library and install the receive code on one of the Arduinos and the transmit on the other. Pick a baud, the lower the better for starting out. Check the crystal frequency of each of the CAN modules and enter the appropriate value for each Arduino. I expect they will be the same.
Once you get that working then set up the baud for your radar unit and be sure they still work. If so then connect the radar unit and see what you can get. The receive module is needed to ACK (ACKnowledge the transmitter) otherwise it will send then error out.
I have many versions of this operating with Nano, Uno, and WeMos R1 units, and they all talk to each other.
Hi gilshultz,
Thanks for the detailed answer. Tbh, the purpose of this question is to know if it is possible to test CAN on arduino without needing a CAN controller (basically the MCP2515 or any other).
My work with the radar is to be done on another card with a ready to use CAN interface (in the automotive field), however once implementing the CAN transmission on my radar, I just wanted to test it simple and quickly (instead of booting linux on my card and setting the interface and all).
Since I don't have a way to use arduino without additional HW (The company doesn't purchase things only for test purposes), I guess I have to check it on my card directly.
Thanks for the reply !
Lilia.
Thanks,
You might explain to the boss that less then $100 and maybe 2 days you will have it working. To do it with a commercial unit it will take a few hundred dollars for the equipment and the learning time. To test it properly without the tools will take a few weeks. Here is a link to a tool that should do a good job. Autel MS908CV Diagnostic Scanner Scan Tool Specialized for Heavy Duty w/J2534 - USA Version | JB Tools The OBDII tools to my knowledge do NOT have access to and control of the OEM codes.
If you are an automotive OEM you will eventually need similar tools for PV and DV for starters.