RX-errors with waveshare-CAN-hat

Hi,

I’ve connected my Pylontech batteries to my Venus OS, driven by raspberry pi, with the 1-channel waveshare-CAN-HAT https://www.waveshare.com/wiki/RS485_CAN_HAT
I’m facing RX error rates of 8% on this CAN interface.
Thus, I added a 150 Ohm resistor between A and B at the CAN-hat. But this raised the error rate to 25%. The reason could be bad cable-contacts since I added the resistor, but I didn’t check this yet.
On the battery-side, the DIP-switches are unmodified => all are switched OFF.
(The newest revision of this HAT has a switchable built-in resistor. My board does not feature this resistor.)
Any experiance or hints?

Regards
Alex

I would also check the ground connection, and any offset in ground voltage between the pi and Battery without the CAN cable connected. Termination should be 120 ohms each end, this can be measured with the system completely powered down - including the battery. If there is still ~2.5V on the can data, then the CAN interface is still powered.

I measured that my CAN-HAT has a 120 Ohm resistor built-in.
Voltage-offset between Raspberry and disconnected battery is 50 mV.
I now added ground-wiring to my CAN-wiring, but the situation isn’t progressing: still 25% error-rate.
In a second-Victron-installation done be me, exactly the same way (without ground-CAN-connection), the error-rate is 5%.

Check the spimaxfrequency in /u-boot/config.txt. The setting in the Waveshare installation guide is too low and results in many overrun errors. Increase the value to 10MHz.

dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=10000000

Thank you @Telekatz, you’re 100% right. Now, I have <0,1% error-rate.