Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Engineering & Systems > Lithium Power Systems
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 13-02-2020, 18:50   #31
always in motion is the future
 
s/v Jedi's Avatar

Cruisers Forum Supporter

Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,001
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by Lake-Effect View Post
I appreciate your patience and sharing your reasoning.

So how will these individual chips, each on a different cell so no common reference voltage, communicate with the mothership/main processor, whatever that is?
I had not done the math yet so I appreciate those questions as it makes me look at choices critically and run the calculations to get the details on the table

As the ground of each of the Tiny85’s is at a different potential, the output of data must be isolated by using opto-couplers or specialized isolators (which are often transformers). I will attempt to create an I2C bus, with all the Tiny85’s as slaves, sleeping until the central controller (the master) calls for data, wake up, do the measurement, report data to the master and go back to sleep.

The problem is that the Tiny85 does not have a an I2C port so it has to be done in software, which is available.
s/v Jedi is offline   Reply With Quote
Old 13-02-2020, 19:03   #32
always in motion is the future
 
s/v Jedi's Avatar

Cruisers Forum Supporter

Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,001
Re: Designing yet another BMS (yaBMS)

I’m not balancing with the BMS. During the build of the pack, I would bottom-balance them, which should keep them balanced for years. If balancing afterwards, I would plug in one of the $10 active balancers that charge the lowest cell from the highest cell. I may even help a bit by top balancing using a bench power supply on the low cells.

Over voltage: the thing is that we want to not charge to 100% all the time. We would stop charging at 80% to extend life. This can only be done by counting Ah so I plan to use a Victron battery monitor for that.

All this BMS will do is protect the expensive LiFePO4 cells and attempt to extend lifespan by smart control of chargers and discharge loads.

A complete power management system as you describe is not what I’m making. But using multiple of these BMS’es must be possible as I will have at least two house banks.

Quote:
Originally Posted by boat_alexandra View Post
How are you achieving balancing? The best way to use a switching transformer from all 4 cells which charges just the lowest cell. I found a bms that did it this way already a low price.

As for over voltage... normally the solar charge controller takes care of this, so it's not an issue for limiting battery life in normal use but a protection in case of some other fault like the solar controller breaks.


I would also like to see a bms which has multiple connections.

Using a central inductor with many of switches, energy transfer from solar or turbines to charge batteries of various voltages, or just supply 12 volts. The batteries connected could be programmed for different profiles and depending on their calculated efficiency this could be automatically optimized.

The biggest problems with all of this is you need lots of switches, and solenoids are bad because they have contact resistance and also take energy to power and are physically huge.

a particular scenario: ie I have 2 batteries, 40 amps max. Also have 2 solar inputs, and power 2 loads (later programmed for different cutoff voltages) and these loads are 20amp and 5 amp.

To dynamically generate the schematic needed based on this information, and automatically place the components on the pcb based on a simple algorithm. This pcb then is automatically assembled, possible?
s/v Jedi is offline   Reply With Quote
Old 13-02-2020, 22:37   #33
always in motion is the future
 
s/v Jedi's Avatar

Cruisers Forum Supporter

Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,001
Re: Designing yet another BMS (yaBMS)

I think this OLED display will do (text just mock-up to get a feel for size) It costs $5
Attached Thumbnails
Click image for larger version

Name:	79B99F04-9AF0-46DE-B790-1F7142DB2DFD.jpeg
Views:	82
Size:	99.6 KB
ID:	208668  
s/v Jedi is offline   Reply With Quote
Old 13-02-2020, 23:44   #34
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by s/v Jedi View Post
I had not done the math yet so I appreciate those questions as it makes me look at choices critically and run the calculations to get the details on the table

As the ground of each of the Tiny85’s is at a different potential, the output of data must be isolated by using opto-couplers or specialized isolators (which are often transformers). I will attempt to create an I2C bus, with all the Tiny85’s as slaves, sleeping until the central controller (the master) calls for data, wake up, do the measurement, report data to the master and go back to sleep.

The problem is that the Tiny85 does not have a an I2C port so it has to be done in software, which is available.
All seems so much more complex than it needs to be....
Why not just have a jlcpcb board with several Ads1115 measuring the cell voltages differential then send the data to an esp8266 or 32. No resister networks needed, extremely accurate and simple to imi.pliment.
And have a ds18b20 bus on the board to get a thermometer on each cell. Might as well add a Bme280 for pressure while your at it. Then sent it where you want from the esp, WiFi future proofed, write a web page for the esp to publish either on a network it creates or a local WiFi network. Send over usb. Or fast straight to an influxdb database on networked machine, I've had no probs sending ads metrics @ 100Hz UDP watching YouTube on the same network. All cheaper, tidier and way simpler to program.
conachair is offline   Reply With Quote
Old 14-02-2020, 00:41   #35
Registered User
 
hzcruiser's Avatar

Join Date: Aug 2008
Location: Sydney, Australia
Boat: Roberts 45
Posts: 1,037
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by s/v Jedi View Post
So I decided to design a BMS specifically for a sailboat house bank. It will not try to balance (plug in a balancer for that if ever needed) but is smart on protection measures (shut down charging sources or discharging loads and only disconnect the battery if that shutdown fails or is not enough). Another advanced feature will be a storage mode (where it disconnects from the bus except when it needs a bit of charge.

Very interesting project, indeed.



Quote:
The difficulty is measuring cell voltages safely, without discharging cells too much or, even worse, disturbing the balance of the cells.
A simple board could look like this:


Click image for larger version

Name:	<a title=Screen Shot 2020-02-14 at 9.11.48 am.png Views: 151 Size: 84.3 KB ID: 208670" style="margin: 2px" />


Just measuring the voltage with an INA219 and temp with an LM75, sending it back via I2C referenced to the battery controller (BC). I can send you a couple of those boards, if you want.



Quote:
I’ll throw in my initial ideas:


- a small PCB for each cell (or group of parallel cells) which connects to both terminals of the cell. The only components are a temperature sensor and an Ethernet socket for the cable to the main PCB.
Done. Only thing is that RJ45 (and even RJ11) are huge connectors, given the PCB above is only 25x11mm or 1x7/16 ".



For the interface I'm using a TE 215570-4 as in:
https://www.te.com/usa-en/product-215570-4.html


with a short 4 wire flat flex line back to the BC. It can be powered off if not needed, but the standby currents of those two sensors are a few uA only.



Quote:
- outputs & inputs (input to check switch position) for Blue Sea Systems ML series 500A remote battery switches. Support for separate charge and discharge busses.
Those contactors are very beefy but also fairly expensive.

If the current really ever gets above, say, 50A per battery there are alternatives: My suggestion has always been to use smaller LFPs and latching relays controlled by an H bridge driver chip like the L9110.

The price of the LFPs is pretty linear with their capacity: e.g. 8 sets of 4 LFPs with, say, 70Ah capacity would make up a house bank of 560 Ah @ 12V nominal and one can disconnect, rest and test each batt individually and automatically every month or two.

At the same time, those 8 batts can readily deliver 400A @ 12V through those relays. Better yet, I placed a few of them right next to the 1200W inverter, a few more in the wheel house for lights, radio and navigation and in the forepeak to run the windlass: this keeps the high current cables very short yet the 12V bus can recharge each of them 24x7.



Quote:
This should be easy to implement [...]
That's what I thought when I started the development 3 years ago
__________________
Fair winds,
heinz

https://www.timantra.net
hzcruiser is offline   Reply With Quote
Old 14-02-2020, 04:33   #36
Registered User

Join Date: May 2011
Location: Lake Ont
Posts: 8,548
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by conachair View Post
All seems so much more complex than it needs to be....
Why not just have a jlcpcb board with several Ads1115 measuring the cell voltages differential then send the data to an esp8266 or 32. No resister networks needed, extremely accurate and simple to imi.pliment.
And have a ds18b20 bus on the board to get a thermometer on each cell. Might as well add a Bme280 for pressure while your at it. Then sent it where you want from the esp, WiFi future proofed, write a web page for the esp to publish either on a network it creates or a local WiFi network. Send over usb. Or fast straight to an influxdb database on networked machine, I've had no probs sending ads metrics @ 100Hz UDP watching YouTube on the same network. All cheaper, tidier and way simpler to program.
I'm a big fan of the ESPs too. When you have a hammer, everything looks like a nail Wifi for slow data is sorta like a multi-lane highway to bring home the groceries occasionally, but it's so damn easy these days... it does raise the possibility of a nifty wireless one-board-per-battery solution.
Lake-Effect is offline   Reply With Quote
Old 14-02-2020, 07:51   #37
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by Lake-Effect View Post
... it does raise the possibility of a nifty wireless one-board-per-battery solution.
Or one ESP apparently can have 2 I2C buses, so ads1115's with 4 possible address - so with differential measuring that's 16 channels with 8 sensor boards talking to 1 ESP. Just one ground voltage, power to the sensors from the ESP so no worry about doing any discharge from the cells. The esp32 also has a can port , though I don't know anything about that rich folks N2K so no idea if it could talk to a N2K bus.
https://docs.espressif.com/projects/...erals/can.html
conachair is offline   Reply With Quote
Old 14-02-2020, 07:54   #38
always in motion is the future
 
s/v Jedi's Avatar

Cruisers Forum Supporter

Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,001
Re: Designing yet another BMS (yaBMS)

So how does the ads1115 send the measured voltage to the esp? And how does the ads1115 measure the temperature? It seems that your solution requires -more-, not less components and is more complex than mine, where all I have per cell is a Tiny85, a thermistor and an optocoupler or isolator.

I think you mixed up my idea with that of others in the thread. I am not going to use resistor dividers and will use differential measurements like you describe... but I’ll use the 10-bit ADC that is inside the Tiny85 instead of extra chips. Same for temperature, eliminating as much as possible

On wifi: I can do wifi, or Bluetooth or nmea2000. But I can also let my a Victron BMV do that for me, or my nmea to Ethernet gateway... or my nmea to wifi gateway. There are so many ways to do something and my choice is to do it as simplistic as possible while making sure I get the best accuracy, efficiency, stability and longevity possible

Quote:
Originally Posted by conachair View Post
All seems so much more complex than it needs to be....
Why not just have a jlcpcb board with several Ads1115 measuring the cell voltages differential then send the data to an esp8266 or 32. No resister networks needed, extremely accurate and simple to imi.pliment.
And have a ds18b20 bus on the board to get a thermometer on each cell. Might as well add a Bme280 for pressure while your at it. Then sent it where you want from the esp, WiFi future proofed, write a web page for the esp to publish either on a network it creates or a local WiFi network. Send over usb. Or fast straight to an influxdb database on networked machine, I've had no probs sending ads metrics @ 100Hz UDP watching YouTube on the same network. All cheaper, tidier and way simpler to program.
s/v Jedi is offline   Reply With Quote
Old 14-02-2020, 08:43   #39
Registered User

Join Date: May 2011
Location: Lake Ont
Posts: 8,548
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by s/v Jedi View Post
So how does the ads1115 send the measured voltage to the esp? And how does the ads1115 measure the temperature? It seems that your solution requires -more-, not less components and is more complex than mine, where all I have per cell is a Tiny85, a thermistor and an optocoupler or isolator.
(I'm just enjoying the mental challenge, this is not an earnest attempt to derail your current concept, which has a lot of merit )

Two ASD1115 chips (boards) would monitor up to 8 cells. Both could be on the same I2C bus.You can have one DS18B20 per cell for temp measurement, and again they can share a bus [corrected this part]

Yes you'd be back into divider territory. Let's add something like 2 quad open-drain ICs to unload dividers when not needed. (This is definitely the most inelegant part of this idea, and perhaps its Achilles' heel as you've already concluded)

One potential weakness I see in the ATTiny approach is isolator device - the I2C data line needs to be bidirectional, so an optocoupler is out, and I think I2C data has a serious DC component which would rule out transformers... you could go for a simpler and slower way of transferring data, with a polling input to each of the tinys, but now you need two level shifters or isolators per tiny.

Chip counts per battery (assuming 6 cells for a nominally 12v battery?):

ATTiny85 way:
  • 6x ATTiny85
  • 6x temp sensor
  • 6x isolator
  • plus master controller, plus any extra components to interface with 6 isolators

ADS1115 way:
  • 2x ADS1115
  • 6x DS18B20
  • 2x quad (or 1 hex) open-drain buffer IC (divider enabling)
  • up to 12 divider resistors
  • 1 master controller (eg ESP)
Lake-Effect is offline   Reply With Quote
Old 14-02-2020, 09:09   #40
Registered User

Join Date: May 2011
Location: Lake Ont
Posts: 8,548
Re: Designing yet another BMS (yaBMS)

Huh. Ok, there is an elegant I2C isolation chip available.
http://www.ti.com/lit/ds/symlink/iso1541.pdf


Will wonders never cease...
Lake-Effect is offline   Reply With Quote
Old 14-02-2020, 09:17   #41
Registered User
 
hzcruiser's Avatar

Join Date: Aug 2008
Location: Sydney, Australia
Boat: Roberts 45
Posts: 1,037
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by Lake-Effect View Post
Huh. Ok, there is an elegant I2C isolation chip available.
http://www.ti.com/lit/ds/symlink/iso1541.pdf

I looked at that, too. At >$4 per chip not a cheap solution though, if you need one per battery of 4 LFPs (or 8 LFPs in a 24V nominal system).
__________________
Fair winds,
heinz

https://www.timantra.net
hzcruiser is offline   Reply With Quote
Old 14-02-2020, 09:55   #42
always in motion is the future
 
s/v Jedi's Avatar

Cruisers Forum Supporter

Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,001
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by Lake-Effect View Post
Huh. Ok, there is an elegant I2C isolation chip available.
http://www.ti.com/lit/ds/symlink/iso1541.pdf


Will wonders never cease...
Indeed, and here is the transformer based one I was hinting at... chip scale transformer technology from Analog Devices
Attached Thumbnails
Click image for larger version

Name:	BC1D6544-0C97-42F8-AE3A-CB011535BD63.jpg
Views:	75
Size:	424.1 KB
ID:	208694  
s/v Jedi is offline   Reply With Quote
Old 14-02-2020, 10:00   #43
always in motion is the future
 
s/v Jedi's Avatar

Cruisers Forum Supporter

Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,001
Re: Designing yet another BMS (yaBMS)

Welcome to this thread Heinz, I had already recognized your electronics background in other threads and was hoping you would turn up here

I’m gonna study the chips you used before commenting. You measure cell positive to battery negative without voltage dividers?

Quote:
Originally Posted by hzcruiser View Post
Very interesting project, indeed.




A simple board could look like this:


Attachment 208670


Just measuring the voltage with an INA219 and temp with an LM75, sending it back via I2C referenced to the battery controller (BC). I can send you a couple of those boards, if you want.




Done. Only thing is that RJ45 (and even RJ11) are huge connectors, given the PCB above is only 25x11mm or 1x7/16 ".



For the interface I'm using a TE 215570-4 as in:
https://www.te.com/usa-en/product-215570-4.html


with a short 4 wire flat flex line back to the BC. It can be powered off if not needed, but the standby currents of those two sensors are a few uA only.




Those contactors are very beefy but also fairly expensive.

If the current really ever gets above, say, 50A per battery there are alternatives: My suggestion has always been to use smaller LFPs and latching relays controlled by an H bridge driver chip like the L9110.

The price of the LFPs is pretty linear with their capacity: e.g. 8 sets of 4 LFPs with, say, 70Ah capacity would make up a house bank of 560 Ah @ 12V nominal and one can disconnect, rest and test each batt individually and automatically every month or two.

At the same time, those 8 batts can readily deliver 400A @ 12V through those relays. Better yet, I placed a few of them right next to the 1200W inverter, a few more in the wheel house for lights, radio and navigation and in the forepeak to run the windlass: this keeps the high current cables very short yet the 12V bus can recharge each of them 24x7.




That's what I thought when I started the development 3 years ago
s/v Jedi is offline   Reply With Quote
Old 14-02-2020, 10:19   #44
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by s/v Jedi View Post
So how does the ads1115 send the measured voltage to the esp? And how does the ads1115 measure the temperature? It seems that your solution requires -more-, not less components and is more complex than mine, where all I have per cell is a Tiny85, a thermistor and an optocoupler or isolator.

I think you mixed up my idea with that of others in the thread. I am not going to use resistor
2 x Ads1115 will send 4 channels 15bit over i2c, ds18b20 thermometers are ahead of thermisters, one wire bus, they will get power down the data line so just 2 wires. That's it, no opto isolators to bother about,no earth loops. Simple programming. For 4 cells, 6 components and a master ucontroller. No worry of disturbing cells.
What battery chemistry? Assuming Lifepo4 with the mention of cell balancing - then an Ads1115 should be fine without any resister network, will measure up to 6v.
Won't you tiny85 need something to step the voltage down if using the internal 1.1v (which Google hints isn't all that stable with changing Vcc)? Then need to calibrate every one in software to get the accuracy
Seems like you want to use a microcontroller tiny85 and force it to be a sensor when sensors are available, more accurate,cheaper, easier to program....
conachair is offline   Reply With Quote
Old 14-02-2020, 10:23   #45
always in motion is the future
 
s/v Jedi's Avatar

Cruisers Forum Supporter

Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,001
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by Lake-Effect View Post
(I'm just enjoying the mental challenge, this is not an earnest attempt to derail your current concept, which has a lot of merit )

Two ASD1115 chips (boards) would monitor up to 8 cells. Both could be on the same I2C bus.You can have one DS18B20 per cell for temp measurement, and again they can share a bus [corrected this part]

Yes you'd be back into divider territory. Let's add something like 2 quad open-drain ICs to unload dividers when not needed. (This is definitely the most inelegant part of this idea, and perhaps its Achilles' heel as you've already concluded)

One potential weakness I see in the ATTiny approach is isolator device - the I2C data line needs to be bidirectional, so an optocoupler is out, and I think I2C data has a serious DC component which would rule out transformers... you could go for a simpler and slower way of transferring data, with a polling input to each of the tinys, but now you need two level shifters or isolators per tiny.

Chip counts per battery (assuming 6 cells for a nominally 12v battery?):

ATTiny85 way:
  • 6x ATTiny85
  • 6x temp sensor
  • 6x isolator
  • plus master controller, plus any extra components to interface with 6 isolators

ADS1115 way:
  • 2x ADS1115
  • 6x DS18B20
  • 2x quad (or 1 hex) open-drain buffer IC (divider enabling)
  • up to 12 divider resistors
  • 1 master controller (eg ESP)
I have a bunch of ads1115’s so let me share my reasoning on not using them here:

Measured voltages must be between Vcc and ground potential. This means you can only measure up to 5V. Now you must choose: use voltage dividers or use one chip per cell. With one chip per cell, your I2C must be isolated again. You get the exact same dilemmas at 16-bit instead of 10-bit resolution. I bought these a week ago and paid $12 for 3 so $4 each which is double the price of the Tiny85.

p.s. for a 12V battery, only 4 cells are needed as they are 3.2V nominal and range between 2.5 and 3.6V empty to full
s/v Jedi is offline   Reply With Quote
Reply

Tags
Arduino, BMS, lifepo4


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modern Yet Cheap - Bluewater Worthy Yet Fast ? kman07 Dollars & Cents 21 31-05-2019 10:10
Yet another LFP and BMS build tanglewood Lithium Power Systems 0 19-11-2018 07:40
LiFe(Y)PO4 BMS Dessign - good reading for DIY BMS developers CatNewBee Lithium Power Systems 10 20-09-2018 00:15
yet another cyclone Alan Wheeler General Sailing Forum 3 04-03-2005 04:51
yet another new guy undrsol Meets & Greets 10 06-02-2004 08:17

Advertise Here


All times are GMT -7. The time now is 22:06.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.