Modified sine wave inverter using pic microcontroller

Modified sine wave inverter is designed to using pic microcontroller and push pull topology. MOSFET used as a switches in Push pull operated through control circuit in such a way that iron core transformer produced step up battery voltage having modified sine wave form. PIC16F87A microcontroller is used to generated control signal to derive. Control circuit is also discussed at the end of this article. MOSFET driver IR2210 is used as a MOSFET driver to drive both low side mosfet. If you don’t have idea about MOSFET driver IR2110, I recommend you to go through following article to know how to use MOSFET driver IR2110 as a low side MOSFET driver.

How to use Mosfet driver IR2110




IRF3205 MOSFET is used a switch of in push pull topology. Block diagram of Modified sine wave inverter is shown in figure :

block diagram of modified sine wave inverter

block diagram of modified sine wave inverter

Control circuit is used to generate signals for MOSFET driver which turn on and turn off MOSFET of push pull high voltage transformer is such a way that Modified sine wave is produced at the output of high voltage step up transformer. PIC16F877A microcontroller is used to generate control signal. AND gate or NOT gate is used to generate two signals for low side MOSFETS in such a way that only one MOSFET on at a time. Remember if both MOSFETs turn on at the same time, short circuit will occur and it will damage your inverter with in few seconds if you have not used protection circuit. Output of control signals and circuit diagram is shown below :

control circuit for modified sine wave inverter

control circuit for modified sine wave inverter




output of control circuit for modified sine wave inverter

output of control circuit for modified sine wave inverter

Push pull circuit and transformer selection:

Push pull topology and iron core transformer is used to in this project to generate modified sine wave. Circuit diagram of push pull transformer is shown below. MOSFET driver IR2210 is used as low side MOSFET drivers to drive to low side MOSFETs. Because to operate MOSFETS fully we need to give gate signal of 10 volt and voltage level of control signals from control circuit is about 5 about which is not enough to drive MOSFETS fully. That’s why MOSFET driver is used to driver low side MOSFETS. Remember I have used only one MSFET with legs of push pull transformer. You should connect MOSFETS in parallel according to power rating of your inverter and also use proper heat sinks for MOSFET.

NOTE: Use separate heat sinks for MOSFETS connect to upper and lower leg of push pull transformer.Otherwise drains of both sides will become short and short circuit will occur. I did this mistake when I started working on power electronics projects and  got serious shok. 😀

you may also like ” Pure sine wave inverter tutorials

Parallel combination of diode and resistor is used to discharge gate capacitance fast to turn off  Mosfet before turning on mosfet connected to other leg of push pull transformer. 12 volt battery is used as a DC source to which we want to convert into modified sine wave AC voltage.you can also use 24 volt battery bank , but then you have to select push pull transformer which step up voltage from 24/1.414 into 220 volt AC.  Circuit diagram of is shown below :

pusl pull transformer circuit diagram

push pull transformer circuit diagram

Complete circuit diagram and output wave form :

Complete circuit diagram and output wave form of modified sine wave is shown in figure below :

complete circuit diagram of modified sine wave inverter

complete circuit diagram of modified sine wave inverter

Output wave from of  modified sine wave inverter :

output of modified sine wave inverter

output of modified sine wave inverter

 LIST OF COMPONENTS :

Components list :
Resistors,"R1",10R,
Resistors,"R3",10R,
Resistors,"R2",1k,
Resistors,"R4",1k,
Resistors,"R5",300,
Resistors,"R10",10k,
Capacitors,"C1",1000uF,
Capacitors,"C2",100nF,
Capacitors,"C3",100nF,
Integrated Circuits,"U1",IR2112,
Integrated Circuits,"U2",IR2112,
Integrated Circuits,"U3",PIC16F877A,
Integrated Circuits,"U4",AND gate,
Integrated Circuits,"U5",AND gate,
Integrated Circuits,"U6",40106,
Transistors,"Q1",IRF3205,
Transistors,"Q2",IRF3205,
Diodes,"D1",1N4148,
Diodes,"D2",1N4148,
crystal 12Mhz
Iron core transformer 12-220 volt

CODING :

Code is written in Mikro C and 12Mhz crystal is used. I have also explained the code with comments, but if you still have any issue, you can ask me by commenting on this post. Share this article with your friends.

//************************bilalmalikuet@gmail.com***********
unsigned cnt;

void interrupt() {

cnt++;
if (cnt==3)
PORTC.f2 = 1; // Toggle PORTB LEDs
else if (cnt==17)
PORTC.f2 = 0; // Toggle PORTB LEDs
else if (cnt==20)
{
cnt=0;
PORTB.f1 = ~PORTB.f1; // Toggle PORTB LEDs
}
TMR1IF_bit = 0; // clear TMR0IF
TMR1H = 0xf6; // Initialize Timer1 register
TMR1L = 0x65;
}
void main() {

TRISB =0; // PORTB is output
TRISC=0;
PORTC=0;

PORTB = 0x00; // Initialize PORTB
T1CON= 0b00000001; // Timer1 settings
TMR1IF_bit = 0; // clear TMR1IF
TMR1H = 0xf6; // Initialize Timer1 register
TMR1L = 0x65;
TMR1IE_bit = 1; // enable Timer1 interrupT
INTCON = 0xc0; // Enable TMRO interrupt
cnt=0;
do {

PORTC.F0=1;
delay_ms(1000);
PORTC.F0=0;
delay_ms(1000);
} while(1);
}

If you feel you have gained useful knowledge through this article  , share it with your friends on social media. Because I believe the more knowledge you share, the more you will get. 🙂

12 Comments

  1. Pulsetronics November 7, 2014
    • BILAL Malik February 18, 2015
      • Noah August 14, 2015
  2. Syed Ghufran Hassan December 8, 2014
    • BILAL Malik February 18, 2015
  3. haroon iqbal May 16, 2015
  4. siktec June 26, 2015
  5. paco July 9, 2015
  6. Ashwini Verma April 24, 2016
  7. usmaa July 18, 2016
  8. Pandurang jadhav January 18, 2017
  9. yogeshwari March 6, 2017

Add Comment

Subscribe to our blog to get updates in your email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 904 other subscribers