Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 14-02-2020, 11:32   #46
Do… or do not
 
s/v Jedi's Avatar

Cruisers Forum Supporter

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

Quote:
Originally Posted by conachair View Post
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....
Again, the 1115 requires either voltage dividers or output isolation just like the Tiny85.

The trick is to use the cell voltage as Vcc and also as voltage reference (it’s between 2.5 and 3.6V) and then you sample the internal 1.1V reference. There is a linear relation between Vcc and that 1.1V reference so you can simply calculate the cell voltage.

The Tiny85 voltage reference is stable in relation to Vcc but not calibrated. Calibration is easy though and the value can be put as a constant in the code or stored in EEPROM.

Here is the link to the article that everyone using this trick has as reference: https://provideyourown.com/2012/secr...ttery-voltage/
__________________

s/v Jedi is offline   Reply With Quote
Old 14-02-2020, 12:23   #47
Registered User
 
hzcruiser's Avatar

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

Quote:
Originally Posted by s/v Jedi View Post
[...]

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

Yes, the INA219 can be used and measure up to 26V. This is plenty for a 12V nominal system.
However, I would not use it for a 24V bus if one might want to use 8 LFPs in series.

Their max. charge voltage is 3.65V and 3.65 V * 8 = 29.2 V.


In the past and we've also used voltage dividers and the internal reference of the Atmel chips. We then calibrated them, writing the values in the onboard EEPROM, but the results were still less reliable than the INA chips. Given the low price tag of the INAs it's now a no-brainer to put them in all the modules, even if we just want to measure voltage and not current.
__________________

__________________
Fair winds,
heinz
hzcruiser is offline   Reply With Quote
Old 14-02-2020, 13:09   #48
Registered User

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

Quote:
Originally Posted by s/v Jedi View Post
Again, the 1115 requires either voltage dividers or output isolation just like the Tiny85.
Don't understand that at all - what are you actually measuring?
You said > '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'

So why is a voltage divider needed for 2 x ads1115 monitoring voltage on 4 cells?

1 chip will monitor 2 differential measurements up to 6.114v

Or why would output isolation be needed? There's no connection between the differential inputs and ground/Vcc.


A few moments on easyeda, ads1115 chips are $1.64 each , 2 needed for 4 cells. typ 150uA >
conachair is offline   Reply With Quote
Old 14-02-2020, 13:22   #49
Do… or do not
 
s/v Jedi's Avatar

Cruisers Forum Supporter

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

I wish it was that simple. The problem is that you left some connections out, like the GND to the negative of the first cell of the battery. This has to work for a battery that is in use, so it’s main negative and positive need to be connected.

None of the analog input pins, when referenced to GND, may have a voltage higher than Vcc. This is a requirement for both single ended and differential sampling, so in your schematic that’s requirement is only met for measuring the first cell... all the other ones make puffs of smoke

Quote:
Originally Posted by conachair View Post
Don't understand that at all - what are you actually measuring?
You said > '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'

So why is a voltage divider needed for 2 x ads1115 monitoring voltage on 4 cells?

1 chip will monitor 2 differential measurements up to 6.114v

Or why would output isolation be needed? There's no connection between the differential inputs and ground/Vcc.


A few moments on easyeda, ads1115 chips are $1.64 each , 2 needed for 4 cells. typ 150uA >
s/v Jedi is offline   Reply With Quote
Old 14-02-2020, 14:30   #50
Do… or do not
 
s/v Jedi's Avatar

Cruisers Forum Supporter

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

Interesting, I have ordered these components and they are on the way.

I’m also working on a new DC switch panel design using latching relays and the INA219 looks perfect for V/A sensing. I ordered little breakout boards that come with a 100mOhm shunt for 3.2A range, that I could replace with a 10mOhm shunt for 32A.

So, you do I2C over ribbon cables hahaha

I may do that differently as my digital electronics teacher would get up from his grave to whack me I come from the land where I2C was invented and they didn’t like that at the time.
I could just run a voltage sense twisted pair and put the INA219 on the main pcb, which leaves the temperature... I feel crazy enough to put a TMP36 on the cell board and run it’s leads through the cat5 cable

Quote:
Originally Posted by hzcruiser View Post
Yes, the INA219 can be used and measure up to 26V. This is plenty for a 12V nominal system.
However, I would not use it for a 24V bus if one might want to use 8 LFPs in series.

Their max. charge voltage is 3.65V and 3.65 V * 8 = 29.2 V.


In the past and we've also used voltage dividers and the internal reference of the Atmel chips. We then calibrated them, writing the values in the onboard EEPROM, but the results were still less reliable than the INA chips. Given the low price tag of the INAs it's now a no-brainer to put them in all the modules, even if we just want to measure voltage and not current.
s/v Jedi is offline   Reply With Quote
Old 14-02-2020, 14:36   #51
Do… or do not
 
s/v Jedi's Avatar

Cruisers Forum Supporter

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

Just for fun, still checking out that OLED display. It has more than enough space, I don’t know how to fill it and it’s only 0.96” diameter.

The picture of the Waterpump is what would be on my new dc distribution panel, with just a resettable fuse, one or two push buttons and thus display, instead of the old breakers.

Heinz, what kind of latching relays do you use? You mentioned a H-bridge for control... don’t they have versions with two coils?
Attached Thumbnails
Click image for larger version

Name:	9AA68C2F-7795-4EB1-9065-3FA2F38AA541.jpg
Views:	24
Size:	426.4 KB
ID:	208725   Click image for larger version

Name:	4222F775-0B62-4F11-958C-3BFD94D07C4F.jpg
Views:	23
Size:	417.9 KB
ID:	208726  

s/v Jedi is offline   Reply With Quote
Old 14-02-2020, 15:48   #52
Registered User
 
hzcruiser's Avatar

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

Quote:
Originally Posted by s/v Jedi View Post
[...]

Heinz, what kind of latching relays do you use? You mentioned a H-bridge for control... don’t they have versions with two coils?

I'm using the AS508 or similar, datasheet (DS) is below:

https://www.dropbox.com/s/ssaz63erzw...-100A.pdf?dl=0


The contacts are beefy but nevertheless, switching high currents of 30A or more will likely degrade the contacts, hence the firmware keeps track of how many times the relay was opened and multiplies it with the current flowing at the time. That way we get an early warning if the relay might wear out prematurely. Of course, you also want to track the physical relay changes and compare them with the expected lifetime of the relay from the DS. It's usually around 10,000 operations.


The white lever allows a manual override in case everything else fails. We boaters always like a backup, don't we?


Relays with two coils exist but are less common. The H bridge driver does everything in one package without the need for a second 12V control line.
__________________
Fair winds,
heinz
hzcruiser is offline   Reply With Quote
Old 14-02-2020, 16:02   #53
Registered User

Join Date: May 2011
Location: Toronto
Boat: Sandpiper 565
Posts: 4,561
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by hzcruiser View Post
I'm using the AS508 or similar ...
The contacts are beefy but nevertheless, switching high currents of 30A or more will likely degrade the contacts, hence the firmware keeps track of how many times the relay was opened and multiplies it with the current flowing at the time. That way we get an early warning if the relay might wear out prematurely. Of course, you also want to track the physical relay changes and compare them with the expected lifetime of the relay from the DS. It's usually around 10,000 operations.
I note that it's designed as an 80 A (max) AC switching device. So you're derating it to 30A DC? It's my understanding that devices for switching DC require more robust contacts than AC-switching devices.
Lake-Effect is online now   Reply With Quote
Old 14-02-2020, 16:19   #54
Registered User

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

Quote:
Originally Posted by s/v Jedi View Post
I wish it was that simple. The problem is that you left some connections out, like the GND to the negative of the first cell of the battery. This has to work for a battery that is in use, so it’s main negative and positive need to be connected.

