Communication via the eBUS requires synchronisation. This project should enable this synchronisation although transmission latency (e. g. via WiFi).
Overview:
- eBUS Adapter
- Microcontroller board. I successfully tested the Blue Pill Board with a STM32F103C8T6 MCU.
- Development environment (e. g. Arduino IDE or Visual Studio Code with PlatformIO)
eBUS Adapter: Any eBUS adapter with a UART interface should be fine.
Microcontroller board: The STM32F103C8T6 achieved a good timing accuracy also with quite some debug output. I also tested a ATmega328P with 8 MHz, which was too slow. At 16 MHz it was slightly better, but with Arduino and quite some debug output it was also too slow (an optimised native implementation should be fine).
Connect Vcc and GND.
eBUS TxD - A0 (SENSE_PIN)
eBUS RxD - A1 (WRITE_PIN)
Flashing Bootloader for STM32F103C8T BluePill Boards
The firmware can then be easily uploaded via USB by the "STM32duino bootloader".
My test software (ugly draft, not released yet) buffers the data which should be sent to the eBUS and transmits it after a SYN symbol, as required by the specification. It should also detect collisions and pre-process received data before forwarding.
I have chosen Arduino to be able to easily test on different platforms. Since no special libraries are used, it should be rather easy to natively port the code to a particular platform.
What I observed on the Arduino IDE with the STM32F103C8T6 (CPU Speed configured at 72 MHz): The timer micros() works as expected, but delayMicroseconds() only delays half of the time as requested. To fix this, I double the delay value.
- Support of eBUS daemon's enhanced protocol
A logic analyser trace shows quite nice timings:
The (closed-source) firmware ebusd-esp synchronises to the SYN symbol, but has quite some latency: Wireshark shows that a lot of packets are sent with just one byte of payload:
[Untested]
- ESP-LINK: Wifi-Serial Bridge with REST&MQTT
- Tasmota Serial to TCP Bridge
- ESPHome UART
- ESP32-Serial-Bridge
- eBUS - English Wikipedia article
- eBUS - German Wikipedia article
- openHAB eBUS binding (outdated)
- "Unofficial" openHAB eBUS binding
- Description of "unofficial" openHAB eBUS binding
- eBUS daemon
- Firmware for ESP8266 and ESP32 allowing eBUS communication for ebusd
- FHEM eBUS wiki article (German)
- eBUS adapter design which does not require trimming
- Optional: Logic analyser software (I used sigrok and PulseView GUI)