DIYBMS v4

hmmm that doesn’t sound good. Maybe @stuart knows what is going wrong.

To get you going and to recap. What happens if you only connect power to a module? Is the blue light flashing?

1 Like

Yes, the blue light flashes twice every few seconds.

I was looking back at the pictures you posted before, and I can’t see anything that might give you trouble. The flashing led on the module looks fine also.

Can you make a picture of your controller without the display mounted and a screenshot of the NODEMCU flasher screen when you program your ESP32?

This is the picture of one of the controllers not completely assembled. But the situation is the same on the other controller also.

And the screenshoot:

1 Like

I still don’t see anything strange. Only thing in NODEMCU I never go higher than 115200 Baud.
Can you check the orientation of the optocoupler near the TX1 Connector the dot need to be where the 1 is printed on the circuit board. Al you not able to get the test file running can you also check if the connection of the 2 traces highlighted in the images below is 0 ohm.


[EDIT] Measure them with the ESP32 seated on the board.
[EDIT2] now we are measuring also check the resistors R2 (2k2) and R3 (180R)

2 Likes

I think you found the problem! :clap: :clap: :clap:
The Optocoupler seems to be mounted upside down.

The two tracks have 0 ohm between them.

The problem with the test code must be something different.

Thanks a lot for your time and help. I’ll turn around this component.

Oke that sounds great let us know if it works after turning arround the optocoupler.

@Vince the test code cannot be programmed to the ESP32 using the NodeMCU flash tool, either use PlatformIO directly or use the “esphome flasher” tool - the instructions for this are on the ESP8266 version of the controller here [GitHub - stuartpittaway/diyBMSv4Code: Software for diyBMS v4]

Using platformIO I’m able to flash either the complete controller code or the test code. But then the ESP32 complains about not been able read the filesystem. More than probably I’m missing some step to build or upload the firmware.

Anyway, I’ll turn around the optocoupler on the controller and try again to flash with NodeMCU. It looks like it is directly related to the module communication problem.

@Vince In platformIO you also need to upload the filesystem image
image

1 Like

Great. I’ll try.

Looks like there is something else to the optocoupler.

Sometimes programming the module fails. Wifi settings are lost after an undefined number of reboots.

I’m enjoying a lot trying to make this baby work the way it should :sweat_smile:

@Vince just try programming with the ESP32 disconnected from the board.

Ok, when the controller is running,. You can hold down the BOOT button to wipe the WiFi settings. I’ve seen more than 1 esp32 which has the boot button wired differently to standard devkit devices. This could be the problem you see. The led should also light up (Cyan from memory)

Finally! :sweat_smile:

Thanks for the support!

3 Likes

Wifi settings are lost seemingly ramdom and without pressing the boot button. I’ll check the led color if it happens again.

@Vince Was it only the optocoupler that was wrong on your board?

On the controller board, it was the optocoupler wrong orientation causing the communication problem with the battery modules.

But there were also some faulty battery modules that I’ll need to check.

The wifi resetting to default seems to be related to the ESP32. @stuart said it could be caused by the boot button. But I’m not sure if he was referring to using the button to reboot the controller.

It has happened again a couple of times after turning the power off. The led was lighting white or very light and bright blue when that happened.

Yes thats it - I’ll have to disable this in code, it seems people are running into this problem more and more. The other time it happens is if you leave a module connected to the AVR programmer port and reboot the ESP (or power on/off).

I’ve created an issue for it Wifi Settings lost via "BOOT" button randomly · Issue #12 · stuartpittaway/diyBMSv4ESP32 · GitHub

Can anyone help me with getting Grafana setup with the DIYBMS?

*** Main Question:
In the DIYBMS controller settings there is a check box to enable MQTT and/or Influxdb. Is the DIYBMS already logging the information or just broadcasting information and I need to set up an influxdb database myself?

Or if anybody could explain to me point me in the direction of a video or tutorial of someone setting up a grafana dashboard for the DIYBMS ID appreciate it

Have you seen this thread?

2 Likes