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>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
<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>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>
<p>makasih bos aq asli indonesia</p>
<p>ok bro semoga bisa membantu heheh</p>
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>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>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
i check chuksthewoundy code its not a pure sinewave wave , Jeronimo17 code is triangular wave but Nickk code is pure sine wave
I checked the code of Jeronimo17 and it is Pure Sine but it has to have a good filter because i also saw that triangular wave until i put a filter on it. <br>See scope shot of Jeronimo17. <br>The one of chuksthewoundy i can test, getting the same error as the one from you? <br> <br>Cheer
<p>can you send proteus file for me hawisscooterist@gmail.com</p>
no it's very close to sine wave but not acutally because its peaks has much time delay and wave become clipped on load some minor modification is need
and also compare it with Nickk you see the difference
Thanks for that extra info, will compare ;-)
Oops, meant to say &quot;I can't test&quot; the code of chuksthewoundy. <br>Its late...-.-
You're right, it is triangular, I have to investigate more, but I have no time for now
Yes ! :)
hi Nickk, your code is awesum and pure sine wave no one deny ... why not u get source code from programmer???
i contact him many many times but he doesn't respond i don't know why
Thats a good question wmughal. <br>Hey nickk, i'm willing to donate abit for the complete source code. <br>Its not much but all bits counts but thats up to you ofcourse :) <br> <br>Cheers
Hey nickk, can you tell whats the switching Frequeny of the code/inverter? <br>With this info i hope to calculate a good LR low pass filter. <br> <br>Cheers
Thanks for that info wmughal, still learning here ;-) <br>I will try to put a non polarized 2.2uf cap on that output with Nickk's code in proteus and hopifully i will see that nice sine wave. <br> <br>Cheers
for inductor/cap use the following: <br>2.2uF and 10mH

About This Instructable

300,470views

217favorites

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: