DIYBMS v4

If it’s the PCB from the master branch, you have to slide the SD card metal clip open. I think you are forcing the card into the holder!!

Smaller cards are better, anything over 2gb is probably overkill.

Thanks oops! It’s working now that it’s formatted FAT32 (I don’t any other cards at home).

Next issue is that the relays are quite working properly. The serial tests all pass, and the yellow LEDS by the relays light up, but they aren’t clicking. Also only RE3 is changing continuity, RE4 remains open circuit.

Edit: The mechanical relays are incorrect, somehow bought 12v rather than 5v. Still not sure why RE4 isn’t working as expected.

Edit2: RE4 issue resolved, it was a dry solder joint from JLPCB, quick reflow with the soldering iron and the solid state relays are working.

So the outstanding issue is the TFT screen, the green light on the RGB led is flashing, unless the TFT is plugged in then the RGB led doesn’t flash at all after the blue serial test flashes. The TFT screen doesn’t turn on at all.

Edit3: Solved it, this time the issue was poor soldering by me on the TCA5934

Well sorry that I seem to be spamming this thread, I am working hard to try and solve the problems myself. So I have another issue or two to sort out:
The touchscreen was unresponsive on the controller test, the pressure figure stayed at 4095 and the x and y figures didn’t change unless I ran my fingers over the pins of the screen. This isn’t a major deal breaker as I’m not fussed about the screen particularly (but it would be nice to get it working).

More importantly can someone run through the steps of correctly compiling the main controller software and file system in Platform IO, I can’t just use the compiled bin in Github, because I’ve had to change the i2c address of the TCA9534A.

Thanks in advance for the help.

Verify that your TFT supports touch, I’ve ordered a few on AliExpress and most of them came in without the touch IC which causes the controller to not detect the TFT (since it reads from the touch IC).

  1. Download the Controller code (git clone is best).
  2. Install PlatformIO (I use the command line version on Linux, for Windows I’d suggest use VSCode with the plugin).
  3. Modify the code as you need for your alternative address.
  4. Modify platformio.ini to configure upload_port and monitor_port to match your environment.
  5. Run the “Upload” target (pio run -t upload) to upload the controller code.
  6. Run the “Upload Filesystem” target (pio run -t uploadfs) to upload the filesystem image.
  7. Run the “Monitor” target (pio run -t monitor) to monitor startup and ensure that the controller starts correctly.

Thanks for taking the time to explain. Spot on about the Screens, I hadn’t even realised my mistake when ordering them.

I’m using windows and didn’t have the pio commands set up in terminal, but it was easy enough to google it and find the GUI instructions for uploading the file system and as far as I can tell it works! I need to finish the modules now and build the battery to test it all.

Thanks again, this really is a fantastic community.

1 Like

2 posts were split to a new topic: Victron Integration - feedback

i stuart and guys

Very good job.
An analogue port receive rs232 data.

I didn’t see it in the kicad schematics.
all are connected
no?
Connect mppt controller votronic.

tks

At the moment it is very difficult to find the TCA9534A in any electronic shop, therefore I used the PCA9534. The only problem that I realised later is, that the address of the PCA9534 (0100) is different to the TCA9534A (0111). I think to make the software running it is necessary to change TCA9534APWR_ADDRESS to 0x20. Any suggestions if this makes sense?

There is already TCA6408APWR chip using address 0x20. But you can do steps in this post DIYBMS v4 - #4319 by uqfus and you should be able run controller board with PCA9534.

hey everyone, could one of you kindly point me to this file

“*5 Click Browse and select the file “diybms_controller_firmware_espressif8266_esp8266_d1mini.bin””

as I cant seem to find it on stuarts github under “programming the controller”

thanks

PS not even github can find that file.

Click on Actions and select the latest ESP8266 version such as: Fix platform version for espressif8266 (#122) · stuartpittaway/diyBMSv4Code@87f6de1 · GitHub

nice, thanks

Could someone check my wiring? I cant seem to get the modules to respond.

Tx!

[Edited to show the image. Moderator (RW)] ← thanks Robert

AFAIK it’s wired correctly as in switched… But my modules won’t start in the correct order or sync

Umm, why are you connecting + to - ?? that cannot work. you need to connect pin1 of Tx to pin1 of Rx instead of swapping Pin1 with Pin2.

Funny you should ask, I had it 1 to 1 but when the didn’t work either,I went lookin for a wiring diagram and found some where there were switched here in this thread. Thanks for the clarification though. Doi

Maybe they weren’t responsive because the power was too low

Edit.

So I switched it back pin 1 to 1 and still no dice.

Hi
I’m a little confused and have 2 questions.

  1. on all videos and pictures I can see that the esp32 controller is equipped with C8, C9, R22, R23, D6. The ATtiny841 is always missing. These are listed in the BOM file but are not used with jlcpcb. I assume this is related to the cpl file. Should I equip c8,c9,r22,r23,d6 or can I ignore them?

  2. Do I need 32 balancer modules with an S16P2 battery pack?

You can ignore all the parts related to the ATTINY841 on the controller board. These have also been removed on future versions of the controller PCB.

For a 16S pack, you need 16 modules.

Ok, this is going to be more difficult for you because of the missing JST connectors.

  • Start with a single module and get that working, then add on more as you go.
  • Does the LED on each of the modules flash every 8 seconds?
  • TX connects to RX, as @Smurfix mentions, pin 1 to pin 1 and 2 to 2.
  • If you loop the TX and RX on the controller together (no modules), you should see the “ignored” message count increase on the web interface.

Note that the ESP8266 and the older style controller are no longer actively maintained or developed, all focus is on the newer ESP32 controller.

I checked my connectivity and seem to have a short in the com line somewhere, so yes, I’ll give it a rewire and try as you suggest. Thanks Stuart.

On the 4.0 controller board there aren’t any pin markings, so it’s also a bit of hit and miss, thankfully the module boards hat rx1 and tx1 marked.

Stuart, can I use this board without these chips? I ordered the new one a while back but haven’t gotten any of these missing chips yet for it.