Battery manager and generator start

Options
2»

Comments

  • zoneblue
    zoneblue Solar Expert Posts: 1,220 ✭✭✭✭
    Options
    Re: Battery manager and generator start
    NorthGuy wrote: »
    That is not necessarily true. The overhead of unneeded parts on a single board might be less than the communication overhead. Also, if you want to deal with other people, it is easier for them to have a single universal unit than several modules with associated wires.

    I didn't really want to do ADC. I wanted to control my system, primarily run generator when I want, and control the charger through XanBus. I had to add ADC because XanBus numbers were not accurate enough for me. Of course, you can make an ADC-only board with communication protocol. There are some out there already - Victron monitor is probably the best of the kind.

    The problem is as i see it is demarkation/defining things. Your baord contains 12 channel adc, a microcontroller and some output relays. Others will need a radio interface to other sensors. Still others will need hard wire to other sensors. Some more relays etc. Rather than building one mother-of-all-boards, that will inevitably never please anyone, better to have a 12 channel adc board, coms board, sensor boards etc, so it becomes a bit more plug and play. I understand what you are saying about how tightly optimised your controller /adc pairing is, i get that, microcontrollers are resource poor, but they are neither expensive nor draw significant power. If it means having one on your baord, and another on a coms interace baord and still others on daughter sensor baords, then that makes sense doesnt it?
    I'll think about that. I designed it for personal use. I didn't think of selling or publishing it. It is designed for my level of current, my equipment etc. To make it useable to other people, quite a bit of changes need to be done first.

    Doesnt need to be pretty, everything weve done so far is all work in progress. But isnt this how civillisation evolves, levering each others efforts?
    It won't be exact Isc because resistor is not short and have some resistance, but it'll be close if the voltage accross the resistor at full power is substantially less than Vmp.

    Power is V*I. The Isc measurement will only give you the I part. You would have to estimate V, which varies with temperature etc. Apparently, you can measure I more accurately than you can estimate V. It all depends on how accurate your V estimates are.

    If you do MPPT method, you measure what you want directly, so you can get better results. However, if your V estimates in Isc method are good, I wouldn't expect much difference between these methods.

    I was under the impression that pv was basically a current source. Hence say i have a panel that is 12v vmp, isc= 80mA, then using a resistor of say R=2volts/80mA=25 ohms, anything less than 150 ohms will carry the full isc. On the voltage thing, should be able to get that using the sandia IV curve / pv perf model.
    Perhaps you can bypass the faulty Ethernet interface and connect directly to the Modbus with RS-232 or RS-485 (whatever Classic supports).

    Thats not a bad idea!
    It is very simple. Back in winter, I did a lot of experimenting with my batteries. I looked at the charging current over time, and I noticed that at constant voltage it goes down and finally settles at some value, which I call end amps. I figured that when the end amps level is reached the battery is charged and all the amps go to bubbling. I just built a table of end amps depening on voltage. Say at 64V, there's 15A. Then it sharply goes down as the voltage decreases and is practically 0 at 52V. I use my table to figure out end amps during the charge and then subtract them from real amps. Say, if I charge at 64V and 80A, my program thinks that only 65A goes to charge batteries and 15A goes to bubbling (65+15=80). Other than that, it's straight AH counting.

    Over time, I noticed that end amps may vary for the same voltage. Say, at 64V I may get anything between 12A and 19A. My program uses 15A. At my typical 1000AH swing between full charges this doesn't produce big difference.

    Not counting the bubbling effect, batteries are 100% efficient in term of AH. The energy efficiency is less because you charge at higher voltage than you discharge, but this doesn't affect AH counting.

    Of course, each battery bank will have its own table of end amps. So, if you want to make it universal, you need a way to guess or measure the end amps.

    I think that my table may change as the battery ages, but there's no way to tell.

    Ok ill try to digest that.

    So youre more measuring Ah DOD, rather than %SOC. That makes a huge amount of sense to me. How to make something horendously complex simple in one easy step.
    I measure AH only. I don't know if you can measure capacity. I know my battery can discharge 520AH, which is 77% of 673A (published 20-hour rate). How much deeper can they go? I don't want to find out because deep discharges can damage the batteries beyond repair.

    If I notice a big voltage drop by the end of discharge, I will know that it's getting close to the end of the life for my batteries. I'll lower the discharge settings and start shopping for new batteries.
    1.8kWp CSUN, 10kWh AGM, Midnite Classic 150, Outback VFX3024E,
    http://zoneblue.org/cms/page.php?view=off-grid-solar


  • Blackcherry04
    Blackcherry04 Solar Expert Posts: 2,490 ✭✭✭
    Options
    Re: Battery manager and generator start
    Doesnt need to be pretty, everything weve done so far is all work in progress. But isnt this how civillisation evolves, levering each others efforts?
    HeHe, I'v heard that one before, let us use your design and we'll take care of you after the copyright and patent is issued.
  • NorthGuy
    NorthGuy Solar Expert Posts: 1,913 ✭✭
    Options
    Re: Battery manager and generator start
    zoneblue wrote: »
    The problem is as i see it is demarkation/defining things. Your baord contains 12 channel adc, a microcontroller and some output relays. Others will need a radio interface to other sensors. Still others will need hard wire to other sensors. Some more relays etc. Rather than building one mother-of-all-boards, that will inevitably never please anyone, better to have a 12 channel adc board, coms board, sensor boards etc, so it becomes a bit more plug and play. I understand what you are saying about how tightly optimised your controller /adc pairing is, i get that, microcontrollers are resource poor, but they are neither expensive nor draw significant power. If it means having one on your baord, and another on a coms interace baord and still others on daughter sensor baords, then that makes sense doesnt it?

    It depends on many factors. I understand the appeal of modular design. If people want completely different things then yes, modular design is better. However, most people will want the same - they want to interface their controllers/inverters, they want to monitor their batteries somehow, they also want some relays to exert control on things. Also, they want to be able to program all this from their computer. One single device that does all this would fit everyone's needs.

    A relay installed on a main board costs fraction of what it would cost if it was made in a separate module.
    zoneblue wrote: »
    I was under the impression that pv was basically a current source. Hence say i have a panel that is 12v vmp, isc= 80mA, then using a resistor of say R=2volts/80mA=25 ohms, anything less than 150 ohms will carry the full isc. On the voltage thing, should be able to get that using the sandia IV curve / pv perf model.

    Vmp located on the part of the curve where currect starts to decrease. To avoid this part, you need to go lower. Also, Vmp will decrease with temperature and a little bit with decreasing level of insolation. Therefore, to make sure you're on a flat part of the curve, you need to go considerable lower than Vmp. Say, with your example, the resistor of 70 Ohm would be Ok. Anything less than this, including 25 Ohm is good too, except that for 25 Ohm resistor, you do not need such a big panel.

    I think if you can simply introduce a linear coefficient for temperature and linear coefficent for insulation level, and then go with P = Prated*(Vestimated/Vmp)*(Imeasured/Isc), it'll be relatively accurate.

    Once you get your numbers, it'll be difficult to figure out how to use this information to manage opportunity loads.
  • mtdoc
    mtdoc Solar Expert Posts: 600 ✭✭
    Options
    Re: Battery manager and generator start

    Very nice Northguy! Any chance of seeing a circuit schematic?

    I'm in the early stages of a project to do something very similar. I'm not satisfied with the fairly poor resolution and accuracy of AC and DC current measurement available with my current Outback and Midnite equipment. It's just fine for any reasonable system uses and maintenance, etc it's just that I'm kind of a monitoring junkie and want accurate measurements of power production and consumption - just because.... I'm also teaching myself electronics as a hobby and it makes a nice way to combine this with my RE interests.
    NorthGuy wrote: »
    For the beginning, to measure something, you need to have a voltage reference to measure against. Even with my modest requerements, a reference chip along with high precision resistors to create voltage points for reference and dynamic calibration, costed me over $50 in parts. I also had to get good power source for amplifiers and ADCs. With all this overhead, I had to put all the measuring circuits together, so that voltage references and power sources could be shared.

    I had to use very precise op amps (and also precise resistors) for shunt measurements, because voltages to be measured are very low, and also fast changing. I couldn't even use any over-voltage protection on the inputs because it would introduce too much noise. Had to put in some low pass filters to filter out possible high frequency ripple from CCs, but keep 120Hz ripple from the inverter intact. I built 4 channels, perhaps $40 each. This resulted in very accurate DC current measurements.

    I've had good luck using the LTC2400 24 bit ADC from Linear Tech- measuring across my ePanel 500A/50mv shunt. Using AVR (basically Arduino with it's newbie friendly IDE). Still playing with different voltage reference options.. Eventually hoping to feed this info and CT info for AC current into a LabView front end for graphical display, processing, etc. - not the lowest power option for a front end (11 watts or so) since it needs at least a netbook/Atom/Windows environment - but adequate for my needs. Been following zoneblue and the others at the Midnite forum blackbox project with great interest as well.
  • NorthGuy
    NorthGuy Solar Expert Posts: 1,913 ✭✭
    Options
    Re: Battery manager and generator start
    mtdoc wrote: »
    Very nice Northguy! Any chance of seeing a circuit schematic?

    Thank you. I don't have the overall schemaric. It is a microcontroller with different unrelated parts connected to it - different measurements, communications, relay control. Tell me which part you're interested in and I'll draw it and post it here.
    mtdoc wrote: »
    I'm in the early stages of a project to do something very similar. I'm not satisfied with the fairly poor resolution and accuracy of AC and DC current measurement available with my current Outback and Midnite equipment. It's just fine for any reasonable system uses and maintenance, etc it's just that I'm kind of a monitoring junkie and want accurate measurements of power production and consumption - just because.... I'm also teaching myself electronics as a hobby and it makes a nice way to combine this with my RE interests.

    I'm not obsessed with monitoring, but I'm obsessed with control! :D
    mtdoc wrote: »
    I've had good luck using the LTC2400 24 bit ADC from Linear Tech- measuring across my ePanel 500A/50mv shunt. Using AVR (basically Arduino with it's newbie friendly IDE).

    I looked at the spec sheet. This is an interesting chip. Amazing accuracy. Even though it is very slow, the spec sheet says it does filter out 60Hz noise, so it should automatically filter out all the 120Hz ripple caused by inverter. Good thinking.

    I used built-in PIC ADC, which is only 12-bit because I needed high sample speed. It samples at 50kHz. Wanted to go 100kHz, but it started loosing precision at this speed.
    mtdoc wrote: »
    Still playing with different voltage reference options..

    I used AD780, which is accurate to 1mV - 0.03% of my 3V ADC range. Even has built-in temperature compensation. Works well.
  • mtdoc
    mtdoc Solar Expert Posts: 600 ✭✭
    Options
    Re: Battery manager and generator start
    NorthGuy wrote: »
    Thank you. I don't have the overall schemaric. It is a microcontroller with different unrelated parts connected to it - different measurements, communications, relay control. Tell me which part you're interested in and I'll draw it and post it here.

    OK - no worries.

    I am most interested in knowing more about your AC measurements. Which CTs are you using? What sort of signal conditioning (if any) are you doing between the CT output and input to your PIC ADC?

    I used AD780, which is accurate to 1mV - 0.03% of my 3V ADC range. Even has built-in temperature compensation. Works well.

    Thanks. Looks very nice. I purchased a small breakout board for the LTC2400 on fleabay to avoid the smd soldering fun. It comes with a fairly mediocre voltage reference which I will eventually replace - just researching alternatives now and will add the AD780 to my list.
  • NorthGuy
    NorthGuy Solar Expert Posts: 1,913 ✭✭
    Options
    Re: Battery manager and generator start
    mtdoc wrote: »
    I am most interested in knowing more about your AC measurements. Which CTs are you using? What sort of signal conditioning (if any) are you doing between the CT output and input to your PIC ADC?

    I used CR3100 transformers by CR Magnetics. They have 3000 turns. I was very skeptical about them because they're marketed on their web site as a cheap solution. However, in my test they showed extremely good linearity with errors within 0.02A when compared to Fluke 289, except that Fluke is not that precise. I think real error is higher than this.

    The connection is very simple. A 56 ohm resistor accross the CT (called burden resistor). One side of the resistor is connected to 1.5V reference - this is the middle of my ADC range. The other side is connected directly to ADC. This centers the AC wave around 1.5V. I know that I often fail to explain things well, so if necessary I can draw a picture.

    I did two different calibrations.

    First, I measured the AC amps with the CT and with Fluke. I used devices with different waveforms - a CFL lamp, a drill, a heater. I also did measurements with one, two and three turns of wire through the CT to get a wider range of currents. Then I did a linear regression of the CT numbers on Fluke numbers. Even with intercept forced to 0, the error was within 0.02A. I wanted to calibrate each CT separately, but they were all pretty much the same (possibly because I bought them together), so I used a common formula. The controller gets the measurements, squares them, sums them up, takes a square root, then multiplies by my coefficient. This gives true RMS reading for the current. As with any true RMS device, there's an error when current is very small, because the noise gets squared up and produce a small positive reading.

    For power measurement, it is necessary to synchronize voltage and current. CT gives you current with a slight shift (called phase angle), which I found to be around 60 uS. This is not bad, but with inductive loads, it may produce substantial errors. So, the controller shifts it back to synchronize with voltage.

    To determine the phase shift, I bult a simple circuit with CT wired in series with a shunt. I had to build an isolated power supply and isolated USB interface to do these shunt measurements on AC line. I set up a controller to measure both CT and a shunt current at 50kHz and send the results to the computer where I processed the data and found the shift that would minimize the difference between CT and the shunt. I run different loads through it. The phase angle shift happened to be slightly worse for high currents and slightly less for lower currents, but I decided to use an average value.

    To measure the power, controller multiplies voltage by current then takes an average. Since these are two unrelated measurements, the noise doesn't get in the way, and these numbers are good even at small current.

    Hope this makes sense.
  • mtdoc
    mtdoc Solar Expert Posts: 600 ✭✭
    Options
    Re: Battery manager and generator start

    Thanks NG! Those CTs look nice.

    For my current project I am only needing to accurately measure at 0.1 amp resolution the AC current draw from my system load total and my inverter output.
  • NorthGuy
    NorthGuy Solar Expert Posts: 1,913 ✭✭
    Options
    Re: Battery manager and generator start
    mtdoc wrote: »
    For my current project I am only needing to accurately measure at 0.1 amp resolution the AC current draw from my system load total and my inverter output.

    Also, wanted to add than in AC measurements there's an additional error caused by sampling. Current/voltage curves are small. When you sample and multiply, you loose some precision. The exact error depends on the waveform and sampling frequency. Your measurements points will approximate the curve better if there are many of them. I did my calibrations with 50kHz sampling, but the actual device samples at slightly over 3kHz. This introduces some additional error.
  • solar_dave
    solar_dave Solar Expert Posts: 2,397 ✭✭✭✭
    Options
    Re: Battery manager and generator start

    I have been using the NOCO line of chargers around here for a couple of years with great success. They watch the line voltage and make adjustments accordingly. They have bulk, absorb, and float voltages. Many have modes for AGMs and some for large and small batteries. The prices are pretty good as well.

    I use one on my truck that sits a lot, never a problem getting it going again and that battery is quite aged. I have a couple of smaller ones for the Motorcycles as well, batteries that used to last for a couple of seasons on a Harley Davidson tender now last much longer. That HD tender has just charge and float levels.

    Some of the problems with modern vehicles is the computers and electronics draw some power all the time.