Home  |  Contents 
Electronics
  Forum Index : Electronics         Section
Subject Topic: MAD/OZ AC/DC Charge Controller Post ReplyPost New Topic
<< Prev Page of 12
Author
Message << Prev Topic | Next Topic >>
Tinker
Guru
Guru
Avatar

Joined: 07 November 2007
Location: Australia
Online Status: Offline
Posts: 1265
Posted: 25 November 2017 at 7:57pm | IP Logged Quote Tinker

Awsome. I had no idea that forklift batteries were that heavy. Come to think of it one really wants a forklift to move them .

Not being familiar with these batteries, the clear tubes on top are for recycling water vapor? Do you need to top the cells individually or is there a central filling place, that thicker clear tube in the middle?

I suppose your battery charging inverter will have its work cut out from now on.

__________________
Klaus


Back to Top View Tinker's Profile Search for other posts by Tinker
 
Madness
Guru
Guru
Avatar

Joined: 08 October 2011
Location: Australia
Online Status: Offline
Posts: 1154
Posted: 25 November 2017 at 9:40pm | IP Logged Quote Madness

Yes they are really heavy and there are ones at least twice as big as the one I got. Moved it to its final position today after getting all the old batteries out, needed the steel shafts, hoist, crowbar and a few four-letter words but got it there. Not real easy to get it turn a tight corner, but I won in the end. I lifted it up on to 6 50mm square pieces of timber to allow air to flow under it to help keep it cool.

The tubes are the watering system, there is a float in each cell which controls the level, it also pops up into the clear circle on each cap to indicate it is full or low. The photo shows how they look when water is down, I topped it up this morning with a 20 litre container 2.5 metres above the battery top it filled in about 5 minutes using about 15 litres, they were just above the plates prior to that. Those caps have a top that flips open with a hole under it just big enough for a hydrometer to fit in.

The battery was fully charged when I got it, last night it was drawn down to 90% and had no trouble charging it today with almost complete cloud cover and a few showers. It went into float before 11 AM, plus my wife did ironing, washing and used the clothes dryer all powered by solar panels. The hot water system was running for about 4 hours as well which turns on automatically when the voltage is at the set point. So the AC power to the house was over 5KW for quite a few hours.

This the daily report from my GTI.

Date: 2017-11-25
E-Today: 15.0kWh
P-Peak: 3.01kW
Yield: 4.95$
CO2 Avoided: 12.0kg

There would have been similar amount from other anels as well.


Edited by Madness on 25 November 2017 at 9:45pm


__________________
Off the grid and on the cloud
Back to Top View Madness's Profile Search for other posts by Madness
 
Madness
Guru
Guru
Avatar

Joined: 08 October 2011
Location: Australia
Online Status: Offline
Posts: 1154
Posted: 03 December 2017 at 3:12pm | IP Logged Quote Madness

The new battery is going really well after an initial problem with power dropouts. Turned out someone (not me) had not tightened one of the interconnectors properly, it was about 3/4 of a turn short of being tight. Only showed up when drawing over 100A, since tightening it the battery has been running perfectly. The new battery can complete the absorb cycle @ 59.2 volts and holding that voltage with just 15 amps.

I did not realise just how much power my old crap batteries were losing due to inefficiency, self-discharge etc. They cost me scrap price of $0.40 per KG now I am going to get $0.60 per KG. Here is what $1,200 worth of junk looks like.





Still unable to work out why the newer version of the Charge controller PCB is blowing MOSFET's.

Been working on software for the simpler version. It now includes time delay for resting the charge cycle, equalization cycle and manually being able to put it into Float or Absorb. Holding both Float and Absorb will initiate Equalization. I have also connected the Float button via a voltage divider to the AUX output of one of my Midnite charge controllers. So when the Midnite CC enters float and the AUX outputs 12V this supplies 5V to the pin on the Nano forcing it to enter float at the same time.

Here is the code which may be of help to someone.


// Get 1-wire Library here: http://www.pjrc.com/teensy/td_libs_OneWire.html
#include <OneWire.h>

//Get DallasTemperature Library here:  http://milesburton.com/Main_Page?title=Dallas_Temperature_Control_Library
#include <DallasTemperature.h>
// Wire (I2C) Library
#include <Wire.h>

// include the library code:
#include <LiquidCrystal.h>

/*-----( Declare Constants and Pin Numbers )-----*/
// Data wire is plugged into port 8 on the Arduino (can be changed)
#define ONE_WIRE_BUS 12    // NOTE: No ";" on #define


// Setup a oneWire instance to communicate with any OneWire devices
// (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass address of our oneWire instance to Dallas Temperature.
DallasTemperature sensors(&oneWire);
#include <LiquidCrystal_I2C.h>

// Start the LCD display library
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address

//===========================MAIN CHARGER SETTINGS, REFER TO YOUR BATTERY MANUAL==================================================================

float batv             = 48;     // nominal battery voltage 24 OR 48, could work with 12V with 18v power supply for FET driver chips on pcb
int floatVolts         = 54.0;   // User setting for the FLOAT voltag
int absorbCharge       = 59.2;   // User setting for the ABSORPTION voltage
long timedOut          = 120;    // ABSORPTION MINUTES
int EqualizationCharge = 64.8;   // User setting for the ABSORPTION voltage
int startAllOverAgain  = 50.5;   // User setting for resetting the charge cycle, usually overnight or after heavy drawdown
int startoverdelay     = 30;     // minutes below startAllOverAgain before reseting cycle

//===========================ADVANCED SETTINGS===================================================================================================


float R1 = 100000.0;            // resistance of R1 (100K)
float R2 = 5500.0;              // resistance of R2 (8K2) For setting up voltage divider to get correct voltage reading Use in conjunction with trim pot on pcb
int pwmmin = 15;                 // Minimum Output level 0 = will go as low as no output, set higher WITH CAUTION if you want to stop a GTI from restarting during the day if unsure leave at zero





const int numReadings = 5;
int readings[numReadings];      // the readings from the analog input
int readIndex = 0;              // the index of the current reading
int total = 0;                  // the running [ total
int average = 0;                // the average
int voltsinputPin = 3;
float battemp;
float tcomp;
float tcompl;
float vout = 0.0;
float vin = 0.0;
int value = 0;
long fullTime = 0;            // timer for float stage
int PWMout1 = 6;               // fet driver connected to this pin
int analogPin = 3;            // divided voltage from battery
int pulseVal = 0;             // initilise the pulse width to zero of 255
long absorbTime = 0;            // initialise the time to zero for the absorb
int increment = 25.5;           // how much to change each pulse width for voltage control definition
int weAreHereNow = 0;         // initialize the start stage as zero
int weWhereHere = 0;
long resettimer = 0;
long start;
long finished;
long elapsed;
long astart;
long afinished;
long aelapsed;
long apause;
long fstart;
boolean r = false;
const int buttonFloat = 7;     // the number of the pushbutton pin
const int buttonAbsorb = 8;     // the number of the pushbutton pin
int buttonFState = 0;
int buttonAState = 0;

void setup() {
  Serial.begin(9600);
  sensors.begin();

  // initialize all the readings to 0:
  for (int thisReading = 0; thisReading < numReadings; thisReading++) {
    readings[thisReading] = 0;
    pinMode(voltsinputPin, INPUT);
    lcd.begin(20, 4);
    pinMode(PWMout1, OUTPUT);          // sets the pin 6 as an output for the fet drive
  }
}
void loop() 
{  GetVolts();
}

void  GetVolts() {

  // subtract the last reading:
  total = total - readings[readIndex];
  // read from the sensor:
  readings[readIndex] = analogRead(voltsinputPin);
  // add the reading to the total:
  total = total + readings[readIndex];
  // advance to the next position in the array:
  readIndex = readIndex + 1;

  // if we're at the end of the array...
  if (readIndex >= numReadings) {
    // ...wrap around to the beginning:
    readIndex = 0;

    // calculate the average:
    average = total / numReadings;
    // read the value at analog input
    vout = (average * 5.0) / 1024.0;
    vin = vout / (R2 / (R1 + R2));    // Voltage divider calculation
    if (vin < 0.09) {
      vin = 0.0; //Battery voltage
    }
  }

   buttonFState = digitalRead(buttonFloat);
   buttonAState = digitalRead(buttonAbsorb);

  if (buttonFState == HIGH) {  
  weAreHereNow = 2;}// Enter float mode:   //Manually select Float State, pin needs 10K pull down resistor to ground to prevent errors

   if (buttonAState == HIGH) {  
  weAreHereNow = 1;}// Enter Absorb mode:  //Manually select Absorb State, pin needs 10K pull down resistor to ground to prevent errors

if ((buttonFState == HIGH) && (buttonAState == HIGH)) {               // Press both buttons to select Equalization State
  absorbCharge = EqualizationCharge;}// Enter Equalization mode:   //Manually select Equalization State, for Flooded Lead Acid Batteries only! make sure battery water is above minum before initiating

   
  sensors.requestTemperatures(); // Send the command to get temperature readings

  battemp = (sensors.getTempCByIndex(0)); // convert sensor value to degrees celcius

  if (battemp == -127.00) // Measurement failed or no device found, if no temp sensor temperature comp has no effect
  {
    battemp = tcompl;    // prevents error if sensor fails to return a result occasionally
  }
  else
  {
    tcomp = (25 - battemp) * (batv * 0.0025);   //used to calculate voltage set point with temperature compensation applied
    tcompl = battemp;
  }

  lcd.setCursor(0, 0);
  lcd.print(vin);            //Actual battery volts
  lcd.setCursor(6, 0);
  lcd.print("C");
  lcd.setCursor(7, 0);
  lcd.print(tcomp);         //Temperature compensation voltage adjustment value add or subtract for difference from 25 degrees
  lcd.setCursor(13, 0);
  lcd.print(pulseVal / 2.55); // print the PWM out as a percentage from 0 - 100 (100% = charging at full avaiable power)
  {

    if ((vin < startAllOverAgain) && (resettimer == 0))           //charge cylce starts here
    {
      lcd.setCursor(0, 1);
      lcd.print("PreBulk       ");
      start = millis();                   //sets start time for when bulk charge starts
    }


    if (weAreHereNow == 0 && vin > startAllOverAgain)    // if stage 1 then we do this routine
    {
      lcd.setCursor(0, 1);
      lcd.print("Bulk       ");
      lcd.setCursor (7, 1);
      lcd.print((millis() - start) / 60000); // Displays how many minutes since bulk charge started
    }

    if (weAreHereNow == 1)    // if stage 2 then we do this screen routine

    { if  (vin >= ((absorbCharge + tcomp) - 0.5))
      { lcd.setCursor(0, 1);
        lcd.print("Absorb      ");
        lcd.setCursor (7, 1);
        lcd.print(absorbTime);// Display minutes actually at absorb voltage
      }
      else if (vin < ((absorbCharge + tcomp) - 0.5))
      { lcd.setCursor(0, 1);
        lcd.print("< Abs      ");
        lcd.setCursor (7, 1);
        lcd.print(absorbTime);
      }
      if (absorbCharge == EqualizationCharge)
      {lcd.setCursor(0, 1);
        lcd.print("Equal      ");
      }
      
    }
    if (weAreHereNow == 2)
    {
      lcd.setCursor(0, 1);
      lcd.print("Float      ");
      lcd.setCursor (7, 1);
      lcd.print(fullTime);           // Display minutes since float was started
    }

    lcd.setCursor(11, 1);
    lcd.print("T");
    lcd.setCursor (12, 1);
    lcd.print (battemp);             // Display actual battery temperature
  }

  if (vin >= (absorbCharge + tcomp) && weAreHereNow == 0) // if we achieve 59v (bulk chg) AND we were in stage zero then change weAreHereNow to 1 as a flag ie absorb
  {
    weAreHereNow = 1;               //   weAreHereNow=1 is absorb status
  }

  //=============bulk routine==============


  if ( weAreHereNow == 0)           // if in stage 1 then check voltage against bulk charge constant ... can be set in definitions
  { pulseVal = 255;                 // was not up to bulkCharge, then increase pulse width incrementally
    astart = millis();              //sets start time for when absorb charge starts
  }

  //==========absord routine==============

  if ( weAreHereNow == 1 )            // if we are in absorb then do this
  {
    if  (vin >= ((absorbCharge + tcomp) - 0.5)) { // This section is keep track of the time at or just under absorb voltage
      aelapsed = ((millis() - astart) - apause);  // aelapsed = time from the absorb cycle starting less the time below (absorbCharge + tcomp) - 0.5)
      afinished = millis() - apause;              // afinished is used to calculate time below absorb
      absorbTime = (aelapsed) / 60000;            // convert time to minutes

    } else {
      apause = (millis() - afinished);            //time below absorb set point since absorb started
    }
    if (absorbTime >= timedOut)                   // once we reach timedOut, we have finished our absorb sequence, change status flag weAreHereNow to 2, and change the voltage now to float value
    {
      weAreHereNow = 2;
      fstart = millis();
    }

    if (vin < (absorbCharge + tcomp))
    {
      pulseVal = pulseVal + increment; // was not up to bulkCharge, then increase pulse width incrementally
    }


    if (vin > (absorbCharge + tcomp))
    {

      pulseVal = pulseVal - increment;
    }

    if ( pulseVal >= 255)
    {
      pulseVal = 255;
    }
    if ( pulseVal <= pwmmin)
    {
      pulseVal = pwmmin;
    }
  }
  //=========float routine=======


  if ( weAreHereNow == 2)      // are we in float charge stage

  {
    if  (vin > ((floatVolts + tcomp) - 0.5))

    {
      fullTime = (millis() - fstart) / 60000;   // increment float timer
    }


    if (vin < (floatVolts + tcomp))
    {
      pulseVal = pulseVal + increment; // is not up to float voltage, then increase pulse width incrementally
    }


    if (vin > (floatVolts + tcomp))
    {
      pulseVal = pulseVal - increment; // keeping charge in the float band....floatVolts is the constant we use
    }

    if ( pulseVal >= 255)
    {
      pulseVal = 255;
    }
    if ( pulseVal <= pwmmin)
    {
      pulseVal = pwmmin;
    }

  }
  //==============================write the pulse to the fet======================
  analogWrite (PWMout1, pulseVal);  // actually write the data to the fet via pin 6 ...

  //=============================================
  if ((vin > startAllOverAgain) && (weAreHereNow == 4))
  { resettimer = 0;
    weAreHereNow = weWhereHere;
  }
  if ((vin < startAllOverAgain) && (resettimer == 0) && (weAreHereNow >= 1))

  { resettimer = millis();
    weWhereHere = weAreHereNow;
    weAreHereNow = 4;
  }
  if (resettimer > 0)
  {
    lcd.setCursor(0, 1);
    lcd.print("reseting ");
    lcd.setCursor (9, 1);
    lcd.print((millis() - resettimer) / 60000);           // Display minutes since reset was started
  }
  {
    if ((vin < startAllOverAgain) && (resettimer + ( startoverdelay * 60000)) <  millis())    // Voltage level to restart charge cycle when voltage drops below threshold due to night or very heavy load  {
    {
      weAreHereNow = 0;             //reset values for start of next charge cycle
      absorbTime = 0;
      astart = 0;
      apause = 0;
      aelapsed = 0;
      fstart = 0;
      fullTime = 0;
      resettimer = 0;
    }

  }
}


Edited by Madness on 03 December 2017 at 3:14pm


__________________
Off the grid and on the cloud
Back to Top View Madness's Profile Search for other posts by Madness
 
Revlac
Regular Member
Regular Member


Joined: 31 December 2016
Location: Australia
Online Status: Offline
Posts: 51
Posted: 03 December 2017 at 9:25pm | IP Logged Quote Revlac

That pile of batteries, They served you well for a bit. looks just like my backyard I have probably twice that many.

The new batteries will charge better on the cloudy days as they are more efficient.
I can't see why the mosfet's should fail, they are only on/off switching?.

Cheers
Aaron
Back to Top View Revlac's Profile Search for other posts by Revlac
 
Madness
Guru
Guru
Avatar

Joined: 08 October 2011
Location: Australia
Online Status: Offline
Posts: 1154
Posted: 03 December 2017 at 10:02pm | IP Logged Quote Madness

Price of lead is up so might be a good time to cash in those old batteries in Aaron. The old batteries did the job but they were a pita to top up the water and check specific gravity with so many individual cells.

Yes definitely a big difference on cloudy days, this morning we had partial cloud till around 10 and then it started raining on and off with no breaks in the clouds. We were able to do a load of washing, dry it in the dryer, run a wash in the dishwasher and still got to float by 1 PM. Not long after that, it got really dark and all my panels were making < 50W most of the afternoon.

__________________
Off the grid and on the cloud
Back to Top View Madness's Profile Search for other posts by Madness
 
Madness
Guru
Guru
Avatar

Joined: 08 October 2011
Location: Australia
Online Status: Offline
Posts: 1154
Posted: 16 December 2017 at 1:31pm | IP Logged Quote Madness

Finally solved the MOSFETs shorting issue, I had to separate the Drains of the MOSFETs from each other as per the diagram. It has been running well with this modification, I am not sure what difference it makes but this how my original design was made and it has not failed.











Edited by Madness on 16 December 2017 at 1:32pm


__________________
Off the grid and on the cloud
Back to Top View Madness's Profile Search for other posts by Madness
 
Tinker
Guru
Guru
Avatar

Joined: 07 November 2007
Location: Australia
Online Status: Offline
Posts: 1265
Posted: 16 December 2017 at 6:49pm | IP Logged Quote Tinker

Hi mad, trying to understand what you are doing and knowing not much about GTI's...

Must one connect two strings of panels to this GTI or will it work if one has just one string of panels?

__________________
Klaus
Back to Top View Tinker's Profile Search for other posts by Tinker
 
Madness
Guru
Guru
Avatar

Joined: 08 October 2011
Location: Australia
Online Status: Offline
Posts: 1154
Posted: 16 December 2017 at 7:31pm | IP Logged Quote Madness

Hi Tinker,

The GTI has 2 inputs each with its own MPPT circuitry, the maximum power either side can handle is 3500W. I have 2 strings of 2500W each giving a total of 5KW which is the maximum total output for the GTI.

It will work with one string but it is limited to the 3500W, the idea of being split into 2 is you can have each array in different conditions and it will get the most power from each string.

It has me baffled as to why the separation of the drains makes a difference but until I did this it would blow MOSFETs as soon as it starts regulating. At 100% on there was no issue, with only one string of panels connected it was fine, but with both connected it shorted out at least 1 MOSFET instantly when the PWM started.

__________________
Off the grid and on the cloud
Back to Top View Madness's Profile Search for other posts by Madness
 
Tinker
Guru
Guru
Avatar

Joined: 07 November 2007
Location: Australia
Online Status: Offline
Posts: 1265
Posted: 16 December 2017 at 10:39pm | IP Logged Quote Tinker

Mad, have you ever measured between each negative input of the GTI if *nothing* was connected to it? If you do not see a short circuit between those connections then the GTI input is perhaps not happy having the negative inputs switched rapidly on and off if there might be different power levels at the positive inputs.
Just a theory...

__________________
Klaus
Back to Top View Tinker's Profile Search for other posts by Tinker
 


If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Search the forums using Google.
<< Prev Page of 12
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1560 seconds.
Privacy Policy     Process times : 0.05, 0, 0, 0.11