Various aspects of home brew inverters


Author Message
poida

Guru

Joined: 02/02/2017
Location: Australia
Posts: 1432
Posted: 01:10am 24 Jan 2021      

  iannez said  Hello,
I'm actually studying the DDS implementation like this:

http://interface.khm.de/index.php/lab/interfaces-advanced/arduino-dds-sinewave-generator/

the signal comes out from pin11 or pin3 if it is enabled through TCCR2A registers
and pinMode.

I need it to study some behaviors of a sine wave,
strictly at low voltage such as the output from a 50w class A/B amplifier,
superimposed on another sine wave, but for this they must
be in phase with PLL as on nanoverter sketch.

thanks A.


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.