Simple ATtiny85 500Watt Sinewave Inverter
by Poldo in Circuits > Arduino
1063 Views, 1 Favorites, 0 Comments
Simple ATtiny85 500Watt Sinewave Inverter
![Main Unit.png](/proxy/?url=https://content.instructables.com/FPS/LL8X/LKPGDW5A/FPSLL8XLKPGDW5A.png&filename=Main Unit.png)
I recently decided to replace my home "modified sinewave inverter" with a "pure sinewave" type. In this project I will demonstrate how to build a simple sinewave inverter taking a 12VDC input and inverting the voltage to 230VAC at 60Hz. The output voltage will be regulated to +/-1% under all load conditions.
You can download all the pertinent files from my google drive at:
https://drive.google.com/drive/folders/1aoGEX2wa7OB19KscNpgHB03Pls-luwKY?usp=sharing
Supplies
12VDC to 380VDC PCB
*******M1 - High Voltage Power supply Module - QS-100 - DC-AC Converter DC12V to 220V 380V 18V AC 500W Inverter module. Use this to harvest all the necessary parts***********
Below are links to obtain the 12VDC To 380VAC Converter Module;
Amazon
AliExpress
https://www.aliexpress.com/w/wholesale-500w-380v-inverter.html
Shoppee
C1,C14 0.01uF,Capacitor,50V
C2,C3 47uF,Electrolytic Capacitor,450V
C4,C5 2200uF,Electrolytic Capacitor, 16V
C6 100uF,Electrolytic Cap,50V
C7,C8,C9,C10,C11 0.1uF,Capacitor,50V
C12 10uF,Electrolytic Cap,16V
C13 1uF,Capacitor
R1,R6,R7,R8,R9,R12 10k,Resistor
R2,R5 5Ω,Resistor
R3 330k,Resistor,1W
R4 4.7Ω,Resistor
R10 100Ω, Resistor
R11 3.3k,Resistor
F1 40A,Fuse
L1 24uH,Inductor,13T #13AWG wound on a SM270125A Core
D1,D2,D3,D4 HS3M,Silicon Diode,1000V,3A
D5 HS3K,Silicon Diode,800V,3A
J1 Jumper,2 Pin Header
Q1,Q2,Q3,Q4 HY1906,N-CH 60V MOSFET,120A,Rdss ON = 6mΩ
T1 500W Transformer,ETD44,PRI-12V CT, SEC-0,220V,380V
TB1 PCB to Wire Connector,2 pin
U1 78M12,Regulator,12V,SOT-223
U2 78M05,Regulator,5V,SOT-223
U3 LM3525,Pulse Width Modulator,16 Pin DIP
DC to AC Inverter PCB
R1,R2,R3,R4 47Ω
R5,R6 10k
R7 220k 1W
R8 6.8k
C1,C5,C10,C14 0.1uF,Ceramic, Capacitor 50V
C2,C6 10uF,Electrolytic Cap,16V
C3,C9 103,Capacitor,1kV
C4,C7 1uF,Capacitor,Ceramic,50VDC
C8 1uF,Capacitor,Film,630VAC
D1,D2 MUR160,Silicon Diode,600V
D3 1N4148,Silicon Diode
L1 2mH,Inductor, 5A
Q1,Q2,Q3,Q4 MDF11N60,PWR N-CH MOSFET,600V,Rdss ON=500mΩ
U1,U2 IRS2104,Half Bridge Driver
U3 ATtiny85,Microprocessor
U4 CNY-17F,Opto Coupler
J1 2 Pin,PCB to Wire Connector
Simplified Schematic Diagram
![ATtiny 500W Inverter Simplified Schematic](/proxy/?url=https://content.instructables.com/F2W/A8T6/LL566NIA/F2WA8T6LL566NIA.jpg&filename=ATtiny 500W Inverter Simplified Schematic)
In this video the generic function of each element making up the inverter is explained.
Power Supply Schematic
![Power Supply Schematic.png](/proxy/?url=https://content.instructables.com/FVI/8XAH/LL566NPI/FVI8XAHLL566NPI.png&filename=Power Supply Schematic.png)
The power supply schematic utilizes the High Voltage Power supply Module - QS-100 - DC-AC Converter along with additional components to provide +380VDC, 12VDC and 5VDC to the ATtiny85 Inverter PCB. There is an optional input filter that helps prevent conducted emissions created by the inverter from getting on the 12VDC input.
Inverter Schematic
![ATtiny85 Inveter PCB Schematic.png](/proxy/?url=https://content.instructables.com/F9N/4DLV/LL566NRY/F9N4DLVLL566NRY.png&filename=ATtiny85 Inveter PCB Schematic.png)
The inverter utilizes the IRS2104 forming the half bridge Mosfet driver for both the high frequency and low frequency sides. A CNY-17F opto-isolator is used to provide voltage feedback to the ATTiny85 and operates in the linear mode. L1 2.0mH was purchased on AliExpress.
PCB Layout
![Inverter PCB.png](/proxy/?url=https://content.instructables.com/FTN/U9RW/LL566P5J/FTNU9RWLL566P5J.png&filename=Inverter PCB.png)
![Power Supply PCB.png](/proxy/?url=https://content.instructables.com/FH6/5J1C/LL566P5K/FH65J1CLL566P5K.png&filename=Power Supply PCB.png)
I seperated the power supply and Inverter PCB's. This gave me more flexabilty in finalizing the design especially if I needed to make changes. The Inverter PCB has a daughter board containing the CNY-17F opto-coupler circuit. It also has a universal layout for output capacitor C8. I finally settled on a 1uF.
Code Review
![ATtiny 500W Code Review](/proxy/?url=https://content.instructables.com/FB6/BTG9/LL566P4Y/FB6BTG9LL566P4Y.jpg&filename=ATtiny 500W Code Review)
Please watch this short video to learn how the code was implemented.
For this project the ATtiny85 needs to run at an internal clock speed of 16MHz. Since the default factory setting is 1MHz before loading the program you will need to set the Arduino to Internal 16MHz and "Burn Bootloader" when complete go ahead and upload the code normally.
For those of you who are not familiar with how to program an ATtiny you can acomplish it with either an Arduino Uno or an Arduino Nano. There is an Instructable on the topic which I havn't tried but looks to be good. The one I used was the "How to Program an ATtiny with Arduino Nano- YouTube" by Tanner Tech.
Inverter Demo
![ATtiny 500W Demo](/proxy/?url=https://content.instructables.com/FB3/2RKB/LL566PGN/FB32RKBLL566PGN.jpg&filename=ATtiny 500W Demo)
Please watch this short video to see the inverter in action.