DIYBMS v4 Shunt Design and discussion

I was hoping you were going to do it properly - you know what you are doing! :slight_smile:

We are also going to struggle for free pins on the ESP8266, likely candidate at the moment is D6 (pin 13) and D3 might be possible if we do something clever to replace the wifi clear/reset feature. Somebody sent me a link to a double reset method to achieve the same result without needing a pin.

What RS485 transceiver shall we use on the controller side?

The first kick at the can. Changes you want made? The shunt connection is a screw terminals from LCSC as well as the 4pin screw terms back to the controller.

For the controller RS485ā€¦ A non-isolated, generic RS485 driver chip. If you had plans to hang more off this bus it may need more thought.

diyBMS-CurrentShunt LT2944 RS485.pdf (51.6 KB)

@GeorgeBoudreau
So sorry that we woke you up that early :grin: :grin:

Some small inputs to your great looking schematic:

  • If Y1 is a crystal, then you need 2 small caps
  • RS485 needs termination on each end, so make room for a 120 ohm resistor between RS485+ and RS485- just in case that the shunt-pcb will be the only one on the bus
    (And somewhere on the bus pullup to Vcc, and pulldown to gnd,but itā€™s better to add at the controller end)
  • A single LED or 2 will always be usefull to have on the PCB to see that something is happening

With this DIYBMS shunt will we need new controller ? Or would the communication happed over the same lines as the modules ? Would be cool if that were possible and we just added inline with the battery modules, and a code update to the controller ?

@SteenA, @stuart
The latest schematic with Steenā€™s suggestions. I have done more reading than I care to about RS485. I hope this simplist interface works. I expect more work to be done but nothing else to do when locked down.

diyBMS-CurrentShunt.pdf (56.2 KB)

Thanks for this George, can you get the kicad files over to me?

@stuart Here is a compressed library of the schematic.
D1 has no footprint or value
L1 in the switcher is also missing the footprintā€¦ LSCS may have inductors.

Many of the parts do not have values as I was trying to push the rough schematic out as fast as possible.

The screw terminals are LCSC 3.81mm spacing items, not sure about the footprints. Part number is in the symbol description.

The ATMEGA328 is 7mmx7mm 32 TQFP but it would be nice if you went with the smaller 5mm x 5mm DFN.
You are more familiar with JCLPCB parts issues and since we are going for assembly you can change footprints to 0603 from 0805.

Watch the parts used in the power supply feedā€¦ you need 100v parts for the 2 input caps.

The poly fuse has 1206 footprint but no part number.

diyBMS-CurrentShunt.zip (29.3 KB)

@stuart @GeorgeBoudreau

Sorry for the late input, but I just saw 2 small issues on Georges nice schematic

  • AVCC on the ATMEGA328 chip schall always be connected to VCC according to the datasheet. Even if ADCā€™s are not used on the chip
  • Both VCC and AVCC schall have their own 100nF decoupling caps close to the pins of the chip

Yesā€¦ No bypass caps and I expect a few other issues. As a proof of concept done in an afternoon rush it is not bad. Had to squeeze it in between client quote issues.

I have a few FL-15 shunts coming from China as well as a few 2944 eval boards. Once those boards arrive I will see if they can be used instead of trying to solder the LTC2944. Redo the main board to carry the small board.

Just an ideaā€¦

@stuart, @GeorgeBoudreau, @SteenA, why are you trying to physically separate the controller from the shunt pcb over any significant distance? The shunt will be right next to the battery. The modules are right next to the battery. The controller is very near. The shunt signal wires can be arbitrarily long. They carry very little current and the kelvin connectors mitigate the resistance of those signal wires for measuring the delta V over the shunt.

Why not make it with isolated i2c?

What is the use case where the shunt board cannot be a daughter board on the controller?

1 Like

Hi, i am reading last messages with attention but I must admit that I am a bit loose with all stuff you now guys!!!

@stuart @GeorgeBoudreau @SteenA

May be this is a stupid question: what about putting shunt in low side? Then we will measure at most 50mV (no problem of isolation). We ALREADY have battery voltage in our main controllers as we sum all of individual batteries values. With voltage and shunt voltage ( === amperes) we have all stuff that we need. It is true that we have to do maths in ESP8266 code but it simplifies a lot the schema, dont it?

Thanks.

1 Like

@juan3211

Good suggestion :slight_smile:

It seems like low side current measurement is primarely used in high-voltage circuits to avoid high voltages in the current sense circuit

I think it will cause some issues to use low side current sensing in a battery based off grid system because some inverters eg. Epsolar are using common ground between input, output and battery, and I canā€™t see where we can put a low side current resistor then.

Some solar chargers have both input and outputs connections, and Iā€™m not sure if all of the current from the solar panels / inverter is going to the batteries and back again via the inverter. So if you put the current shunt in the low side of the battery you will only measure the current to / from the battery, but not the current that is going directly from the solar panels to the outlets

And eg. here in Denmark you need to ground the solar panels and mounting metal to a real ground connection which again maybe can cause some problem if part of your setup is actually floating

Maybe more shunt modules are necessary to measure a correct current flow. One in the battery lines and one in the line out to 110/230V inverters etc.

And another person maybe want more shunts to have current measurement on a specific device
I think it could be a mess if all these devices have their own floating ground

1 Like

My experience with diybms v3 is that i2c is not reliable even over short distances when you also factor in large inverters being physically near - its an electrically noisy environment and thatā€™s why I moved away from it in DIYBMS v4.

Many many posts earlier, we agreed that people wanted to use the LTC2944 chip - which needs the high battery voltage to work. Once you start down that path, you need to look at isolation.

We could roll-our-own isolated serial port (using optocouplers), but why reinvent the wheel when standards already exist?

I think we already are - what is your definition of ā€œlow sideā€ ? The design is using a commercial shunt device to measure the current out of the battery bank - this produces a very small voltage (75mV) which is then processed by a dedicated cell monitoring chip.

This chip is constantly powered by the battery so provides energy counting, which wouldnā€™t be possible with the existing ESP controller as it couldnā€™t process the data samples quickly enough.

1 Like

The problem with V3 was not in the i2c bus, the problem is in esp, it takes a lot of interference from inverters. But there is a way to get rid of this, I described it above. Everything works with 13s without problems, next to the inverterā€‹:+1::grinning:

1 Like

Glad you got a working solution for your installation. Iā€™ve also had reports of problems between individual modules/cells.

Thank you for developing this great project! :handshake: Could you add a black background to the page with modules for BMS V3? This will be a very good additionā€‹:+1:

Iā€™m not developing any changes to the V3 code, but happy to take modifications/pull requests via GITHUB for user submitted contributions.

Too bad ā€¦ Unfortunately, I am very far from programmingšŸ˜£

The TQFP-32_7.0x7.0x0.8P size is the one to go for - carried in stock for assembly.

The fuse could be a TECHFUSE nSMD012 (1206 footprint) LCSC Part # C70066 60vdc, 120mA hold and 290mA break.

The assembly service doesnā€™t do any through hole parts or any type of connector so the screw terminals will be hand soldered.

The LM2944 I think can use the standard kicad PCB footprint of Housings_DFN_QFN:DFN-8-1EP_3x3mm_Pitch0.5mm