DIYBMS v4 Shunt Design and discussion

I did mention it was a prototype, seeing if it’s the right way to go, you don’t have to use the bolt holes and as there are so many different shunt sizes it probably doesn’t make sense. But anything which helps physical mounting of the pcb is good in my book.

The controller ground is connected to whatever is on the end of the usb port.

However all the modules are using their own virtual ground, all at different voltages. If you take a voltage reading from the negative on one module to negative on another module you will get a voltage difference.

From the controller or a cell. I am no expert, but does it really matter if one cell is powering 2 modules?

Right, this was in response to the posting that was saying that the negative of the battery is at a different voltage than the negative that is used by the equipment, including the controller, when using a low side shunt. I was arguing that that 2 negatives seemed like a poor argument for the benefits of a low side shunt.

My thinking was that a low side shunt was a benefit because the shunt reader is dealing with 50mV above ground and thus there are a lot of counters to consider, where-as the 2944 was the only > 48v that we found.

1 Like

Do we have any solid reason to believe the accuracy is needed? When I started thinking about this a week or so ago, I would agree. But now I’ve changed my mind. At least in my use case, the SOC counter will be reset almost every day because I have solar. I couldn’t care less if it reads 5% when the loads are shut off, vs .0001%. I am looking for more sun, or shutting off loads, or turning on a charger when I am near 15%.

Even if this is for an E-bike am I going to rely on the SOC to be so good that I’ll take the bike out for a ride when it reads 5% and be disappointed that it shuts off quickly?

1 Like

Hi @John_Taves, @stuart
The LTC2944 is almost perfect from a feature point of view. The down side is the chip is not DIY solder friendly… a 3mm DFN with exposed pad would put hand soldering beyond the reach of most. However, look in AliExpress for LTC2944 and you will find small evaluation boards that could be repurposed.

The other downside is there is no easy way to run the chip with galvanic isolation, opto isolated I2C control. Mixing grounds, battery and the controller can give odd problems.

The LTC2045 has fewer features but does support isolation and can be had with small flat pack that is hand solderable.

Why not remove one of the 4 banks, and dedicate it to shunts. Therefore 3 banks of 16 cells and then bank 4 is for current.

Or keep it as is, but allow the controller to specify which module is a current module and it then reads the values as current not voltage, therefore using the same data as a cell module

Its a bit of a fiddle though isn’t it - I’d also be removing a bank people may already be using - its quite common to have 4 banks.

This shouldn’t matter as i pointed out, whatever chip or chips on the shunt module used to measure the soc would keep adding to the cumulative tally, the data would then be read on the next poll. SOC will not charge dramatically in 3-4 seconds.

All I’ve moved over 100 posts into this new thread, looks like a couple of them have got mixed up on the sequence/time, but its the best I can do!

1 Like

Here’s some more doodlings. Replaced the bolt holes with slots to accommodate lots more shunt types.

Read through the Murata data sheets - didn’t know there was a correct way to mount a shunt (horizontal) so the shunt blades have vertical air flow.

1 Like

Mu setup was to have 5 banks so a second controller was to be used.

Are we going to have to replace the controller board if we go down the route of I2C, CAN, RS485?

Probably yes. The existing design is limited (by the ESP8266) on the number of pins it has for interfaces. I think I can make it work with the existing ESP8266 devices so it would just be a controller PCB swap.

I’ll likely try and get a batch made and sell them via the forums shop so its easier for you folks.

1 Like

If it works then i dont see a problem. But it seems a bit of a waste of the boards we already have. I have 5 as that was the minimum order, i dare say most others are the same.

However if we are to go down this route, would it not be a wise idea to maybe look into the esp32 to further future proof.

Also maybe the boards we already have could possibly be used as an expansion board, i.e. more banks of cells and pass the data to the esp32?

Again my head is buzzing with the possibilities

I was an idiot. I was forgetting that the ADC on the ATTINY is not going to able to measure < 50mV. It’s not a matter of accuracy, so much as the dynamic range of the delta it is capable of measuring.

My bad. I deleted those posts.

However, I still think that it would make sense to put this circuit onto the module board. It is doubtful that jclpcb has any of these chips to surface mount, so most likely we buy one or two of these and add it to one or 2 modules. There are a lot of single cell Coulomb accumulation chips that I ignored because they didn’t handle large voltages. We only need 1 cell of volts if it is mounted high side and any will work low side.

As I was writing this, snail mail spam arrived with an ad for this: Smart Current Sensor SSA - Riedon How ridiculously timely. This shunt will amplify the differential voltage signal and isolate that. It should deliver 1.2v @ 250A (for the 250A shunt), if I am reading this correctly.

@stuart Can’t this be sent into the unused ADC on the ATTINY? And wouldn’t that be enough range to get decent accuracy?

Is there any reason the ATTINY does not have enough CPU cycles to poll this and accumulate and deliver it to the controller on demand?

Will it be a problem to add this data to the communication protocol to the controller?

I suck at circuit design, but I can write software.

Um

@John_Taves.
This is a nice system… but… For 250A shunt $70 shunt + $11base + $11 custom cable + shipping. $92+ and you still need a differential to single-ended opamp on a PCB to feed the ATTiny. If Stuart reworked the original ESPcontroller the opamp could be placed there. But you are back to have 4 unused controllers.

Damn, good point. I didn’t look at the datasheet in detail, I assumed it would provide a single ended output. My hope was that I could use this with an existing module (cell module, not the controller). My hope was that I could use this and implement the software to accumulate the amps in the ATTINY on the cell module and transmit that the the controller.

Are you understanding the idea that the cell module (not the controller) can be modified to collect the current sums?

I feel like Stuart and you have not really evaluated that concept.

For the shunt, I am hoping to build a device which would be generic enough that others could use it without DIYBMS - for instance by using modbus or CAN bus protocols to comply with off the shelf standards.

The existing code on the modules and the comms protocol it uses isn’t designed to carry additional payloads like shunt readings without modification. I’m sure it can be changed, but then you are also asking every user to re-flash the module code (and some are running with 30+ modules!).

It also doesn’t solve the isolation issue unless you run a seperate power supply from the battery cells. Just connecting a new shunt module to an existing cell will add extra drain on that cell and start an imbalance.

Using an ATTINY to calculate the current/power and SOC is perfectly doable, but I don’t have the time to spend working out the calculations and writing the code when a perfectly good custom chip is available to do it.

I would also want to measure the total pack voltage to compare that with the voltage the modules are returning, this then allows additional rules to be written to spot errors or potential issues.

I’m more than happy for others to build add on modules for DIYBMS (in the spirit of open source etc.) and write the code to support them - I’d be grateful for the GITHUB submissions!

At the present time, my thoughts are still to build a standalone current shunt, with isolation, voltage and current monitoring, hopefully SOC calculations and an industry standard comms format.

Whilst I appreciate this won’t fulfill everyones design goals, I still think its the best way forward for a DIY product.

I expect this will also need a new controller circuit board. I’ll look into purchasing some stock for the forum to save people having to order 5+ when they only need 1.

2 Likes

Good idea. Maybe it would be even better if there could be several people who have boards “for sale” in different regions (EU, USA, RU, etc.). For me. for example, it would not be a problem to have some boards “in stock” ready for delivery within Germany.

Why not let others do this as a business? They could solder the jst connectors, load the software, and test it.

Also, why not put the controller circuit on every module? Only one would be used, of course, but so what if there’s a few unused IC’s on each module?