News:

To visit MidNite Solar click this link www.midnitesolar.com

Main Menu

Cell monitoring

Started by RossW, December 04, 2013, 03:04:38 AM

Previous topic - Next topic

RossW

Quote from: zoneblue on December 05, 2013, 03:13:08 PM
Nice work Ross.

I too would encourge you to consider how this will connnect to blackbox. I see less value in a LED flashing in a battery room, that you rarely visit. (actually my agms i never visit). Blackbox is where this data belongs.

Ive been thinking about this and have more or less concluded that a arduino type of board paired with an arm board is the best solution. The arduino with its i2c spi, buses  can talk to as many connected devices as we can dream up. Isnt DB9 serial going to limit the number of conections to the number of free uarts ports? Or do you have a some tricky plan in mind?

While rpi, Beaglebone etc have these buses, my thinking is that the arm board focuses on webserver, and the arduino can then use its tiny cpu for realtime bus related stauff, without being bogged by database calls and whatnot.

The biggest single issue is that in order to monitor a (lets say) 48V nominal array with lets say, 5mV resolution per cell requires a very significant ADC (being able to measure down to at least 5mV in about 60V). Using a 24 channel MUX puts a lot of demands on it too. And then there's a giant wiring loom and all the problems previously raised.

The next option, using SPI or I2C to talk to a bunch of boards in this application poses problems because all the boards are at different potentials.

Creating a "bigger" system to do it all means each one is specifically for a particular battery configuration. For a 12V bank, you wouldn't use a 24/36/48V system because you'd be wasting most of it. So there would need to be lots of different versions. And if you upgraded from 12 to 24V, or 24 to 48, your old device is rendered useless.

The way I'm doing it, it's stackable and expandable. You only need one point to "talk". At the moment I've chosen to do that via RS232, but it could be via other forms and would be readily connected to the BB project. Remote display heads would also be "trivial" because of the RS232 comms, and because of the isolation very little chance of nasties, ground loops etc.

Lets see if I can get the prototype to do what I want first before we get too anxious!
3600W on 6 tracking arrays.
7200W on 2 fixed array.
Midnite Classic 150
Outback Flexmax FM80
16 x LiFePO4 600AH cells
16 x LiFePO4 300AH cells
Selectronics SP-PRO 481 5kW inverter
Fronius 6kW AC coupled inverter
Home-brew 4-cyl propane powered 14kVa genset
2kW wind turbine

zoneblue

Quote from: zoneblue on December 05, 2013, 03:13:08 PM
Ive been thinking about this and have more or less concluded that a arduino type of board paired with an arm board is the best solution. The arduino with its i2c spi, buses  can talk to as many connected devices as we can dream up. Isnt DB9 serial going to limit the number of conections to the number of free uarts ports? Or do you have a some tricky plan in mind?

Quote from: RossW on December 05, 2013, 06:25:52 PM
The biggest single issue is that in order to monitor a (lets say) 48V nominal array with lets say, 5mV resolution per cell requires a very significant ADC (being able to measure down to at least 5mV in about 60V). Using a 24 channel MUX puts a lot of demands on it too. And then there's a giant wiring loom and all the problems previously raised.

I Think we are at cross purposes there. I wasnt suggesting that the arduino does the job of your monitor. I see the arduino is a comunications hub of sorts, that talks to various other boards like your battery monitor. An arduino or something built with its processor, is in a better position to do these tasks than {insert random} arm board is. To my mind though it needs to be EASY, a standard conector, and common protocol for all remote devices. We cant have some talking uart, some i2c some spi, or else about 5 of us are the only people that will ever use it.

Will you be able to get all the cell voltages out on serial?
6x300W CSUN, ground mount, CL150Lite, 2V/400AhToyo AGM,  Outback VFX3024E, Steca Solarix PL1100
http://www.zoneblue.org/cms/page.php?view=off-grid-solar

RossW

Quote from: zoneblue on December 05, 2013, 08:22:57 PM
Will you be able to get all the cell voltages out on serial?

