Microprocessor controlled light dimmer?

  • Thread starter Thread starter dencker
  • Start date Start date
  • Tags Tags
    Light
Click For Summary

Discussion Overview

The discussion revolves around creating a programmable, remote-controlled light dimmer using a microprocessor, specifically an AVR Mega16. Participants explore the feasibility of replacing a potentiometer with a MOSFET and the implications of using a Digital-Analog Converter (DAC) versus Pulse Width Modulation (PWM) for controlling light brightness.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant suggests using a DAC connected to a MOSFET to replace the potentiometer, questioning whether this approach is straightforward.
  • Another participant proposes using RF modules to control the dimmer and indicates that PWM might be a simpler method than using a DAC.
  • A participant expresses confusion about how a MOSFET would interpret a PWM signal, wondering if it would merely turn on and off.
  • Concerns are raised regarding the use of a MOSFET for AC lighting, indicating that it cannot be treated like a DC LED and that a thyristor (triac) is typically used for controlling AC light brightness.
  • One participant explains that the potentiometer in a dimmer usually controls a thyristor's firing angle, which is akin to PWM chopping of the AC waveform.
  • Another participant notes the need for isolation in the control circuit and discusses the nonlinearity of the FET channel resistance, suggesting that the microcontroller may need to compensate for this.
  • There are inquiries about the best approach to solve the problem, with suggestions for using a specific microcontroller and considerations for current burden.

Areas of Agreement / Disagreement

Participants express differing views on the appropriate method for controlling the light dimmer, with some advocating for PWM and others emphasizing the necessity of a thyristor for AC applications. The discussion remains unresolved regarding the best approach to implement the dimmer.

Contextual Notes

Participants highlight limitations in understanding the interaction between MOSFETs and AC lighting, as well as the complexity of controlling brightness with different methods. There is also mention of potential nonlinear behavior in FETs that may affect control strategies.

dencker
Messages
5
Reaction score
0
Hi folks :smile:

At the moment I'm rebuilding my room, and now I want to make a programmable, remote controlled light dimmer. The remote isn't my problem.
I already have a dimmer with a built-in potentiometer. My AVR Mega16 processors output is digital - either 0V or 5V.
I thought of using a DAC (Digital-Analog Converter), which I will then connect to a MOSFET (i.e. TIP120). Could I just directly replace the potentiometer with a MOSFET which I then control from my micro processor?
Or isn't it that simple? :biggrin:

Thanks in advance,
Dencker.
 
Engineering news on Phys.org
dencker said:
Hi folks :smile:

At the moment I'm rebuilding my room, and now I want to make a programmable, remote controlled light dimmer. The remote isn't my problem.
I already have a dimmer with a built-in potentiometer. My AVR Mega16 processors output is digital - either 0V or 5V.
I thought of using a DAC (Digital-Analog Converter), which I will then connect to a MOSFET (i.e. TIP120). Could I just directly replace the potentiometer with a MOSFET which I then control from my micro processor?
Or isn't it that simple? :biggrin:

Thanks in advance,
Dencker.

I'm kinda not clear on what you have and what you don't have. Assuming you want to control it using RF, I would buy an RF rx and tx module on ebay and interface the RX module to your AVR. The RF modules are easy to interface with. When you press "on" on the TX module, the RX module output goes high. Then program your AVR watch for the "high" signal from the RX module and send out the appropriate PWM signal to your mosfet which switches your light.

It will be relativity complicated if you use DAC to control the brightness of your light instead of PWM.
 
The remote controlling should be no problem receiving, I already programmed this and made the processor understand certain commands from the remote I want to use :smile:

I'm quite new to this subject, so excuse me for any dumb questions :-) But how would a MOSFET "understand" a PWM signal? Wouldn't it just turn on and off?
 
http://screencast.com/t/llDqlQEJl

The mosfet you see on the sketch above is what I intend to replace the potentiometer from the dimmer with, like these:
http://www.elari.com/inside/images/dimmer-ryhma2(net).jpg

Where, instead of the button, is a mosfet. Kinda hard to explain, but I kinda want the mosfet to act like a resistor instead of the 'turning-knob', which I will then control from my AVR Proc.
 
Also, nevermind about the GND symbols.
 
Is this AC lighting we are talking about? If it is you can't treat it like you would with a DC LED. A reverse bais mosfet controlled by a PWM is not something you can use to control the voltage or current of a 120VAC light.
 
There's a potentiometer in your dimmer, but that's usually not what controls the brightness. You usually have a thyristor (triac) whose firing angle is controlled based on the potentiometer setting. It is similar to PWM chopping, but you pass, for instance, 40% of the AC wave form through to achieve 40% light (it's not always one to one like this, but I'll use that to illustrate the point).

There's a nice animation on the Wiki that illustrates what I'm talking about:
http://en.wikipedia.org/wiki/Thyristor

EDIT: And you can use the microprocessor to control the thyristor's firing angle.
 
Last edited:
The potentiometer controls the triac, the triac controls the firing angle.

A Mosfet will conduct equally well in both directions. Still, the FET source will tie to Neutral. Either you have to run the control circuit hot, or isolate it with an opto-isolator, for one. Linearity may be a problem. The Fet channel resistance is exponential in the gate-source voltage. You're uController needs to compensate for this. Because it's so nonlinear your uC needs a 16 bit counter, or two in series, or you could do it in software. You can find a uC with a D to A output, or pulse width modulate, then smooth it with a low pass RC arrangement. The FET gate capacitance may serves to some of this purpose.
 
Oh alright, I get the idea. So how would you suggest that I solve my problem best?
 
  • #10
dencker said:
Oh alright, I get the idea. So how would you suggest that I solve my problem best?

If this is a one-off use a J8 (edit: your favorite microcontroller) and bias it off the line with a resistor and shunt regulator, I guess. What's your total current burden?
 
Last edited:

Similar threads

  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 12 ·
Replies
12
Views
21K
  • · Replies 12 ·
Replies
12
Views
15K
  • · Replies 2 ·
Replies
2
Views
4K