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 Rating: Thread Rating: 39 votes, 4.85 average. Display Modes
Old 19-06-2013, 16:20   #2746
Registered User

Join Date: Jul 2011
Location: Australia Mannum South Australia
Posts: 644
Re: LiFePO4 Batteries: Discussion Thread for Those Using Them as House Banks

That certainly sounds good if you can get it all to work like you plan. a better alarm port set up would be needed, , maybe a 9 pin din plug and matching mate wiring adapter to the 4 relay board, the flimsy wiring for the junsi alarm port plug has always been one of it's biggest weaknesses.
How big would the package be? Could the display also be remote?

T1 Terry
T1 Terry is offline   Reply With Quote
Old 19-06-2013, 18:25   #2747
Registered User
 
ebaugh's Avatar

Join Date: Dec 2011
Location: On the boat
Boat: DeFever 44
Posts: 292
Quote:
Originally Posted by roetter View Post

Frank

I contacted Junsi with regards to changing the software such that one can set a hysteresis for the alarm port. That way you would not need latching relays or any other complication to use the Junsi alarm port for driving the LVC and HVC. However, Junsi said the software development for the CellLog is finished. He also declined to let me have the source code and instructions on how to download the change code to the Junsi CellLog. I understand his position for his company. But I thought I would ask.

I opened a Junsi and found it to use an ATMega micro controller. I have just recently started to play with the Arduino micro controller development kit. It uses the same micro controller. I have already run a test reading the cell voltages with the Arduino and it works fine. I have ordered several different LCD displays to test as well. They should arrive later this week.

For the problem with the small numbers to read and some missing function in the JunsiI am going down this way now.

This is what I plan to do.
- Assemble and Arduino micro controller with a large LCD display either 2 lines 16 character, 4 lines 20 characters or a 3.2 inch graphic screen. These are much larger than the Junsi small display.
- write the code such that it will display voltages of 4 cells, pack voltage, min and max voltage as well as voltage difference.
- the code will raise separate alarms on low and high voltage. the alarms can drive the relay boards
- the hysteresis (voltages at which the alarms will cancel) can be set. I will also put in the option of a timed delay for the alarm.

There will also be an option to record measurements onto a SD card, which will give several GB of data and can be easily taken out for analysis on the computer.
I've done some of this, and am in the middle of testing. I used a commercial programmable logic computer (PLC), instead of an Arduino, since I could program in my ancient, but familiar BASIC. I don't have an LCD display, but the PLC has an Ethernet port, so the UI works via a web browser. So you can use any Apple I thing, a PC, or a Android device as the display. And the same device can configure the parameters.

The PLC talks via RS485 to a 16 bit ADC voltage monitor for the cell voltages, and to a relay controller to switch things around. Each relay has a separate time to trigger and user selectable voltage settings. It also can switch based on bank or alternator temperature. Perhaps, I'm hopeful, this should be a bit more robust since all the hardware is designed for industrial automation.

Not as inexpensive as an Arduino, the PLC is $150, the relay box about $30, the 8 channel 16 bit ADC about $100. But the code supports up to 80 cells, 2 banks of LFP, and 10 user relays with customizable trigger parameters. That much is pretty well developed. I'm adding a routine to do the initial and, as needed a maintenance balance. Plus an amp hour counter and SOC tracking for 1-2 banks.

I don't have the space on the base PLC to store detailed history, but it could be done for another $50-60 in hardware, just not sure for an ordinary install how useful it would be.

Hopefully this product may make adopting LFP easier. I can specify the hardware, I just bought the pieces, if someone want's to write their own application. But I'm not planning at the moment to make the software open source.

I attached a screen print of the development level "bank" display.

Bob
ebaugh is offline   Reply With Quote
Old 19-06-2013, 18:47   #2748
Nearly an old salt
 
goboatingnow's Avatar

Join Date: Jun 2009
Location: Lefkas Marina ,Greece
Boat: Bavaria 36
Posts: 22,801
Images: 3
Re: LiFePO4 Batteries: Discussion Thread for Those Using Them as House Banks

