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 20-02-2020, 07:14   #91
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 CatNewBee View Post
Nice setup. I would go with the one wire DS18B20, you can hook them all up to a string and add more if you add cells (up to 10 in a row), they can be powered externally too, so no problem for the controller. Otherwise you will either need analog multiplexers or more A/D converters.
Yes, that, plus it’s waterproof edition are big advantages. Unfortunately it comes with some big disadvantages as well so I’ll have to do the tests.

On analog inputs: would 21 be enough? I have the Teensy 3.2 that can do about anything we can throw at it, incl. CANbus. It is a power play option that comes at $22 https://www.amazon.com/PJRC-6485230-...17313427&psc=1
s/v Jedi is offline   Reply With Quote
Old 21-02-2020, 07:35   #92
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)

Busy with other things as well but yesterday I worked on the INA219 because it’s pretty clear it is the choice for measuring cell voltage.

I used a pull down resistor on the V+ input. The reason was that it measured 1V with the input floating. I had noticed that with a 100K pull down resistor, I still had 5mV measurement with the input open. I tried a 1MOhm resistor and measured voltage went up, then a 10kOhm and measurement went down but only to 2-3mV. When connected to GND it showed 0.00V so this is how it is.

I then measured current through the pull down resistor. At 100kOhm it was 3uA.

I was pretty sick of it and decided to just remove the resistor, eliminate it completely as the input is always connected to a cell. If there are unused inputs, just jumper them to ground, but better yet, leave the INA219’s out for unused channels.

Now it’s about the temperature sensors. I’m working on physical implementation of the TMP36 sensor. It will require a small circuit board, the TMP36 and two decoupling capacitors, some heat shrink and epoxy to protect it, then a heat transfer silpad to stick it to the cell and probably some gaffer tape to cover it for extra protection.

The DS18B20 waterproof version only requires the silpad and gaffer tape. But at 700ms measurements, it takes 3 seconds of cpu time to read four sensors which is pretty bad.

The LM75 is very easy on the breadboard but I do not like the complexity of the implementation on a battery cell. It puts all kinds of restraints on the length of the wiring because of using the I2C interface.

Next question is scaling and modularity. It would be possible to take a small uC, like the Arduino Pro Mini and use that for each group of 4 battery cells. Then let each of those report over I2C to the central unit to give measurement updates for their group of cells. The only thing is that for a 4-cell setup, which would be the most common, one can do this with one uC easily. When willing to select different hardware, you can select a uC with more ports, up to a Teensy 3.2 which can easily do 16 cells for a 48V battery. Even that only costs $22 delivered from Amazon.

Still thinking about this. I feel that using a single Pro Mini for a 4-cell 12V setup is a no-brainer. What are your thoughts about this?
s/v Jedi is offline   Reply With Quote
Old 21-02-2020, 08:24   #93
Registered User
 
ronstory's Avatar

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

Regarding the 700ms time for sampling. Other than the power usage, which would be a few more milliwatts... how often are you planning on sampling? With the response time of a battery for items with a larger thermal mass, in the PC industry we often just sample and set another wake up event for 30 secs and then sample again. It saves us power.
__________________
Thanks,
Ron
ronstory is offline   Reply With Quote
Old 21-02-2020, 08:31   #94
Registered User
 
jram's Avatar

Join Date: Oct 2010
Posts: 72
Re: Designing yet another BMS (yaBMS)

Hello,


This is a good discussion with many excellent points.



I'm also in year 3 of my BMS and its working well. I went with the voltage divider and can live with the losses.
Its live (unless we are out of interweb range) and you can view the state of the bank at: https://thingspeak.com/channels/760876


I haven't spent much time documenting it but what the main features are at: https://github.com/9H5G/ESP32-Battery-Protection-System
I'll add some pictures if anyone is interested.


Also mentioned was fridge monitoring. I have implemented this (as an interim solution since I'm out cruising and the thermostat broke down). So I now have tight control and monitoring of the fridge with an ESP8266, DS18b20 and a relay. You voyeurs out there can also watch my fridge temperature on line at: https://thingspeak.com/channels/924478
jram is offline   Reply With Quote
Old 21-02-2020, 09:46   #95
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 ronstory View Post
Regarding the 700ms time for sampling. Other than the power usage, which would be a few more milliwatts... how often are you planning on sampling? With the response time of a battery for items with a larger thermal mass, in the PC industry we often just sample and set another wake up event for 30 secs and then sample again. It saves us power.
I agree, that would be fine. The problem is that this particular sensor is from Dallas Semiconductor and they gave it their own, proprietary OneWire communication bus, which is not supported by microcontrollers. This means that the communication needs to be done by software. After requesting the reading from each sensor, the cpu needs to wait for the reply, can’t go to sleep nor service other interrupt routines. If communication is hardware supported (or the on-board ADC is used), then all sensor communication can be done from routines that sleep otherwise like you describe.

Also, we already have the ADC on board the controller. It may only be 10 bits but that is way good enough for this temperature reading. It’s a bit silly to wait for a crappy slow ADC inside a sensor while not using on-board fast ADC that’s left Idle or powered down otherwise.

The sampling interval will probably vary... long interval when in safe temperature zone but more frequent towards the range boundaries.

Of-course there’s the other side of the story which is the fabrication of a usable circuit board with the TMP36. I’m hoping this is easy enough to be worth it, we’ll see.
s/v Jedi is offline   Reply With Quote
Old 21-02-2020, 10:39   #96
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 jram View Post
Hello,


This is a good discussion with many excellent points.



I'm also in year 3 of my BMS and its working well. I went with the voltage divider and can live with the losses.
Its live (unless we are out of interweb range) and you can view the state of the bank at: https://thingspeak.com/channels/760876


I haven't spent much time documenting it but what the main features are at: https://github.com/9H5G/ESP32-Battery-Protection-System
I'll add some pictures if anyone is interested.


Also mentioned was fridge monitoring. I have implemented this (as an interim solution since I'm out cruising and the thermostat broke down). So I now have tight control and monitoring of the fridge with an ESP8266, DS18b20 and a relay. You voyeurs out there can also watch my fridge temperature on line at: https://thingspeak.com/channels/924478
That’s looking good! Saw you updated on Github I like the transient protection you put in, but plan to add some MOV’s as well. I’ve lost a bunch of nmea2000 sensors already due to nearby lightning strikes.

You use MOSFET gate drivers to control the battery disconnect? I did not come up with that one yet
s/v Jedi is offline   Reply With Quote
Old 22-02-2020, 12:20   #97
Registered User
 
ronstory's Avatar

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

Quote:
Originally Posted by evm1024 View Post
Ron Story, I think I bought a Parsec 12 mount from you ages ago.
Holy cow! I missed this post. Great to hear from you and that was/is a heck of a mount.
__________________
Thanks,
Ron
ronstory is offline   Reply With Quote
Old 22-02-2020, 15:34   #98
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)

Update: today I studied power saving, the Atmel interrupt support etc. I decided to use the DS3231SN real time clock chip to add to this BMS. It allows to set the alarm, after which the BMS can go to sleep in power off sleep mode. The RTC will trigger a hardware interrupt to wake us up when it’s time to check cell voltages and temperatures again.

A second function is time and date stamping for event that trigger a charge- or discharge disconnect event. I intend to write these to EEPROM so they can be read back from the display.

A second source of hardware interrupt is going to be a little momentary push button to wake the system incl. display up. The display will be powered down normally. I must still test power draw from the INA219 and TMP36 chips but will probably power them all down during sleep periods. The only power draw will be the RTC and the interrupt controller inside the uC

I also ordered conformal coatings, adhesive silpads and extra sensors to make a “real” 1P4S system of LiFePO4 cells + BMS. I already have a Blue Sea Systems remote battery switch at hand to test the switching. I’ll try MOSFET and relay control to come to a decision on which way to go. I think most go solid state but we have had requests for potential free contacts earlier in the thread and I always like those as well
s/v Jedi is offline   Reply With Quote
Old 22-02-2020, 16:09   #99
Marine Service Provider

Join Date: May 2011
Location: Cruising Mexico Currently
Boat: Gulfstar 50
Posts: 1,979
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by ronstory View Post
Holy cow! I missed this post. Great to hear from you and that was/is a heck of a mount.
Yes, it was. I used it for years (that and a G-11) and got a few photos taken with my Schmidt camera published.

I sold it last year to another astrophotographer.

Back to the BMS thread...
evm1024 is offline   Reply With Quote
Old 23-02-2020, 15:02   #100
Registered User

Join Date: Feb 2015
Posts: 1,227
Images: 1
Re: Designing yet another BMS (yaBMS)

No discussion about pre charge and contactor inrush with capacitive loads. All the high end BMSes do precharge because they have experienced contactor welding. All it takes is an inverter with a lot of input filtering.

Thoughts?
__________________
www.MVTanglewood.com
tanglewood is offline   Reply With Quote
Old 23-02-2020, 15:11   #101
Registered User
 
CatNewBee's Avatar

Join Date: Aug 2017
Boat: Lagoon 400S2
Posts: 3,755
Images: 3
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by tanglewood View Post
No discussion about pre charge and contactor inrush with capacitive loads. All the high end BMSes do precharge because they have experienced contactor welding. All it takes is an inverter with a lot of input filtering.

Thoughts?
Not have pre charge, nor do I need one. Control the inverter by signals instead of hard disconnect. Beefy solenoids like the bluesea ml-rbs can handle this...
__________________
Lagoon 400S2 refit for cruising: LiFeYPO4, solar and electric galley...
CatNewBee is offline   Reply With Quote
Old 23-02-2020, 15:17   #102
Registered User

Join Date: Sep 2015
Posts: 445
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by CatNewBee View Post
Not have pre charge, nor do I need one. Control the inverter by signals instead of hard disconnect. Beefy solenoids like the bluesea ml-rbs can handle this...
How can you control the inverter by signals if it's not powered up yet?

It's the powering it up where the problem lies.

Switching 12V is much easier than switching higher voltages. The costs go up exponentially, and thus protecting the relays becomes more important. My relays cost more than most BMSes.
nebster is offline   Reply With Quote
Old 23-02-2020, 15:36   #103
Registered User

Join Date: Feb 2015
Posts: 1,227
Images: 1
Re: Designing yet another BMS (yaBMS)

Quote:
Originally Posted by nebster View Post
How can you control the inverter by signals if it's not powered up yet?



It's the powering it up where the problem lies.



Switching 12V is much easier than switching higher voltages. The costs go up exponentially, and thus protecting the relays becomes more important. My relays cost more than most BMSes.


Right. It’s about contactor close, not open. If you read the data sheets from contactor manufacturers like GigaVac and TE, all describe the need to do pre-charge.
__________________
www.MVTanglewood.com
tanglewood is offline   Reply With Quote
Old 23-02-2020, 15:43   #104
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)