None of the analog input pins, when referenced to GND, may have a voltage higher than Vcc. This is a requirement for both single ended and differential sampling, so in your schematic that’s requirement is only met for measuring the first cell... all the other ones make puffs of smoke
OK, hands up, silly error on my part, should have researched more. No smoke but a few cents of non working inputs later ..... you're right, I'm wrong.

INA219 would work though, easy, very accurate and cheap
conachair is offline   Reply With Quote
Old 14-02-2020, 16:19   #55
Senior Cruiser
 
Steve_C's Avatar

Cruisers Forum Supporter

Join Date: Apr 2009
Location: Bulverde, Texas
Boat: Shopping for a Cat
Posts: 427
Re: Designing yet another BMS (yaBMS)

Absolutely DC will require higher rated contacts. AC has zero potential many times per second to help break any arcing between the contacts.
Quote:
Originally Posted by Lake-Effect View Post
I note that it's designed as an 80 A (max) AC switching device. So you're derating it to 30A DC? It's my understanding that devices for switching DC require more robust contacts than AC-switching devices.
__________________
_________________
_____________
Steve
Steve_C is offline   Reply With Quote
Old 14-02-2020, 17:49   #56
Do… or do not
 
s/v Jedi's Avatar

Cruisers Forum Supporter

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

Quote:
Originally Posted by conachair View Post
OK, hands up, silly error on my part, should have researched more. No smoke but a few cents of non working inputs later ..... you're right, I'm wrong.

INA219 would work though, easy, very accurate and cheap
This is all pretty steep and I didn’t post a single schematic yet. I know I was right here but then this Heinz guy shows up and he probably has the best solution for choice of chips (although his wiring of I2C won’t do of course ). I’m very fortunate that he decided to share his experience instead of watching me go through the same three year process he did

Compared to what I used to do this all feels like cheating. I mean, I built NAND ports with transistors and learned machine code on a 6800 cpu Eurocom thingy (with hexadecimal keypad) and Z80 on a book-like thing called the microprofessor
s/v Jedi is offline   Reply With Quote
Old 14-02-2020, 18:02   #57
Do… or do not
 
s/v Jedi's Avatar

Cruisers Forum Supporter

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

Wow Wikipedia knows about that stuff:

https://en.wikipedia.org/wiki/Micro-Professor_MPF-I

https://en.wikipedia.org/wiki/MEK6800D2
s/v Jedi is offline   Reply With Quote
Old 14-02-2020, 18:30   #58
Senior Cruiser
 
ronstory's Avatar

Cruisers Forum Supporter

Join Date: Sep 2015
Location: Portland, OR USA
Boat: C&C 35 MK-II
Posts: 336
Re: Designing yet another BMS (yaBMS)

For me it was the Elf 1802 "computer"... and of course the 6502.
__________________
Thanks,
Ron
ronstory is offline   Reply With Quote
Old 14-02-2020, 19:29   #59
Do… or do not
 
s/v Jedi's Avatar

Cruisers Forum Supporter

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

Looking at latching relays. Victron has their Cyrix lithium series versions for charge bus and load bus. 120A costs list €66/77 and 230A is €165 Blue Sea is better deal, but the Victron ones are smart about lithium and application.

For lower amperage, I found a Hella 30A DC for between $18-$25. That may be the one for the distribution panel except of-course I found the one linked by Heinz for as low as $4.-

For the 30A range it may be better to use mos fet’s instead.... like all the Chinese bms’s do
s/v Jedi is offline   Reply With Quote
Old 14-02-2020, 19:45   #60
Do… or do not
 
s/v Jedi's Avatar

Cruisers Forum Supporter

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

And then I find this: https://www.amazon.com/INTELLITEC-01...1734504&sr=8-3

I searched for “latching solenoid relay” as I believe that is what the a blue Sea Systems remote battery switches are...
__________________

s/v Jedi is offline   Reply With Quote
Reply

Tags
Arduino, BMS, lifepo4

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 08: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 05:51
yet another new guy undrsol Meets & Greets 10 06-02-2004 09:17

Advertise Here


All times are GMT -7. The time now is 12:58.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.