Triac phase control

Discussion in 'The Projects Forum' started by crazypacov, Jun 16, 2014.

  1. crazypacov

    Thread Starter New Member

    Jun 16, 2014
    12
    0
    Hi guys!
    I am working on a dimmer project (as part of my thesis). I tested it and it works fine. I am ready to share my experience with anyone interested. Any suggestions? Programming part is done in MikroBasic.

    I have a problem in simulation part, in Proteus. It doesn't seem like triac simulation is done in a right way, or i am missing something? I doubt that, because as i said, it works in practice on a 100w and 500w light bulbs, i even tested it with oscilloscope and i got normal/expected graphs.
    Here is the circuit in Proteus:

    [​IMG]
    Chanel A - from zero crossing circuit.
    Chanel B - signal from MCU to triac gate.
    Chanel C - wierd signal i am getting from triac.

    When i lower the voltage to ~100v then everything seems to be ok. :confused:

    Any help/comment is appreciated :)
     
    Last edited: Jun 16, 2014
  2. MrCarlos

    Active Member

    Jan 2, 2010
    400
    134
    Hello crazypacov

    It seems to be a lack of synchronization.
    In the picture you added, there is nothing to synchronize the two AC generators
    It may be also that the program in the PIC has something to improve.
    How is the pulse from MCU to triac gate appears first (Green Line) and then the zero crossing (Yellow Line).

    I'd like to have your whole project to give better support
     
  3. crazypacov

    Thread Starter New Member

    Jun 16, 2014
    12
    0
    That is because i start with a minimum voltage
    [​IMG]

    up to the maximum voltage for the load
    [​IMG]

    That is how waveform should look like.
    I can achieve it with 120v or lower voltages, but not with 220v in simulation.
    I tried different settings, triacs, resistors but i just cant make it work :)

    [​IMG]


    Generators are synchronized by default in Proteus:
    [​IMG]
     
    Last edited: Jun 17, 2014
  4. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Perhaps the model for the opto or triac has a lower breakdown voltage, and you simulation is exceeding it. Just a guess, I really don't know much about models in Proteus. The negative swing of the signal looks correct. That should be a clue.
     
  5. crazypacov

    Thread Starter New Member

    Jun 16, 2014
    12
    0
    This MOC have 400v blocking voltage and triac 800v.
    I tried with MOC3052 which have 600v blocking voltage.
     
  6. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    I said "the models" Are you sure about the models? Have you tried an experiment with Proteus using these components and 220V? I'd try every component in an experimental circuit.
     
  7. crazypacov

    Thread Starter New Member

    Jun 16, 2014
    12
    0
    I cant be sure about models. It looks like triac models are faulty.
     
  8. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998

    That's a good possibility. It would only take a few minutes to test the models. Make a simple design and find out how much voltage you can connect before the models fail. Once done, you can find new models or fix the ones you have.
     
  9. nigelwright7557

    Senior Member

    May 10, 2008
    487
    71
    I could be totally wrong but haven't you got mt1 and mt2 swapped ?
     
  10. crazypacov

    Thread Starter New Member

    Jun 16, 2014
    12
    0
    I got it working, this way:

    [​IMG]

    :cool:
     
  11. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,801
    1,105
    Working? Unfortunately you now have an amp or so going through R9 and the opto-triac :(
     
  12. crazypacov

    Thread Starter New Member

    Jun 16, 2014
    12
    0
    But during small period of time (~300 micro seconds) every 10ms.
    From MOC manual:
    R1(min) = Vin(pk)/1.2A = 310V/1.2A = 260 Ohms, so it is ok.
     
  13. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,801
    1,105
    No. Not with the post #10 circuit. You have a permanent current path through V3, R9, the opto-triac and the gate of U4. Rms current is ~730mA ! Run the sim and confirm.
     
  14. crazypacov

    Thread Starter New Member

    Jun 16, 2014
    12
    0
    How can there be a permanent current path through the opto-triac, when i am controlling it with a signal from a microcontroller (via R17)?
     
  15. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,801
    1,105
    For the lamp/load to be on max (i.e. most of the mains cycle) the micro will need to provide either (a) a continuous 'on' signal (which I was wrongly assuming) or (b) a pulse synchronised with the mains cycle.
     
  16. crazypacov

    Thread Starter New Member

    Jun 16, 2014
    12
    0
    Well as you see this is phase control, so i am synchronizing with voltage zero-cross, and opto-triac is in conducting state for short period of time, so it is basically max repetitive surge current that comes into equation.
     
  17. embpic

    Member

    May 29, 2013
    187
    3
    post your proteus file bcoz i am doing same but not getting components.
     
  18. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    You can buy opto-isolated zero crossing solid-state mains relays for as little as $2 or $3 now, good for 120v AC 2A to 3A range.

    Your opto/TRIAC/heatskink etc will probably cost more than that, and there is a reliability benefit going with a zero cross solid-state relay anyway (and no need for your micro to sense or care about the zero cross point).
     
  19. crazypacov

    Thread Starter New Member

    Jun 16, 2014
    12
    0
    Do you need the hex file too?
    I will post it tomorrow.

    You can't do the phase control with that.
    [​IMG]
     
  20. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Sorry!

    You can also get "random turn on" types of solid state relays in the same price range.

    That WILL do phase angle control, and will still replace your opto, TRIAC and heatsink. :)
     
Loading...