Neue Software für Grid Tie Inverter

Ladeelektronik, Messgeräte, Steuerungen etc.

Re: Neue Software für Grid Tie Inverter

Beitragvon Badwater » Mi 24. Apr 2013, 17:54

Verlängere die Wartezeit in den LCD-Schreibroutinen.

Wg. Sekunden:
Du hast den Code, generell geht alles, tobe dich aus! 8-)
Badwater
 
Beiträge: 39
Registriert: So 4. Nov 2012, 21:30

Re: Neue Software für Grid Tie Inverter

Beitragvon Nik » Mi 24. Apr 2013, 18:18

ja, ich kann aber noch immer kein C oder was das is ;D
naja, das ist auch nicht so tragisch ^^

ok, die Wartezeit hab ich gefunden, das probier ich mal aus :)
Nik
 
Beiträge: 40
Registriert: Di 17. Jul 2012, 16:27

Re: Neue Software für Grid Tie Inverter

Beitragvon Badwater » So 28. Apr 2013, 10:58

Hier noch einmal die Fuses:
Dateianhänge
atmega8-fuse_gti600-28.04.13.jpg
Fuses mitt EEPROM History
atmega8-fuse_gti600-28.04.13.jpg (35.36 KiB) 13809-mal betrachtet
Badwater
 
Beiträge: 39
Registriert: So 4. Nov 2012, 21:30

Re: Neue Software für Grid Tie Inverter

Beitragvon vasonline » Di 7. Mai 2013, 19:15

Jorg (e.a)
Sorry for hijacking your topic.

I used your Sine Wave in my C program for KD GTI:
Code: Alles auswählen
const unsigned int Sine[100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
10, 20, 30, 40, 50, 60, 70, 80, 89, 99,
108, 117, 126, 135, 143, 152, 160, 167, 175, 182,
189, 196, 202, 208, 214, 219, 224, 229, 233, 237,
240, 243, 246, 249, 251, 252, 253, 254, 255, 255,
255, 255, 254, 253, 252, 251, 249, 246, 243, 240,
237, 233, 229, 224, 219, 214, 208, 202, 196, 189,
182, 175, 167, 160, 152, 143, 135, 126, 117, 108,
99, 89, 80, 70, 60, 50, 40, 30, 20, 10,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };


And this formula for the PWM:
Code: Alles auswählen
CCPR1L =  (PulsBreedte) * (Sine[SineIndex++] ) >>8  ;


It works really well, but I see on the scope it's a bit too well on a PIC ;)
I have 255 levels (8 bits) in the CCPR1L register. When counting up "PulsBreedte" The middle part of the sine wave is already "full on" at around
PulsBreede = 100 and at PulsBreede=254 I only have 1/10 where I can see the pulses. The rest is "Full On"

Do you know software that allows me to generate a new sine const?
Would try a sine const with lower values.

Thanks for any advice! :)
vasonline
 
Beiträge: 60
Registriert: Sa 2. Feb 2013, 20:46

Re: Neue Software für Grid Tie Inverter

Beitragvon JBecker » Di 7. Mai 2013, 22:55

You just have to scale differently to get a result with maximum 8 bit resolution.

The sine table is calculated with full 8 bit resolution. Just keep that. Why loose resolution at this point.
For the ATmega, we use a maximum PulseWidth of 511 (9 bits).

The original calculation for the PWM register is:
OCR1A = (uint32_t)PulseWidth*Sine[SinePhase]>>8;
means: 9 bits * 8 bits / 8 bits = 9 bits

There are two possibilities to get an 8 bit result for the PIC:
CCPR1L = (uint32_t)PulsBreedte*Sine[SineIndex++]>>9;
this will shift the result 1 bit further to the right (an extra divide by 2). But shifting 9 bits is very slow compared to shifting by 8 bits. Good compilers shift by eigth bits by rearranging the bytes.

You could also limit PulsBreedte to 8 bits, means you count it only up to 255. Or you divide PulsBreedte by 2 afterwards:
CCPR1L = (PulsBreedte>>1)*Sine[SineIndex++]>>8;

Just some ideas.

BR, Jörg.

PS: I just looked into your code (in the other thread). Your variable PulseBreedte is only declared as 8 bit (unsigned char). Then you should also limit it to 8 bits when increasing the pulse width:
if( PulsBreedte<255 )
PulsBreedte++;

And then the calculation has to be:
CCPR1L = (unsigned int)PulsBreedte*Sine[SineIndex++]>>8;
Depending on the compiler used, yoo have to do the (unsigned int) cast for PulseBreedte, otherwise the calculation can get wrong.
Benutzeravatar
JBecker
 
Beiträge: 76
Registriert: Fr 11. Mai 2012, 14:13
Wohnort: Kirchlengern

Re: Neue Software für Grid Tie Inverter

Beitragvon vasonline » Mi 8. Mai 2013, 17:46

Jörg,

Many thanks for your detailled answer.

:) :) :) :) :) :) :) :) :) :)

I'll look into your suggestions.
vasonline
 
Beiträge: 60
Registriert: Sa 2. Feb 2013, 20:46

Re: Neue Software für Grid Tie Inverter

Beitragvon vasonline » Sa 11. Mai 2013, 08:53

Hi Jörg,

I think I got the calculation right. :)

Made PulsBreedte integer. That got rid of some of the strange effects. Then I shifted >>9. It was Ok. But I made that >>10
to match it better with the original firmware.

---
I now flashed the new code in my second GTI300W :) Nothing blew up, and basic functions seem to work :)

But my second GTI300W, is a "parts" unit. The AC FETs (H-Bridge?) are all blown. (had nothing to to with the new firmware).

I had one blown because of an accident, and after that it seemed as if every remaining FET was "damaged" by that.
Replaced one (1) and the remaining FETs all blew at regular intervalls. Replaced the next broken one, and after a while the next FET blew...

What FET's are used in the AC section of the PowerJack?
Do you know some good substitutes?

- The originals are 30NM60ND.
- They are pretty pricey at my local elektronics store.
- I can get 10NM60ND too. They are pretty cheap, but lower current...Good enough for a test drive?

Greetings,

Viele Grube,

(trying to brush up my German ;) )
vasonline
 
Beiträge: 60
Registriert: Sa 2. Feb 2013, 20:46

Re: Neue Software für Grid Tie Inverter

Beitragvon vasonline » So 12. Mai 2013, 08:58

Hi Jörg,

Something other I have noticed.

You have two sine waves in your GTI code.
What is the function of the second one?

I am thinking of adding a slightly modified second one (with a bit a less or more zero's).
I would do this, in order to "compensate" for the optocouplers output.
vasonline
 
Beiträge: 60
Registriert: Sa 2. Feb 2013, 20:46

Re: Neue Software für Grid Tie Inverter

Beitragvon JBecker » Mo 13. Mai 2013, 01:00

Hi vasonline,
sorry, I cannot help at the moment with the component types used in my GTI. It is working at one 60 cell 240W nominal PV panel since many weeks now and I do not want to disassemble it. On good days I get up to 1.4kWhs/d (DC input) and maximum input power values of up to 200W. I had to modify the MPP tracker from badwaters version with some (very unsophisticated) anti-freeze additions. With badwaters code (which is again a modification of my original code, which was a modification of someone elses code...:-)) it could happen that it got stuck at ~5W power and 30V input voltage on perfect weather conditions. Now it certainly works better.

The original sine table represents a 'perfect' sine which should in simple theory give the most sine-like output current. I added the second sine table for experiments with other current waveforms. At low input voltages my GTI cannot deliver a high enough output current at the sine maximum. This is due to the limited voltage transfer ratio of the transformers.

The original code of the GTI seemed to work with a 1ms deadband around the voltage zero crossings. I am not sure about the reasons for this. With the second sine table I also wanted to experiment with modifications of this deadband (but did not find the time ...).

The 10NM60ND has about four times higher Rdson than the 30NM60ND. So conduction losses should be much higher (switching losses could possibly be considerably smaller to much lower gate charge though). I would try to replace all four at the same time.

BR, Jörg.
Benutzeravatar
JBecker
 
Beiträge: 76
Registriert: Fr 11. Mai 2012, 14:13
Wohnort: Kirchlengern

Re: Neue Software für Grid Tie Inverter

Beitragvon Nik » Mo 13. Mai 2013, 05:14

kurze Meldung von mir:
ich nutz die real sine table im code
mit nem 120 Wp-Panel zeigt mir die Kista auch mal eine 180 Wp Spitze an :o
na gut, auf Peak-Werte gebe ich nichts ^^

vermutlich ist die 1ms dead time zum Schutz der FETs? Um sicherzugehen, dass nicht zufällig ein Kurzschluss eintreten kann?
Nik
 
Beiträge: 40
Registriert: Di 17. Jul 2012, 16:27

VorherigeNächste

Zurück zu Elektronik für Windkraftanlagen



Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast