Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:34 28 Nov 2024 Privacy Policy
Jump to

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.

Forum Index : Electronics : Controlling a GTI into the ozinverter

     Page 1 of 6    
Author Message
oztules

Guru

Joined: 26/07/2007
Location: Australia
Posts: 1686
Posted: 11:59am 12 Jul 2017
Copy link to clipboard 
Print this post

Idle curiosity caused me to combine one of my run of the mill voltage regulators for simple pwm that I use in my 100 amp 48v controllers... into an aerosharo grid tie unit.

I decided this would be simple to do, as it is already set up for 48v battery operation, is fully controllable, and provided high current direct pwm output to drive any kind of fet load.

So the theory looked good, and after 10 mins adapting it to a grid tie ( 1.5kw aerosharp)... stood back and turned it on.

Sadly it was latish in the day, but it still drove near 800 watts back into the ozinverter and into the house and battery bank... then the clouds, and then too late.

So today I hope for some spare time, and some sun to continue testing.

The environment is about 350 volts, and a max of 5.5amps ( yes the little 5x5 cells I DONT use for the off grid system. I only use 6x6 cells for off grid.)

This feeds direct to the aerosharp inputs. Here the neg gets interrupted by a big 600v fet of .35rdson, 20 amps... don't recall the type at the moment, but pulled from a blown up SMA 1kw GTI it was an IXZ something something 600v 20a.

It stayed cold as it was attached to inner case against the heat sink.

Anyway, this turned out to be completely controllable from the 800w down to 14 watts and then no watts.

Now for Clockman, and others where the battery is not available for the monitoring and control, a simple transformer on the output of the GTI will do for the input and driving power of the pwm, so remote operation is possible, using the AC voltage to tell you that the bank is near full, and it will throttle the GTI back and maintain a set AC voltage if the sunlight is available.

Just how that works out in the real world I won't know until I get a 48v tranny or change the board to accept 12v or so .... but it looks stupidly simple at the moment, so am expecting a foot up the bum today as problems arise that i have not bothered to realise yet.

This may help mad and clockman anyway, will update further after some sun turns up and we push it to the max for a bit.

Will rewire the board for 12v and test that on a little 2w tranny today perhaps...... It must work, as thats how the ozinverter regulates itself to very close tolerances.... we will see I guess.



..........oztules
Village idiot...or... just another hack out of his depth
 
Madness

Guru

Joined: 08/10/2011
Location: Australia
Posts: 2498
Posted: 12:56pm 12 Jul 2017
Copy link to clipboard 
Print this post

Hi Oz,

Would be nice to have control of the GTI's, mine has been running well ATM using the hot water system and a heater to dump power as needed. This is controlled by my charge controllers, however dumping heat like this works but it is hard on off. Having the ability to throttle back the GTI to match what is required would save the problem I have when the hot water switches off and the heater is not enough load to take care the excess power. What I have been doing is covering the solar hot water panels when we have a few days in a row of clear skies. This increases the reliance on electrical power to heat the water.


I look forward to seeing your progress.
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: Australia
Posts: 1686
Posted: 02:56pm 12 Jul 2017
Copy link to clipboard 
Print this post

Well Mad, this is going just too well.

I left it connected up last night, and it woke itself up as it should, and just went to work.

Here are some pics of the setup.

This is the current inverter under test for yet another site... there are quite a number out there now with thousands of hours collectively.... pretty well tested now.... under real house conditions in all kinds of environments.



The GTI is a stock aerosharp 1.5kw unit... only mod is a fet stuck to the back wall, interrupting the neg terminal from the solar neg to the board itself. The input caps are doing any filtering required.

