Introduction: Adaptable 12vDC/220vAC Pure Sinewave Inverter

Picture of Adaptable 12vDC/220vAC Pure Sinewave Inverter

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.


scotts88 (author)2017-09-20

hi there i was wondering would i be possible to scale this.

for instant is it possible to scale it to 2.5kw by paraleling mosfets and transformers

ðkital (author)scotts882017-10-31

Yes you can

SweetA2 (author)2017-10-27

Hi dear
where we can adjust the out put voltage???

krishnankanth123 (author)2017-09-30

Hi, can anyone email to me the circuit diagram files.

My email :


NerdBishop (author)2017-09-23

please what is the frequency of this circuits output

FernandoP126 made it! (author)2017-06-06

Thank you very much for the project Nick

I am sharing my proteus version for the simulation based on its original scheme include code mikroC.

I could indicate the characteristics of the indicator 10mh for a power of 5000w, and if you can do yourself

Greetings from Peru

Greetings from Peru

weldone boss.

this is no more available.

please can i get it via email?

pls whats the total output power.


AhmedAwady (author)FernandoP1262017-06-17

First of all Thank you very much,
but your proteus project doesn't work with me , when I tried to startup the proteus file it given me an error message and the program stopped
Can you tell me what should I do?

FernandoP126 (author)AhmedAwady2017-06-19

Hello @AhmedAwady 
I find that your problem is by performance of your cpu
Try this (look at the image)

AhmedAwady (author)FernandoP1262017-06-20

Thank you for your replaying @FernandoP126

i tried your suggestion, but the problem was not solved

i am attached the image to describe my problem.

i hope to find the solve of this problem.

and i am really sorry to waste your time .

maverickfj (author)AhmedAwady2017-08-01

i am having the same problem, the proteus file doesnot opens. plz suggest...

FernandoP126 (author)AhmedAwady2017-06-22

Hello my version Proteus is 8, If you open a blank project also gives you that error? If so, you may need to reinstall proteus

eseguanaco (author)FernandoP1262017-06-06

Hola Fernando! Gracias por el circuito en Proteus, una pregunta ¿Por qué me arroja a la salida los 160v a 14hz?

FernandoP126 made it! (author)eseguanaco2017-06-07

Aca te dejo la versión con Mosfets.


Fernando Parodi

FernandoP126 made it! (author)eseguanaco2017-06-07

Hola la simulación que compartí tiene el transformador en 12v 0v 12v, pero como indican los comentarios de Nick este debe ser de 6v 0v 6v en la vida real, para efectos de simulación a mi me funciona con 10v 0v 10v dando una salida de 242v AC (considerando que hay una caída de 20v cuando hay carga...), y para la frecuencia si deseas 50Mhz usas un cristal de 20Mhz y para 60Mhz un cristal de 24Mhz también lo indicaron.... la parte de medir frecuencia debe ser antes del filtro RC aun así no es exacta a lo que sale en realidad.. el proteus es simulación no necesariamente son os valores exactos. lo mejor es ir a protoboard y probar y probar..

que gusto encontrar alguien in spanish (y)


Fernando Parodi

jeffreeman96 (author)2017-09-12

this is no more available.

please can i get it via email?

pls whats the total output power.


tramphuc (author)2017-08-28

hi , can someone send the PDF file for me
Thank you

NAFZ (author)2017-08-14

Please master Nick explaining the controlar settings 16f628a config fuse settings with the external crystal 20MHZ

Morshedul IslamS (author)2017-07-25

Where is output voltage control section ? or this circuit doesn't need that to output continuous 220V output even we increase the load .

informito (author)2017-07-08

Hi! What would have to be modified for the circuit to work at 24v? Great job, thank you!

احمد فرازب (author)2017-05-23

Can you send me the proteus file of pure sinewave inverter

Muhammad68 (author)2017-06-06


Are you sure this project its working ???

i am makes this project but no signal in pin 11 or 12 ???

why like this project do not working are this project for buy can tell this ??

i am sorry for this

FernandoP126 (author)Muhammad682017-06-06

Works Ok


Rahardian made it! (author)2017-03-17

why in my proteus simulation there is always a message like this ??

"Simulation is not running in real time due to excessive CPU load"

But the results at the output already Exit Pure sine wave

awais_1999 (author)Rahardian2017-05-23

is it possible to get the proteus file from you. i am also facing the same issue but not getting sine wave

awais_1999 (author)awais_19992017-05-23

my email address is

Kienkoj9 (author)Rahardian2017-05-23

Aukcje internetowe dla Twojej strony! Please help me, i am a student vietnamese , i really need your project
. Can you send me your proteus file? thank you very much .

aleclee (author)2017-05-21

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

aleclee (author)2017-05-21

where is the IMG_0690.MOV ? file no longer available for download

Rahardian (author)2017-03-13

hey, can someone send the proteus file for me


thak you so much

HawisS1 (author)Rahardian2017-03-14

check email bro i send you my proteus file

Langers123 (author)HawisS12017-05-18

Hi mate is there any change of you being able to send it to me too please

LucasG40 (author)HawisS12017-05-05

poderia me enviar o circuito no proteus para eu poder simular também?

Rahardian (author)HawisS12017-03-15

makasih bos aq asli indonesia

HawisS1 (author)Rahardian2017-03-15

ok bro semoga bisa membantu heheh

faizmunahir (author)HawisS12017-04-29

this my email..

faizmunahir (author)HawisS12017-04-29

hawis s1 can you send for me proteus file for this project,,i need ur help..tq so much.

Kienkoj9 (author)HawisS12017-04-13

I am a Vietnamese student. I need your project. Please send me the file about your project to thank you very much.

zaryab (author)HawisS12017-04-04

please send me proteus file and pcb layout file. my email id or at

KishanJ7 (author)2017-05-14

Hey, can someone send me the main .asm program of the hex. File
This is my email

mahio4u (author)2017-05-02

Hello...i love your project. Just one question.. How does the inverter regulate the output? I see no feedback loop in the schematics... Thanks.

faizmunahir (author)2017-04-29

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

faizmunahir (author)faizmunahir2017-04-29

this my email tq so muchh

sumityadav (author)2017-04-25

Can anybody send me right diagram because image will confused so please send on

Kienkoj9 (author)2017-03-08

i am Vietnamese . can you send proteus file for me . thank you so much

HawisS1 (author)Kienkoj92017-03-14

check email bro i send you my proteus file

Kienkoj9 (author)HawisS12017-04-21

Thank you, but i have not received it, can you send it back to thank you very much

manolission made it! (author)2016-08-21

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.

greetings to all.

Kienkoj9 (author)manolission2017-04-21

Tôi là một sinh viên Việt Nam, bạn có thể gửi cho tôi tập tin proteus. Cảm ơn nhiều

About This Instructable




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