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>Can you send me the proteus file of pure sinewave inverter</p>
<p>why in my proteus simulation there is always a message like this ??</p><p>&quot;Simulation is not running in real time due to excessive CPU load&quot;</p><p>But the results at the output already Exit Pure sine wave</p>
<p>is it possible to get the proteus file from you. i am also facing the same issue but not getting sine wave </p>
<p>my email address is ars.soomro18@hotmail.com</p>
<p>Aukcje internetowe dla Twojej strony! Please help me, i am a student vietnamese , i really need your project<br> . Can you send me your proteus file? thank you very much .</p>
<p>should we use a transformer rated for 50/60hz low frequency or the higher frequency used by the pwm (i supposed it is a sinusoidal PWM at 2.5kHz from the oscilloscope diagram)? From what I understand, the 50hz output is what you get AFTER the filtering capacitor at the secondary. The transformer itself see a PWM waveform at 2.5KHz. Is laminated iron core transformer good enough at 2.5Khz ?Since at this frequency laminated core has a lot of eddy current</p>
<p>where is the IMG_0690.MOV ? file no longer available for download</p>
<p>hey, can someone send the proteus file for me rahardianpahlevi@gmail.com</p><p>Please.....;(</p><p>thak you so much</p>
<p>check email bro i send you my proteus file</p>
<p>Hi mate is there any change of you being able to send it to me too please tye2000@hotmail.com</p>
<p>poderia me enviar o circuito no proteus para eu poder simular tamb&eacute;m?</p><p>lucas.spfc.lg@gmail.com</p>
<p>makasih bos aq asli indonesia</p>
<p>ok bro semoga bisa membantu heheh</p>
<p>this my email.. faizmunahir@gmail.com</p>
<p>hawis s1 can you send for me proteus file for this project,,i need ur help..tq so much.</p>
<p>I am a Vietnamese student. I need your project. Please send me the file about your project to kienkoj95@gmail.com thank you very much.</p>
<p>please send me proteus file and pcb layout file. my email id zaryabmalik95@gmail.com or at bsee14067@itu.edu.pk </p>
Hey, can someone send me the main .asm program of the hex. File <br>This is my email<br>Kishan.roxta10@gmail.com
Hello...i love your project. Just one question.. How does the inverter regulate the output? I see no feedback loop in the schematics... Thanks.
<p>hello everyone,,i need ur help,,can anyone send for me this software schematic because i have problem to simulate my design.. tq so much</p>
<p>this my email faizmunahir@gmail.com tq so muchh</p>
Can anybody send me right diagram because image will confused so please send on sumit.yadav123459@gmail.com
<p>i am Vietnamese . can you send proteus file for me kienkoj95@gmail.com . thank you so much </p>
<p>check email bro i send you my proteus file</p>
<p>Thank you, but i have not received it, can you send it back to kienkoj95@gmail.com thank you very much</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></p><div>T&ocirc;i l&agrave; một sinh vi&ecirc;n Việt Nam, bạn c&oacute; thể gửi cho t&ocirc;i tập tin proteus. Cảm ơn nhiều</div><div><br></div><div><br></div>
<p>I am a Vietnamese student. I need your project. Please send me the file about your project to kienkoj95@gmail.com thank you very much.</p>
<p>kindly send me pcb layout file my email id zaryabmalik95@gmail.com or at bsee14067@itu.edu.pk</p>
<p>hello..?<a href="https://www.instructables.com/member/manolission" rel="nofollow">manolission</a></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>
Excellent! I will try this
Pleace .<br>cek email bro saya mengirimkan berkas proteus saya<br>Bahasa indonesia
Sir my question is who right image of pure sine wave inverter circuit because your 2. 3 images will confused me because some images not match with other image so who is right image please tell me
<p>hi nick I tried your filter capacitor value in my own inverter using Arduino.,<br>i made also sine wave to my Arduino<br>switching frequency is 20KHz<br>puls per half cycle 512.,<br>Frequency 60Hz since out grid is 60 Hz and all appliance are 60Hz<br>but cant get sine wave at the output.,</p>
<p>please send me proteus file if anyone have it</p><p>memrprashant@gmail.com</p><p>Thank you</p>
<p>hey, can someone send the proteus file for me mhazimanmahadi@gmail.com</p><p>thak you so much</p>
<p>check email bro i send you my proteus file</p>
<p>thank you for the circuit, can i know how much the output that were delivered after been simulate?</p>
Latest scope shot of Nickk's code ;-)
<p>can you send proteus file for me hawisscooterist@gmail.com</p>
hi Heask, <br> <br>may i know your configuration in proteus? or can you post the file here? (*.DSN file) <br> <br>Regards,
Ofcourse you may, here is the circuit i used ;-) <br>Note, with the LC filter value's from Nickk i dont get this nice wave. <br>I've read that its better the test that in real life condition than with a simulation. <br>So in Proteus i'm using a RC low pass filter with a AC-100uf cap and a 22ohm-10Watt resistor to get that nice Sine Wave. <br>It doesnt matter if you use transistor to switch the mosfets or not in Proteus. <br>You will get that nice Sine Wave in both cases ;-) <br>I've try to upload the DSN but i can't? <br> <br>Cheers
beauty :)
Hi Nickk and Chuksthewoundy and others, <br>I've gotten all the stuff needed but the PIC programmer(K150) wont read/write the PIC16F628A due to firmware issue but the Seller is sending me a new one so a few weeks delay on that part. <br>But in the meantime i've learned to use Proteus and did a comparison with the Code from Nickk and Jeronimo17. <br>I tried to simulate the one from chuksthewoundy but no luck? <br>But than agian i am still learning to use it. <br> <br>Hey chuksthewounndy, any chance for a Op-amp circuit to get a RMS output? <br>Even if your not done testing it, its good practice for me and i can try to make it in Proteus i see how it goes. <br> <br>Hey Nickk, you are using a cap on the output but doesnt there have to be a Inductor also in series with the output to make a good Low-Pass filter? <br>I am not an expert here guys, just reading reading and more reading trying to get this. <br> <br>Here's a picture of the simulation i did and it was with no caps on the output. <br>Yellow and blue is the PMW mode from Jeronimo17 and Red and Green is from you Nickk and i think its called the Linear type of Sine Wave or Linear Mode of the Fets...i think.lol <br> <br>It doent look like the scope shot from Jeronimo17 but thats what i gotten. <br>As soon as i have more i will post it :) <br> <br>Cheers
Oops, forgot to post the pic.
Some info on Low-pass filter. <br>For a 50Hz the resistor should be 3.3K and the cap 1uf. <br>But with the 2.2uf cap of Nickk the value for the resistor is 1.5K. <br>But i prefer a Inductor/Cap filter because that resistor will get very hot when we pull alot of power out of the Inverter. <br>And for 60Hz value's are 1uf and 2.7K and with Nickk's 2.2uf cap the resistor value is 1.2K. <br>Maybe you all know this stuff already but i'm posting it anyway for those few who doen't know it...i am a beginner still ;-) <br>For the above calculation i used a program...:D <br> <br>Cheers

About This Instructable




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: