Author Topic: DIY Pure Sine Wave Inverter  (Read 3645 times)

0 Members and 1 Guest are viewing this topic.

Offline 09d08Topic starter

  • Contributor
  • Posts: 30
  • Country: 00
DIY Pure Sine Wave Inverter
« on: August 20, 2018, 09:56:24 pm »
Hello,

I'm trying to design a pure sine wave inverter based on an AVR MCU but I'm not really sure what kind of design I should go with. So far I've managed to implement sPWM on an ATmega328 and verified that it was working as it should with the help of two low-pass filters. (Attached a picture of the waveforms.)

I've tried experimenting with a 24v:220v center-tapped transformer (1uF film capacitor connected to primary for filtering and the center tap of the secondary connected to 12v) and I've had mixed results. I've tried connecting the remaining two connections of the secondary to GND via two mosfets and tried to drive them with a TC4427 but I got a waveform that looked like a deformed square wave so I replaced the mosfets and the TC4427 with two BC548s and two MJE13007s which resulted with a perfect sine wave at the primary but the voltage was around 140VRMS instead of 220VRMS.

Firstly, should I just ditch the idea of using a center-tapped transformer? I saw other designs which use a DC/DC converter to convert 12V into 310V and a H bridge to modulate 310V DC into 220V AC and honestly they just seem more suitable. If a center-tapped transformer is suitable for such an application, how can I get the transformer to output 220VRMS instead of 140VRMS? I've attached the source code of my sPWM program. Honestly, it feels like I'm missing something obvious.

This is my first post here so sorry if this is not the right thread for such questions.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: DIY Pure Sine Wave Inverter
« Reply #1 on: August 21, 2018, 12:15:37 am »
Your schematic is too small for me to see.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12994
Re: DIY Pure Sine Wave Inverter
« Reply #2 on: August 21, 2018, 12:57:50 am »
Your output voltage is almost exactly what you'd expect.   Darlington pairs will drop about 1V (possibly more), so assuming 11V peak, that's 7.8V RMS.  Transforming up with a 12:220 turns ratio gives 143V RMS.

You need a transformer with an 18V 9-0-9, or 20V 10-0-10 secondary to have enough drive to get nominal line voltage out with a 12V DC bus with headroom for regulation.   With your transformer you'd need an 18V DC bus.
 
The following users thanked this post: 09d08

Offline 09d08Topic starter

  • Contributor
  • Posts: 30
  • Country: 00
Re: DIY Pure Sine Wave Inverter
« Reply #3 on: August 21, 2018, 10:13:07 am »
Your output voltage is almost exactly what you'd expect.   Darlington pairs will drop about 1V (possibly more), so assuming 11V peak, that's 7.8V RMS.  Transforming up with a 12:220 turns ratio gives 143V RMS.

You need a transformer with an 18V 9-0-9, or 20V 10-0-10 secondary to have enough drive to get nominal line voltage out with a 12V DC bus with headroom for regulation.   With your transformer you'd need an 18V DC bus.

Giving the circuit 18V instead of 12V did the trick, thanks. Do you have an idea why the driver IC and two MOSFETs couldn't produce a clean sine wave? It would be nice to be able to replace the BJTs with power MOSFETs for increased efficiency.

Your schematic is too small for me to see.

I forgot to attach them yesterday, sorry.
 

Offline station240

  • Supporter
  • ****
  • Posts: 967
  • Country: au
Re: DIY Pure Sine Wave Inverter
« Reply #4 on: August 21, 2018, 01:32:46 pm »
I see one obvious problem with your mosfet circuit, lack of gate resistors.
I don't know anything about AVR hardware to understand your code, are you sure it's using PWM switching, as mosfets only do on and off, unlike transistors.
 
The following users thanked this post: 09d08

Offline 09d08Topic starter

  • Contributor
  • Posts: 30
  • Country: 00
Re: DIY Pure Sine Wave Inverter
« Reply #5 on: August 21, 2018, 01:47:05 pm »
I'll rebuild the circuit with two 15 ohm resistors when I get home. My code changes the duty cycle periodically by looking up values from an array. I've tested it by connecting the sPWM signals to a low-pass filter and got nice half sine waves I posted in my first post so I think there's an issue with the hardware and not the software but I may be missing something.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12994
Re: DIY Pure Sine Wave Inverter
« Reply #6 on: August 21, 2018, 01:48:29 pm »
A TC4427 MOSFET driver pulls up to 1.8A from the supply when switching and has a risetime under 40ns driving a 1000pF load.  If you don't keep its output traces as short as possible, have very good local decoupling and either a ground plane or minimal loop area star grounding to a point as close to the MOSFET sources as possible, it *WILL* misbehave.  You can tame it a bit by adding series gate resistors as close as possible to the MOSFETs - 47R would be a good value to start with, but it depends on the MOSFETs and the switching frequency.
 
The following users thanked this post: 09d08

Offline mdszy

  • Supporter
  • ****
  • Posts: 291
  • Country: us
  • somehow has an ee degree
    • szy.io
Re: DIY Pure Sine Wave Inverter
« Reply #7 on: August 21, 2018, 01:49:05 pm »
mosfets only do on and off, unlike transistors.

1. MOSFETs can definitely be used as amplifiers, not just switches...
2. MOSFETs are still a type of transistor.
somehow allowed to be a Pixie Wrangler in Training
eBay Store | My site | Hackaday.io Projects | my mastodon.technology profile
 

Offline 09d08Topic starter

  • Contributor
  • Posts: 30
  • Country: 00
Re: DIY Pure Sine Wave Inverter
« Reply #8 on: August 21, 2018, 07:35:46 pm »
I added 39 \$\Omega\$ gate resistors and actually got a sine wave at the primary, but it wasn't as good as the one I got with the BJTs. My scope started to show a weird deformed waveform after a couple of seconds and I realized that the driver IC was too hot to touch (attached the new schematic just in case). If I'm not mistaken, there's nothing in my circuit that can cause the TC4427 to fail in such a way.  Nevertheless it looks like the driver IC and the missing gate resistors were the problem.
« Last Edit: August 22, 2018, 10:58:47 am by 09d08 »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: DIY Pure Sine Wave Inverter
« Reply #9 on: August 22, 2018, 05:27:10 pm »
The IC may have been damaged, or it may be oscillating. Back before I knew better I used to have a lot of troubles trying to get any of those mosfet driver ICs to work properly. It turns out that proper grounding and good decoupling is critical with this sort of part. It will not work on perfboard wired with bits of wire from CAT5 cable as I used to prototype with.
 
The following users thanked this post: Ian.M, 09d08


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf