Super simple dimmer - but how does it work? - Page 1
Forum section: electronics / beginners

author: FriedMule
author_rank: Frequent Contributor
timestamp: June 17, 2021, 05:35:07 am
content: So I have reverse engineered this two button LED dimmer and it works fine, both in a simulator and in reality, but I have no idea on why and how it works.Could any of you explain a 400% noob how it works?I think the cap and resistors value changes the speed of the dimming, but how does it "remember" the dim-value, what is the mosfet doing there?

author: james_s
author_rank: Super Contributor
timestamp: June 17, 2021, 05:50:27 am
content: Did you intend to attach a schematic?

author: FriedMule
author_rank: Frequent Contributor
timestamp: June 17, 2021, 07:56:10 am
content: Sorry but it wasn't visible for some reason, I have re-uploaded the image again. :-)

author: SeanB
author_rank: Super Contributor
timestamp: June 17, 2021, 08:34:53 am
content: The Mosfet is acting as a source follower, wityh the gate voltage biasing it into the linear region, and the 1uF capacitor acting as a storage element for the gate voltage. The 1M resistor allows the charge to be slowly increased or decreased, so the mosfet is going to turn on more or less, depending on the voltage on the capacitor. The charge will gradually leak away, so it will eventually dim and go out, and the mosfet will be running in a linear region, where you have to be aware of current flow and power dissipation, and most mosfet devices are not specified for DC use, as they have to be massively derated to run there. You might find big variance with temperature and between devices as well, and in general probably do not want to draw more than 2A or so of current, even with a 50A device, as it will need a pretty big heat sink to dissipate the power it is generating as heat.Works sort of well if you only have a few small LED's to dim, and can handle the power loss, but it will drift brightness with time, and will eventually go off, but will still draw a small current as it dims.

author: magic
author_rank: Super Contributor
timestamp: June 17, 2021, 09:55:10 am
content: It's common source, not follower.When all switches are off, 1µF holds a constant charge and is effectively a voltage source. It keeps the gate X volts below drain voltage. If drain goes up, the FET is turned on harder, if drain goes down it's throttled down. Effect: drain voltage is regulated X volts higher than whatever voltage is needed at the gate to sink LED current at given drain voltage. So it's roughly constant.Such circuit is know as Miller integrator. The resistor and switches are "current sources" which charge/discharge the cap and change the drain voltage. Leakage from gate to source charges the capacitor and causes slow increase of capacitor charge and dimming of the LED, leakage through the capacitor itself has an opposite effect. Brightness may slowly drift as a result.

author: ledtester
author_rank: Super Contributor
timestamp: June 17, 2021, 11:49:16 am
content: A more conventional schematic:

author: Zero999
author_rank: Super Contributor
timestamp: June 17, 2021, 12:16:29 pm
content: The LED needs a current limiting resistor, if it doesn't have one built-in, or the on resistance of the MOSFET is enough to limit the current.

author: Gyro
author_rank: Super Contributor
timestamp: June 17, 2021, 12:23:13 pm
content: Just an obvious one. You need a series resistor somewhere in the chain between the positive supply, S1, S2 and Gnd, otherwise you will short the supply if you happen to push both buttons at the same time.