DIYBMS v4

In principle it does not seem the cause, it is a wemos acquired in the official channel. The Internabl BMS error, would it be compatible with a component with a defect in any of its welds?

During the startup of WiFi and/or BT there is a spike in demand for the 3v3 power rail, this can be handled in one of two ways:

  1. 3v3 power remains at (or slightly above) 3.3v.
  2. power drops below 3.3v to compensate for increased current draw (mA).

The brownout detected message indicates that the ESP32 detected that the 3v3 voltage dropped below ~2.43v (+/- 0.005v). One of the two following conditions will cause the 3v3 power rail to drop below thresholds:

  1. Power supply is unable to supply 5v 750mA (or higher)
  2. The 3v3 LDO on the ESP32 DevKit-C board you are using is undersized.

Which exact ESP32 board are you using?

The LDO being undersized is known to occur on a few third-party DevKit-C boards that opted to use the bare minimum rather than recommended sizing. If you can provide a detailed picture of the board where the markings on the LDO can be read it can be verified if that is the source of the problem or if it is external to that.

Internal BMS error indicates two distinct conditions:

  1. Unable to communicate with modules.
  2. At least one module is reporting zero volts on the connected battery.

The first one is expected if you do not have modules connected to the controller board. The second I’m not 100% certain how that condition could occur but likely a module that is connected to the controller did not respond and the controller used the default values of zero for it.

Happens when a modules eeprom is corrupt and has zero for a calibration value.

Ok, that is not an Espressif branded DevKit-C, the markings for pins are not correct (they don’t start with G normally). Components are also in the wrong placement.

However, the LDO does appear to be mostly correct but I can’t confirm 100% as I can’t locate the LDO with “2129K” as the marking. Additionally, both the 1A and 800mA versions are labeled as “AMS1117-3.3”.

I have this same ESP (“2129K”) in two other installations that have not presented any problem. It turns out to me that the origin of the problem is this ESP but hey, I will tell you to do tests with another ESP or to send it to me so that I can test it with the rest of the verified elements. Thanks for your explanation

I Think I have captures the output at reboot and will raise the ticket on github, but thought I might as well publish it here too

Code version [Fix issue #38 (#60) · stuartpittaway/diyBMSv4ESP32@019382f · GitHub]

[I][influxdb.cpp:177] influx_task_action(): Influx host 192.168.1.50 port 8086
[D][influxdb.cpp:73] influxdb_onConnect(): Influx connected
[D][influxdb.cpp:126] influxdb_onConnect(): Influx data sent
[D][influxdb.cpp:47] influxdb_onData(): Influx data received
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x40151736  PS      : 0x00060830  A0      : 0x80149f26  A1      : 0x3ffd8d40  
A2      : 0x3ffecb3c  A3      : 0x00450008  A4      : 0x00000002  A5      : 0x00000000  
A6      : 0x3ffd81e4  A7      : 0x3ffd8280  A8      : 0x007ff834  A9      : 0x0080036c  
A10     : 0x00000000  A11     : 0x00000359  A12     : 0x00800013  A13     : 0x00000b38  
A14     : 0x00060820  A15     : 0x00000000  SAR     : 0x00000019  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00450018  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff  

ELF file SHA256: 0000000000000000

Backtrace: 0x40151736:0x3ffd8d40 0x40149f23:0x3ffd8d70 0x400e5de2:0x3ffd8d90 0x40149064:0x3ffd8db0 0x40092ce2:0x3ffd8de0

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8



                _          __ 
    _|  o      |_)  |\/|  (_  
   (_|  |  \/  |_)  |  |  __) 
           /                  
[I][main.cpp:3286] setup(): CONTROLLER - ver:019382f764db386f6cab8d8338ad073d21b7bad0 compiled 2021-10-05T10:47:31.492Z
[I][main.cpp:3291] setup(): ESP32 Chip model = 1, Rev 1, Cores=2, Features=50
[I][HAL_ESP32.cpp:232] ConfigureI2C(): Configure I2C
[I][HAL_ESP32.cpp:291] ConfigureI2C(): Found TCA9534A
[I][HAL_ESP32.cpp:321] ConfigureI2C(): Found TCA6408
[D][HAL_ESP32.h:288] TouchScreenUpdate(): Touch = touch=0 pressure=0 x=0 y=0

Any chance you can decode that backtrace?

You can download EspArduinoExceptionDecoder/decoder.py at master · me21/EspArduinoExceptionDecoder · GitHub and if you have PlatformIO bits installed the following command should work to decode it:

python ~/decode.py -p ESP32 -t ~/.platformio/packages/toolchain-xtensa-esp32/ -e .pio/build/esp32-devkitc/diybms_controller_firmware_espressif32_esp32-devkitc.elf backtrace.txt

Adjust the paths according to your actual installation paths. In my case I’m on Linux so the above works when run from the diyBMSv4ESP/ESPController directory (git clone copy)

Finally the problem was much simpler and it is one of the things that has happened to all of us at some time and that makes us think, “but what a fool I am” there was a continuity problem in the RX TX cables. Thank you all.

1 Like

hello all,

just a note that my controller board populated with:
PCA9534APWR and PCA6408APWR (instead of the tca ones)
works fine.
Running now for 5days, led blinking as it should (and at the right colour!), screen works, relays click on and off according to rules set, batteries charging, etc. Not got into CANBUS stuff yet, probably next week when I have some time. current setup is with 4 18650cells (half new, half used) testing/charging @0.5A using a bench supply and discharging with a 12V light that needs 0.7A. Running at stock comms speed, plan to upgrade to 9600 tonight.

a big thank you to all involved!

5 Likes

Hello all
I use the esp8266 version of DIY BMS. I would like to use the faster communication upgrade but i`m unable to do so because i have no idea how to change the baud rate on esp8266.
I tried for several days to do it but i have no idea where to look.
I have the firmware for the modules with 5K and 9K6 speed thanks to Stuart
Can anybody help precompile the firmware for me with 5K baud rate and 9k6 and upload it somewhere.
thank you

CAN bus send error

I’ve activated communication with my victrons via CAN bus but diybms doesn’t appear in victron device list. At the same time I’ve just seen a lot of CAN send errors in diybms.

How can this happen?

Could you measure voltage on pin № 8 on chip TJA1057 with enabled and disabled victron comm?

Can i also reach this pin on the CAN screw terminal or exclusively on the chip?

Good point is only on chip.

Bad wiring to the can bus. No terminator resistors. Bad soldering on the can chip. Faulty can chip.

Lots of things to check.

How do I fix this?

\Users\TECH\.platformio\packages\[email protected]\cores\esp8266/pins_arduino.h:645:7: error: stray '\342' in program
       <span class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
C:\Users\TECH\.platformio\packages\[email protected]\cores\esp8266/pins_arduino.h:645:7: error: stray '\206' in program
C:\Users\TECH\.platformio\packages\[email protected]\cores\esp8266/pins_arduino.h:645:7: error: stray '\265' in program
C:\Users\TECH\.platformio\packages\[email protected]\cores\esp8266/pins_arduino.h:1076:38: error: stray '#' in program
               focus-list:ref-selector#focusFirstListMember
                                      ^
In file included from C:\Users\TECH\.platformio\packages\[email protected]\cores\esp8266/Arduino.h:296:0,
                 from include/defines.h:1,
                 from src\HAL_ESP8266.cpp:3:
C:\Users\TECH\.platformio\packages\[email protected]\cores\esp8266/pins_arduino.h:1073:25: warning: missing terminating " character [enabled by default]
             data-action="
                         ^
C:\Users\TECH\.platformio\packages\[email protected]\cores\esp8266/pins_arduino.h:1073:13: error: missing terminating " character
             data-action="
             ^
C:\Users\TECH\.platformio\packages\[email protected]\cores\esp8266/pins_arduino.h:1077:13: warning: missing terminating " character [enabled by default]
             "

I have selected the 500 kb/s in Can-bus profile on my Victron Color Control GX to make the equipment comunicate to the diyBMS.

Aaah, eher can i find CAN bus profile? Haven’t seen that before…

Thx to all!

In my CCGX

Settings 》Services 》VeCanport. and sellect 500kb