I think the very first thing I will try is to change the CAN settings in the ESP32.
Not sure why
@Sleeper85 or
@MrPablo have CAN_TX = GPIO5 and CAN_RX = GPIO6 in
https://github.com/Sleeper85/esphome-jk-bms-can/blob/main/config/config_atom-s3-lite-esp32-s3.yaml for the Atom S3 Lite.
If you look at the M5Stack it's written RXD = GPIO16 , TXD = GPIO17:
# New: Atom S3 Lite + CAN Hat -> Refer to
https://docs.m5stack.com/en/unit/can -> RXD = GPIO16 , TXD = GPIO17
So I have this at the moment in my configuration
https://github.com/luckylinux/jk-bm...main/esphome-jk-bms-can/esp32-ble-1.17.4.yaml
YAML:
# +--------------------------------------+
# | ESP32 CAN port pins |
# +--------------------------------------+
# GPIO pins your CAN bus transceiver (TJA1050, TJA1051T or SN65HVD230) is connected to the ESP, note! TX->TX and RX->RX.
# Old: Atom S3 Lite + CAN Hat -> Refer to https://docs.m5stack.com/en/atom/atom_can -> CAN_TX = GPIO22, CAN_RX = GPIO19
# New: Atom S3 Lite + CAN Hat -> Refer to https://docs.m5stack.com/en/unit/can -> RXD = GPIO16 , TXD = GPIO17
# Final: Refer to Sleeper85 GitHub Repository -> https://github.com/Sleeper85/esphome-jk-bms-can/blob/main/config/config_atom-s3-lite-esp32-s3.yaml
#can_tx_pin: GPIO17 # According to https://docs.m5stack.com/en/unit/can
#can_rx_pin: GPIO16 # According to https://docs.m5stack.com/en/unit/can
can_tx_pin: GPIO5 # According to https://github.com/Sleeper85/esphome-jk-bms-can/blob/main/config/config_atom-s3-lite-esp32-s3.yaml
can_rx_pin: GPIO6 # According to https://github.com/Sleeper85/esphome-jk-bms-can/blob/main/config/config_atom-s3-lite-esp32-s3.yaml
But I think I will try with GPIO16 and GPIO17 now that absolutely nothing is happening.
Although it's true that GPIO16 and GPIO17 are not even listed on the Atom S3 Lite itself ...
View attachment 204504
An easy fix will be to upgrade USB cable & Power Supply -> Let's just try with a Raspberry Pi 5V/3A power adapter.
I'll also try, with the same cable and another CAN adapter (CANable Pro), to sniff the traffic, to see if there is something really going on here.
With the can-utils package on Linux, I should be able to do
EDIT 1: The cable I used must also be quite "low-cost". It is "Cat 6 S/FTP" etc. but no AWG indicated. Probably AWG 27 or AWG 28 or something.
I guess the difference with Ethernet is that the wire resistance plays a much bigger role in CANbus ? I have seen CANbus cablers ($$$$) AWG 22 or AWG 24. In shops, AWG 26 is the best you can buy for Cat 6 etc. Example
But even AWG 27 Aluminum (assuming CCA) the resistance should be peanuts ...
View attachment 204506
EDIT 2: The BMS CAN Pinout on the Deye SUN-12K-SG04LP3-EU seems correct, Pin 4 & 5 ...
View attachment 204508