diy solar

diy solar

makeSkyBluer

Had issues with my breadboard build. When connected to my PV array and battery bank with loaded inverter, the OLED display is messed up. I dont have low esr tantalum caps. But when I added an aluminum 2200 uF cap across the GND and +5V of the OLED display, the problem seems to be fixed. On to testing.
 

Attachments

  • DisplayMessedUp.gif
    DisplayMessedUp.gif
    5.3 MB · Views: 9
  • Scan.gif
    Scan.gif
    7.5 MB · Views: 9
if u have a small sized 10uf or 22uf metal can electrolytic, u might add it to the 3.3v rail also..
make sure u use my latest iteration of makeSkyBluer.ino I cleaned up some more stuff..
I'd like to see the scan.. a full scan..that tells all..
 

Attachments

  • makeSkyBluer.zip
    10.7 KB · Views: 2
if u have a small sized 10uf or 22uf metal can electrolytic, u might add it to the 3.3v rail also..
make sure u use my latest iteration of makeSkyBluer.ino I cleaned up some more stuff..
I'd like to see the scan.. a full scan..that tells all..
the 3.3V rail already has a 10 uF metal can electrolytic in parallel with a 10 uF ceramic chip capacitor. If you click on the scan.gif attachment in my post #61, it is a video clip of the full scan.

I will test your latest code when the sun is up and bright.
 
that scan looks perfect!!!!
my latest code-- please checkthe configuration..might not be set for u..
instead of max WATTS, I changed it to max AMPS..makes more sense,since the FETs are limited by a maximum current rating.. it is assumed the user wont apply over-rated voltage to the PV input..
so u will need to adjust max AMPs to get ur 1300watts.. it is set default at 20A..u can adjust up to the 60A limit.. watch forsmoke..
1300w/53v battery = 24.5A
 
Last edited:
In my earlier post of the scan, the sun is no longer shinning on the PVs. This time, the PVs are delivering 1529 watts and the msb is charging the batteries with 28.1A. See attached pictures.

When I swapped in the modified msb V113, the display gets messed up again when the scan is getting close to the mppt point. Maybe my ground tap point to the pcb is in the wrong location and/or something else. I need to work on this again.
 

Attachments

  • POWMR READING1.JPG
    POWMR READING1.JPG
    175.6 KB · Views: 8
  • POWMR READING2.JPG
    POWMR READING2.JPG
    172.5 KB · Views: 8
wow.. OK, what u are running into is more than what I push them.. I just run them up to 500w more orless.. so ifu can do some looking around..
not sure what is causing the hickup when it approaches max mppt, but obviously when max currentis flowing, the instability happens..
maybe weneed to always check during the ramp-up during the scan that max amps is not exceeded.. thats likely the problem..I will look at the scan routine now and get back..
 
void scan4peakPWM(){//scanForPeakPWM;
static int32_t peakWATTS=0;
// if(Serial)Serial.println("entering scan4peakPWM");
// if(Serial){Serial.print("INDUCTOR:");Serial.println(INDUCTOR);
// Serial.print("freq:");Serial.println(freq[f_idx]);}
peakWATTS=0;
//if(keyHIT!=keyNONE)return;
OLED(dspPeakPWM,false);
driveFETs(f_idx,2);
delay(1500);

for(uint32_t x=2; x<=freq[f_idx]-2; x++){//if(keyHIT!=keyNONE)break;
//if(Serial)Serial.print("scan4peakPWM x=");if(Serial)Serial.println(x);
driveFETs(f_idx,x);

//if(keyHIT!=keyNONE)break;
// if(Serial)Serial.println(x);
scanVitals();

if(WATTS>peakWATTS){peakPWM=x;
peakWATTS=WATTS;} //log the peak

pixelX=map(x,0,freq[f_idx],8,120);
pixelY=map(constrain(WATTS,0,500),0,500,60,8);
OLED(dspPeakPWM,true);

if(BATTi>=maxChargeAmps)break; //ADD THIS STATEMENT
}
PWM=peakPWM;
// if(Serial)Serial.println("leaving scan4peakPWM");
}

add this statement in the scan routine..see if that works to avoid overloading the msb....should have been in there to begin with..
 
No longer messed up, but do this limit only the scan display and not the mppt?
 

Attachments

  • scan limited.gif
    scan limited.gif
    6.3 MB · Views: 7
I had it already in the MPPT routine, but never got around to cleaning up the scan routine..
just noticed-- its wrongin the MPPT routine.. yikes..will send a file when I getit done..

