DIYBMS v4

Yes, use GITHUB please.

1 Like

Iā€™ll point you at the documentation on how to use the code/program the ESP8266.

Once you have the controller programmer, loop the TX + RX connections on the controller. The web interface should show ā€œignoredā€ errors - if this is the case, the controller is working.

Using ESP32 Controller board i have no spontaneous reboots with enabled MQTT. Right now controller reports: Packets sent:1033775 Packets recā€™d:1033773 Roundtrip (ms):3102 Uptime:22d18h53m
How far controller from WIFI router? Is there near controller high power high EMI equipment? How long communication cables between controller and modules?

I am approximately 13 meters from the Wifi accespoint (its a monitored Cisco Meraki MR-33), I see no dropped connections in the logs, signal strenghth is reasonable(16db).
I use the external antenna on my ESP32.

There were issues with the influxdb connection, but these were fixed a few months ago.

Since then, this is the first report Iā€™ve had of random reboots.

The only way to narrow this down, is to capture the serial debug logging output from the controller - when the controller reboots, it will output a stack trace - this will tell us the exact line in the code that failed.

Without that, Iā€™ve nothing to debug.

Thanks Stuart, I will do my best to get that output, I have found an old laptop that can be run in the shed with the powerwall, zo I hope to be able to capture an output this weerkend. When I have one, I will raise the ticket on Githubā€¦
Have a nice weekend all!

Perfect!

1 Like

It does show the ignored request errors and the send/receive packet count increases. Tried moving the D1 and controller to my working setup but no luck. Also tried the controller and D1 separately on the known working other half. No luck there either. Not sure how to proceed from here.

What firmware are you using on the modules? What version hardware are they?

Modules are V4.21 and were flashed about a year or so ago using the old platformio method.

Ok, perhaps try a newer firmware on one of the modules to test?

having issues with avrdude. I was going to try that but it isnā€™t running right. followed your instructions.

c:\AVRDUDE>avrdude -C avrdude.conf -P usb -c usbasp -p t841
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor=ā€˜www.fischl.deā€™ product=ā€˜USBaspā€™

avrdude done. Thank you.

Switched to a windows 7 machine and got avrdude to run. Now getting a error that the firmware file cant be found. I did put it in the same directory as avrdude. Any suggestions as to why it doesnā€™t find it?

Indeed, I have tested in the test panel with a new firm for both the controller and the shunt and everything is perfect, now I will have to reprogram the shunt installed in the battery. Thank you all

Many thanks Rafael I was seeing same problem with same solution.

Have you tried these chips?

Just curiuos if my thinking/actions are right on how to capture theserial output;
Can I make the usb connection with laptop when the controller is still powered through its own seperate powersource? Or does that have to be disconnected?

Do I capture this serial output using putty for instance?

And when it reboots I go lookin for error codes in the putty screen?

If possible, just use the USB as the power source - it should work okay with both power sources, but you would be mixing the two 5v lines.

Putty would be a good choice - just ensure its logging to a file output.

Then its just a case of hunting the error code

1 Like

In case of long lasting serial logging processes it is good idea to buy OpenLog - open source data logger.
It is pretty cheap but gives a huge benefits. GitHub - sparkfun/OpenLog: Open Source Hardware Datalogger
In case DIYBMS there is no easy way to connect OpenLog to ESP32.
I think it would be a good idea to add pinhead for UART0 with GND and VCC.

The chip markings look correct and match what I have on hand as well (60+ so far)

1 Like