My expectation (and what I'm still mulling over in the back of my head) is that you will see a series of lines via RS232, something like this:

V1 2.005
T1 21.2
V2 2.050
T2 21.3
V3 1.990
T3 21.2
.... (repeated with incrementing cell numbers appropriate to bank size)
V24 1.805
T24 21.1
A24
!

The "A24" on the penultimate line is indicative, but says "Cell 24 is in Alarm state". There may be no "A" lines, or multiples.
3600W on 6 tracking arrays.
7200W on 2 fixed array.
Midnite Classic 150
Outback Flexmax FM80
16 x LiFePO4 600AH cells
16 x LiFePO4 300AH cells
Selectronics SP-PRO 481 5kW inverter
Fronius 6kW AC coupled inverter
Home-brew 4-cyl propane powered 14kVa genset
2kW wind turbine

RossW

Well, the I managed an hour or so today to have a crack at the first rough pass of the code.
Here's the first board with real data out of it. (Connected to a nearly flat 9V transistor battery with a divider string of 1K, 1K2 and 1K to synthesise some sort of cells).

Voltages measured (they were fluctuating) on V1, V2, V3 inputs were:
2.336 V 
5.085 V  (2.749)
7.760 V  (2.675)

Here's the actual display, cut and pasted from the terminal window:


*V01 2.314
T01 23.9
V02 2.761
T02 24.1
V03 2.698
T03 24.1


The bulk of the rest of the code is done and I've so far used 25% of the codespace available to me, so any particular feature requests for me to think about for when I get another hour on it??

Next stop: burn the code into board #2 and cascade them!
3600W on 6 tracking arrays.
7200W on 2 fixed array.
Midnite Classic 150
Outback Flexmax FM80
16 x LiFePO4 600AH cells
16 x LiFePO4 300AH cells
Selectronics SP-PRO 481 5kW inverter
Fronius 6kW AC coupled inverter
Home-brew 4-cyl propane powered 14kVa genset
2kW wind turbine

boB


Ross, looks like you have one cell that is a bit low ?

boB
K7IQ 🌛  He/She/Me

RossW

Quote from: boB on December 07, 2013, 06:47:58 PM

Ross, looks like you have one cell that is a bit low ?

Since I was synthesising the cells (as mentioned, by 1K + 1K2 + 1K in series across the inputs), I was AIMING to have an imbalance - you know what testing is like? Three identical readings could be caused by a short on the board, or software reading or writing the same variable etc.

I've just finished populating the first "slave" board and hooked it up. Dumped the code into it and cascaded them, and woot! They're talking!
3600W on 6 tracking arrays.
7200W on 2 fixed array.
Midnite Classic 150
Outback Flexmax FM80
16 x LiFePO4 600AH cells
16 x LiFePO4 300AH cells
Selectronics SP-PRO 481 5kW inverter
Fronius 6kW AC coupled inverter
Home-brew 4-cyl propane powered 14kVa genset
2kW wind turbine

boB

Quote from: RossW on December 07, 2013, 08:12:01 PM
I was AIMING to have an imbalance - you know what testing is like?


Oh.  OK.  Yes, I do.
K7IQ 🌛  He/She/Me

RossW

Been working interstate for a few days, but got a couple of hours to work on it again today.
Had a perplexing problem that turned out to be a timing issue. I'm running the processor at its minimum speed of 4MHz (it can go up to 32MHz) - but trying to keep consumption down. In my test configuration of 2 boards, the data was whistling around the ring quicker than the processor could work out what to do with it. Once identified, easily fixed.

So, here's a raw data dump of it running. Still only with "synthesised" inputs of a resistive divider on each of the two boards (two boards is the "worst case" scenario, any more than this just gets easier)


S150
*V01 2.296
T01 0.0
V02 2.728
T02 0.0
V03 2.681
T03 0.0
A01 7.705 2.568 .150
#V04 2.312
T04 0.0
V05 2.697
T05 0.0
V06 2.682
T06 0.0
A04 15.396 2.566 .150
E01
E02
!E04
S101
*V01 2.289
T01 0.0
V02 2.720
T02 0.0
V03 2.672
T03 0.0
A01 7.681 2.560 .101
#V04 2.302
T04 0.0
V05 2.687
T05 0.0
V06 2.672
T06 0.0
A04 15.342 2.557 .101
E01
E02
E03
!E04
E05
E06
S210
V01 2.280
T01 0.0
V02 2.708
T02 0.0
V03 2.663
T03 0.0
A01 7.651 2.550 .210
#V04 2.288
T04 0.0
V05 2.668
T05 0.0
V06 2.653
T06 0.0
A04 15.260 2.543 .210
E01
!E04


You can completely ignore *, # and ! characters. They're just used as flags to identify data phases in the ring.
Basically, I've turned the board on and immediately sent it a "SENSITIVITY 150mV" command.
(I stupidly left unplugged the temperature sensors - they're working perfectly, just not shown here)
The first board has spat out voltages for cell 1, 2 and 3.
The  "A" line is currently a diagnostic line. Says the total of all cells up to the board starting with cell 1, was 7.705V, the average cell voltage is 2.568V, and the sensitivity (from non-volatile memory) is 150mV
The second board then kicked in its offering, with voltages for cell 4, 5 and 6.
Another diagnostic displayed, board starting with cell 4 and we're up to 15.396V, average now of 2.566V per cell.
We have ERROR conditions on cells 1, 2 and 4.  (they are more than 150mV from the system average)

I then changed the threshold to 101mV. This time it's errored on all 6 cells.

Then changed the threshold to 210mV and cells 1 and 4 have errored.

I'm oversampling (reading each A/D channel 16 times, and averaging).
The only code I need to write now is to make each board lampen-blinken to display its alarm/error condition and some overall tidyup. Adding some timeouts so the system can't get hung up in a state waiting for something etc.

I'll be away again over the weekend, but hopefully get a chance to build up some more boards and connect it to my bank and get some real live data.

I also found a source of inexpensive 1% resistors, they should be here tomorrow, and I'll replace the 5% networks with these.

No, I haven't worked out a price yet, still a little early for that - but will be interested in "expressions of interest"!
Who else "can't live without one"?
3600W on 6 tracking arrays.
7200W on 2 fixed array.
Midnite Classic 150
Outback Flexmax FM80
16 x LiFePO4 600AH cells
16 x LiFePO4 300AH cells
Selectronics SP-PRO 481 5kW inverter
Fronius 6kW AC coupled inverter
Home-brew 4-cyl propane powered 14kVa genset
2kW wind turbine

RossW

Well, it's been a busy week (or however long its been!), but today someone (naughty man!) started throwing money at me, so I've had to make a little time to get some more work done.

I've made up interconnect cables and battery cables for 4 boards and taken 4 of the prototypes out to one of my 48V strings. I've connected cells 1-3, 4-6, 19-21 and 22-24 (being both ends of a 48V string). No magic smoke. All just worked perfectly!

Connected a laptop and there was all the data, just as expected!

I've got some tweeking to do. Mostly in terms of timeouts so it'll recover nicely from one board being disconnected, and although all 12 channels are reporting voltages "pretty close" to actual voltages, I'm going to add an additional function to calibrate them. (I think the only one that was more than 20mV in error was the one using 5% resistors, all the others have 1%) - but still, a calibration pass should make them read pretty much bang on.

Boards are taking slightly more current than I expected at about 2.2mA, so I will be investigating where that's going and what (if anything) I can do to reduce it.

I've left these 4 boards running a "ring test" - basically each board gets the "ring test" token - turns its LED on for 500ms, then turns it off and passes the token on. This will go until either a board resets for some reason, or I  break the ring connection (unplug a cable). It's been going for 3 hrs now and still running, so thats a good sign!

The local store hopes to have more connectors for me by the end of the week, so I can get another 4 boards online and running. Tomorrow, time permitting, I'll at least get these boards logging and see how they trend over time. That could be quite interesting!
3600W on 6 tracking arrays.
7200W on 2 fixed array.
Midnite Classic 150
Outback Flexmax FM80
16 x LiFePO4 600AH cells
16 x LiFePO4 300AH cells
Selectronics SP-PRO 481 5kW inverter
Fronius 6kW AC coupled inverter
Home-brew 4-cyl propane powered 14kVa genset
2kW wind turbine

Westbranch

Hi Ross, do you have any pics of the boards and connectors, showing a size reference also?  tks
KID FW1811 560W >C&D 24V 900Ah AGM
CL150 29032 FW V.2126-NW2097-GP2133 175A E-Panel WBjr, 3Px4s 140W > 24V 900Ah AGM,
2 Cisco WRT54GL i/c DD-WRT Rtr, NetGr DS104Hub
Cotek ST1500 Inv  want a 24V  ROSIE Inverter
OmniCharge3024  Eu1/2/3000iGens
West Chilcotin 1680+W to come

TomW

Quote from: Westbranch on December 16, 2013, 12:46:34 PM
Hi Ross, do you have any pics of the boards and connectors, showing a size reference also?  tks

He posted a few links to such photos over on IRC but I did not bookmark them.

Ahh, found one in my history.

Pretty sure he won't mind if I post it here:



Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

Westbranch

didn't see those pics .  I think that is a O zzie  10 cent piece.  think I have one , will check. Nope can't find it...
KID FW1811 560W >C&D 24V 900Ah AGM
CL150 29032 FW V.2126-NW2097-GP2133 175A E-Panel WBjr, 3Px4s 140W > 24V 900Ah AGM,
2 Cisco WRT54GL i/c DD-WRT Rtr, NetGr DS104Hub
Cotek ST1500 Inv  want a 24V  ROSIE Inverter
OmniCharge3024  Eu1/2/3000iGens
West Chilcotin 1680+W to come

RossW

Quote from: Westbranch on December 16, 2013, 03:55:59 PM
didn't see those pics .  I think that is a O zzie  10 cent piece.  think I have one , will check. Nope can't find it...

It is, but here's another pic of incomplete boards - purely for scale!



And the board with isolated RS232 when populated is like this:
3600W on 6 tracking arrays.
7200W on 2 fixed array.
Midnite Classic 150
Outback Flexmax FM80
16 x LiFePO4 600AH cells
16 x LiFePO4 300AH cells
Selectronics SP-PRO 481 5kW inverter
Fronius 6kW AC coupled inverter
Home-brew 4-cyl propane powered 14kVa genset
2kW wind turbine

Westbranch

Boy they are tiny... what will you house them in?
KID FW1811 560W >C&D 24V 900Ah AGM
CL150 29032 FW V.2126-NW2097-GP2133 175A E-Panel WBjr, 3Px4s 140W > 24V 900Ah AGM,
2 Cisco WRT54GL i/c DD-WRT Rtr, NetGr DS104Hub
Cotek ST1500 Inv  want a 24V  ROSIE Inverter
OmniCharge3024  Eu1/2/3000iGens
West Chilcotin 1680+W to come

RossW

Quote from: Westbranch on December 16, 2013, 09:00:12 PM
Boy they are tiny... what will you house them in?

Matchboxes? :)

I'm not sure. One of my plans was to pot them in epoxy which would make them tough and durable, insulated, and be the case all in one. But I remember my last grand plans for pouring cases and the time it took and the mess the black stuff made!

This morning I was thinking that if I get enough people wanting them, I should go to the "minister of finances" with a business case for a 3D printer  <grin>. Do you think it'd work?
3600W on 6 tracking arrays.
7200W on 2 fixed array.
Midnite Classic 150
Outback Flexmax FM80
16 x LiFePO4 600AH cells
16 x LiFePO4 300AH cells
Selectronics SP-PRO 481 5kW inverter
Fronius 6kW AC coupled inverter
Home-brew 4-cyl propane powered 14kVa genset
2kW wind turbine