Dimmer Circuit w/ uC

Discussion in 'The Projects Forum' started by Dalaran, Jan 8, 2010.

  1. Dalaran

    Thread Starter Active Member

    Dec 3, 2009
    168
    0
    This is still in the planning stage, but I am looking to dim a set of 4x ~40W light bulbs (110V AC) using a uC. I only need 4 or 5 different settings from off to full.

    What is the best way to go about this? I'm assuming a horrible idea but one could use 4/5 separate relays with a different resistor to trim the power getting there. But I figure there is a easier/cheaper way?

    Cheers.
     
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    the dimming can be accomplished by the uC. You can set the duty cycle for, say, 20% 40% 60% 80% and 100% if you wanted 5 dimmer settings. That would be the easiest part. I dont know if a solid state relay would be fast enough to handle pulse wave modulations that fast on the AC side. Did you have a uC in mind?
     
  3. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    also, could you be happy with high-power leds in place of the lamps? You could then forgo the need for a relay. You could do it all pretty easily.
     
  4. Dalaran

    Thread Starter Active Member

    Dec 3, 2009
    168
    0
    It is to re-furbish an old electric fireplace (no PCBs). All of the parts heater/fan/lights etc run off AC so I would like to keep it this way. The PWM output is a great idea. I guess instead of a relay I could use a high power MOSFET for something and drive the gate with the PWM? I suppose the frequency of the PWM wouldn't matter much as long as it is above the eye detection level? Maybe if I keep the frequency low I will be able to use the relays I already have...?

    Thanks for the advice.

    Oh and I will most likely be using a PIC16F886 (or maybe smaller but comparable chip)

    Cheers.
     
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Ahh, you don't use MOSFETs for AC; you use SCRs or TRIACs.
     
  6. Dalaran

    Thread Starter Active Member

    Dec 3, 2009
    168
    0
    Last edited: Jan 9, 2010
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You don't use PWM with a TRIAC.

    Once a TRIAC gets turned on, it stays on until the current through it falls to zero.

    So basically, to control a TRIAC, you look at the zero crossing, and then delay the turn-on time in proportion to how much or how little power you want flowing through it.

    Dimmers use a TRIAC or SCR with a cap and variable resistor. The RC time is varied by the resistor. The larger the resistance, the longer the delay in the cycle is before the TRIAC/SCR turns on.

    A relay is not the thing to use for PWM; it would not be nearly fast enough, too noisy, and the contacts would wear out in a matter of hours or days.
     
  8. Dalaran

    Thread Starter Active Member

    Dec 3, 2009
    168
    0
    Interesting. Thanks very much for your insight.

    I will do my reading on TRIAC/SCR.

    Is there a method to control dimming of AC lights via PWM?

    Thanks.
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Actually, controlling the delay between the zero crossing and the SCR/TRIAC trigger IS a form of PWM, if you think about it.

    With the TRIAC, you're delaying the time when it's triggered. The longer the delay (up to 1/2 of the AC cycle) the less current flows through it.

    The frequency is fixed by the incoming AC frequency. Where you live, that might be 50Hz, 60Hz, or if you're working on an aircraft, it could be 400Hz. The zero crossings will occur at twice the incoming frequency; so 100Hz, 120Hz, and 800Hz.

    You'll need to detect the zero crossings (at which point you know that the TRIAC will turn off if it isn't triggered), then delay for the desired amount of time before triggering the TRIAC.

    Oh, TRIACs are basically back-to-back SCRs. The generic name for that class of semiconductor is "thyristor"
     
  10. Dalaran

    Thread Starter Active Member

    Dec 3, 2009
    168
    0
    hehe Thanks again. So it seems the only solution to my problem is the TRIACs.

    Looks like I should get to reading/sourcing components!

    Thanks.
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It's not the ONLY solution, but it'll be the easiest.
     
  12. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    There may be another way. Sarge, let me know if this is way off. I know of digitally controlled variable resistors, can they be used as rheostats? Could you use the uC to control the dimming that way? I have only seen this type of technology used for trim pots, but I do not know all.

    check this out:
    http://www.intersil.com/dcps-dccs/
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Controlling incandescent lamps using rheostats would be terribly inefficient. The power dissipation in the rheostat would be very large.
     
  14. Dalaran

    Thread Starter Active Member

    Dec 3, 2009
    168
    0
Loading...