-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] configurable HW-SPI (for Huawei CAN and CMT wireless module) #605
Comments
Its an abstract request. Currently only the HM series can be combined with the Huawei. |
Yes, that was my idea. I don't see a reason why this could not be possible.
As an alternative I'd suggest to use the build-in CAN-controller, as is done here: https://github.com/mb-software/esphome-huawei-r4850 - that would free up the SPI for other parts. Using the build-in CAN also means that a cheaper sn65hvd230 module must be used.
Gesendet: Montag, 22. Januar 2024 um 10:30 Uhr
Von: "gitisgreat2023" ***@***.***>
An: "helgeerbe/OpenDTU-OnBattery" ***@***.***>
Cc: "Martin" ***@***.***>, "Author" ***@***.***>
Betreff: Re: [helgeerbe/OpenDTU-OnBattery] [Request] configurable HW-SPI (for Huawei CAN and CMT wireless module) (Issue #605)
Its an abstract request.
You're interested that the Huawei can be used together with HMT/HMS Hoymiles, right? (those need the CMT module)
Currently only the HM series can be combined with the Huawei.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Reading through the software issue here and this I'm wondering whether its feasible to get the software fixed... @mager33 I don't get how this solution works. Lets say take PCB solutions like on akkudoktor (for example this PCB or this one. |
The EPS32 has a hardware CAN controller. So we can use that (together with an external transceiver). That would free up one SPI that could be used for other stuff.
I don't know why so many solution (I know the procets you'Ve refered to) do not use the built-in CAN-controller but go SPI->external-controller->transceiver. It does not make sense me - and the other solution just works (I've tested it myself)
The ESP32 has two available hardware SPIs, but each can handle multiple devices via CS; some background: https://randomnerdtutorials.com/esp32-spi-communication-arduino/
Backgroud for CAN: https://docs.espressif.com/projects/esp-idf/en/release-v3.3/api-reference/peripherals/can.html https://www.designer2k2.at/de/home/arduino/191-esp32-can-bus-twai https://esphome.io/components/canbus.html
The Arduino library can use both CAN methods: https://github.com/sandeepmistry/arduino-CAN
|
@mager33 yeah, but in those applications the built in CAN controller of the ESP32 is used for the Pylontech communication. |
The Pylontech has CAN and RS485, so we could free the CAN-bus. |
Which interface is then used to steer the RS485? Some general IO pins of the ESP32? |
Yes, RS485 is standard serial via an external transceiver (MAX485 or similar, available on cheap modules). There are 3 hardware UARTs available: https://circuits4you.com/2018/12/31/esp32-hardware-serial2-example/
|
Relevant discussion here on adding an ethernet controller via CAN... |
That looks like a well thought out request, only the title is misleading. We can thus close my request.
|
Fully agree. |
Pylontech can use UART protocol like the JKBMS, and i don't think people will use JKBMS and Pylontech a the same time (and if needed, esp32 has 3 UART controllers). So if Pylontech use the UART communication, the Huawei charger can use the CAN bus of the esp, and people can use other SPI for NRF and CMT tranceiver. |
I create an pull request to make huawei usable together with HMS: #1144 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. |
Is your feature request related to a problem? Please describe.
Both use the same HW SPI
Describe the solution you'd like
Make HW-SPI configurable for each device.
Describe alternatives you've considered
Hard-assign HW-SPI 2 to CMT and HW-SPI 1 to Huawei and disable other modules the require SPI, like display
Additional context
No response
The text was updated successfully, but these errors were encountered: