Here is a very simple pure sinewave inverter based on the microntoller "PIC 16F628A", "don't freak out !", NO it is not difficult to use microntollers, actually it could not be any easier than this.

For those wondering, Yes I myself designed the circuit concept, schematic and components but had to hire a programmer to write the code since I have no idea how to write software programming, I even paid him money to do this job since no one works for free these days, probably if he see this instructable he would be laughing at me on how I gave everything for free here :-/

The principal used for creating the sinewave:
Most hard work in this circuit is done by the 16F628A chip itself, where it divides the half wave into small segments generating PWM train of pulses to create each half wave as shown in the pic, generated oscillation then go to get amplified by the 4 transistors Q1,Q2,Q3 and Q4 where they feed the power stage to drive the power transistors. Can't be much simpler than that !

There are 2 options to program the 16F628A:
1- Most of the electronic parts selling shops do this service for you for an additional 3$ cost, where you take the program which is a "Inverter.HEX" file in our case, written on a disk to the shop and they will hand you an already programed 16F628A.

2- If you're an electronic hobbiest I suggest you buy your own programing device (I bought mine for 22$) and experiment with it because the microcontroller applications that can be built are endless. I bought the cheapest / smallest USB one which is a DIY K128 it came along with a CD containing the MicroBurn software "older versions known as MicroPro" and a driver for your computer, after setting up the driver and operating the thing, it programed the 16F628A IC in 10 seconds !
Here is a link to see how the programmer looks like.

Note: Both 16F628 and 16F628A will work, the difference is that the 'A' has more memory capacity, but both work the same.

The filter:
The 2.2 uF capacitor which is the filter is a very very important part of this design, without it you'll never get a pure sine wave.
I have included 2 screen shots of the oscilloscope (with-filter and without-filter) so you can see the difference and importance of this capacitor.

Other notes:
- Included is the movie file "IMG_0690.MOV" in case you encounter any problem and need to see the wave form on pins 11 and 12 of the 16F628A how it looks like.

- The PIC16F628A is so sesitive to static, if you're sitting on a plastic chair never touch the IC's pins with your hand.

- You can build bigger versions of this inverter up to 5000w, to see what needs to be done on the power stage please see details on my other instructable here

- Heat sinks are required to cool the power transistors they should be big enough to cool the transistors, they are separate and should NOT touch each other.

- Wiring connections marked in dark black on the power stage section should be thick enough to handle the big amps drain from the batteries.

- A cooling fan will be needed to reduce heat off the heat sinks and transformer.

- Be cautious when building this circuit it involves high voltage which is lethal, any part you touch when the circuit is ON could give you a nasty painful jolt, specially the heat-sinks, never touch them when the circuit is on to see if the transistors are hot.

Do not forget to rate this instructbale with 5 stars "of course if you like it and appreciate the effort done" and also click the "follow me" button to keep updated of future instructables and updates that I do.

We need to get this inverter to perfection by adding some more options to it like:
- Low DC Battery voltage detection to trigger a buzzer and a to auto-stop oscillation at some point.
- Heat detection to trigger a fan ON
- Battery level indicator 3 LEDs (High-Medium-Low) and to trigger charger ON
We'll need some help to code the above..
so any suggestions, help in coding or design on this project to make it better are very welcomed so send your thoughts.
<p>Please sent me the code (for 50hz).</p><p>milanerg@gmail.com</p><p>tnx</p><p>TNH</p>
<p>hi.</p><p><a href="http://www.instructables.com/id/250-to-5000-watts-PWM-DCAC-220V-Power-Inverter/" rel="nofollow">http://www.instructables.com/id/250-to-5000-watts-...</a></p><p>can i refer that link in changing voltage source and transformer?</p><p>//----------</p><p>since i don't have available mosfet like yours in the diagram here in my place. can i change mosfet and parallel it.? 2n3773 change to any mosfet?</p>
I am very intersted to make this inverter.But i confused to find it in market (Pic 16F628A)chittagong bd.pls suggest me it or another can i buy from shop.
<p>Try finding here <a href="https://www.techshopbd.com/" rel="nofollow">https://www.techshopbd.com/</a><br><br>also you can buy from amazon or ebay. Though it can take up to 2 month to reach to Bangladesh major cities. If you buy from amazon or ebay never forget to regularly visit your nearest post office for the package. They may never deliver if it has a custom or vat issue. <br><br>Enjoy</p>
<p>please i need the source code </p><p>saravanan763@gmail.com</p>
The transformer I'm using is a 40v center tapped, how do I go about changing the circuit if need be
<p>Please sent me the code (for 50hz).</p><p>My email: quangphucgl@gmail.com.</p>
Here is my e-mail<br>hoikutea1@gmail.com<br>Or phamhoi9693@gmail.com
<p>Are you a Vietnamese?</p>
<p>please sent me suorce code<br>nhumotthoiquen1993@gmail.com<br>thank so much...!</p>
<p>Hi.can you give me a code hex sine 50hz.thanks all.</p><p>Email: adti_mientay@yahoo.com</p>
<p>please i need the source code. <br>zevangelz@gmail.com <br>thank's!</p>
<p>please i need the source code.thank's goldenlie1@gmail.com </p>
<p>please i need the source code.thank's philipuslie@yahoo.co.id</p>
<p>Hi,</p><p>This is a pretty old instructable, and you probably hadn't developed it any further, but how could this output a TRUE sinewave with nothing but a capacitor on the secondary winding for filtering? I have a strong hunch that there's going to be some <strong><u><em>serious</em></u></strong> PWM noise there if you test it with a scope.</p><p>Please explain.</p><p>Istvan</p>
<p>please i need the source code <br>phongk8a1@gmail.com</p>
<p>See my post ...</p>
<p>Here is the inverter.hex file from an old link:</p><p>:10000000AE29FF3FFF3FFF3F0030031383129F1BCA<br>:100010000130F1007108013A031D12280130A000DF<br>:10002000851113288515080003138312A101A2016D<br>:100030002F082202031D1E282E082102031824283F<br>:10004000A10A0319A20A18280800353400343B34E9<br>:1000500000342F340034413400342A340034463420<br>:100060000034243400344C3400341F340034513410<br>:1000700000341A34003456340034153400345B3400<br>:100080000034113400345F3400340D3400346234F1<br>:1000900000340934003466340034063400346834E3<br>:1000A0000034043400346B340034023400346C34D3<br>:1000B0000034003400346D340034003400346E34C5<br>:1000C0000034003400346E340034003400346D34B5<br>:1000D0000034013400346C340034033400346A34A6<br>:1000E0000034053400346734003408340034643498<br>:1000F00000340B340034613400340F3400345D3488<br>:10010000003413340034583400341734003453347A<br>:1001100000341C3400344E3400342234003449346A<br>:10012000003427340034443400342D3400343E3459<br>:10013000003432340034383400343834003432344B<br>:1001400000343E3400342D34003444340034273439<br>:10015000003449340034223400344E3400341C342A<br>:10016000003453340034173400345834003413341A<br>:1001700000345D3400340F340034613400340B3407<br>:1001800000346434003408340034673400340534F7<br>:1001900000346A340034033400346C3400340134E5<br>:1001A00000346D340034003400346E3400340034D4<br>:1001B00000346E340034003400346D3400340034C4<br>:1001C00000346C340034023400346B3400340434B2<br>:1001D00000346834003406340034663400340934A2<br>:1001E0000034623400340D3400345F340034113490<br>:1001F00000345B34003415340034563400341A347F<br>:100200000034513400341F3400344C34003424346E<br>:100210000034463400342A340034413400342F345E<br>:1002200000343B34003435340034080003138312A7<br>:1002300024088A002508820008008B13033003136A<br>:1002400083168600831286019F129F151F119F142B<br>:100250001F10E430831685008312851583169F17BF<br>:100260001F139F129F151F119F101F1408000313C7<br>:100270008312A0011E30A6000030A700A801A9012A<br>:10028000AA01080003138312AB0100302706031DE7<br>:100290004B2926082B06031D4E290420061786121B<br>:1002A0000130F4002B08F000F101740803195D29F6<br>:1002B000F00DF10D7010FF3F56292530F00700308A<br>:1002C0000318013FF1077008A5007108A4000A088F<br>:1002D000A3001621AE0023088A00A50A0319A40A68<br>:1002E0001621AF0023088A001420AB0A06138616D5<br>:1002F0000130F4002B08F000F1017408031985297E<br>:10030000F00DF10D7010FF3F7E292530F007003011<br>:100310000318013FF1077008A5007108A4000A083E<br>:10032000A3001621AE0023088A00A50A0319A40A17<br>:100330001621AF0023088A001420AB0A2D08003CC8<br>:10034000031DA4292C082B02031C45290800783022<br>:1003500003138312AC000030AD000800A7211D215B<br>:1003600037214221A90A0319AA0A00302A06031DCF<br>:10037000BB2932302906031DCF29A901AA01C729AB<br>:100380000130A8008617CF29A8018613CF29280895<br>:10039000003A0319C0292808013A0319C429B129D0<br>:1003A000D029FF3FFF3FFF3FFF3FFF3FFF3FFF3FA2 :02400E006A3F07<br>:00000001FF</p>
<p>if use PWM, output transistors much cold, more efficient on power. Output capacitor still need.</p>
<p>Hi Nick,</p><p>I really want to build your inverter. I do not have the PIC16F628A chip. I do however have a PIC16LF872-I, can I use this? I do not know much about microprocessors? Thanks</p>
<p>hi nick <br>thank you for your effort<br>please i need the code <br>engineerlaithluay@gmail.com</p>
<p>please i need the source code <br>engineerlaithluay@gmail.com</p>
<p>Hi. Thanks for your effort. If you can send me the source code, I'll do some modification modification to it to add battery low alarm etc.. You can mail me at fmulder25@gmail.com</p><p>And another hint, for everybody who wants to do the pcb's yourself, use photoshop to open the jpg files and then rescale to 34.266% to print.</p>
<p>(arif.dpi11@gmail.com ) thats my mail acconut ........ plz give me hex file this project </p>
<p>without feedback?? Pure sine wave? with Push-pull? Doesn't sound good........</p>
<p>is there anybody can sell me the PIC16F628A allready programed, because i dont know how to program it , thank you</p><p>my email moematar@yahoo.com</p>
<p>hi can you sell me the PIC16F628A allready programed , because i dont know how to program it , thank you </p><p>my email moematar@yahoo.com</p>
<p>PEOPLE WHO WANTS THE .HEX CODE AND THE .MOV FILE.<br><br>The links are given from the post whenever you see it from a mobile device. <br>There is a example:</p>
<p>Hello Nick<br></p><p>Would you give us the PIC's C code please? Like me and a lot of people here, we finished the project and now we need the code to make it work. At least, we can accept Hexa, you know... <br><br>My email is urielantolini@gmail.com. I appreciate the effort you've done working on this project !</p>
<p>Hi Friends,</p><p>Can someone tell me Number of winding and thickness of coil for T1 Transformer onbothsides</p>
<p>hello everyone i have used this circuit as my MT bur there is too many questions why did he choose this pic16f628a those components( transistors)?</p><p>why BJT while IGBT is better?</p><p>if anyone can answer thxxx in advance </p>
<p>hello everyone i have used this circuit as my MT bur there is too many questions why did he choose this pic16f628a those components( transistors)?</p><p>why BJT while IGBT is better?</p><p>if anyone can answer thxxx in advance </p>
Hey guys check-out for more circuit and code @ acecct.blogspot.com/?m=1
<p>hi.. i built a circuit same as yours, I already put it on a pcb, uploaded the hex file you gave. But the problem is, it cant produce AC when I connect a 12V battery, what do you think is the problem? Please help.</p>
<p>Do you find out the Problem?. it could be the battery has to low Ampere? I wanted to buy a conveter 12V/220V 2000w and told me Minimum Charge battery is 70Ah</p>
<p>Hi everyone,</p><p>can someone tell me, how many Input Ampere needs to make the Inverter board to work.</p><p>Thanks in advance.</p>
hi everyone, so sorry I have been offline for a long time now. I have been working on an improved version of this project. The new version includes a more powerful pic microcontroller and it uses a MOSFET output stage. I'm still working on regulation of the output voltage. When I'm done I'll post an instructable....feel free to mail me and ask your questions. chuksthewoundy@yahoo.com
<p>hello Nick</p><p>i need a efficient inverter. how much is your inverter efficiency?</p><p>thanks a lot</p>
<p>Hello all, </p><p>I don't think Nickk is here to assist us. I'm sure if we decide to help one another everything will be fine</p><p>thanks</p>
<p>Hi Nick,Let me thank you for this wonderful work....i have made this circuit But I faced some problems,I hope to have a solution.....When I use the filter 2uf Ceramic capacitor Even if another type of capacitor. The load on the battery is more than 20 amperes without any load on the output circuit....And the voltage drops to the 180volt</p>
<p>hello, how did you do it, I made mine and got nothing. i really don't know if the problem is from my programming. I used the Genius G540 programmer since Nickk has stopped responding to us i think we can help ourselves here by sharing. my question goes to how you did your programming and what programmer did you use?</p><p>thanks</p>
<p>theseare not pure sine wave inverter. These are modified sine wave inverter. Pure sine wave inverter are complex and consists of many stages. I have a Microchip 5000 watt pure sine wave circuit schematics with complete program for microcontroller. PCB was designed in PCAD software which will be provided to you once you contact me by email. My email is &quot;premingiet@gmail.com&quot;. But remember i will first send half of the schematics, pcb layout and program. If you feel it is important then again contact me within 72 hours via my email, and if you transfer 20$(united states dollar) or 1200 rs(in indian currency) via paypal after contacting me then i will send you complete project. Remember please provide your actual name before doing any transaction. And contact me via email before any transaction. There is also an LCD module which displays the power, voltage, current etc and its program is also included in package.</p><p><br>PLEASE CONTACT VIA EMAIL&quot;premingiet@gmail.com&quot; TO RECEIVE PART OF THE PROJECT NOW FREE OF COST.</p>
<p>Is the inverter.hex 50hz? How can I use a 24v 12-0-12 transformer on this circuit? What do I have to modify?</p>
<p>hello can anyone tell me plz why he is using two differents types of transistors in the full H- bridge thxx</p>
<p>I was wondering if it is okay to use arduino uno? And I dont know how to program it in arduino uno. Can you give me a sample making 12vDC/220vAC pure sine wave inverter using arduino uno?</p>
<p>hello </p><p>is this circuit sine wave or square wave </p>
Hi.can you give me a code hex sine 50hz.thanks all
<p>Yes I was wondering the same thing. Im about to make this circuit. can you either give me the C code of this circuit or HEX file of 50Hz ?<br>Thanks</p>
<p>Hey nick,</p><p>I built this circuit but I keep getting high voltages instead of 230V. I used the transistor 3055 instead of 3773. Is this the problem???</p>
<p>I know its a very late reply but it might help somebody else with the same problem.<br>Try to find voltages without the transformer. Only then you may decide the rated transformer. Like I made an inverter whose schematic showed 12-0-12 Transformer but the output was very low. About 160v without load! So I applied 9-0-9 Transformer and got 230v AC which were excellent! How I figured that out? By finding voltage without transformer. <br>I hope this helps :)</p>

About This Instructable


160 favorites


More by Nick_Zouein: Aux Input for BMW 325i Business CD Adaptable 12vDC/220vAC Pure Sinewave Inverter Transforming a 300W Sinewave DC/AC mini inverter to a 5000W monster
Add instructable to: