Dimming AC loads

Discussion in 'The Projects Forum' started by raghurocks, Sep 3, 2012.

  1. raghurocks

    Thread Starter New Member

    Jun 26, 2012
    Hai Everyone,
    I have been working under I have been working under dimming of ac loads using the microcontroller .
    The concept I am using is the based upon the basic operation of the triac, as once the gate of the triac gets the trigger it will be on for next zero cross
    so for this I have taken a basic zero cross detection circuit where it detect the every zero crossing so this output is given to the one of the interrupt pin of the microcontroller and I have done the coding like after it detects the zero cross that is from the external interrupt it waits for some time (delay time) which indulge in the delay angle which inturn changes the conduction angle of the triac and so the output voltage so this delay time can be varied to change the brightness as the rms output voltage will be varied I have change this delay time or the delay angle into 16 levels where the brightness is also varied in 16 levels so far I think I am clear........... Any suggestions in the concept are appreciated .......

    Basing on this I have written the interrupt routine to give some amount of delay basing on the level (this level is determined from the input it get from the port p1 of the microcontroller where I used 4 switches connected to the p1.0,p1.1,p1.2,p1.3 that is if all the switches are on then the level will be 1111 that is 0x0F so for this there will be different delay time or delay angle like wise the levels will be from 0x00 to 0x0F which inturn should vary the brightness) I think I am clear with the input how the microcontroller gets 16 different levels of input and how it it will vary different levels of delay angle........ Any doubt can be expressed

    Coming to the triac output section it consists of the basic application circuit from the application note with a snubber network .

    The tricky part included in this is I am getting the output exactly as I desire in the Proteus emulator but I don't know why I am not getting the desired output in the hardware

    Any explanations or suggestions or clarification are appreciated
    Thanks in advance
  2. DickCappels


    Aug 21, 2008
    #1 I hope you are using an isolation transformer, otherwise this thread cannot continue.

    #2 All sounds good from your description. Please post a schematic diagram which might help us spot an error.
  3. raghurocks

    Thread Starter New Member

    Jun 26, 2012
    here is my schematics which I am working
  4. n1ist

    Senior Member

    Mar 8, 2009
    I could swear I have seen the same circuit with the same potentially lethal errors already here.

    High voltage and low voltage MUST NOT share any connections. You have the mains neutral tied to circuit ground both at the triac and transformer. This eliminates any protection offered by such isolation devices.

    This MUST be fixed before you power up your circuit again or you could get killed.

    Once fixed, please post the complete circuit (as the left side and bottom side are cut off in the one you posted).

  5. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    When I built a micro controller based dimmer I did exactly that: connected the high AC line voltage to my controller's low voltage. Actually, they were always connected as I used an off the line AC to 5 VDC switching converter that was not isolated.

    While this if fine and it all works very well, this is an intrinsically unsafe circuit to work on irregardless of whatever isolation you use: there is always that exposed AC line voltage even if it isolated or floating.

    Thus, due to safety concerns and a strong desire not to impose any Darwinian selection in the electronics training of our members I would strongly suggest the mods close this and any similar threads.

    It's a basic example of "if you have to ask (here) you shouldn't be doing it."