Dimmer


Closed Thread
Results 1 to 40 of 68

Thread: Dimmer

Hybrid View

  1. #1

    Default Dimmer

    What would be the solution for following problem. I want to controll 2 opto SCR connected to RB1 RB2. I want one to increase light at the same time as the other Decrease light. The zero detection works perfect and also the delay for the ignition puls for scr1 but what about no 2.How do I solve it with Picbasic pro

    Thanks





    DELAY_1 = 8500 : us

    POS_FLNK:IF ZERODETECT = 0 Then POS_FLNK
    NEG_FLNK:IF ZERODETECT = 1 Then NEG_FLNK
    DELAY_1 = DELAY_1 - 1

    IF DELAY_1 < 7000 Then DELAY_1 = 7000

    PauseUs DELAY_1
    High out_1
    "High out_2"
    PauseUs 100
    "Low out_1"
    Low out_2

    GoTo POS_FLNK

  2. #2
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Since you want to basically complement the 2 outputs, the timing part is easy; assuming you are on 50 Hz, your circuit should see a zero crossing every 10 ms. Therefore, if the delay for one output is X, the other would be (10000-X) us.

    Now, the difficult part is that at times X will be less than (10000-X), and more than (10000-X) the other times.

    You'll need to therefore determine the sequence of servicing the 2 outputs.

    E.g., IF X < (10000-X) THEN PAUSEUS X, SWITCH ON TRIAC1, PAUSEUS (10000-X), SWITCH ON TRIAC2.

    IF X > (10000-X) THEN PAUSEUS (10000-X), SWITCH ON TRIAC1, PAUSEUS X, SWITCH ON TRIAC2.

    Take care of the situation when X = (10000-X) !

    Also allow for the time taken for the actual execution, or else you'll miss the subsequent zero crossing. This you could do by taling the half cycle width to be, say, 9000 us seconds instead of 10000.

    Hope this helps!

    Regards,

    Anand Dhuru

  3. #3


    Did you find this post helpful? Yes | No

    Default

    What about the timing of the trigger pulse when they meet in the center "50%dutycyle". At one point the pic will be busy with 100us pulse for SCR1 and at the same time SCR2 should be triggerd. this might give some flicker. maybe the solution would be to make the dimfunction in lets say 10 or 20 steps and then take care of the overlap instead of a linear dimfuntion


    Thanks

  4. #4
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    I've found that the trigger pulse can be as narrow as 5uS; therefore the flicker you refer to is imperceptible.

    Also, you could put in a line that caters specifically to this situation; e.g., if X = (1000-X) then High Out1 - Pauseus 5 - Low OUt1 - High Out2 - Pauseus 5 - Low Out2.

    BTW, I am using traics, not SCRs. Any particular reason you are using SCRs?

    Regards,

    Anand

  5. #5


    Did you find this post helpful? Yes | No

    Default

    I am using a opto triac Sharp S216S01 so its not a SCR. have to check what the shortest triggpulse can be

    Thanks for you input

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


    Did you find this post helpful? Yes | No

    Default Which PIC are you using ?

    Hi there,

    Which PIC are you using ayway and how are you detecting the zero cross.

    It is also important if you are detecting every or alternate zero crosses.

    If you are using an interrupt based routine then do the following

    1. Play with Timer0 and reset it every zero cross. All turn off the outputs. Its best to do it in assembly.
    2. Thus your timer functions as a digital ramp generator now use to loop to detect if the timer has reached the desired value. In this way you do not have to care about the glitches.
    3. A 5us time might be not enough. It is best to keep the outputs latched till the next zero cross. This will also let you use low loads under the latching current of the SCR.

    Regards

    Sougata

Similar Threads

  1. PICDIM Lamp Dimmer for the PIC12C508 - PICREF-4
    By charudatt in forum General
    Replies: 8
    Last Post: - 2nd September 2015, 07:14
  2. Dimmer switch
    By iugmoh in forum Off Topic
    Replies: 4
    Last Post: - 20th March 2009, 16:02
  3. Ideas on ir-code for dimmer
    By tirithen in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 13th February 2009, 23:22
  4. 50hz sync for light dimmer
    By tirithen in forum General
    Replies: 2
    Last Post: - 6th September 2008, 19:29
  5. Dimmer Circuit
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 25th January 2007, 14:37

Members who have read this thread : 0

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