Go Down

Topic: Digital Light Dimmer (Read 2124 times) previous topic - next topic

Bskitter

Hey guys,

Im wondering if anyone can help around here, I have built a light dimming circuit with a triac kit, I now want to connect a digital potentiometer to it so i can control the lights via an Arduino.

Here is the Diagram




I can't quite find a 500K digital pot, could you guys help provide me with one OR an alternative ?

Byron

aarg

The pot circuit just varies the trigger phase. You are much better off detecting the zero crossing and producing the trigger pulse with software timing. You need some kind of line isolation so you and other people won't get electrocuted.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

Grumpy_Mike

#2
Jun 12, 2016, 05:59 am Last Edit: Jun 12, 2016, 06:01 am by Grumpy_Mike
In other words if you did wire up a digital pot to that it would go
BANG!

So don't do it.

You need a triac circuit with an optically isolated input. Then you can control it using PWM and a filter.

raschemmel

Mike, why would biasing the voltage on the Triac gate cause a catestrophic failure ?
(the two pots are merely a voltage divider on the gate. Why is that a problem ?
Is it because the turn on isn't synchonized with zero-crossing like an SSR ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Grumpy_Mike

It is a problem because then the ground of the Arduino would be connected directly to the mains.

TomGeorge

Hi,

google      arduino ac light dimmer

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Bskitter

Thanks for the reply's guys,

What Opto isolator must I look for, or more specifically what specification in the opto iso must I look out for ?

And can  I just hook it up like this ?


Paul__B

And can  I just hook it up like this ?
No, that is nonsense.

Research a MOC3010.  And when I say "research", I mean study all the available examples in the datasheet until you comprehend how to use it.


raschemmel

#9
Jun 12, 2016, 03:17 pm Last Edit: Jun 12, 2016, 03:18 pm by raschemmel
Very funny !

@Mike,
I reread thre OP and just noticed the part about the "digital pot". I missed that the time.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Paul__B


That's more like it! :smiley-lol:

OK, the problem with your original notion is that a digital potentiometer operates at something like 10 Volts and your original circuit runs at 230 Volts.  Do you see the disparity and the "BANG!"?

So the way to implement a digital dimmer is rather more involved - you will find many projects along these lines with varying degrees of practicality.

And Mike must have been short on breakfast - you cannot implement a phase control dimmer with just a PWM output on an Arduino.  You require two opto-couplers - a MOC3021 to trigger the Triac and a "AC" optocoupler such as an EL814 to find the zero crossings in the AC line waveform.

You then need to code to delay the desired amount following each zero crossing to trigger the MOC3021.


Grumpy_Mike

Quote
And Mike must have been short on breakfast - you cannot implement a phase control dimmer with just a PWM output on an Arduino.  You require two opto-couplers - a MOC3021 to trigger the Triac and a "AC" optoc
Or in fact  you could use a SSR that has phase control input, which is what I was suggesting. You don't have to make everything you know there, are plenty of these about. And it is a hell of a lot safer for someone with so little skill as to even think of using a digital pot.

Paul__B

Or in fact  you could use a SSR that has phase control input, which is what I was suggesting.
I would call that a dimmer module, not a SSR.

And it is a hell of a lot safer for someone with so little skill as to even think of using a digital pot.
Absolutely!

raschemmel

Quote
Or in fact  you could use a SSR that has phase control input, which is what I was suggesting. 
Solid state relays won't work as dimmers. That is well known. They are either on or off . There is very little in between. I was able to get a very small range of speed with an electric drill but when I tried it with a light bulb it just flickered. This is due to the fact that an SSR is NOT an AC PHASE control, which is what a dimmer is. When you apply the dc voltage to the SSR , it waits until the zero crossing and then turns the triac on. It stays on until you remove the dc voltage at which time it waits until zero crossing and to turn the triac off. Try it yourself by putting an SSR in series with the "Line" wire of an AC outlet and plugging different devices into the outlet. You will see a difference between tungsten light bulbs and the "energy saving " bulbs but both will flicker. If you try to PWM the SSR. The flickering will not stop until the PWM value is 255.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Grumpy_Mike

Quote
Solid state relays won't work as dimmers.
Some things called solid state relays have a phase control dimming action. See the data sheet to see if it has. I have several SSRs with a phase control input.

Go Up