+ Post New Thread
Results 1 to 11 of 11
  1. #1
    Full Member level 5
    Points: 1,667, Level: 9

    Join Date
    Sep 2016
    Posts
    261
    Helped
    1 / 1
    Points
    1,667
    Level
    9

    Voltage control using PWM

    I having an test panel in that their is an stepup transformer which produce 270VAC from 230VAC.

    I have to use variable voltage from 170VAC TO 270VAC for my operation in specified time.So I tried to bulit an automatic voltage converter to change the voltage from 170VAC TO 270VAC,based on time of operation.

    So I tried it by using PWM output from the PIC controller with BT136,IRF540 and MOC3021 but I can't get any output from it...

    How to control the voltage by using the PWM from PIC controller..?

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 70,834, Level: 64
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,486
    Helped
    3296 / 3296
    Points
    70,834
    Level
    64

    Re: Voltage control using PWM

    Hi,

    AC voltage control by PWM? Are you sure? Show your circuit.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  3. #3
    Newbie level 6
    Points: 226, Level: 2

    Join Date
    Jun 2018
    Location
    INDIA
    Posts
    14
    Helped
    5 / 5
    Points
    226
    Level
    2

    Re: Voltage control using PWM

    Hi,
    I think the solution to your this problem is a little different. If u want to vary your voltage in AC supply, first detect the zero crossing (any) of the voltage waveform and then vary the duration before giving the gating pulse (at each half of the AC supply to vary the RMS value of voltage) to your BT136 (TRIAC) which will control the output terminal voltage across your load.



    •   AltAdvertisment

        
       

  4. #4
    Full Member level 5
    Points: 1,667, Level: 9

    Join Date
    Sep 2016
    Posts
    261
    Helped
    1 / 1
    Points
    1,667
    Level
    9

    Re: Voltage control using PWM

    Click image for larger version. 

Name:	optocoupler.png 
Views:	11 
Size:	8.3 KB 
ID:	150732

    Code:
    freq_timer = TMR1L; 
                    freq_timer += (TMR1H << 8); 
                    freq = (int) (60000.0 / (0.008 * freq_timer));
    Output side of this circuit is connected to fluke meter and checked the frequency,it showing 100.01.
    Then I connected with CCP1 pin of PIC controller and by using the above calculation,it showing nearly 20000 like.

    How to detect the zero crossing..?



  5. #5
    Super Moderator
    Points: 70,834, Level: 64
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,486
    Helped
    3296 / 3296
    Points
    70,834
    Level
    64

    Re: Voltage control using PWM

    Hi,

    I'm not familiar with PIC,

    But "CCP1" sounds like a capture input.

    When using capture feature you need to setup the capture periferal. I don't see this in your code.
    Please explain how you set up the capture periferal.

    All I see are some values I don't know where they come from.
    Please explain your code and the math behind it.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisment

        
       

  6. #6
    Newbie level 6
    Points: 226, Level: 2

    Join Date
    Jun 2018
    Location
    INDIA
    Posts
    14
    Helped
    5 / 5
    Points
    226
    Level
    2

    Re: Voltage control using PWM

    Quote Originally Posted by venkates2218 View Post
    Click image for larger version. 

Name:	optocoupler.png 
Views:	11 
Size:	8.3 KB 
ID:	150732

    How to detect the zero crossing..?
    To Detect the zero crossing of the AC supply, follow the following steps:
    1. AC supply needs to be rectified via bridge rectifier. {Take a parallel connection}
    2. The pulsating DC which you gonna get after step 1 is also having a zero crossing at same position which we need to detect, is given input to the opto-coupler [eg. MOC3043 IC] to protect your micro-controller from over-voltage and over-current from the direct supply.
    3.The DC signal which u get in step 2 is given to the voltage comparator to detect the zero crossing.
    4. Output from step 3 i.e. O/P of voltage comparator is fed to the micro-controller to know the zero-crossing.



  7. #7
    Super Moderator
    Points: 77,386, Level: 67
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,667
    Helped
    4224 / 4224
    Points
    77,386
    Level
    67

    Re: Voltage control using PWM

    Klaus, CCP1 is one of the capture or PWM output pins depending on configuration. In PWM mode it is an output, in CCP mode it effectively becomes a gate input for counting a clock or a counter input itself.

    I'm not sure why PWM is suggested at all here and I'm not sure triac control is suitable for producing a variable AC voltage unless chopping parts of the cycles is permissible. If PWM is used, it can only be to either control the phase angle the triac is fired, in which case the waveform will no longer be sinus or it can be used to recreate the entire AC waveform in which case zero crossing isn't necessary.

    venkates2218, can you explain which method you are trying to use. From your triac diagram is seems you want to control overall power to a load rather than voltage.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  8. #8
    Advanced Member level 5
    Points: 14,248, Level: 28
    schmitt trigger's Avatar
    Join Date
    Apr 2013
    Posts
    2,376
    Helped
    771 / 771
    Points
    14,248
    Level
    28

    Re: Voltage control using PWM

    Are you really attempting to control 270 volts alternating current with a phototransistor?
    My batteries are recharged by "Helpful Post" ratings.
    If you feel that I've helped you, please indicate it as a Helpful Post



  9. #9
    Super Moderator
    Points: 77,386, Level: 67
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,667
    Helped
    4224 / 4224
    Points
    77,386
    Level
    67

    Re: Voltage control using PWM

    ... I think that was just to detect zero crossing.

    However, using PIC PWM module usually implies a relatively fast PWM rate so unless this is a full inverter (creating a new AC voltage via a DC source), the PWM signal is useless as a triac trigger.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   AltAdvertisment

        
       

  10. #10
    Member level 1
    Points: 496, Level: 4
    ArakelTheDragon's Avatar
    Join Date
    Jul 2017
    Location
    If you like the post, please press "Like".
    Posts
    38
    Helped
    7 / 7
    Points
    496
    Level
    4

    Re: Voltage control using PWM

    I don't know if the forum rules allow this question and us to comment. If they do, it would be best to use a step up transformer for this purpose.



  11. #11
    Super Moderator
    Points: 50,911, Level: 55

    Join Date
    Apr 2011
    Location
    Minneapolis, Minnesota, USA
    Posts
    12,506
    Helped
    2487 / 2487
    Points
    50,911
    Level
    55

    Re: Voltage control using PWM

    Does your project draw low power? Here is an AC-in-AC-out voltage multiplier. It has positive and negative Villard cells. The transistors feed a true AC sine wave to the load. It allows some room for adjustment (although more effort is needed to create automatic regulation).

    Supply is 170V AC. The load gets 270 VAC

    By selecting small enough values for C1 C2, it produces large voltage swings. Thus the transistors do not need to dissipate so much heat. Bias resistors should be adjusted so the load gets a sinewave at the desired voltage.

    Click image for larger version. 

Name:	AC in AC out V mult 170v to 270v 100mA 50Hz.png 
Views:	4 
Size:	51.3 KB 
ID:	150764

    Power factor error is high. It can be reduced by installing resistor/ capacitor/ inductor networks inline with the diodes.



--[[ ]]--