the scan display is still messed up--I am working on that.. need to clean up alot of stuff. I have been working on a new drop-in replacement
that will have OTA and internet interactive so u can see remotely whats going on..
adafruit QT PY ESP32-S2
lotta changes being made.. this new chip is a screamer-- 240 Mhz.. and the ADC is completely different.. so kinda busy..lol..

void doMPPT(){static int32_t cloudyTMR=4;

static int32_t WATTSmem=0;
static int32_t modeTMR=0;
static int32_t cloudyWATTSmem=0;

scanVitals();

if(board==MakeSkyBlue_30A){modeTMR--;
if(modeTMR<0){modeTMR=50;
if(pwmLEVEL>0)if(BATTi<=pwmLEVEL){mode=_MPPT;}
else mode=_PWM;}}

cloudyTMR--;
if(cloudyTMR<0){cloudyTMR=20; //look for rapid fade or rise
if(abs(WATTS-cloudyWATTSmem)>
(cloudyWATTSmem+((cloudyWATTSmem*5)/10))){intFlagSCAN=true; //sun cloudy up/dn
cloudyWATTSmem=WATTS;}}


//determine mode--bulk or float
if(BATTv>BULKv)bulkMODE=false;
if(BATTv<(FLOATv*9)/10)bulkMODE=true; //10% drop from float v

if(PVv>BATTv){//do MPPT
if(((bulkMODE==true) && (BATTv<BULKv))||
((bulkMODE==false) && (BATTv<FLOATv))){//dither around sweetSpot
//scanVitals();

if(WATTS<WATTSmem)DIR=!DIR;
if(DIR==UP)PWM++;
if(DIR==DN)PWM--;

if(mode==_MPPT){if(PWM<peakPWM-20){PWM=peakPWM;
DIR=!DIR;}
if(PWM>(freq[f_idx]-2)){PWM=peakPWM;
DIR=!DIR;}}

if(mode==_PWM){if(PWM<127){PWM=127;
DIR=!DIR;}
if(PWM>254){PWM=254;
DIR=!DIR;}}

if(degHOT>32)PWM=peakPWM/4;
if(degHOT>34)PWM=2;
if(WATTS>maxChargeAmps)PWM=PWM-(PWM/8);

if(mode==_MPPT){driveFETs(f_idx,PWM);}

if(mode==_PWM)analogWrite(PWMdrv,254);


WATTSmem=WATTS;}
else driveFETs(f_idx,2);

}
else analogWrite(PWMdrv,LOW);





}
 
I had it already in the MPPT routine, but never got around to cleaning up the scan routine..
just noticed-- its wrongin the MPPT routine.. yikes..will send a file when I getit done..

the scan display is still messed up--I am working on that.. need to clean up alot of stuff. I have been working on a new drop-in replacement
that will have OTA and internet interactive so u can see remotely whats going on..
adafruit QT PY ESP32-S2
lotta changes being made.. this new chip is a screamer-- 240 Mhz.. and the ADC is completely different.. so kinda busy..lol..

void doMPPT(){static int32_t cloudyTMR=4;

static int32_t WATTSmem=0;
static int32_t modeTMR=0;
static int32_t cloudyWATTSmem=0;

scanVitals();

if(board==MakeSkyBlue_30A){modeTMR--;
if(modeTMR<0){modeTMR=50;
if(pwmLEVEL>0)if(BATTi<=pwmLEVEL){mode=_MPPT;}
else mode=_PWM;}}

cloudyTMR--;
if(cloudyTMR<0){cloudyTMR=20; //look for rapid fade or rise
if(abs(WATTS-cloudyWATTSmem)>
(cloudyWATTSmem+((cloudyWATTSmem*5)/10))){intFlagSCAN=true; //sun cloudy up/dn
cloudyWATTSmem=WATTS;}}


//determine mode--bulk or float
if(BATTv>BULKv)bulkMODE=false;
if(BATTv<(FLOATv*9)/10)bulkMODE=true; //10% drop from float v

if(PVv>BATTv){//do MPPT
if(((bulkMODE==true) && (BATTv<BULKv))||
((bulkMODE==false) && (BATTv<FLOATv))){//dither around sweetSpot
//scanVitals();

if(WATTS<WATTSmem)DIR=!DIR;
if(DIR==UP)PWM++;
if(DIR==DN)PWM--;

if(mode==_MPPT){if(PWM<peakPWM-20){PWM=peakPWM;
DIR=!DIR;}
if(PWM>(freq[f_idx]-2)){PWM=peakPWM;
DIR=!DIR;}}

if(mode==_PWM){if(PWM<127){PWM=127;
DIR=!DIR;}
if(PWM>254){PWM=254;
DIR=!DIR;}}

if(degHOT>32)PWM=peakPWM/4;
if(degHOT>34)PWM=2;
if(WATTS>maxChargeAmps)PWM=PWM-(PWM/8);

if(mode==_MPPT){driveFETs(f_idx,PWM);}

if(mode==_PWM)analogWrite(PWMdrv,254);


WATTSmem=WATTS;}
else driveFETs(f_idx,2);

}
else analogWrite(PWMdrv,LOW);





}
Cool no hurry, I appreciate and grateful what you are doing.

Is that code snippet something for me to try?
 
Cool no hurry, I appreciate and grateful what you are doing.

Is that code snippet something for me to try?
no..
when I made the coding change from watts to amps, I screwed things up..thot I had it all converted over..but no..
I will work on it now..and get back..
 
tinyt--Could u test this iteration of msbr.. lotta changes.. check the configuration stuff.. use PowMr..its already selected.. u might need to flip the fan drv.. dont know..
dont change any bootup defaults..I put stuff in that should be close enuff to start with..u might have to re-call from there..keep ur old msbr.ino might have to go back toit..
hope it works foru!!..

u will need to set BULKv and FLOATv....for ur system..
u might need to set adc_offset because u have xiao.. PVv_zero_cal.. no PV in, set for 0.0v..
 

Attachments

  • makeSkyBluer.zip
    10.9 KB · Views: 3
Last edited:
tinyt--Could u test this iteration of msbr.. lotta changes.. check the configuration stuff.. use PowMr..its already selected.. u might need to flip the fan drv.. dont know..
dont change any bootup defaults..I put stuff in that should be close enuff to start with..u might have to re-call from there..keep ur old msbr.ino might have to go back toit..
hope it works foru!!..

u will need to set BULKv and FLOATv....for ur system..
u might need to set adc_offset because u have xiao.. PVv_zero_cal.. no PV in, set for 0.0v..
Because it is already night, I tested the new code using my benchtop setup: 16S 32700 LifePO4 battery and a 5A max current power supply for PV.
I changed the following values in the code:
Code:
/////////////////select board type///////////////////
const int32_t board=MakeSkyBlue_v113; //PowMr;
.
.
 if(board==MakeSkyBlue_v113){
 BULKv         =55.2;  //  =33.8;
 FLOATv        =54.4;  //  =33.0;
 maxChargeAmps =60;    //  =20;
 Thermostat      =110;
 adcOFFSET       =-10;    //=0;
 PVvGAIN         =322;    //=205; 
 BATTvGAIN       =125;    //=105;
 PViGAIN         =44;    //=19;
 TEMP_offset     =-300;  //=0; case temp=89F
 pwmLEVEL        =0;
 f_idx           =1;}
Looks better than before, see attached video clips. Hopefully, I can test using my solar setup tomorrow.
 

Attachments

  • Scan.gif
    Scan.gif
    7 MB · Views: 6
  • Values.gif
    Values.gif
    8.9 MB · Views: 6
Looks good!! but u set maxChargeAmps to 60A..yikes.. 24A= 1300W..
Just following the rating of the model S3-60A, and I cannot test for this with my solar setup.
 

Attachments

  • MakeSkyBlue Manual 1.jpg
    MakeSkyBlue Manual 1.jpg
    152.2 KB · Views: 7
Just following the rating of the model S3-60A, and I cannot test for this with my solar setup.
depends how long u want ur S3-60A to last I think..I highly recommend not going over the maximum charging wattage.
on page 2 of the msb , for a 48v batt system it says <=2800watts
2800/53v = 53A
half that is what I would run, and simply run 2 msbs..I like to avoid trouble by not pushing the limit..ratings listed in a sales brochure are easy to print..
 
new iteration.. cleaned up some more stuff and I changed the way to calibrate PVi.. now it looks for 2.0 amps..then u need to adjust an external amp meter in the PV circuit (like across the PV breaker).. and watch that external meter and line it up to 2.0A also, so that both readings agree..
I think this is a better way to calibrate PVi..
cleaned up the fan temperature control alot..so offset will be totally new.. but looks much better now..1 deg is still not really 1 deg..doesnt really matter all that much as long as its close..I thinkit is..
 

Attachments

  • makeSkyBluer.zip
    11.2 KB · Views: 5
Back
Top