Home  |  Contents 
Electronics
  Forum Index : Electronics         Section
Subject Topic: Controlling a GTI into the ozinverter Post ReplyPost New Topic
<< Prev Page of 9
Author
Message << Prev Topic | Next Topic >>
Madness
Guru
Guru
Avatar

Joined: 08 October 2011
Location: Australia
Online Status: Offline
Posts: 936
Posted: 14 September 2017 at 2:00am | IP Logged Quote Madness

Hi Yahoo,

Yes I can help with extras, the price of 5 is very little less than 10. I am keeping the PCB to 100 X 100MM to keep the cost down. Is there anything that you would like to see on the board?

__________________
Off the grid and on the cloud


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

Joined: 05 April 2011
Location: Australia
Online Status: Online
Posts: 914
Posted: 14 September 2017 at 5:21am | IP Logged Quote yahoo2

Madness wrote:
Is there anything that you would like to see on the board?


No , dont think so, most of my DC stuff is pretty simple and modular now-days.

As long as there is power I can convert to 3.3 volts for a wireless module I should be fine.

__________________
I'm confused, no wait... maybe I'm not...
Back to Top View yahoo2's Profile Search for other posts by yahoo2
 
Mulver
Regular Member
Regular Member


Joined: 27 February 2017
Location: Australia
Online Status: Offline
Posts: 42
Posted: 14 September 2017 at 8:28am | IP Logged Quote Mulver

yahoo2 wrote:

If you have to do a order of ten, I would buy some of your spares Madness.


I'd happily chip in for a couple if it's an option Madness!
I'm not yet at making pcb status.

FYI
I bought myself an Arduino starter kits for fathers day and have been working on an automatic ssr dump load controller based on oztules code. This will be used to consume power to control the back charging before needing to throttle back the grid tie.

Based on this code Variablessr

As soon as it's cleaned up I'll post it here.

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

Joined: 08 October 2011
Location: Australia
Online Status: Offline
Posts: 936
Posted: 14 September 2017 at 8:42am | IP Logged Quote Madness

Hi Mulver

I will be doing the same also, the new version of the PCB I am working on will require an Arduino Uno. This gives a lot more flexibility to add shields for networking, data logging. I have used code similar to that before but it can play havoc with your inverter, I now turn the SSR on when at full battery voltage and off again if it drops too far.

Other things I will add is temperature compensation to the battery charging algorithm, I will also be using the temperature to control an SSR for air conditioning to keep everything cool, last summer my batteries were getting up to 40 degrees.

Learning to write code for the Arduino opens so many doors to solve problems, whether it is water the garden to a robot the possibilities have no limit.

Anyone wanting boards can you PM with numbers please and I will let you know cost etc.

Edited by Madness on 14 September 2017 at 8:58am


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


Joined: 27 February 2017
Location: Australia
Online Status: Offline
Posts: 42
Posted: 14 September 2017 at 9:51am | IP Logged Quote Mulver

2017-09-14_094737_MulversSSRhackup.zip

Quickly cleaned up my test program, was originally a zero crossing fired interrupt, now just looping on timer set at approx. 50hz. With Serial inputs for adjusting firing sequence. The lookup table is huge so i wont place code in a post.

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

Joined: 08 October 2011
Location: Australia
Online Status: Offline
Posts: 936
Posted: 16 September 2017 at 5:18am | IP Logged Quote Madness

I found a bug in the code, with the modification I made the PWM could remain stuck at a particular level when the voltage dropped. It would then remain there until the voltage returned to absorb volts.

Here is the affected part before the change.

//==========absord routine==============
 
  if (( weAreHereNow==1 ) && (val>(absorbCharge-25)))               // if we are in absorb then do this
  
    
  {
    floaTime=floaTime+1;               // check if time elapsed in absorb is up or not (timedOut constant)
  }
  
  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;
  }
  
  if (val< absorbCharge)
   { 
   pulseVal=pulseVal + increment;  // was not up to bulkCharge, then increase pulse width incrementally
   }


  if (val>absorbCharge)
  {
    pulseVal=pulseVal-increment;
  }
  
 if ( pulseVal>=255)
  {
    pulseVal=255;                // seen all this before
  }
   if ( pulseVal<=25)
  {
    pulseVal=25;
  }


And with the change.
//==========absord routine==============
  {
  if (( weAreHereNow==1 ) && (val>(absorbCharge-25)))               // if we are in absorb then do this
 
    
  
    floaTime=floaTime+1;               // check if time elapsed in absorb is up or not (timedOut constant)
  }
  
  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;
  }
  
  if (val< absorbCharge)
   { 
   pulseVal=pulseVal + increment;  // was not up to bulkCharge, then increase pulse width incrementally
   }


  if (val>absorbCharge)
  {
    pulseVal=pulseVal-increment;
  }
  
 if ( pulseVal>=255)
  {
    pulseVal=255;                // seen all this before
  }
   if ( pulseVal<=25)
  {
    pulseVal=25;
  }



Edited by Madness on 16 September 2017 at 5:28am


__________________
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: 936
Posted: 19 September 2017 at 12:06pm | IP Logged Quote Madness

I was still having dramas with the code, I ended up using a spare Arduino with a variable resistor connected to the 5V pin to simulate the battery voltage and shortened the times down for testing. After simulating what would have taken a few weeks in real life I have tested the code below thoroughly.

Quote:
Mad, I had to back off the 25 pwm... it pulled the battery up to 57v in the end... had to go to 5. I also stuffed up the addition of your code, and moved a brace one position... then the absorb used the last pwm setting if the voltage dropped below 57v... sad syntax me.


25 works for me but I always have enough load, the other charge controllers I am using ATM drop back to zero. Plus I think my batteries are getting a bit tired, I will be looking at a new set in the new year.

Here is the new PCBs I have ordered today, they are all spoken for but I have at least one other order for the next batch. If anyone else is interested they will be $5 AUD each plus postage. If people are prepared to wait 21 days plus I can have them sent by China post that will bring it back a bit. (I hope this is not breaking any rules, I am selling for just above my cost)

First board will run 1 or 2 GTI's or straight PWM PV to battery, the slave board could run another 2 GTI's or another 12 MOSFETs. My plan is to run one 5KW GTI and use the remaining 18 MOSFETs to control PWM PV to battery. I don't know the upper limit but HY4008 FETs are rated at 200A, even at 10% of that 18 of them would handle 18KW of PV on a 48V system.

The boards are designed to mount the FET's on the bottom with the legs bent at 90 degrees so they sit on a large flat heatsink. I have found a few old GTI Inverters that are ideal for this with the big heatsink and a case.







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


  if ( weAreHereNow==0)              // if in stage 1 then check voltage against bulk charge constant ... can be set in definitions
  {
   bulkTime=bulkTime+1;
  if (val< bulkCharge)
  { 
  pulseVal=pulseVal + increment;  // was not up to bulkCharge, then increase pulse width incrementally
  }


  if (val>bulkCharge)
  {
    pulseVal=pulseVal-increment;   // if over the preset bulh voltage ... then back the pwm off a bit
  }
  
 if ( pulseVal>=255)
  {
    pulseVal=255;               // if pulse width calculation exceeds 255 then just make it 255
  }
   if ( pulseVal<=25)
  {
    pulseVal=25;                 //if pulse width calulation is below zero, then make it zero instead
  }

  } 

  //==========absord routine==============
  
  if ( weAreHereNow==1 )              // if we are in absorb then do this
 
  {  
    if  (val>(absorbCharge-25))
  {
    
    floaTime=floaTime+1;               // check if time elapsed in absorb is up or not (timedOut constant)
  }
  
  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;
  }
  
  if (val< absorbCharge)
   { 
   pulseVal=pulseVal + increment;  // was not up to bulkCharge, then increase pulse width incrementally
   }


  if (val>absorbCharge)
  {
    
    pulseVal=pulseVal-increment;
  }
  
 if ( pulseVal>=255)
  {
    pulseVal=255;                // seen all this before
  }
   if ( pulseVal<=25)
  {
    pulseVal=25;
  }
  }
  //=========float routine=======
  
  
  if ( weAreHereNow==2)        // are we in float charge stage
  
  {
  if  (val>(floatVolts-25))
  
  {fullTime=fullTime+1;  }     // increment float timer
  
  
  if (val< floatVolts)
  { 
  pulseVal=pulseVal + increment;  // was not up to bulkCharge, then increase pulse width incrementally
  }


  if (val>floatVolts)
  {
    pulseVal=pulseVal-increment;    // keeping charge in the float band....floatVolts is the constant we use
  }
  
 if ( pulseVal>=255)
  {
    pulseVal=255;
  }
   if ( pulseVal<=25)
  {
    pulseVal=25;
  }

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

  //=============================================
  if (val<startAllOverAgain)          // panic/reset routine when voltage drops back to 48 volts or so.
  {
  weAreHereNow=0;
  bulkCharge=absorbCharge;
  floaTime=0;
  bulkTime=0;
  fullTime=0;
  }
  }
  //thats all folks


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

Joined: 26 July 2007
Location: Australia
Online Status: Offline
Posts: 1501
Posted: 19 September 2017 at 12:22pm | IP Logged Quote oztules

"My plan is to run one 5KW GTI and use the remaining 18 MOSFETs to control PWM PV to battery. I don't know the upper limit but HY4008 FETs are rated at 200A, even at 10% of that 18 of them would handle 18KW of PV on a 48V system. "

I am running 6 x hy4008 for over 120 amps, and it seems to do it easily with 9kw of solar into 675ah trojans@48v nominal. The batts don't seem to go over 115-120 amps, and even then it is not for long.... 18fets will certainly do something big.

These controllers seem very very nice... simple and effective and we control them as we see fit. I am liking them more each day.


..........oztules

__________________
Village idiot...or... just another hack out of his depth
Back to Top View oztules's Profile Search for other posts by oztules
 
Madness
Guru
Guru
Avatar

Joined: 08 October 2011
Location: Australia
Online Status: Offline
Posts: 936
Posted: 19 September 2017 at 9:27pm | IP Logged Quote Madness

oztules wrote:
These controllers seem very very nice... simple and effective and we control them as we see fit. I am liking them more each day.


The controller is about twice as fast to respond to changing loads/clouds as the Midnite controllers I am using also. Also does not seem to overshoot when there are fluctuations, it runs very nicely.

I agree totally about being able to control it as we want, the Midnite controllers are good but you just don't have the flexibility of DIY.

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


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 9
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.0781 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.08