jean12
Advanced Member level 2
- Joined
- Aug 27, 2013
- Messages
- 529
- Helped
- 5
- Reputation
- 12
- Reaction score
- 6
- Trophy points
- 18
- Activity points
- 5,497
Hello,there can anyone help me to correct my circuit here so I can get 220VAC at the output with the main source at 12VDC which has passed through a push pull and gives 440VDC;so help me to convert that 440VDC into 220VAC/50Hz.
When measuring the output with LC filter of 2.2mH and a capacitance of 0.47uF I am getting a high DC component and a very low AC component,Please help me.
The code I am using for getting the SPWM to ocntrol the MOSFET are here
I am using a PWM signal as shown in snapshot.
Please help me .
Thanks.
When measuring the output with LC filter of 2.2mH and a capacitance of 0.47uF I am getting a high DC component and a very low AC component,Please help me.
The code I am using for getting the SPWM to ocntrol the MOSFET are here
PHP:
unsigned char sin_table[32]={0, 18, 36, 54, 72, 88, 104,
119, 132, 145, 155, 165, 173, 179, 183, 186, 187, 186,
183, 179, 173, 165, 155, 145, 132, 119, 104, 88, 72, 54, 36, 18};
unsigned int TBL_POINTER_NEW, TBL_POINTER_OLD, TBL_POINTER_SHIFT, SET_FREQ;
unsigned int TBL_temp;
unsigned char DUTY_CYCLE;
void interrupt(){
if (TMR2IF_bit == 1){
TBL_POINTER_NEW = TBL_POINTER_OLD + SET_FREQ;
if (TBL_POINTER_NEW < TBL_POINTER_OLD){
CCP1CON.P1M1 = ~CCP1CON.P1M1; //Reverse direction of full-bridge
}
TBL_POINTER_SHIFT = TBL_POINTER_NEW >> 11;
DUTY_CYCLE = TBL_POINTER_SHIFT;
CCPR1L = sin_table[DUTY_CYCLE];
TBL_POINTER_OLD = TBL_POINTER_NEW;
TMR2IF_bit = 0;
}
}
void main() {
SET_FREQ = 410;
TBL_POINTER_SHIFT = 0;
TBL_POINTER_NEW = 0;
TBL_POINTER_OLD = 0;
DUTY_CYCLE = 0;
PR2=187; ///for 16Khz at 12MHZ of quartz
TRISB=0x3F;// PWM output pins
CCP1CON = 0x4C;
TMR2IF_bit = 0;
T2CON = 4; //TMR2 on, prescaler and postscaler 1:1
while (TMR2IF_bit == 0);
TMR2IF_bit = 0;
TRISB=0; //defined my self for PWM out
TMR2IE_bit = 1;
GIE_bit = 1;
PEIE_bit = 1;
while(1);
}
I am using a PWM signal as shown in snapshot.
Please help me .
Thanks.