Light dimmer problem


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: Light dimmer problem

    Quote Originally Posted by dhouston View Post
    Full-wave rectification of what? You said you were using an external power supply.

    Numerous people have used the circuits in that appnote to control triac dimmers using the X10 powerline protocol.
    Full wave rectification of mains, I needed it for Zero-Crossing of mains. External power supply only provides 12V to my circuit. I checked the X-10 circuit but it has it's own transformer-less power supply and from there direct resistance is coming for Zero-crossing without any sort of rectification. I don't know much about X-10 so I am sorry if there is something I missed which you were trying to point out.

    Anyways, since I have modified the code now the problem is of flickering of the bulb. Any comments about could be wrong?

  2. #2
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: Light dimmer problem

    Quote Originally Posted by FromTheCockpit View Post
    Full wave rectification of mains, I needed it for Zero-Crossing of mains.
    You do not need full wave rectification for zero-crossing detection. The circuit shown on p3, FIG3 of AN236 works fine for zero crossing. The appnote even details the inaccuracies inherent in the circuit, saying...
    On a rising edge, RB0 will go high about 64 µS after the zero-crossing, and on a falling edge, it will go low about 16 µS before the zero-crossing.
    You'll find similar inaccuracies in most methods for zero-crossing detection. Their calculations are for 120VAC/60Hz. You'll need to adjust for 220V/50Hz (and maybe use a larger current limiting resistor).

    One possible cause of flicker is failing to compensate for inaccurate zero crossing detection.

    You can ignore the X10 communications circuitry and code but I suggest you study the code used for the triac dimmer circuit in AN236 (p6) or in the referenced PICREF-4 Reference Design, “PICDIM Lamp Dimmer for the PIC12C508”. The Microchip engineers frequently know what they are doing.
    Last edited by dhouston; - 6th July 2012 at 20:02.

  3. #3
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default Re: Light dimmer problem

    Instead of feeding the mains to the pic pin, drive an opto like the PC814.

    This has 2 LEDs in anti-parallel at the input, so you'd get 2 pulses for each mains cycle, one each for positive and negative. This will also give you a bonus of isolating your circuit from the mains.

    Regards,

    Anand Dhuru

  4. #4


    Did you find this post helpful? Yes | No

    Question Re: Definitely problem with the circuit (or at least this is what it seems for now)

    I played around with the circuit a little and it seems that the problem is with the circuit only.
    My reason for saying this is because as soon as I connected the ground of my oscilloscope with the 12V ground which comes from an external source (smps), the flickering suddenly stopped and glowing of the bulb at different brightness levels was just as expected, smooth and perfect. As soon as I removed the ground of my oscilloscope the flickering started again.

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: Light dimmer problem

    Quote Originally Posted by ardhuru View Post
    Instead of feeding the mains to the pic pin, drive an opto like the PC814.

    This has 2 LEDs in anti-parallel at the input, so you'd get 2 pulses for each mains cycle, one each for positive and negative. This will also give you a bonus of isolating your circuit from the mains.

    Regards,

    Anand Dhuru
    Thanks for the reply. What resistance values normally goes for the opto side of the PC814 and what should be the wattage of this resistance values. I am @ 240VAC

  6. #6
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default Re: Light dimmer problem

    I'd used 100K, 1W on 240 VAC.

    Reducing the resistance would get you sharper edges, but then one needs a resistance of a higher wattage, so I finally settled on these, and its worked great for me.

  7. #7
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Default Re: Light dimmer problem

    I wonder if 4n25 can be used the same way?
    (with 100k direct to Live and other end to neutral)

  8. #8
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default Re: Light dimmer problem

    Looks like the 4n25 has only 1 diode at the input. You'd get only 1 pulse per cycle. If thats acceptable, I dont see why the 4n25 shouldnt work.

    Regards,

    Anand

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