Various aspects of home brew inverters
Author | Message | ||||
poida![]() Guru ![]() Joined: 02/02/2017 Location: AustraliaPosts: 1432 |
Hi Angelo This is how nano1_7_etc type code works: a 20KHz timer with PWM is set up. Each time the timer calls it's interrupt some work is done. For the inverter application, we need a PWM pulse train on one pin (D9) and the other pin (D10) is held LOW. This is maintained for 1/2 of the 50 Hz cycle. Then for the other 1/2, D9 and D10 functions are swapped. We are driving 2 half bridge inverter output stages. The PWM pulse train is taken from a lookup table of precomputed values of a 1/2 cycle sine wave. I wonder what your project entails. I guess you are studying this at school or university. I think you would like one pin only to output PWM pulse widths that range from near 0% to near 100%. This implies "zero AC volts" would be 50% width exactly. Now you will have a DC offset of about 1/2. This can be removed with AC coupling. here you go: nano_1_v7_no_bessel_angelo.ino.zip Here is D9, low pass filtered with 4.7K R and 220nF cap, Light Blue Yellow is D7, the 50Hz heartbeat or CRO trigger Note the vertical scale and zero position for D9. It is DC coupled. ![]() |
||||