Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
Okay Oztules & Madness, finally got some test data on the AC voltage rise set against battery voltage rise when a GTI is backcharging
Note, the batts were full and on float, no diversion or dump loads. Note, the 8010 boards had a similar readings, but I stopped at just before 62vdc.
Edited by Clockmanfr 2017-07-17Everything is possible, just give me time.
3 HughP's 3.7m Wind T's (14 years). 5kW PV on 3 Trackers, (10 yrs). 21kW PV AC coupled SH GTI's. OzInverter created Grid. 1300ah 48v.
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 11:30am 16 Jul 2017
Copy link to clipboard
Print this post
Well that looks like mountains of room to play with... looks like I just need more sun to push the thing harder..... hopefully get some sun today, and will try a little tranny out.
It seems to gyrate around a few ( up to 5 maybe) hundredths of a volt in it's fuzzy logic of up down, and thats dividing from 59v. I'd still be very happy with 60v if I was ac sensing.
So it looks like each GTI inverter could have this built in.
Hope you have a good season there in Normandy.... very cool here.
..........oztules
Village idiot...or... just another hack out of his depth
Madness
Guru
Joined: 08/10/2011 Location: AustraliaPosts: 2498
Posted: 12:33pm 16 Jul 2017
Copy link to clipboard
Print this post
Hi Oztules,
I have tried zooming in but can't make out the 2 transistors on the upper right of the PCB and also what MOSFETs are you using.
There are only 10 types of people in the world: those who understand binary, and those who don't.
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 02:23pm 16 Jul 2017
Copy link to clipboard
Print this post
2sc2655 and 2sa1026 they are a chunky pair of drivers. TO-92MOD case 2A continuous 50v
The fet I grabbed out of the SMA was a IXFH20n60
My 8010 inverter will not shift it's ac voltage.... lots of load ...233v no load...233v.. 56v battery ..still 233v.. 61.5v battery ... 233v.
I'm beginning to think I painted the numbers on the meter. The most I have seen so far is 234v
I should be happy with the regulation...
........oztulesVillage idiot...or... just another hack out of his depth
Mulver Senior Member
Joined: 27/02/2017 Location: AustraliaPosts: 160
Posted: 04:48pm 16 Jul 2017
Copy link to clipboard
Print this post
Thanks Oztules!
Madness Do you think it would be possible to send a signal over the 230v mains to state the battery voltage to remote Grid Ties?
Madness
Guru
Joined: 08/10/2011 Location: AustraliaPosts: 2498
Posted: 05:04pm 16 Jul 2017
Copy link to clipboard
Print this post
Hi Mulver,
Yes very do able, google "Arduino power line communication x10".There are only 10 types of people in the world: those who understand binary, and those who don't.
Mulver Senior Member
Joined: 27/02/2017 Location: AustraliaPosts: 160
Posted: 07:09pm 16 Jul 2017
Copy link to clipboard
Print this post
Thanks Madness!
Clockmanfr
Guru
Joined: 23/10/2015 Location: FrancePosts: 429
Posted: 09:18pm 16 Jul 2017
Copy link to clipboard
Print this post
Hmm, Oztules gets no ac voltage rise on his 8010 boards. hmm
Mine were just as similar as the PJ boards, hmm. I will delve deeper, but that means if there are differences with the OzInverter Mk1,2,3,4,5 and 6, then the AC side is not a viable option.
I was trying to get a simple robust solution to shut the AC side down of the GTI, its normal operating parameters on most GTI's. Yes a Bang Bang as oztules calls it.
Don't get me wrong I love your DC control and the Arduino set up, but being very honest here, coding and what you have done is far beyond my small brain. Sadly at present, I am not in the Ardunio club.
Here this time of year, my time is constantly filled with multitude of other tasks and projects.
Back to my preset DC battery voltage Bang Bang on the AC side using a TX/RX and a few relays.
Thanks Oztules for your ever constant encouragement.
Everything is possible, just give me time.
3 HughP's 3.7m Wind T's (14 years). 5kW PV on 3 Trackers, (10 yrs). 21kW PV AC coupled SH GTI's. OzInverter created Grid. 1300ah 48v.
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 09:45pm 16 Jul 2017
Copy link to clipboard
Print this post
Don't panic Clockman.... I cant code for nuts either.... but with sufficient ...grit ... I can get it to do my bidding.... sort of. As you see it was not pretty, but it seems to work.
Will send you a board with coded nano. Pls send address... I owe you a few boards.
If you have a computer, you can change the code to suit yourself.... just plugs into your usb, download the software from arduino... and it really is that simple..... must be or I would not have guessed how to do it.
If yours changes the AC by that much, this will work on that I expect... maybe I just have not had enough power to do it... it is dark days here at the moment... I'm doing this at just the wrong time of year... there is no point throttling back this time of year... even a good day.... hit it out of the park.....
Mad is a few thousand kms north, he has too much power, so we need him to give it a go soon.
I need to look into the signal over power lines too... that would solve your problem. It should be straight forward to send a signal or tone perhaps.... they did it in the thirties with valves, we must be able to do it simply now...
Today it ran very well, and holds the voltage within a few hundredths of a volt when there is no pertubations on the line... ie it went up to 59.0 +-.05v then held there for 15 mins ( how I set it), then held steady at 57v +-.05v.for hour after hour.
I was pretty impressed how these little nano's can discern the voltage from such a small input signal.... which makes your AC signal big enough to work on I reckon. Changing the definition of the increment, and the timing of the look up, makes a difference yes, but not as much as I expected. It can be pretty clunky, and easily achieve the same thing I think.
oztules Edited by oztules 2017-07-18Village idiot...or... just another hack out of his depth
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 12:01am 17 Jul 2017
Copy link to clipboard
Print this post
Good thing it's my thread I'm messing up.
Ok this is the last iteration of the program.
I felt today it was very nice, but it drove me mad not knowing what stage it was in while I was messing about with it. I had the absorb very short, so things happened quickly... but it also confused me at the same time taking measurements and generally getting tangled up.
So this one tidies up a few things regarding that... it should be the last ( programs and pcb's are never really finished ), but this has enough legs to get the job done satisfactorily.
Program to interface to the GTI control board. This will give a three stage charging regime, with attention lights for cycle position.... I saw no need for LCD support, as gauges will already be installed on the device I suspect... the GTI certainly will.
int ledPin = 9; // fet gate connected to this pine via totem or similar driver digital pin 9 int stage1pin =4; // led for stage 1 bulk int stage2pin =5; // led for stage 2 absorb int stage3pin =6; // led for stage 3 float int analogPin = 3; // divided voltage from battery or transformer if thats your go
int val = 0; // value of voltage query
int pulseVal = 0; // initilise the pulse width to zero of 255.... won't help really as the thing will run for three minutes before kick off long floaTime=0; // initialise the time to zero for the absorb int floatVolts = 969; // compared to the figure of the bulk and absorb... int bulkCharge = 1000; // figured that half way ( 1000 ) would do as the set point for absorb voltage int absorbCharge = 1000; // voltage equivalent for the absorb voltage.... same as bulk.... funny about that. int startAllOverAgain = 820; // probably in the 49v range long timedOut = 1500; // time delay and step rate will change this... int increment = 10; int weAreHereNow=0;
void setup() // this is where the story starts...
{ pinMode(ledPin, OUTPUT); // sets the pin 9 as an output for the fet drive pinMode(stage1pin, OUTPUT); // sets digital pin 4 for stage 1 bulk pinMode(stage2pin, OUTPUT); // sets digital pin 5 for stage 2 absorb pinMode(stage3pin, OUTPUT); // sets digital pin 6 for stage 3 float Serial.begin(9600); }
void loop() // and this is where the story really starts {
Serial.print("pulseVal = " ); // use the serial monitor for Serial.print(pulseVal); Serial.print("read value = "); //show and tell time Serial.print(val); Serial.print("time value = "); // handy to set your set points Serial.print(floaTime); Serial.print("weAreHereNow =" ); // they will be different to mine I expect Serial.println (weAreHereNow);
delay(10); // use this to speed things up and down.... responsible for the timing number calculation
//====================this section just for song and dance and twinkly lights
if (weAreHereNow==0) { digitalWrite (stage1pin,1); //digital pin 4 will light up for the bulk charge bit } else { digitalWrite (stage1pin,0); }
if (weAreHereNow==1) // this lights up digital pin 5 to signal stage 2 the absorb cycle { digitalWrite (stage2pin,1); // this is all to light up leds to see where we are in the cycle } else { digitalWrite (stage2pin,0); }
if (weAreHereNow==2) { digitalWrite (stage3pin,1); //this lights up stage 3.. the float cycle } else { digitalWrite (stage3pin,0); // remember if we drop below about 48v it will reset everything, the leds will show this as stage 1 again. } //=========== enough with the visual nonsense..... on with the show ==========
val = analogRead(analogPin); // read the input pin analog3
if (val>=bulkCharge && weAreHereNow==0) // have we finished bulk yes no? { weAreHereNow=1; // if we have increment flag }
if (val>bulkCharge) { pulseVal=pulseVal-increment; }
if ( pulseVal>=255) { pulseVal=255; } if ( pulseVal<=0) { pulseVal=0; }
analogWrite (ledPin,pulseVal);
if (weAreHereNow==1) //if weAreHereNow is one , then count each cycle from now on until it no longer equals 1 { floaTime=floaTime+1; bulkCharge=absorbCharge; }
if (floaTime>=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; bulkCharge = floatVolts; }
if (val<startAllOverAgain) // panic routine when voltage drops back to 48 volts or so. { weAreHereNow=0; bulkCharge=absorbCharge; floaTime=0; } } //thats all folks EDIT int floaTime needs to change to long floaTime or you cant use more than 32000 in the counts. This file has now been edited for that.
Note remember it uses analog pin 3 for reading.... some fool I know hooked up to digital 3 and wondered why it didn't respond to voltage change.. Edited by oztules 2017-07-19Village idiot...or... just another hack out of his depth
Mulver Senior Member
Joined: 27/02/2017 Location: AustraliaPosts: 160
Posted: 12:40am 18 Jul 2017
Copy link to clipboard
Print this post
Awesome work Oztules! cant wait to be trying this myself in the near future!!
yahoo2
Guru
Joined: 05/04/2011 Location: AustraliaPosts: 1166
Posted: 04:05pm 18 Jul 2017
Copy link to clipboard
Print this post
Looks like I am going to have to have another attempt at this.
I tried to get it to work with a 4.2kw GTI a couple of years ago and it just kept crashing on me. I never did sort out why. I thought my pulses were triggering a shutdown.
I have been doing it with zero export inverters but they are still quite pricey and the software gets more complex every upgrade.
Looks impressive OZ! I'm confused, no wait... maybe I'm not...
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 09:44pm 18 Jul 2017
Copy link to clipboard
Print this post
I found it to be very impressive Yahoo. Do you have any LF gti to start with?
I think I might use the extra pins on the nano for LCD display... it works to good to just leave alone.
Maybe mad will do it first.
.........oztulesVillage idiot...or... just another hack out of his depth
Madness
Guru
Joined: 08/10/2011 Location: AustraliaPosts: 2498
Posted: 10:32pm 18 Jul 2017
Copy link to clipboard
Print this post
I have not done any more with it ATM, got some other stuff going on and trying to stay focused on that.
I like the serial displays as they only require 2 data pins.There are only 10 types of people in the world: those who understand binary, and those who don't.
yahoo2
Guru
Joined: 05/04/2011 Location: AustraliaPosts: 1166
Posted: 10:33pm 18 Jul 2017
Copy link to clipboard
Print this post
No, I had 4 in the shed that I had repaired but they got sold over 12 months ago. I cant seem to hang onto stuff for some reason. I had a heap of panels and they are all gone too. I stopped officially installing solar a couple of years ago but the phone seems to keep ringing. It feels like solar is going to take off again. I'm confused, no wait... maybe I'm not...
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 03:27am 19 Jul 2017
Copy link to clipboard
Print this post
lcd support added. Will test it out on the live system tomorrow.
........oztulesVillage idiot...or... just another hack out of his depth
Clockmanfr
Guru
Joined: 23/10/2015 Location: FrancePosts: 429
Posted: 10:44am 19 Jul 2017
Copy link to clipboard
Print this post
Thanks Oztules I will take you up on that kind offer.
I now have 3 GTI's working with some extra 8kW of PV and powering into my ozInverter mini grid.
I recall you mentioned that 8kW was max for back charging/Ac Coupling.
But I reckon with adequate controls on the GTI's I can squeeze some more PV on other buildings roofs. Prevent excess back charging but use the GTI's output in the Mini Grid.
At present I have set the internal shut down of the GTI's at 241vac, 242vac and 243vac and all seems okay in all possible conditions.
However, my 3off 3.7m dia Hugh Piggott wind turbines are still shut down, and there excess diversion controllers to dump loads are also switched off. It will be interesting to see what happens when the wind turbines are re-instated in the Autumn. I suspect I will have to lower those Ac shut down voltages on the GTI's so the Dump loads do not dump excess for no good reason.Everything is possible, just give me time.
3 HughP's 3.7m Wind T's (14 years). 5kW PV on 3 Trackers, (10 yrs). 21kW PV AC coupled SH GTI's. OzInverter created Grid. 1300ah 48v.
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 01:18pm 21 Jul 2017
Copy link to clipboard
Print this post
ok clockman, things have changed. It is now a fully digital affair, The LCD readout has voltage, and mins of each stage in real time... the micro also has outputs for three leds if you don't want the screen .... just to tell you where in the charge cycle you are. The board looks like this now, and I will get some made, as pcbway is doing 10 boards for 5 dollars..... i cant make them in the bath for that.
The code for it is this at the moment. Will be tested fully today, but appears to pass the smell test.
// include the library code: #include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 10, 9, 8, 7); //10-7 data.12,11 control
int fullTime=0; int bulkTime=0; int ledPin = 6; // fet gate connected to this pine via totem int stage1pin =2; int stage2pin =3; //three pins for stage leds int stage3pin =4; int analogPin = 3; // divided voltage from battery or transformer int val = 0; // value of voltage query int count=0; int pulseVal = 0; // initilise the pulse width to zero of 255.... won't help really as the thing will run for three minutes before kick off long floaTime=0; // initialise the time to zero for the absorb int floatVolts = 969; // compared to the figure of the bulk and absorb... int bulkCharge = 1000; // figured that half way ( 1000 ) would do as the set point for absorb voltage int absorbCharge =1000; // voltage equivelent for the absorb voltage.... same as bulk.... funny about that. int startAllOverAgain = 862; // probably in the 49v range long timedOut = 107000; // time delay and step rate will change this...107000=2hrs int increment = 10; int weAreHereNow=0;
void setup() // this is where the story starts... {
pinMode(ledPin, OUTPUT); // sets the pin 6 as an output for the fet drive pinMode(stage1pin, OUTPUT); //sets pin as output for the stage leds pinMode(stage2pin, OUTPUT); pinMode(stage3pin, OUTPUT); Serial.begin(9600); // for the detective work }
void loop() // and this is where the story really starts
{ Serial.print("pulseVal =" ); Serial.print(pulseVal); Serial.print(" read value ="); //show and tell time Serial.print(val); Serial.print(" time value ="); Serial.print(floaTime); Serial.print(" weAreHereNow =" ); Serial.println (weAreHereNow); delay(10); // use this to speed things up and down.... responsible for the timing number calculation //===========show the current volts with slow up routine called count.==========
if (count==5) { if (weAreHereNow==0) { lcd.setCursor(0,1); lcd.print("BulkChg"); lcd.setCursor (8,1); lcd.print(bulkTime/860); // makes it about a minute update at 860.. ish lcd.print(" min"); }
if (weAreHereNow==1) { lcd.setCursor(0,1); lcd.print("Absorb "); lcd.setCursor (8,1); lcd.print(floaTime/860); // makes it about a minute update at 860.. ish lcd.print(" min "); }
if (weAreHereNow==2) { lcd.setCursor(0,1); lcd.print("Float "); lcd.setCursor (8,1); lcd.print(fullTime/860); // makes it about a minute update at 860.. ish lcd.print(" min "); }
lcd.setCursor(0, 0); lcd.print("Volts = "); // print the volts out lcd.setCursor (8,0); // the if count is to slow the screen update to the value of if count=x lcd.print (val/16.94); count=0; }
count=(count+1); // increment the counter for printing to stop wobble
//====================this section just for song and dance and twinkly lights
if (weAreHereNow==0) { digitalWrite (stage1pin,1); //digital pin will light up for the bulk charge bit } else { digitalWrite (stage1pin,0); }
if (weAreHereNow==1) // this lights up digital to signal stage 2 the absorb cycle { digitalWrite (stage2pin,1); // this is all to light up leds to see where we are in the cycle } else { digitalWrite (stage2pin,0); }
if (weAreHereNow==2) { digitalWrite (stage3pin,1); //this lights up stage 3.. the float cycle } else { digitalWrite (stage3pin,0); // remember if we drop below about 50v it will reset everything, the leds will show this too. }
val = analogRead(analogPin); // read the input pin
if (val< bulkCharge) { pulseVal=pulseVal + increment; // was not up to bulkCharge, then increase pulse width incrementally }
if (val>=bulkCharge && weAreHereNow==0) // now bulkCharge is here, change the weAreHereNow to 1 as a flag { weAreHereNow=1; }
if (val>bulkCharge) { pulseVal=pulseVal-increment; }
if ( pulseVal>=255) { pulseVal=255; } if ( pulseVal<=0) { pulseVal=0; }
analogWrite (ledPin,pulseVal); if (weAreHereNow==0) //if weAreHereNow is one , then count each cycle from now on until it no longer equals 1 { bulkTime=bulkTime+1;
} if (weAreHereNow==1) //if weAreHereNow is one , then count each cycle from now on until it no longer equals 1 { floaTime=floaTime+1; bulkCharge=absorbCharge; }
if (weAreHereNow==2) //if weAreHereNow is two , then count each cycle from now on { fullTime=fullTime+1; bulkCharge=absorbCharge; }
if (floaTime>=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; bulkCharge = floatVolts; }
if (val<startAllOverAgain) // panic routine when voltage drops back to 48 volts or so. { weAreHereNow=0; bulkCharge=absorbCharge; floaTime=0; } } //that all folks
So it is a very simple program, but poorly written as it seems too long to do so little. Anyway, it prints the voltage = xxx on the top line, and the stage and number of minutes it has been operating in that stage... nice to see where we are in the charge cycle, ie bulk plus time..... then absorb plus time in absorb, and then float and float time.
It is set for 59v bulk, 59v absorb, 57v float at the moment.
......oztulesEdited by oztules 2017-07-22Village idiot...or... just another hack out of his depth
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 02:23pm 21 Jul 2017
Copy link to clipboard
Print this post
Here is what it looks like cobbled into/onto and outside of the DC DC solar controller box. So it can run GTI or 60v or whatever solar panel to battery controller box.. like this one is.
Yes there is a discrepancy of about .2v with the two voltages, but thats just changing a single line in the program.
The lights are now integrated with the computer, and run now means bulk, chg now means absorb, and float will mean float... need to make another label.
The calibration pots on the board also affect the voltage algorithm.... pesky, but thats life... the calibration figure in the micro, is used on the voltage from the divider on the board.... so a change in one necessitates a change in the other.
.....oztules edit ... the curse of testing with short time intervals, is you don;tpick up the problems regarding overflow... so the above sketch has a few problems when unleased in the real world.. I won't reprint it now, there may be further bugs I have not found yet.Edited by oztules 2017-07-23Village idiot...or... just another hack out of his depth
yahoo2
Guru
Joined: 05/04/2011 Location: AustraliaPosts: 1166
Posted: 04:27pm 21 Jul 2017
Copy link to clipboard
Print this post
Thank for posting Oztules,
this is the first time I have seen any version of your charge controller, I will have to sit down and try and work out what you have done. Looking at the new version of the board while you talk about the calibration of previous one is a bit confusing.
is this the calibration line? lcd.print (val/16.94);
I will sit down and have a look at it tomorrow. cheers I'm confused, no wait... maybe I'm not...