loading
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.

Finaly:
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>hi <a href="https://www.instructables.com/member/Nick_Zouein/" rel="nofollow">Nick_Zouein</a> Greetings from Indonesia I intend to develop you as an artificial inverter thesis assignment, if I may ask coding for Adaptable 12VDC / 220VAC Pure Sinewave Inverter thank you, for example may be sent to hawisscooterist@gmail.com Thanks</p>
<p>Hi Nick, thank you very much for sharing this project all, the pure sine wave inverter works very well, the only change I made was 2.2 uf capacitor by 6.3 uf in out 230v attached some photos , sorry my English I am Spanish.</p><p>greetings to all.</p>
<p>Hello <a href="https://www.instructables.com/member/manolission" rel="nofollow">manolission</a> can you sent the layout PCB the project for me..? hawisscooterist@gmail.com Thanks</p>
<p>Hi manolission,</p><p>How much current does your inverter (from your 12V DC supply) draw when you have no load connected to the output (AC load)? I also built this project but noticed that my inverter was drawing alot of current even with no load connected to it. I then re-wrote the code and tried again, same story.</p>
<p>Hi <a href="https://www.instructables.com/member/manolission" rel="nofollow">manolission</a>,</p><p>Glad to hear that the project worked for you. Thanks for the nice photos.</p>
<p>Thank you nick for sharing with all your proyects, you have won a 10 from me.</p><p>Sorry my english.</p>
<p>For 60hz use 24mhz crystal</p>
<p>Great Instructable !</p><p>However I have a question. How can i increase the input voltage to 24v? I am running a wind generator, which charges couple of old truck batteries wired in series and in parallel. My main objective is to run a 2.5kw heater from it, which requires a pure sine wave. </p>
<p>I am doing this circuit and i am trying to simulate it in the Proteus. but constantly getting error. can someone send his Proteus file. it will be really helpful </p>
<p>Hi Nick!</p><p>Thanks for sharing your great job. is the output frequency fixed at 50Hz or can change as per requirement in this design?</p><p>If you want to control a temperature of the power transistor, the charge level of the battery, you have to add a PLC, temperature sensor, buzzer, fan, temperature controlled and current controlled switches. Then you can live out of tension because the PLC does all job inside the inverter.</p><p>If you need help I will prepare PLC program free of cost for you but the cost of your inverter might be increased more than double. </p><p>By the way how much is the cost of this project? I mean all the components cost?</p>
<p>ขอบคุณครับ</p>
<p>Can you also share the PIC source code? Without it, it is more difficult to improve it by adding the required aditional features you suggest at the enf of your article since it then requires to recode everything from the beginning.Kind regards</p>
<p>I am not able to see the video file can someone share it with me</p>
<p>I am Planning to make a inverter which can give an output of 500 watts can anyone help me with the coding part.</p>
plz i need pcb of 5kva full bridge inverters tanx
<p>whether the inverter is truly a pure sine wave ..? and how the maximum watt generated by components above ..? thank you</p>
<p>wow! this is great! pure sine wave AC power source from an inverter!</p><p>i am interested on building it. would you like to give me an estimated cost to get all the electronic component (not including the battery)</p><p>i need to compare which of these option is more valuable, buying an 300W inverter or building it my own. I need it for my studio light equipment for outdoor purpose.</p><p>thank you</p><p>best reggards,</p><p>daris</p>
Hello sir, thank you for the tutorial. Is can I still use this capacitor 2.2 uf for an output voltage of 120 volts ???<br>
<p>Hello Nick,</p><p>This is a genius schematic, thank you for sharing such a clear and elegant design!</p>
<p>Hi,Extraordinary circuit and thanks for uploading hex file it's working,would be more helpful if MOSFET version is included. </p>
<p>Hi there,</p><p>The ic is not available in my country nor the programming platform :( </p><p>Any alternatives?? Equivalent maybe? </p>
I have seen this also.<br><br>https://www.instructables.com/id/250-to-5000-watts-PWM-DCAC-220V-Power-Inverter/<br><br>Can I use the 5.25KW Inverter Power stage and Transformer of 84-0-84V - 220V with the above PIC circuit ?<br><br>What should be the Ampere rating of the 5.25KW Inverter Transformer ?<br><br>
We cant see the name of those component bro and the drawing is not conspicuous. Do some help to make it clearer
X ??? 20hZ or 20mhz ??
<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>
Visit www.alldatasheet.com download the internal specification of both ICs compare and see if the have similar configuration
<p>got it work but i am having some issues the worst is the amp draw its like 6 amp<br>is there any fuirrite core try or help ?</p>
<p>have source code?</p>
<p>what's outuput frequency? i need 60Hz</p>
<p>Hi Nick.</p><p>I've built an inverter based on your designs and the output is a 51Hz 230V sine wave. The problem I'm sitting with is that the power stage draws too much current and drains my DC power source very quickly. When the inverter is switching (no 220VAC load connected to transformer) my 12V supply is sourcing 8Adc to the transformer. Is this normal for your design? Any sugestions?</p>
Hello sorawist please contact me via facebook boonserm chaiwong and facebook.com/radiorepair. the language I'm stronger
<p>on pin 12 and 13 pic measuring frequency is 50 Hz, is that correct?</p>
<p>yes 50Hz is correct, you can see it in one of the pics: 52Hz</p>
<p>Hi Nick!</p><p>Thanks for sharing such a wonderful circuit but I am seriously confused about the size of transformer. Are you using a normal Soft Iron core transformer or a Ferrite core transformer? If you are using soft iron core transformer then I think a terrible effect by the name of 'core saturation' can occur which might cause a huge damage. Please do clarify. </p><p>Thanks!</p>
Hi tambi007,<br>This is a normal iron core trans.<br>Transformer saturation should not happen as long as you're using the correct size for the setup, if you use a small trans probably yes this may occur.
<p>i bread boarded the pic and need to know how to wire the outputs to 2 igbt half bridges to chop 320vdc from my solar into 220vac@50hz</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>thanks for the scaling factor and saving me 30 sheets of paper! beers to you friend!</p>
<p>Hi Nick. May I please get the code want to add some more lines into the code like I want to add a solar controller with it and measure voltages etc</p>
<p>HEX file is wrong. Circuit is inverting square wave and almost 110Hz.</p>
<p>Included a pic from my oscilloscope, u can see clearly the sinewave, why are you misleading and saying 'is wrong'.</p>
<p>You can't ignore the filter. It is what stabilizes the circuit to 50Hz</p>
<p>thanks .</p>
<p>Dear Nick </p><p>Thank you share this information</p><p>am software programmer and also Atmel micro controller programming with full developing environment. don't worry about write a code, a programmed the mcu. I can help you from here. but i need your help to how to design the inverter part i need 3-5KVA inverter </p>
<p>Thank you Nick, it was helpful</p><p>.</p>
<p>Hello nick, i have made inverter this. But inverter it produces frequency 109 hz in voltage 24 volt, how will get frequency 50-60 hz? thank you.</p>
<p>hello nick, i will like to add more program line in the code to display, over heat, battery level etc on 2 x 16 display. if i can get the code.</p>
<p>hi.</p><p><a href="https://www.instructables.com/id/250-to-5000-watts-PWM-DCAC-220V-Power-Inverter/" rel="nofollow">https://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>

About This Instructable

294,004views

211favorites

License:

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: