poida Guru Joined: 02/02/2017 Location: AustraliaPosts: 1432
Posted: 01:12am 06 Nov 2018
Tinker, I think you will have no problem working out what I am doing with this 2x sine version of the code:
To understand what is happening, first start with the 2 1/2 bridges we use already, with the 2 outputs (I term V1 and V2) connected to the transformer primary, with a choke in series to help filter out the PWM noise.
The EG8010 produces a 50Hz square wave on V1 and SPWM on V2. By cunning arrangement of the SWPM (inverse sine 1/2 waveform, normal for the other half) we get what we want, which is a sine wave of 50Hz at V1-V2.
It is important to always look at the difference between V1 and V2. That is what the transformer sees.
In my 2x sine code, I do it differently. On power up, I produce a DC voltage on V1, and the same DC voltage on V2. It is nearly exacty 50% duty cycle. I look at this state as having two DC-DC converters running, each making a DC voltage appear at V1 and V2. Since they are the same voltage, no current flows.
When the enable button is pressed, my code starts to ramp up the power demand variable, increasing 1/300th of full scale each 1/100th of a second. We might get to full power after 3 seconds.
The power demand variable is used to make the DC voltage - which has until now been kept constant - to follow a sine wave with it's amplitude controlled by this power demand variable. So now we have an AC and a DC component present on V1 and V2.
My code makes the AC component be 180 degrees delayed on V2 compared to V1. So when the transformer sees the voltages of V1 and V2, it sees only the AC component.
This approach creates just about exactly 2 x the switching losses in an inverter, compared with the EG8010 approach. I did this work to explore switching losses and figured that I could double them with a bit of new coding. Of course I did not need to change anything on the inverter MOSFET bridge board.
I'm not turning on slowly the MOSFETS as in my heat tests. Not at all, I'm switching them quickly, as usually done by everyone else here.
I made a video for you. Yellow is arduino output for V1, light Blue is output for V2, purple is the 50Hz sync pulse used to get a stable DSO trigger.
At top is about one complete 50Hz waveform. At bottom I zoom in to the top of the 50Hz AC waveform where we can see the maximum difference in duty cycle (of V1 and V2)
Think of duty cycle as being equivalent to 1/2 bridge DC output voltage.
The video shows standby (both V1 and V2 same DC voltage) I press the start/stop button and so it ramps sine wave amplitude up to 230V AC output. Then I press start/stop again and it ramps down to zero output.
have a look at https://youtu.be/L6i5yOFxR2k Edited by poida 2018-11-07wronger than a phone book full of wrong phone numbers