Hi,
Manish originally the inverter was built ono the PIC18F452 and had loads of features like true synchronized changeover using MOSFET based static switches to perform like a pseudo online UPS. Actually it was an adaptation of my motor control system using 18F4331. However the BOM cost was high so it was scaled dowm to mimic other designs already based on 16F72. Uses a pseudo software PWM. (Utilizes the inbuilt unit in compare mode to generate int and fire mosfets). Half-Bridge driving and a half cycle boost PFC for charging control. Vertical-Horizontal current based lookup table to get precalculated points (16F series do not support harware multiply). Most of the credit goes to Mr. Pramod Sinha of Jetmark Systems Delhi cause my 16F skill sucks. We could not share the code as it is a commercial project and we are legally binded. For clarifications and solving issues this forum is a great place and people (far far better than myself, Perhaps) would surely help you out. Best of luck. Where are you located in Delhi, I drop in there almost every month and stay in A6 Paschim Vihar.
Regards
Sougata
I have written a sine wave generating routine in pbp. It is tested.but i am too busy because summer is my business season give me few days to edit and post it to forum.
thanks everybody.
[QUOTE=sougata;35864]Hi,
I am devloping a proogramm for inverter,but i need some helps, More over i have devloped the programm on theory.but in practical i have some problem
i have genrate 50 Hz frequency by a loop and delay.Out Put is Ok but when put load about 100 wats on it
the output voltage go down more tahn 40 volts.
Please help me to do it in write way, I am the lerner and new in the are of pic programming.
Please helps me
Last edited by Pranav Verma; - 16th March 2008 at 11:51.
Hi,
You need to modulate your sinewave according to a modulation index (that increases decreases the output voltage) derived from the error. Inititally a proportional error scheme is okay to experiment with later can add up to PID. In addition you can do a point by point correction to lower distortion. In 16Fs multiply is not supported in Hardware thus a different approach may be taken. Use a sliding lookup table. Here you have more number of points in the lookup table than regular 32/64 points. However it should be a single quadrant lookup table. Now if the resolution of the lookup table is increased you can have a sliding index (according to error) to have voltage correction without much software overhead.
Regards
Sougata
since no one would review my c-code on this subject, ih have decided to modified suogata bacis code on sine wave inverter thread. i am using PIC16F72 for the evaluation because that is the processor that is readily available with me now.
The picbasic iam using is the pro demo version and so i appriciate that i can't run a code more than 31 command line.however upon trying to compile the code ,the following erros are reported:
1: Error line 116 :redefinition of label T0CON
2: Error line 119: bad expression
3: Demo limit of 31 command line exceeded (this is understood)
pls, can any one fix these problem for me?.
(a): With the way the modified code stands,can it generate two complimentary sine pwm signals DRIVE1& DRIVE2?.if yes how do i include a delay routine of about 470ns for dead-time control between the two signals?
(b): If the code cannot generate the two complimentary sinepwm signals what do i do to fix the stuff?.
regards,
babalola.
Hi Babalola,
The routine I posted uses the FSR0 indirect addressing method which is not available in the 16F72. 16F72 has a single FSR register so it would be a different implementation. With Anded outputs steering the PWM should not be difficult. You can use the same phase drive signal to drive the upper MOS so only the lower MOS would be switching with your PWM.
With 20MHz clock each of your instruction takes 200nS. So servicing the interrupt, (All MOS turned off within it) and then fetching the lookup table from PBP and switching as per system flag is quite some DEAD TIME . Another way of steering the PWM is using Four Buffers each connected to individual PIC ports and 4 nos of 4.7K resistors from the PWM pin to the four ports. So you get the following output;
1. PORT pin floating (Z, as input) = PWM
2. PORT pin LOW = LOW
3. PORT pin high = High
Since you are using a demo version of PBP, I would try to find some time to get some portions compiled for you. However I am a bit stuck and behind schedule in one of my projects. So please hang on...
Anybody else out there to help... Please do.
Regards
Sougata
I have found that 16f72 has only FSR(at addr. 04,84,104&184h).from the datasheet,could that be the reason for the errors?.implementing this seems a tedious task for me as a beginner in basic and i need further help. can't the anded schematics attached to my last post do the steering?. from what i understand by using four ports with buffers to steer the PWM would mean configuring the four ports as input permanently, is it? i will appriciate the compile portion so that i can use scope to verify the PWM outputs.
babalola.
Bookmarks