sandeepmistry / arduino-CAN

An Arduino library for sending and receiving data using CAN bus.
MIT License
694 stars 236 forks source link

How to verify SN65HVD230 is somehow functional #72

Open maxdd opened 3 years ago

maxdd commented 3 years ago

Hi, recently i bought an SN65HVD230 (WCMCU-230) from amazon but looking around it seems there are plenty of non-working/fake-devices. Currently with the standard receiver example i can't read any data on my motorbike project (ELM327 works fine). The SN65HVD230 board has a 10K Ohm between 2 points (yet to find out) and a 120 Ohm between CANH and CANL. I have also read about ppl puttin 4k7 Ohm pull-up resistor on CTX and RTX pin (maybe just current limitation) I'm wondering before returing/soldering if i have a way with this library to e.g. read some registers which allows me to understand whether a connection with SN65HVD230 is effectively in place or not. Is an oscilloscope the only solution?

Regards,

Petros144 commented 3 years ago

Hi Max,

There is a issue of the Baud rates with some newer ESP32´s maybe try the next higher baud rate and see if you get imput signals on the Can lines.

ami3go commented 3 years ago

Hi. Also the easiest way is to have 2 mcp2515 (spi CAN chip) and two arduino boards (transmitter and receives).. Connect your board to CAN network and you will see

zalexzperez commented 3 years ago

I won't be able to help you with your doubt. I'm also interested in this topic, though.

Just for your information, there's an Aliexpress store called Lovesell2013 Store that sells waveshare module clones that work just fine. They look like this: image

As a matter of fact, I built my own PCB for my project, bought some SN65HVD230 chips and they didn't work at all, they were fakes. I had to unsolder the chips from the modules I already had.

I bought the same chip model from another seller but haven't tested them yet. The only way I have to do it is by reusing one of the module's PCB without the chip.

maxdd commented 3 years ago

Hi, Thank you for the suggestion. I started to build my PCB as well but I ended up desoldering the apparently broken one with a new one I bought from a local trusted reseller. Where did you buy yours? I was wondering whether jlcpcb or similars have the real one or not

zalexzperez commented 3 years ago

The CANBUS modules I bought on several ocassions were from Aliexpress, here's the link .

When I was considering using jlcpcb's SMT service I searched for the SN65HVD230 chip but they were sold out except for a SN65HVD230Q-DR device at LCSC electronics.

However, I'm unsure whether those 'Q' chips would work with Arduinos or not as the datasheet states: "The SN65HVD230Q, SN65HVD231Q, and SN65HVD232Q controller area network (CAN) transceivers are designed for use with the Texas Instruments TMS320Lx240x 3.3-V DSPs with CAN controllers, or with equivalent devices."

"The SN65HVD23x transceivers are designed for use with the Texas Instruments 3.3V µPs, MCUs and DSPs with CAN controllers, or with equivalent protocol controller devices"

The safest and cheapest option for me was to create a solder blob at each side of the chip and use two soldering irons at the same time to remove it from the PCB.

sysavm commented 1 year ago

Had the same experience here. Bought 2 from amazon cheap and tried sandeep's and some ESP32CAN library and no luck to get the module working.

Is the MCP2551 chip cross compatible with this module? Thinking of replacing the SN65HVD23x with it.

zalexzperez commented 1 year ago

Had the same experience here. Bought 2 from amazon cheap and tried sandeep's and some ESP32CAN library and no luck to get the module working.

Is the MCP2551 chip cross compatible with this module? Thinking of replacing the SN65HVD23x with it.

These look genuine: https://www.aliexpress.com/item/1005002843997801.html

The store I was buying them from no longer has them. It sells them in a different board design, I'm unsure they're genuine or not... they're here.

Your other choice is to buy them from LCSC.