if I get a chance I might hack up your original idea on an ardunio and put the code up on GitHub, ( however at the moment all my projects are 'pushed' on the hobby stack and very little seems to get "poped" off

I want to play with these 4D Systems | Turning Technology into Art anyway as they have a nice set of predefined gauges and barographs, saves writing all these graphics primitives


dave
__________________
Interested in smart boat technology, networking and all things tech
goboatingnow is offline   Reply With Quote
Old 19-06-2013, 19:00   #2749
Registered User
 
ebaugh's Avatar

Join Date: Dec 2011
Location: On the boat
Boat: DeFever 44
Posts: 292
The problem with just an Arduino is measuring differential voltages. The ones I looked at would have to have all the cells referenced to the same ground.

I may do some graphics if I can get a handle on Javascript. The "base" interface to the PLC does not support that, but you can write your own.
ebaugh is offline   Reply With Quote
Old 19-06-2013, 19:04   #2750
Nearly an old salt
 
goboatingnow's Avatar

Join Date: Jun 2009
Location: Lefkas Marina ,Greece
Boat: Bavaria 36
Posts: 22,801
Images: 3
Re: LiFePO4 Batteries: Discussion Thread for Those Using Them as House Banks

Quote:
Originally Posted by ebaugh View Post
The problem with just an Arduino is measuring differential voltages. The ones I looked at would have to have all the cells referenced to the same ground.

I may do some graphics if I can get a handle on Javascript. The "base" interface to the PLC does not support that, but you can write your own.
You dont need differential measurement, just connect each ADC input to the cell ( with a bit of voltage division). some maths in the software will give you cell voltages in a series string

dave
__________________
Interested in smart boat technology, networking and all things tech
goboatingnow is offline   Reply With Quote
Old 19-06-2013, 19:21   #2751
Registered User
 
ebaugh's Avatar

Join Date: Dec 2011
Location: On the boat
Boat: DeFever 44
Posts: 292
Quote:
Originally Posted by goboatingnow View Post

You dont need differential measurement, just connect each ADC input to the cell ( with a bit of voltage division). some maths in the software will give you cell voltages in a series string

dave
It will work, but it won't be as accurate as a 16 bit ADC for every cell. This *is* overkill for the switching, but not balancing, or the SOC amp hour counting.
ebaugh is offline   Reply With Quote
Old 19-06-2013, 19:43   #2752
Nearly an old salt
 
goboatingnow's Avatar

Join Date: Jun 2009
Location: Lefkas Marina ,Greece
Boat: Bavaria 36
Posts: 22,801
Images: 3
Re: LiFePO4 Batteries: Discussion Thread for Those Using Them as House Banks

Quote:
It will work, but it won't be as accurate as a 16 bit ADC for every cell. This *is* overkill for the switching, but not balancing, or the SOC amp hour counting
16 bit ADC whatever for , way to much noise, jitter and conversion time

ardunios have 6 channels 10 bits , 1024 counts nominally referenced to 5v, that provide 0.004V resolution !!, why would you want more, resolving to 10mV ( 0.01V is perfectly fine ,drop the input via precision voltage dividers into the 5V range and your good to go!.

for shunts you might need to go to 12bits, add something like this http://www.gravitech.us/i2c128anco.html

4096 counts of 50mv on a 200A shunt gives you about 2.5 amp resolution ( assuming bringing up the shunt voltage to 5V ( preferably at the shunt too)

does differential too, so the dynamic range improves a good bit

mind you a couple of cheap op-amps, will give you differential capability easily enough for buttons, a precision gain version then would set the right dynamic range ( ie say 4v at 1024 steps, giving you 3mv resolution +- jitter of course)

dave
__________________
Interested in smart boat technology, networking and all things tech
goboatingnow is offline   Reply With Quote
Old 19-06-2013, 21:06   #2753
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
Re: LiFePO4 Batteries: Discussion Thread for Those Using Them as House Banks

Quote:
Originally Posted by ebaugh View Post
I've done some of this, and am in the middle of testing. I used a commercial programmable logic computer (PLC), instead of an Arduino, since I could program in my ancient, but familiar BASIC. I don't have an LCD display, but the PLC has an Ethernet port, so the UI works via a web browser. So you can use any Apple I thing, a PC, or a Android device as the display. And the same device can configure the parameters.

The PLC talks via RS485 to a 16 bit ADC voltage monitor for the cell voltages, and to a relay controller to switch things around. Each relay has a separate time to trigger and user selectable voltage settings. It also can switch based on bank or alternator temperature. Perhaps, I'm hopeful, this should be a bit more robust since all the hardware is designed for industrial automation.

Not as inexpensive as an Arduino, the PLC is $150, the relay box about $30, the 8 channel 16 bit ADC about $100. But the code supports up to 80 cells, 2 banks of LFP, and 10 user relays with customizable trigger parameters. That much is pretty well developed. I'm adding a routine to do the initial and, as needed a maintenance balance. Plus an amp hour counter and SOC tracking for 1-2 banks.

I don't have the space on the base PLC to store detailed history, but it could be done for another $50-60 in hardware, just not sure for an ordinary install how useful it would be.

Hopefully this product may make adopting LFP easier. I can specify the hardware, I just bought the pieces, if someone want's to write their own application. But I'm not planning at the moment to make the software open source.

I attached a screen print of the development level "bank" display.

Bob
That's a lot of equipment. How much power is it using ?
NahanniV is offline   Reply With Quote
Old 19-06-2013, 21:21   #2754
Registered User

Join Date: Nov 2011
Location: Fethiye Turkey
Boat: Lagoon 440
Posts: 2,954
Re: LiFePO4 Batteries: Discussion Thread for Those Using Them as House Banks

Methinks this subject could get bigger than the 'fuse discussion' BUT will be well recieved if the "delicateness" of the Junsie can be removed and a readable remote readout provided.

Watching with interest but little comment...
__________________
"Political correctness is a creeping sickness that knows no boundaries"
Lagoon4us is offline   Reply With Quote
Old 19-06-2013, 22:02   #2755
Registered User

Join Date: Oct 2011
Location: Winter Bahamas - Summer BC
Boat: Lagoon 450, Bavaria Vision 40
Posts: 518
Re: LiFePO4 Batteries: Discussion Thread for Those Using Them as House Banks

Quote:
Originally Posted by goboatingnow View Post
You dont need differential measurement, just connect each ADC input to the cell ( with a bit of voltage division). some maths in the software will give you cell voltages in a series string

dave
I did a test with the voltage divider and all seemed well. I agree, 10-bit ADC is all we need for cell voltages.
roetter is offline   Reply With Quote
Old 20-06-2013, 04:38   #2756
Registered User
 
ebaugh's Avatar

Join Date: Dec 2011
Location: On the boat
Boat: DeFever 44
Posts: 292
Quote:
Originally Posted by goboatingnow View Post

16 bit ADC whatever for , way to much noise, jitter and conversion time

ardunios have 6 channels 10 bits , 1024 counts nominally referenced to 5v, that provide 0.004V resolution !!, why would you want more, resolving to 10mV ( 0.01V is perfectly fine ,drop the input via precision voltage dividers into the 5V range and your good to go!.

for shunts you might need to go to 12bits, add something like this http://www.gravitech.us/i2c128anco.html

4096 counts of 50mv on a 200A shunt gives you about 2.5 amp resolution ( assuming bringing up the shunt voltage to 5V ( preferably at the shunt too)

does differential too, so the dynamic range improves a good bit

mind you a couple of cheap op-amps, will give you differential capability easily enough for buttons, a precision gain version then would set the right dynamic range ( ie say 4v at 1024 steps, giving you 3mv resolution +- jitter of course)

dave
Dave, You do this stuff more than I do...but here is how I thought about it.

I don't see sampling rate as an issue. Once a second seems often enough? Noise and jitter? How would I observe that? I'm seeing the exact same numbers every cycle with my test rig using AA batteries and every open circuit always equals exactly .001V with no variation. I can remove this programmatically, if needed...

The issue with 10 bit, is with a 12V system, you need to measure to 16V to capture the 4th cell and to 32V if it's a 24V system. So that's 16V/1024 or .015V, plus whatever error the voltage divider adds. Or .03V for a 24V system. Is there a way around this?

That's accurate enough for pack disconnects, but not balancing. Further I believe the SOC calculation will need to be "verified" over time in the 3.2 to 3.3V range if the user never resets the Ah counter by reaching full charge (or zero charge....).

I'm assuming a 500A shunt and using a signal converter that adjusts the +-50mV to 0-5V with 2.5V being zero. I think it's basically a packaged instrument amplifier/op amp. This should get me about .1A resolution. 200A is not big enough with today's power peaks.

Bob
ebaugh is offline   Reply With Quote
Old 20-06-2013, 04:56   #2757
Registered User
 
ebaugh's Avatar

Join Date: Dec 2011
Location: On the boat
Boat: DeFever 44
Posts: 292
Quote:
Originally Posted by NahanniV View Post

That's a lot of equipment. How much power is it using ?
That is a good question. The stuff has no power use specifications. Probably because it depends on the number of outputs. The PLC can sink up to 4A of external devices. The relay box box uses 30mA per activated relay. There is a microprocessor in each ADC and Relay device, and of course the PLC itself. But the power hogs are probably the solenoid coils in a complicated system.

The most basic system in my architecture needs the PLC and the ADC. 2 user relays or solenoids can be controlled by the small PLC computer itself and the external relay box is eliminated.

I will take some measurements on the test rig when I get to St Pete in a few days. We just crossed from Mexico to Ft Myers and are goofing off the last few miles home.
ebaugh is offline   Reply With Quote
Old 20-06-2013, 05:12   #2758
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: LiFePO4 Batteries: Discussion Thread for Those Using Them as House Banks

by using switched capacitors you can balance the cells. Need 2 mosfets per cell. Other way is to bleed with resistors using 1 mosfet per cell.
seandepagnier is offline   Reply With Quote
Old 20-06-2013, 05:19   #2759
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: LiFePO4 Batteries: Discussion Thread for Those Using Them as House Banks

Quote:
Originally Posted by ebaugh View Post
Dave, You do this stuff more than I do...but here is how I thought about it.

The issue with 10 bit, is with a 12V system, you need to measure to 16V to capture the 4th cell and to 32V if it's a 24V system. So that's 16V/1024 or .015V, plus whatever error the voltage divider adds. Or .03V for a 24V system. Is there a way around this?
You can use differential inputs, and one one leg the battery voltage, the other leg is connected to the reference divider which is lots of resistors in series across the battery. These two inputs are then very close so then you can use programmable gain 10x or 20x or so to gain more bits.

Another way which is not as good is to take lots of samples, say 1k per second for each channel or more, and average them to essentially gain a few bits.

Last resort is something like an external 24bit adc
Quote:
That's accurate enough for pack disconnects, but not balancing. Further I believe the SOC calculation will need to be "verified" over time in the 3.2 to 3.3V range if the user never resets the Ah counter by reaching full charge (or zero charge....).
For balancing, depending on circuitry there may not be measuring needed.
seandepagnier is offline   Reply With Quote
Old 20-06-2013, 05:27   #2760
Registered User
 
ebaugh's Avatar

Join Date: Dec 2011
Location: On the boat
Boat: DeFever 44
Posts: 292
Quote:
Originally Posted by boat_alexandra View Post
by using switched capacitors you can balance the cells. Need 2 mosfets per cell. Other way is to bleed with resistors using 1 mosfet per cell.
There are lots of ways to balance. Linear Tech has some great chips that simplify the programming. But many of these need custom PCB assemblies or a very patient breadboard guy. All the commercial stuff assumes it's active every cycle, and is really targeted at generally lower current higher voltage applications. Like EVs...

If you have kept up with this monster thread, you will find that balancing is not needed all the time. The cells just don't drift much (if at all) once installed.

So it's more of an installation task, and maybe a maintenance one. I believe the cells will not age exactly the same and there will be a periodic (6-12-18 month) need to rebalance.

My design uses high power resistors that can sink 10-12A off a high cell to realign the bank programmatically in a short period of time. I figure a couple of hours initially on installation, and then maybe 30 minutes for maintenance. Once I get this tested, I can be more specific.
ebaugh is offline   Reply With Quote
Reply

Tags
battery, grass, lifepo4, LiFePO4 Batteries, sailing


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


Advertise Here


All times are GMT -7. The time now is 17:36.


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.