(Everything is in the attached picture)

Today I hacked together a 600mAh 1P4S LiFePO4 battery with balancing leads and 12V output lead.

Next I put 4 INA219’s and an OLED display on the breadboard and wired it up. Next I created the code to read the cell voltages.

The math was suspiciously simple:

cell0 = reading0 (3.2)
cell1 = reading1 - reading0 (6.4 - 3.2 = 3.2)
cell2 = reading2 - reading1 (9.6 - 6.4 = 3.2)
cell3 = reading3 - reading2 (12.8 - 9.6 = 3.2)

Next step is temperature, which is an unexpected problem: my sensors are gonna be bigger than these 600mAh cells Ah well. I’ll find a way

I received the sticky silpads as well as thick formula conformal coating so this is gonna be fun making a mess...
Attached Thumbnails
Click image for larger version

Name:	E0412C71-3BE0-4907-B0C1-D404C806774F.jpeg
Views:	85
Size:	338.4 KB
ID:	209307  
s/v Jedi is offline   Reply With Quote
Old 23-02-2020, 18:23   #105
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 have been playing with the Blue Sea Systems remote battery switch. Man that thing jumps up from the table when energized!

I am now sure this is a latching solenoid like I posted earlier in the thread. The up/down movement of the shaft is telling. The coil uses more than 5A, docs say up to 7 amp.

The LED signaling the state of the solenoid works great. Now working on how to drive it from the Arduino
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 10:39.


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.