DIYBMS v4

https://github.com/stuartpittaway/diyBMSv4/tree/jlcpcbassembly

That’s where you want to be.

OK. That’s the lcsc bom file I downloaded
v4_bom_jlc. Csv
And the on lcsc the total was at least $35 (us) and it was for at least 1000 components. I know a lot of those were for the minimum order quantity though.

But my original question was how many boards can I make with that BOM? Someone mentioned only one but that can’t be possible

What is the status of SON of EXPcontroller?

What is the thinking regarding current monitoring and state of charge?

My application has 2 shunts. 1 for everything in/out of the battery, and 1 for the solar so it is easy to know what solar is providing.

I see c_sen1, but that is just one input and if I am not mistaken it is an analog one. It seems like I’d have to somehow convert the differential voltage from the shunt to a 0-3v value for the c_sen1, then the wemos would have to a lot of frequent adding in order to determine the state of charge.

I am thinking it would be more realistic to use 2 i2c gas gauge chips, one for the main shunt and one for the solar. I started looking for one, but have not found one that would work yet.

Can anyone shed some light on this? Who’s working on something like this?

Do you want to build the boards yourself? If not use the jlcpcb branch and they will do it for you, you only pay for the actual parts used then

At the moment current monitoring isn’t implemented into the diybms.

It is something I’d like to add though.

1 Like

I went ahead and took a stab at incorporating 2 LTC2944IDD current counters and 4 opto relays onto a controller that maintains everything else Stuart had it.

I am a total novice at this, so please, tell me what I did wrong.

My understanding, or rather my use case, will be to put an inverter, a DC/DC converter, a charger, and a PV charger controlled by the relays Jx. Each can optionally have a switch wired into the JSx. (I was not sure what the intended purpose of the ESPController Jx, but I wanted a switch to turn off my inverter so there you go)

I have not paid attention to the i2c addressing. I don’t see how that is done on the LTC2944.
The LTC2944 seems like it will handle the 24v pack I have made. (A lot of these counters were made for a single cell, and thus would not allow enough voltage on the sense leads.) Mouser seems to have these in stock.

I am no expert on the opto relay thing I choose. It seems like it will handle .5A load, and has a low current when on. A lot of the other specs are above my pay grade, but seem OK.

My circuit is here: https://track.pnwsoft.com/taves/controllerjt.pdf (this forum won’t let me upload).
https://track.pnwsoft.com/taves/ControllerJT.svg

@Jon_Coop I think you have the wrong files, I have just download the entire branch jlcpcbassembly at
https://github.com/stuartpittaway/diyBMSv4/archive/jlcpcbassembly.zip

and extracted it, inside the Circuit directory, there are 2 files v4_bom_jlc.csv and v4_cpl_jlc.csv and both those files don’t have the layout as you posted they look like this below, those files are enough components to build 1 module, when you order from JLCPCB you specify how many modules you want and upload these files, JLCPCB will do the rest

BOM

“Comment”,“Designator”,“Footprint”,“LCSC Part #”
“ATtiny841-SSU”,“ATTINY841”,“SOIC-14_3.9x8.7mm_Pitch1.27mm”,“C219103”
“100nF”,“C1”,“C_0805”,“C49678”
“10uF X5R”,“C3”,“C_0603”,“C19702”
“TL432G-A-AE3-R”,“D1”,“SOT-23”,“C171461”
“Blue”,“D2”,“LED_0805”,“C2293”
“Red”,“D3”,“LED_0805”,“C84256”
“Green”,“D4”,“LED_0805”,“C2297”
“AO3400A”,“Q1”,“SOT-23”,“C20917”
“10KOHMS”,“R1”,“R_0603”,“C25804”
“1KOHMS”,“R2”,“R_0603”,“C21190”
“68KOHMS”,“R3”,“R_0603”,“C23231”
“27KOHMS”,“R4”,“R_0603”,“C22967”
“220OHMS”,“R5”,“R_0603”,“C22962”
“510OHMS”,“R14”,“R_0603”,“C23193”
“47KOHMS”,“R15,R20,R21”,“R_0603”,“C25819”
“4.7KOHMS”,“R16”,“R_0603”,“C23162”
“2.2KOHMS”,“R18,R17”,“R_0603”,“C4190”
“NTC THERMISTOR 47KOHMS 4050K”,“R19”,“R_0402”,“C77128”
“1.8KOHMS”,“R23”,“R_0603”,“C4177”
“6.2OHMS”,“R30,R28,R26,R24,R29,R27,R25,R22,R13,R11,R9,R7,R12,R10,R8,R6,R34,R33,R32,R31”,“R_1206”,“C25344”
“EL3H7(B)(TA)-G”,“U1”,“SOP-4_4.4x2.8mm_Pitch1.27mm”,“C32565”

