Sine wave power inverter


Closed Thread
Results 1 to 40 of 245

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default You need to have a closed loop control

    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

  2. #2
    Join Date
    Mar 2008
    Posts
    25


    Did you find this post helpful? Yes | No

    Default firmware code for pic18f252

    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.
    Attached Images Attached Images
    Attached Files Attached Files

  3. #3
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default That code was meant for the 18 series

    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

  4. #4
    Join Date
    Mar 2008
    Posts
    25


    Did you find this post helpful? Yes | No

    Default firmware code for pic18f252

    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.

  5. #5
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Trying to answer your queries

    Quote Originally Posted by babalola View Post
    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?..
    Seems so

    Quote Originally Posted by babalola View Post
    implementing this seems a tedious task for me as a beginner in basic and i need further help.
    This forum is the best place for PBP+PIC

    Quote Originally Posted by babalola View Post
    Can't the anded schematics attached to my last post do the steering?
    Yes, I only suggested another option.

    Quote Originally Posted by babalola View Post
    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?
    Not really. Having the ability to use the Hardware PWM and general I/O (for experimenting with softpwm, perhaps) without changing your circuit can be beneficial during development

    Quote Originally Posted by babalola View Post
    I will appriciate the compile portion so that i can use scope to verify the PWM outputs.
    Hope I find some time for it.
    Regards

    Sougata

  6. #6
    Join Date
    Mar 2008
    Posts
    25


    Did you find this post helpful? Yes | No

    Default firmware code for pic18f252

    Sougata,

    Thanks for your explicit response, i will continue to work on way out of the code problem while also hoping that someone else could offer a clue.

    Regards,
    Babalola.

Similar Threads

  1. Replies: 6
    Last Post: - 31st March 2014, 14:25
  2. sine wave inverter
    By BADAL123 in forum Off Topic
    Replies: 0
    Last Post: - 7th January 2014, 14:20
  3. Low pass filter help - pure sine wave inverter
    By George in forum Off Topic
    Replies: 1
    Last Post: - 9th April 2011, 06:24
  4. sine inverter
    By anybisi in forum General
    Replies: 0
    Last Post: - 21st March 2008, 12:08
  5. squre wave inverter
    By pramodsinha in forum Forum Requests
    Replies: 1
    Last Post: - 11th December 2005, 18:38

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts