Dimmer


Closed Thread
Results 1 to 40 of 68

Thread: Dimmer

Hybrid View

  1. #1
    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

  2. #2


    Did you find this post helpful? Yes | No

    Default

    I use a 16F84 8Mhz.Zero detection with an opto coupler after rectifyer 100Hz and then a schmittrigger to get the levels right. Have a <1ms puls around zero.
    It might be a good idea to make the pulse as long as it can be ,and bring it low just before zero. Sharp "s216s01" recomends 1mS min ,
    Assembly might be the best way of solving this ,since my goal is to control 5 outputs , I start with one then work my way up

    thanks

  3. #3
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171


    Did you find this post helpful? Yes | No

    Default

    I use a resistor as zero detect, 1 meg from phase straight into the port, I then have a 470K resistor on the pin next door to it and swing the bias in an opposite direction to the mains ie:

    GPIO.5 is the output pin with the 470K on it - trigger is GPIO.4 which is connected upto the 1M which goes straight to phase. The triac is triggered by a BC327 and i trigger by turning pic from high impedance to low by changing from input to output.

    LowSide: 'look for trigger points and trigger triac

    IF trigger = 1 Then lowside 'wait for phase to go low
    GPIO.5 = 0 'weight input to sense zero crossing
    PauseUs dim 'wait for dim period
    Output triac 'fire triac
    triac = 0
    PauseUs 400
    Input triac


    HighSide:

    IF trigger = 0 Then HighSide
    GPIO.5 = 1
    PauseUs dim
    Output triac
    triac = 0
    PauseUs 400
    Input triac

    GoTo start
    Last edited by George; - 31st October 2005 at 21:38.

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


    Did you find this post helpful? Yes | No

    Default How would you like your outputs to be controlled

    Hi there,

    Having the opto-triac driven till the zero cross would take care of inductive loads also.
    Provide me with the following :

    1. How the outputs would be controlled? (Internal timer /push button etc)
    2. Your line frequency

    I would try to play with the interrupt part simulate it.

    Regards

    Sougata

  5. #5


    Did you find this post helpful? Yes | No

    Default

    What i wanted to do is a controller for some decorative lights. I want to make a pattern where light fade in / out.
    Powersupply = 50 hz 220V

    My first plan was to fade in/out between 2 limits on 1 channel "this works ok".
    then i wanted to try 2 channels to push the limit "a bit"
    Now I can see this extend to like 5 output creating a wave like motion.
    may be it will end up with a lot of assembly code and also lower the demands
    on "linear control" and go over to fixed steps and a data table


    could even parallell 5 pics to achive my goal this would be the last solution

    Thanks

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


    Did you find this post helpful? Yes | No

    Default I will be posting the code tomorrow.

    Hi,

    Understood. The only problem is that I don't have 16F84 ready. However it should work. Do you have a PIC18F452 ready? This is where I am most comfortable. I also have 16F676, 16F73, 16F619 handy. BTW you don't need five PICs.

    Regards

    Sougata
    Last edited by sougata; - 1st November 2005 at 10:08.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,175


    Did you find this post helpful? Yes | No

    Default

    I have not done this but may be my idea could help.

    Using Interrupts, when there is pulse from zero-crossing detector, you could succeed in your house keeping, timing that is.

    Entering the ISR, the relevant registers would increment or decrement according the flags you have set in your main program. So there is accurate timing to fire every SCR even 5 or more since the ISR would be triggered every 10ms.

    Ioannis

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