Somehow ( and i don't quite know yet) it keeps the GTI circuits alive while i was fiddling with the control pot, which would have shut all DC power off i would have thought.... but it must leak some hF dc through, as it stays alive, and the caps stay at 150v... threshold before trying to grid connect..... don't know how yet.

Anyhow, here is the voltage gauge on the main inverter, all AC output is turned off, so anything coming in goes to the batteries...... and the main DC solar controller is set to only 54v, so is not helping in any way to charge the batts.... they are standing at around 56.6v under thi9s test. I have set the off at 57v, so it should taper in about an hour or so.




and another go.....




Here is the output screen from the aerosharp... the pics are taken close together, but not close enough for definitive power relationships to be accurately computed... but roughly speaking, there seems to be about a 40- 50 watt difference at the 850 watt range, so 5-6% losses in the system at that level... probably get better as the power goes up from there.... will have to check later in the evening to see how it runs at very low inputs.




Here is a pic of my 48v control card that is used in the normal solar controller. It can easily run 10 IRF4110 or similar.... here it is only driving a single fet, so it is a doddle.





So for the aerosharps at least , they seem to not mind the control of the panel power. There is no difference to operation apart from less power if I turn the pot down to say 55v, and it pwm's the controller... the GTI just follows perfectly..... hope this continues in this vein.



..........oztules









Village idiot...or... just another hack out of his depth
 
Madness

Guru

Joined: 08/10/2011
Location: Australia
Posts: 2498
Posted: 03:28pm 12 Jul 2017
Copy link to clipboard 
Print this post

Looking very good.

So the IRF4110's are okay with the high PV voltage?

I have thought the way to do it would to have the PV control in a separate box and leave the GTI stock. It would be very easy to incorporate an Arduino to control the charging regime. Like commercial charge controllers that charge up to the absorb voltage which is 59.2 in my case and hold it there for 2 hours and then drop back to float. It would also be easy to incorporate control for a hot water system to turn on when absorb voltage is reached. But that is just complicating things, I will be keen to try it when you have circuit ready.

A little bit of another side issue, would it work also with using a 240AC generator with rectifiers to supply DC. Could this be left wired in permanently and just start the generator when required.
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: Australia
Posts: 1686
Posted: 04:12pm 12 Jul 2017
Copy link to clipboard 
Print this post

No, the irf4110 is what it was designed to drive, but not in this case.... these are 600v fet we are talking about, but it could drive a heap of them i suspect, their insulator in the gate must be thicker for the high voltage I expect ... so the capacitance of the gate to be less per fet too.

Yes, with a few small adjustments to the control, it would work with the genny... current limiting the thing may be worthwhile, rather more than voltage perhaps... or both.... plenty of op amps spare on the chip...... and your probably going to use a micro anyway, but the idea still works.

It could certainly be all outside the GTI.... makes no difference where it is... between the panels and the gti will be fine.

Plenty of sun now, so results should be forthcoming, and smoe minor adjustments to duty cycles will need to be effected i think.

But the idea of controlling the PV inputs to the GTI looks dirt simple so far.



..........oztules
Village idiot...or... just another hack out of his depth
 
Clockmanfr

Guru

Joined: 23/10/2015
Location: France
Posts: 429
Posted: 09:52pm 12 Jul 2017
Copy link to clipboard 
Print this post

Thanks Oztules for looking at this.

Yes, sorry for my tardiness, I have my 3w trannies and the bits, but this time of year I struggle to find time to experiment and breadboard.......

As I said before there is definitely a voltage rise on the 230vac when the batteries push back, and this is different for the Chinese PJ and the OzInverter boards.

Originally I was using the GTI internal settings to switch themselves off, but even with these so called Rolls Royce SMA GTI's each has different tolerances before switching off. Some behave some don't.

At present, its summer, I have all my GTI's off, and my wind turbines shut down as my 5kw of PV on trackers is DC charging to my batteries.

I have been welding some big complicated gates these last 3 weeks and the OzInverter copes very well, and I switch 2 GTI's on in the welding building/barn to assist as I am 500 meters from the OzInverter. Yes there is voltage drop, and yes one of the GTI's will drop out, at a 3 or 4kW load, so it doesn't like it. But in general AC coupling does work very well.

I was going to use the PSU to the GTI shut down board, (SDB) to operate a Relay/contactor on the AC side of the GTI. I think this is standard practice.? rather than getting 230ac direct onto the GTI SDB. Yea we need AC to the GTI SDB but just sensor type cables. Mmmm thinking about it your probably correct in switching AC 230vac on the board, just less cables coming and going and probably more robust and simpler...... please excuse my meanderings....

That GTI SDB of yours looks good, I await your comments.

And controlling the PV input on the GTI looks interesting. Although GTI shut down does require the AC to be switched off first when GTI is shutting down. And PV on first when switching GTI On. But then why this particular On Off regime mentioned by the GTI manufacturers.?



Edited by Clockmanfr 2017-07-14
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.
 
Clockmanfr

Guru

Joined: 23/10/2015
Location: France
Posts: 429
Posted: 10:20pm 12 Jul 2017
Copy link to clipboard 
Print this post

Hi Madness,

Yes I have got some Arduino Micros, but I am pretty thick when it comes to putting those together and getting the coding correct.

A 3w tranny, it has 2 12v windings, one for censoring the 230vac, the other for PSU for the 5v 13v for the Arduino input and DC powered AC switch off relay for the GTI.

But still have not done the actual testing/figures on the AC voltage back feed rise when the batteries push back as they fill.

Problem with this is that each batteries installation will vary, so a standard hysterias/lag settings may not fit all.

Also there may be voltage drop for each different GTI on the OzInverter mini Grid that will need to be set at each installation.

So providing a AC coupling standard box of tricks for a GTI SDB will be interesting.




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: Australia
Posts: 1686
Posted: 11:44pm 12 Jul 2017
Copy link to clipboard 
Print this post

Well it ran all day with only small stops while i tried different values on the controller board to try to tame the pwm a bit.... it was a bit brutal... well more than I wanted anyway.

Ok.... it works as a concept, and it could work permanently just as it is.

It may be better to just use an arduino for the pwm and sensing, and be done with it, so that Mad can use his algorithm for the charging.... ie get it up to 60v for a few hrs, then back off a bit. This won't do that, it will drive hard till your set point, then feather at that voltage... for winter i set for 59v and leave it, there are not enough hrs of sun to over charge the bank no matter how sunny it is... yes uses water, but i have access to 1000lts per day anyway.

First some dribble.... to say I'm pleased with the ozinverter is an under statement. The noises that came out of the GTI and the inverter when i was tuning it up was scary, but no damage was done, no matter how wildly I tried to upset the power play... It was running the house 3kw loads for a few hrs, whilst accepting wild fluctuations from my twiddling of the pot on the GTI control ( 0-1000w near instantly), while the 80 odd amps from the pwm main solar control gyrated around to match to hold things steady.

Then to really test what would happen, I plulled the 48v leads from the controller to see what would happen at the fet.... then interrupted the solar, then the AC then all of the above....in different combinations.... could not trick it into a deadly fault.

I made that many wild swings in the source voltage and the feedback voltage from full loads to no loads, full solar, full gti solar and all the above... nothing bothered the inverter..... so it is certainly not sensitive to wild loadings and batt voltage manipulation.... I also inadvertently introduced severe instability in the GTI, until it switched out in disgust..... but came straight back on.... I came away impressed. This inverter only has 35kwh on the clock in burn in so far.

Some pics just to make folks think i did something today.....

Here we have the led lights attatched to the gti controller, three lights means that we have float conditions... ie on, charge and float all together, means it is rattling around between all three very fast.




It measures the input signal ( from an AC tranny or battery voltage in this case) and puts that against a zener voltage in a comparator. This comparator sends the output to another comparator that has a triangular wave form on one input, and the result of the voltage switch ( previous comparator). The level of this voltage , against the triangle forms the pwm wave. This goes to a high power totem pole and out to the remotely mounted fet....A third comparator in the chip makes the triangle wave train.


This fet can be seen in this picture, it has a gate zenner to protect it from me, a 10k gate pull down resistor and a 56r gate resistor if your wondering what is on the pins.... fuzzy I know....



The 1.5kw array managed to get up to well over a kilowatt at one point, so the on off was pretty savage when i was messing about with it.




Seems a pretty efficient way of charging the batts.

One second it was this




and the next second it was this.




And if i kept my finger out of it, it remained battery voltage stable at what ever i set it as. I ended up making the normal solar input fixed at 56v, and the GTI at 59v. Most fo the day it was at the 59v mark, and then dropped back as the light worsened later on.

All up, very very successful Mad and Clockman... this will work very well with some thought, but the idea works flawlessly... it will solve your problems.

I will work with this design for a few days, as i can see it making what I need easily, but will have to do the arduino thing I think, as that will solve algorithm problems I can't easily do without a micro.

Looks like a goer..


............oztules

Edit: clockman, I have not had enough light to send the AC volts high as yet. I would have thought i would get there today, but the voltage stayed almost the same... maybe a volt or so more.
Have you found much difference between the PJ and the 8010 control over the AC.... I expect i have yet to see enough sun to cause this... maybe tomorrow.









Edited by oztules 2017-07-14
Village idiot...or... just another hack out of his depth
 
Madness

Guru

Joined: 08/10/2011
Location: Australia
Posts: 2498
Posted: 11:47am 13 Jul 2017
Copy link to clipboard 
Print this post

  Clockmanfr said   Hi Madness,

Yes I have got some Arduino Micros, but I am pretty thick when it comes to putting those together and getting the coding correct.

A 3w tranny, it has 2 12v windings, one for censoring the 230vac, the other for PSU for the 5v 13v for the Arduino input and DC powered AC switch off relay for the GTI.

But still have not done the actual testing/figures on the AC voltage back feed rise when the batteries push back as they fill.

Problem with this is that each batteries installation will vary, so a standard hysterias/lag settings may not fit all.

Also there may be voltage drop for each different GTI on the OzInverter mini Grid that will need to be set at each installation.

So providing a AC coupling standard box of tricks for a GTI SDB will be interesting.





Hi Clockman,

I am yet to see any significant voltage change when the batteries are fully charged on the AC side. If you are wanting to work off the AC voltage it can be done but the Arduino can only read a maximum of 5V DC. That can be done with your 12V transformers and a couple voltage divider resistors.

It would be far better to read the battery voltage, even if the GTI is some distance from the battery bank can you run wires to sense the battery volts?

The variables I would plan to use are voltage correction value, Absorption volts, Absorption time, Float voltage and the option of a battery temperature sensor.

I am basing this on the charge controllers that I have ATM, I can write the code so all you would need to change is these parameters at the top of the code. A LCD is cheap and easy to include also so you can see what is going on if you wish.

Oz,

I usually get plenty of charge in winter as our climate is mostly dry and clear in winter. That combined with the cooler temperatures means too much power unless it is controlled somehow. Edited by Madness 2017-07-14
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: Australia
Posts: 1686
Posted: 02:16pm 13 Jul 2017
Copy link to clipboard 
Print this post

Dark skies and rain.... there goes the testing.

Mad, did a little program last night to drive that fet from the arduino... will have to build the nano board and totem pole driver for the output. It combines the bulk, absorb and float and is probably a poor analog of the commercial ones .... although i cant see how much different they could do it realisticlly.

Clockman, you already have cables joining the "houses" together.... use the 230v lines for communication. I remember reading about it being done in new York in the thirties for voice communications, and the power mobs over here do that too for syncing different things.... so may be the best way to go about it if the 8010 does not raise the voltage appreciably.

.........oztules


Village idiot...or... just another hack out of his depth
 
Madness

Guru

Joined: 08/10/2011
Location: Australia
Posts: 2498
Posted: 02:59pm 13 Jul 2017
Copy link to clipboard 
Print this post

The charge settings for the commercial controllers are not rocket science. What they have is all the bells and whistles to make it easy for anybody to use it. So what you are doing Oz is a good analogue IMHO as far the actual end result goes.

I have thought using a Uno with a LCD screen could be set up to have the ability change settings directly just like a commercial charge controller.

Previously I was using powerline ethernet adaptors to my workshop, I ended up changing to a cable due the hardware failing. But while it was working it worked well.
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: Australia
Posts: 1686
Posted: 11:43pm 13 Jul 2017
Copy link to clipboard 
Print this post

Ok Mad,

This will show you how bad I am at programming the arduino...

Same as i don't do schematics, and just cobble together a circuit on the pcb program my programming is worse... no flow diagrams... just start typing.... and it shows too.

Real programmers may suffer hysterics... read at your own peril


I stole the pwm example function from the arduino site... and then worked out the if statement i think.... will be interested how or what it really does when unleashed on the GTI.

I do this so rarely, that I have to start from scratch each time... bummer really.

So this is what I think will work in some manner yet to be seen.

It compiles at least... first hurdle over.





int ledPin = 9; // fet gate connected to this pine via totem or similar driver digital pin 9

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
int time=0; // initialise the time to zero for the absorb
int floatVolts = 475; // compared to the 500 of the bulk and absorb.... 59v... maybe 8points per volt change? so 475 for 56v
int bulkCharge = 500; // figured that half way ( 500 ) would do as the set point for absorb voltage
int absorbCharge = 500; // voltage equivelent for the absorb voltage.... same as bulk.... funny about that.
int startAllOverAgain = 410; // prpobably in the 49v range
int timedOut = 7000; // time in seconds or thereabouts for absorb 7000= roughly 2 hrs, there are a few milliseconds in there apart from the 7000
int increment = 5; // fraction of the 255 that will change with each decision.

// we start by no pulse width, then build up smoothly to max width ( 255 ). We then monitor, and when we get to
//59v, we move to the absorb routine, where we run at 59v for a few hours, then move to the float routine.... at 56v
// o/night, the volts drop to zero, and the nano resets... well thats the theory... maybe look for 49v in the float routine and reset that way ... hmmm sounds good...
// pity the GTI will have a 3 min startup... ruins the ramp up really....so we will really start at 255 full bore not a bad thing anyway
void setup() // this is where the story starts...

{

pinMode(ledPin, OUTPUT); // sets the pin 9 as an output for the fet drive

}



void loop() // and this is where the story really starts

{

val = analogRead(analogPin); // read the input pin

if (val< bulkCharge)
{
pulseVal=pulseVal + increment; // as not up to 59v, then increase pulse width incrementally

analogWrite (ledPin,pulseVal);

}

if (val>=bulkCharge)
{
delay (1000); // no reason really
time=0; // if we do get to 59v, then change to absorb routine, set initial time=0

absorb;
}

if (val>bulkCharge)
{
pulseVal=pulseVal-increment;
analogWrite(ledPin, pulseVal ); //this is just a catch all I guess, and makes no sense in the bulk phase

if (pulseVal>=255) // another catch all to stop from going over the 255 if thats possible
pulseVal=255; // for the pulse itself probably not, but the artihmetic may do so.
analogWrite(ledPin,pulseVal); // set pulse for max and no more.

delay(50); //.... seems like a good idea... steady the ship so to speak
// analogRead values go from 0 to 1023, analogWrite values from 0 to 255.... reminder to self... this is how pwm works.


loop ; // go to start of loop and do it all over again till we get it right where val>=59v..... bulkCh
}
}
void absorb()
// this routine should take care of about 2 hrs of charging in the 59v band.
{

val = analogRead(analogPin); // read the input pin

if (val< absorbCharge) // and try to keep in the 59v range
{
pulseVal=pulseVal + increment;

analogWrite (ledPin,pulseVal); // yes this is an unnessary cut and paste from above... we have plenty of memory....

}

if (val==absorbCharge)
{
// this line left intentionally blank.... always wanted to use that some where....
}

if (val>absorbCharge)
{
pulseVal=pulseVal-increment; //slow it up a bit.... and keep to the script
analogWrite(ledPin, pulseVal );
}

if (pulseVal>=255)
{
pulseVal=255;
analogWrite(ledPin,pulseVal);
}
delay (1000); // here we increment the time base

time=time+1;

// note to self....analogRead values go from 0 to 1023, analogWrite values from 0 to 255

if (time<=timedOut) // test to see how long we have been at the 59v mark in seconds
{
absorb; // if less than 7000 seconds, then back to absorb and do another seconds worth
}
floatCharge; // if >7000 seconds...head over to float charge, and give that a go
}

void floatCharge()
{


val = analogRead(analogPin); // read the input pin

if (val< floatVolts) // all looks suspiciously familiar, but works hopefully
{
pulseVal=pulseVal + increment;

analogWrite (ledPin,pulseVal);

}

if (val==floatVolts)
{
delay (50); // no reason really... kill a bit of time and add some hysterisis
}

if (val>floatVolts)
{
pulseVal=pulseVal-increment;
analogWrite(ledPin, pulseVal );
}

if (pulseVal>=255)
pulseVal=255;
analogWrite(ledPin,pulseVal);

if (val <= startAllOverAgain) // check for low voltage ..... then panic
{
time=0;
loop; // if the voltage drops through to 49v or whatever the startAllOverAgain value is...... then reset back to the main loop with values at start up.... I hope....
}


floatCharge; // loop in float forever...... or until the sun goes down at least, try to hold onto 56v or so. If we drop to 49v, then restart the whole game from main loop onwards.



}
//thats all folks





........oztules

Edit.... re-reading that....I think the absorb should really be a while loop... as the updates are screwed/elongated by the timer.... or bring the time to .01 seconds, and change the int timedOut to long timedOut and bring it up to 700000Edited by oztules 2017-07-15
Village idiot...or... just another hack out of his depth
 
Madness

Guru

Joined: 08/10/2011
Location: Australia
Posts: 2498
Posted: 12:22pm 15 Jul 2017
Copy link to clipboard 
Print this post

Hi Oz,

Getting my head around someone else's code takes me a little time but here goes.

I am working on putting it into a simulator, will let you know when I get that sorted.
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: Australia
Posts: 1686
Posted: 04:09pm 15 Jul 2017
Copy link to clipboard 
Print this post

After a ninetieth birthday do yesterday and well into the night, i have not had a chance to try it out will do in the next hour or so as the head clears from the celebrations....

I have just finished marrying the nano to one of the normal boards shown in the pics above. By just removing the analog bits, leaves the power supply, divider, output totems all ready to hook into the nano with 4 wires... so did that.
loaded into the chip, and ran it on the CRO.... just needed to catch the over flow properly on the 0-255 pwm.... i put the catch all in the wrong part of the routines....

Apart from that, it looks very nice. the waveform smoothly tries to adjust and all looks good... thats the main loop, will look at the absorb and float after seeing the main loop on the real thing.

Should know a lot more in a few hours i guess.


.......oztules


Village idiot...or... just another hack out of his depth
 
oztules

Guru

Joined: 26/07/2007
Location: Australia
Posts: 1686
Posted: 08:11pm 15 Jul 2017
Copy link to clipboard 
Print this post

ok this is a tidier version... and is known to work properly ( well... in test mode anyway)

This is a test mode version, where the set points will need to be changed for different setups on the input pin voltage versus the real voltage in the battery.

I started off using 500 as the set point for 59v.... but decided to get better definition by using 1000 for 59v.... which made my float at 57v look like 972.

I have left the serial parts in there for looking at whats going on.

But the main thing to take away from this is that dealing with GTI interface is really very very simple.. and why didn't I do this years ago. It would have changed the way I did things and set up the system.

Clockman, I have not seen much in the way of AC voltage swing in the 8010 designs i have.... so you may need to use the power jack instead to get the AC lift, or your 8010 may do a bit better/differently, as I have had barely enough sun to test this out hard as yet.

so here is what a hangover looks like after the night before... hic...


int ledPin = 9; // fet gate connected to this pine via totem or similar driver digital pin 9

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
int floaTime=0; // initialise the time to zero for the absorb
int floatVolts = 972; // 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 = 820; // prpobably in the 49v range
long timedOut = 50; // time delay and step rate will change this... 50 is for 30 second absorb test only.... must 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

Serial.begin(9600);
}
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(100); // use this to speed things up and down.... responsible for the timing number calculation


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) // 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==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, 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


...........oztules


Village idiot...or... just another hack out of his depth
 
oztules

Guru

Joined: 26/07/2007
Location: Australia
Posts: 1686
Posted: 08:15pm 15 Jul 2017
Copy link to clipboard 
Print this post






and this from a distance





Thanks for trying Mad, this should be easier to deal with I hope.... my programming style is erratic and strange.
......oztulesEdited by oztules 2017-07-17
Village idiot...or... just another hack out of his depth
 
Madness

Guru

Joined: 08/10/2011
Location: Australia
Posts: 2498
Posted: 11:35pm 15 Jul 2017
Copy link to clipboard 
Print this post

Good to see you are making progress, nice to see you have chosen to use digital too.

Your mischievous comments in the code were a little distracting, I find it difficult to focus doing code.

Are you ready to let us know what the hardware is?
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: Australia
Posts: 1686
Posted: 12:46am 16 Jul 2017
Copy link to clipboard 
Print this post

Yes, I have just modified the normal 48v analog controller board as I have a 15 of them... will send you some if you want.

The nano will just be glued to the empty space in the center, and has 4 leads going to the board...and two to the fet
plus12v....
gate drive to the fet
Source lead to fet ( neg )
negative/gnd
pwm to the totems
bat plus from the divider.

Thats it.

Here is the pic of the board.... the print to pdf is not set up in this linux at the moment.... just another install..... so a pic will have to do .







edit: the 12v zener... I actually use 18v coz I have a bundle of them... the nano is happy up to 20v. So if you choose the 12, you will have to adjust the 270r resistor to keep at least 11-12v for the totem driver to keep the fet turned on or off properly.
.
..... oztulesEdited by oztules 2017-07-17
Village idiot...or... just another hack out of his depth
 
Mulver
Senior Member

Joined: 27/02/2017
Location: Australia
Posts: 160
Posted: 02:38am 16 Jul 2017
Copy link to clipboard 
Print this post

Really Awesome! Oztules you are a legend!

So do you think it will work on a HF grid tie?

Mulver
 
oztules

Guru

Joined: 26/07/2007
Location: Australia
Posts: 1686
Posted: 03:52am 16 Jul 2017
Copy link to clipboard 
Print this post

I don't have any useful play time with HF grid ties..... but we are really only strangling the DC input feed, so provided the HF has input capacitors then yes... if not then stand alone unit that intercepts the solar before it gets to the GTI that has Caps in it, would solve the problem.

I think they drive a buck converter on the input, and it may or may not care for lumpy inputs... that I don't know, but a filtered stand alone box would have to work I would think.


............oztules
Village idiot...or... just another hack out of his depth
 
     Page 1 of 6    
Print this page
© JAQ Software 2024