CPL
Designator,Val,Package,Mid X,Mid Y,Rotation,Layer
ATTINY841,ATtiny841-SSU,SOIC-14_3.9x8.7mm_Pitch1.27mm,124.117600,-68.387600,270.0,top
C1,100nF,C_0805,119.817600,-62.587600,0.000000,top
C3,10uF X5R,C_0603,107.617600,-72.887600,0.000000,top
D1,TL432G-A-AE3-R,SOT-23,124.717600,-58.787600,270.0,top
D2,Blue,LED_0805,109.342600,-90.512600,0.000000,top
D3,Red,LED_0805,105.517600,-55.287600,0.000000,top
D4,Green,LED_0805,129.317600,-55.087600,0.000000,top
Q1,AO3400A,SOT-23,107.517600,-70.287600,270.0,top
R1,10KOHMS,R_0603,114.917600,-61.587600,0.000000,top
R2,1KOHMS,R_0603,114.917600,-70.587600,0.000000,top
R3,68KOHMS,R_0603,114.917600,-66.087600,0.000000,top
R4,27KOHMS,R_0603,114.917600,-63.837600,0.000000,top
R5,220OHMS,R_0603,116.917600,-53.987600,0.000000,top
R6,6.2OHMS,R_1206,121.817600,-81.387600,0.000000,top
R7,6.2OHMS,R_1206,121.817600,-78.737600,0.000000,top
R8,6.2OHMS,R_1206,117.317600,-81.387600,0.000000,top
R9,6.2OHMS,R_1206,117.417600,-78.737600,0.000000,top
R10,6.2OHMS,R_1206,110.717600,-81.387600,0.000000,top
R11,6.2OHMS,R_1206,110.717600,-78.737600,0.000000,top
R12,6.2OHMS,R_1206,106.217600,-81.387600,0.000000,top
R13,6.2OHMS,R_1206,106.217600,-78.737600,0.000000,top
R14,510OHMS,R_0603,111.217600,-72.887600,0.000000,top
R15,47KOHMS,R_0603,111.217600,-70.887600,0.000000,top
R16,4.7KOHMS,R_0603,116.917600,-49.787600,0.000000,top
R17,2.2KOHMS,R_0603,116.917600,-51.887600,0.000000,top
R18,2.2KOHMS,R_0603,128.617600,-57.187600,0.000000,top
R19,NTC THERMISTOR 47KOHMS 4050K,R_0402,114.017600,-82.587600,90.000000,top
R20,47KOHMS,R_0603,114.917600,-68.487600,0.000000,top
R21,47KOHMS,R_0603,130.217600,-76.287600,0.000000,top
R22,6.2OHMS,R_1206,121.817600,-86.687600,0.000000,top
R23,1.8KOHMS,R_0603,109.342600,-92.312600,0.000000,top
R24,6.2OHMS,R_1206,121.817600,-84.037600,0.000000,top
R25,6.2OHMS,R_1206,117.317600,-86.687600,0.000000,top
R26,6.2OHMS,R_1206,117.317600,-84.037600,0.000000,top
R27,6.2OHMS,R_1206,110.717600,-86.687600,0.000000,top
R28,6.2OHMS,R_1206,110.717600,-84.037600,0.000000,top
R29,6.2OHMS,R_1206,106.217600,-86.687600,0.000000,top
R30,6.2OHMS,R_1206,106.217600,-84.037600,0.000000,top
R31,6.2OHMS,R_1206,121.817600,-76.087600,0.000000,top
R32,6.2OHMS,R_1206,117.417600,-76.087600,0.000000,top
R33,6.2OHMS,R_1206,110.717600,-76.087600,0.000000,top
R34,6.2OHMS,R_1206,106.217600,-76.087600,0.000000,top
U1,EL3H7(B)(TA)-G,SOP-4_4.4x2.8mm_Pitch1.27mm,117.017600,-58.387600,0.0,top

Thank for this @John_Taves. I’ve been speaking on and off with @GeorgeBoudreau about the same topic.

Using an external shunt resistor and the LTC2944 looks like a good idea good for up to 60V - not sure if its suitable for measuring the inverter current though?

[https://www.analog.com/media/en/technical-documentation/data-sheets/2944fa.pdf]

You’d also need to use an external shunt - 50mOhm, something like this…
https://uk.rs-online.com/web/p/shunts/8233576/

I bumped your user account level up a notch.
You should be good to go now.

What about an MCP3423. It is a 2 Channel ADC, both with differential inputs and upto 18bit resolution. Microchip even have a application note for measuring current and use as a battery gauge. Also comes in soic form for easy diy soldering. It too uses I2C.

@stuart Why do you say it won’t be suitable for the inverter (all currents, not just the inverter, go through my existing 300A, 50mV shunt)? Are you saying the accumulator will overflow?

When I read the manual, I conclude that the the amount of charge represented by the least significant bit (qLSB) of the 16 bit counter is 102mAh, and with 16 bits, that’s over 6k ah. I have a 280ah battery.

I don’t think I set the Rsense value (my shunt resistor) in the chip. I think the ESP software will be made to hold the Rsense value and will multiply the counter by the Rsense value to get the Ah value. In other words, I think it is not counting ah (couloumbs), it is counting normalized volt-hours.

Just to be clear to others, no current is going to the LTC2944. It integrates the accumulated amps by measuring the voltage delta across an external shunt.

Don’t use the release section on GitHub. Use the files from the branch jlcpcbassembly

1 Like

The LTC2944 has a hard coded address, which means I cannot put 2 of these onto one I2C bus, which throws a monkey wrench into my goal of having 1 for the total current, and 1 for just the solar current.

Options:

  1. @stuart are the Dx pins on the wemos all the same? One option is to use D6 and D0 (kill the LED) for another SDA/SLC to connect to the solar LTC2944
  2. Maybe I don’t care about solar amp counting. Maybe just use the c_sense for measuring the voltage drop across the shunt.
  3. Maybe the best is to look for a different i2c chip that works the same, but has a different address

@Paul_C I did not fully investigate the MCP3423, but a quick look at it seems to say that it does not count. It will tell us the amps, but not accumulate that to determine SOC (amp-hours). I am assuming that making the wemos do that would be a constant load on the chip and would accumulate a lot of error.

If anyone is ordering the complete Circuit and the ATTINY is in stock please holler. I need to order 30.

I just recently got some https://www.amazon.com/YHDC-Manufacturer-HST21-200A-Current-Sensor/dp/B019SQU0EC I’m just waiting on a +/- 15v module. Is this the type of direction you were thinking of going?

I’d be happy to test any designs you may have. :slight_smile:

Hi @John_Taves

The LTC2944 looks like a good solution for the battery monitor, it does have a fixed i2c address of 0x64 but as you mention, you could have a second i2c bus on different pins.

The LTC2945 goes to 80V and also has address pins to change the i2c address.
[LTC2945 Datasheet and Product Info | Analog Devices]
This chip doesn’t do the coulomb counting but can drive interrupt pins for automatic alerts of under/over current or voltage

Somebody else messaged me to say JLC were not going to stock the ATTINY on the assembly service any longer.

Correct, an external standalone chip would be preferable, if energy counting is needed.

Aww, fish poop. Well if there’s no update to that by the time the new assembled controllers arrive I guess I’ll have to make the plunge. I bought a hot air gun/pencil for the job so maybe I’ll be okay.