
BMS Ctrl DE-9 Adaptor
juepi/PIO-ESP32-BMS_Ctrl
Monitor and Controller for battery setups using Daly Smart BMS with Victron VE.Direct charger and shunt

Monitor and Controller for battery setups using Daly Smart BMS with Victron VE.Direct charger and shunt
ESP32-BMS Ctrl is an open-source printed circuit board by juepi, from the juepi/PIO-ESP32-BMS_Ctrl repository on GitHub. It is a 2-layer board of 125.1 × 90.2 mm with 44 parts on 52 nets, routed with 169 tracks and 0 vias.
It is built around the AQW212EH and IRF4905PBF. Its parts include 18 resistors, 7 connectors, 6 transistors, 4 ICs and 3 diodes. It belongs with the power boards and the ESP32 boards of this library.
This project is intended to be used as an WiFi/MQTT interface to the Daly Smart BMS Systems and Victron VE.Direct devices based on my PlatformIO ESP32 Template.
Primarily, the code reads status data from the Daly BMS, Victron VE.Direct PV charger and SmartShunt and sends it to your MQTT broker at a configurable interval. It automatically switches the load-SSR on if the batteries are fully charged (2 configurable SOC limits) and off if the batteries are drained (also configureable SOC limit). Load-SSR can also be switched manually by setting the corresponding MQTT topic to on or off. The primary source for the battery SOC is the Victron SmartShunt.
Last but not least, the firmware also allows you to handle an external active balancer through an additional SSR as recommended by Andy. However, i have added a second condition beside the 3.4V cell voltage: we're only enabling the active balancer if the voltage difference between the highest and lowest cell is above an configurable threshold (defaults to 30mV, configurable via MQTT topic t_Ctrl_Cfg_SSR2_CdiffOn).
To configure the firmware for your needs, see files user-config.h and mqtt-ota-config.h, also see PlatformIO ESP32 Template readme (WiFi setup etc.).
platformio.inito your needs)What you are looking at here is the second major release of this firmware. If you want to see how it all started or you're interested in the problems I've encountered up to this point, take a look at the final v1 release readme.
The hardware part is also finished now, see KiCad folder.
Keep in mind that you are working with potentially dangerous electricity levels depending on the hardware you use. Take any precautions necessary!
You need to do the initial battery setup on the Daly BMS using the included Bluetooth adapter and Daly's SmartBMS app, as the used library does not support setting configuration parameters. Victron devices can use the VictronConnect App in parallel to the (read only) serial output on the VE.Direct port.
An active balancer is highly recommended, as the internal passive balancer of the Daly BMS is useless. Andy from the Off-Grid Garage has picked up this topic recently, and i've decided to add the active-balancing control as he suggests it into the firmware. Note that you will need an active balancer that will allow you to start the balancing by shorting 2 pins, like this one from AliExpress. You will need to remove the solder chunk from the pads labeled "Run", this will reveal 2 seperate soldering pads. Solder 2 wires to the pads and connect them to an optocoupler output, in example AQW212EH.
Take caution when connecting the ESP to the UART ports: the internal electronics of the BMS (including UART port) use "battery ground", whereas other connected devices (i.e. load, charger) use the "power ground". NEVER EVER connect these different grounds or magic smoke will leave your electronics! To avoid this, make sure to isolate anything coming from or going into the UART ports of the Daly BMS and your VE.Direct devices. For UART RX/TX, a ADUM1201 isolator chip works well for me.
Thanks to maland16 and softwarecrash for providing a library to interact with the Daly Smart BMS.
Thanks to cterwilliger for his Victron VE.Direct frame handler, which has been integrated into this project since v1.2.0. Note that the source is in the lib directory, not from github, as i needed to include the buffer overflow patch. I have also added a frameCounter which increments when a valid frame is decoded (to ease handling of fresh data) and a function which looks up array index numbers by Name label (required for SmartShunt!).
t_Ctrl_Cfg_Offgrid_Mode in user-config.h). Plugging in the offgrid inverter is only done in case of a long lasting power outage, which has not happened yet (and hopefully never will), so i can live with that limitation. A note on failing OneWire communication: in my case the only way to recover OW-communication was to power down the ESP (remove power from the OW sensors), it seems that the controller inside the sensors hung and rebooting the ESP did not help.v2.0.2.CtrlStatTXT topic; now publishes info on every action the controller takes (like enable/disable load or balancer)Daly_dV now reports mVplatformio.ini) - doesn't work yetplatformio.iniuser_setup.h to more suitable user-config.hgetTempCByIndex() calls when no sensors are availablet_Ctrl_Alarm in user-config.h)VSS_MAX_SOC_DIFF was set too low to 0.5% instead of 5%)SSR2.CVOff (previous conditions could lead to Auto-mode rapidly toggling balancer if a single cell is above enable and another one is below disable voltage)platformio.ini)EspSoftwareSerial library versionVSS_MAX_V_DIFF defined in user-config.h)DATA_UPDATE_INTERVAL to avoid publishing wrong/incomplete data directly at firmware bootOW_MAX_TEMP_DIFF)I somehow managed to not to include the VeDirectFrameHandler library into previous commits as it was intended. This affects all versions prior v2.1.0!
If you want to build an older release, you can easily fix this by adding my fork of VeDirectFrameHandler into the library section of platformio.ini:
lib_deps =
https://github.com/juepi/VeDirectFrameHandler
...Have fun,
Juergen
| Qty | Value | Footprint | References |
|---|---|---|---|
| 10 | 10k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R4, R5, R6, R7, R8, R9, R13, R14, R15, R16 |
| 6 | IRF4905PBF | Package_TO_SOT_THT:TO-220-3_Vertical | Q1, Q2, Q3, Q4, Q5, Q6 |
| 4 | 820 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R10, R11, R12, R17 |
| 4 | MountingHole | MountingHole:MountingHole_3.2mm_M3 | H1, H2, H3, H4 |
| 4 | Screw_Terminal_01x02 | proj:TerminalBlock_1x02_P5.00mm_Horizontal | J1, J2, J3, J7 |
| 3 | 100 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1, R2, R3 |
| 3 | 1N4001 | Diode_THT:D_DO-41_SOD81_P10.16mm_Horizontal | D1, D2, D3 |
| 2 | 33µ/100V | proj:CP_Radial_D10.0mm_P5.00mm | C1, C2 |
| 2 | AQW212EH | Package_DIP:DIP-8_W7.62mm_Socket | U1, U2 |
| 2 | Conn_01x02 | Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J4, J5 |
| 1 | 0 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R18 |
| 1 | DE9_Receptacle_MountingHoles | Connector_Dsub:DSUB-9_Female_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm | J6 |
| 1 | WEMOS S2 Mini | proj:WEMOS_S2_Mini | U3 |
| 1 | ~ | proj:Pololu_D24V25F5 | U4 |

