Generating 3-phase sine wave..


Closed Thread
Results 1 to 39 of 39

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Brazil
    Posts
    108

    Smile Generating 3-phase sine wave..

    Heello...

    I'm trying to generate a 3-phase ~60Hz sine wave and i think it would be nice using any 16f7x7 with 3 CCP modules. The problem is that it will take a month to get these here where I live.

    As I've been playing with 18f2550 @ 20MHz and got USB working really fine, I was trying to figure out if it is possible to create a windows interface to control a 3-phase sine wave.. then I would create sags, swells, harmonics and so...

    The ideia is to control the 3-phase amp. and also its frequencys...(never exceeding ~62Hz..)

    So, any ideias of where should I start figuring this out?

    Is a RC low pass filter enought to generate a sine wave from a pic's pin pwm?

    Well,, thanks for the attention!
    Sylvio,

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    More information than you can shake a stick at here...doesn't delve too much into the 3 phase aspect though...
    http://www.picbasic.co.uk/forum/show...light=inverter

  3. #3
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Sylvio,

    (Somehow related).

    Speed Control of 3-Phase Induction Motor Using PIC18 Microcontrollers

    Microchip AN843: (PDF)
    http://ww1.microchip.com/downloads/e...tes/00843a.pdf

    (Code and PDF).
    http://www.microchip.com/stellent/id...pnote=en012011

    Example of 3-phase bridge driver chip:
    http://www.irf.com/product-info/data...ata/ir2136.pdf

    Best regards,

    Luciano

  4. #4
    Join Date
    Jan 2007
    Location
    Brazil
    Posts
    108


    Did you find this post helpful? Yes | No

    Smile

    Well.. Thank you Skimask and Luciano. Excelent readings!

    So, I've bought a 16F777 and it has 3 CCP modules. As suggest in the readings above, it becomes easier to create an analog output when using high PWM frequencys. Using @ 20Mhz and Mister_E's PicMultiCalc, it turn out that it can generate frequencys > 20Khz, what is enought to this application.

    Timer2 is responsable to control the PWM frequencys (all the same).

    Timer1 is responsable to create the interruption to supply the new duty cycle value.

    Now, let'ss think about the sine table and the software. Just to remember, I'll create an interface to control sine frequency, amplitude and also the sine table, as it would be interesting to create harmonics, sags and swells.

    The sine table could be in the pic's data memory or it could be sent throught USART everytime that the user changes the interface option, like frequency. Do you think that it would work in real time using USART?


    Thanks again!
    Sylvio,

  5. #5
    Join Date
    Jan 2007
    Location
    Brazil
    Posts
    108


    Did you find this post helpful? Yes | No

    Default

    Well, things have been working until now...

    When Timer1 interrupts, a INDEX var is summed and another position in a sine table is selected.. then a new value is output throught HPWM.

    The sine table is filled with 72 number.. So, to create a 60Hz sine wave, o must read it at approx. 4.32KHz.

    So, When I set timer1 to 64386 (1:1 prescaler @ 20MHz), it should interrupt at ~4.32KHz and create de 60Hz sine wave... but, it is generating a 26Hz... if I set timer1 to 65000, it decreases the 26Hz to 20Hz ... I didnt get iT! It should read the table faster, shoul'nt it?

    Well, thanks!!!
    Sylvio,

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sirvo View Post
    So, When I set timer1 to 64386 (1:1 prescaler @ 20MHz), it should interrupt at ~4.32KHz and create de 60Hz sine wave... but, it is generating a 26Hz... if I set timer1 to 65000, it decreases the 26Hz to 20Hz ... I didnt get iT! It should read the table faster, shoul'nt it?
    I'm guessing here, wild stab, since I don't see any other code here...
    It might be reading it faster, but it might be missing/skipping a Tmr1 interrupt due to how long it takes to accomplish your interrupt code.
    Try increasing the number by small amounts, see if it actually increases up to a point, and then drops off.

Similar Threads

  1. To Generate Sine Wave Using PCPWM of PIC18F4331 (Issue)
    By Cyborg in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd March 2014, 13:39
  2. Sine wave
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 18th May 2009, 03:31
  3. 3 phase supply detector challenge
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 15th May 2009, 07:54
  4. 3 phase PWM with dsPIC30F2020
    By nemmard in forum mel PIC BASIC
    Replies: 1
    Last Post: - 21st January 2009, 14:19
  5. 3 phase sequencing
    By ardhuru in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2007, 07:35

Members who have read this thread : 1

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