Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Pic 16f876a Pure Sinewave inverter

Status
Not open for further replies.
Sorry, ones again. Before not correct.
 

Attachments

  • Working.pdf
    327 KB · Views: 712

OK thanks guys a lot for the help especially californiajoe you've been most helpful .my inverter is working :D:D my problem was the transformer i changed it and everything is good now
. i still have one new problem :p :razz: the sine wave on the oscilloscope it great but the problem is that when i light a 40 watt light bulb i can see it flickering although on the scope the signal look great what could be the problem?? BTW is it necessary to use an inductor?
 

hi dude ..
have you found the code of generating the sine pwm from pic..please forward to me at umar8khan@gmail.com

---------- Post added at 21:25 ---------- Previous post was at 21:03 ----------

good work done


could you please explain the method using which sine pwm is generated.. sure you will help me.... my id is umar4khan@gmail.com

---------- Post added at 21:34 ---------- Previous post was at 21:25 ----------

hi dear


could you please explain the method by which sine pwm is generated...please explain...
 

check the video and see how the lamp is flickering
 

Attachments

  • IMG_0081.rar
    1 MB · Views: 565

Signal on scope looks sinosuidal to me, but flickering I am not sure.
1. Check frequency of the output voltage (230 VAC), should be very close to 50 Hz
2. Check ACU voltage, should me close to 13 VDC (when load)
3 Check voltage drop between 12 V power suply and output transistors.

Ones again: for correct operation of the inverter both of the transformers (current transformer and output transformer) should be connected correct (check manual), otherwise inverter doesn't work well!!
Regards
 

can any body please post the code of only sine pwm for pic18 ....thanks
 

Also check signals A/B and PWM direct on the MCU pins. The first one is 50 Hz squere signal, the second one is 20 kHz squere PWM. Mixed together they come to each TLP 250.

Regards
 

i will check all u guys are suggesting and thanx again for the help. i have another Q does anyone know y i can compile the c program ? its giving me an Error [141] C:\Documents and Settings\Joseph\Desktop\sine_pwm_voltage-regulator_without_a-b_voltage_check.c; 1.20 can't open include file "16F876A.h": No such file or directory
 
Last edited:

hey californiajoe i know man that i have too many Q's and sorry for that concerning the flickering i noticed that the frequency is not stable it between 49 58 hz and even i noticed when i put an oscilloscope on the output tthe flickering increase more and more :S its really weird i can't explain whats happening .
 

Logic of checking device is quite simple. First you have to be sure your power suply is correct and strong enough, which means your ACU must give to you at least 10A at 13V for less then 100W on the output.
Unstable frequency: check 5V MCU suply (osciloscope), should be without noice. Then check frequency A/B signal, MCU pin 12, also PWM frequeny, MCU pin 13. If those signals are well (shape and frequency) then follow those signals through all elements all the way through the output.

Regards
 

evrything is normal frequencies are jumping could they be because im using a resonator not a crystal???
 

What do you mean by normal? Use crystal then check everything again, start to check MCU signals. Post some picture or video so we can help you.
 

i meant evrything seems to be normal EXCEPT the Frequency is jumping :p i changed the crystal and still i have the same problem. the weird thing is when i connect the ground of the oscilloscope to one of the output the lamp starts flickering more and more and i noticed on more thing my transistors are heating up even without load connected and yes i did the boostrap as u suggested. and no i don't have noise on the ground all signals are perfect even the voltages are perfect too the mcu have a constant 5 v and im using battery so i am having enough current thanks for the help :)
 
Last edited:

Again: how much in Hz are frequenys of signals A/B and PWM. In my case A/B = 47,8Hz, PWM = 18,7kHz and they are stabile.
Next: you don't have noice on GND (if everything is connected well), you could have noice on +5V (check it, in case noise put capacitor 0,1uF very close to suply pins of the MCU)

It is strange, try to load diferent software and check all signals. You have many versions available here. If this will not help i think you have some mistake on your PCB (you have diferent desighn).
Othervise, there is my desighn of inverter available somewhere in this thread, so you can do it by this way with 100% succes.

You have to know: inverter is not so easy to build, you have to learn first how it works, what all those signals do and so on, but I was on the same way a year ago, so step by step ...
 

hey im back again i did some testing i know what the problrm is but i don't know y u guys are not facing it.the problem is the feedback of vout the 2 10M resistors are high impedance so and noise will affect the out thats y im seeing flickering ,so i tried to remove the feedback using lm324 and replace it with a transformer 220 to 6v and did a voltage divider to get 2.4v,and that worked i have no flickering anymore but i lost the regulation for some reason. on more thing is vout AC or DC ???
 

Try to proteckt 10M resistors with some metal cover or somethong similar. aditional transformator is good idea, but you must check fase of those signals, they should have the same fase as before with 10M resistors.
 

can any one please tell me what is wrong with this code ....i want to generate 50 HZ of sine pwm using the ccp module ...


#if defined(__PCB__)
#include <16C56.h>
#fuses HS,NOWDT,NOPROTECT
#use delay(clock=12000000)


#elif defined(__PCM__)
#include <16F877.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=12000000)


#elif defined(__PCH__)
#include <18F452.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=12000000)

#endif



const long sine[50] = {0,12,25,37,49,61,73,85,96,107,117,127,136,145,154,161,168,175,180,185,190,193,196,198,199,200,
199,198,196,193,190,185,180,175,168,161,154,145,136,127,117,107,96,85,73,61,49,37,25,12};

int i=0;


# INT_TIMER2
pwm()
{
if(i=50)
i=0;
//clear_interrupt(INT_TIMER2);
set_timer0(0);
set_pwm1_duty(sine);
i++;

}

void main() {
setup_timer_2(T2_DIV_BY_1,254, 1);
setup_ccp1 (CCP_PWM);
set_pwm1_duty(100);
enable_interrupts(GLOBAL);
enable_interrupts(INT_TIMER2);
}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top