juepi/PIO-ESP32-BMS_Ctrl
Monitor and Controller for battery setups using Daly Smart BMS with Victron VE.Direct charger and shunt

smotesko/power-kit-PSU
Isolated switch mode power supply for Eurorack synth, ±12V and +5V outputs

dragon-mobile/solid_state_relays_12v
The Solid State Relays - 12Volts is an open hardware solid state relay PCB aimed at the tiny home, van life and maker communities.

cjg-1/FPV-RC-CAR
A wireless FPV control system for RC vehicles featuring real-time video transmission and custom embedded power management. Enables immersive first-person vehicle teleoperation with low-latency wireless architecture.

AsherNoble/trueskate-ai-hardware
Hand-control layer for TrueSkate-AI: the agent sends touch gestures, a robotic finger performs them. Teensy 4.1 + SimpleFOC firmware, Python host.


JanKolibri/24V---12V-Tasmota-RGBW-Lighting-Controller-for-Home-Assistant
This project is a custom-designed RGBW LED lighting controller built with KiCad and designed to integrate seamlessly with Home Assistant using Tasmota firmware on an ESP8266.

Masterltb/pcb
Nguồn trong thư mục này được giữ để tra cứu và bảo toàn công việc cũ. Không dùng thay cho RevB. Một số file có sửa đổi cục bộ chưa commit từ trước đợt sắp xếp; các thay đổi đó được giữ nguyên nội dung, chưa được kiểm…

It measures 125.1 × 90.2 mm and has 2 copper layers, 1.6 mm thick.
44 parts, built around the AQW212EH and IRF4905PBF. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the juepi/PIO-ESP32-BMS_Ctrl repository on GitHub, at the commit this page was made from: the board is KiCad/ESP32-BMS_Ctrl/ESP32-BMS_Ctrl.kicad_pcb and its schematic KiCad/BMS_Ctrl_DE-9_Adaptor/BMS_Ctrl_DE-9_Adaptor.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask juepi before reusing the design.