Go Down

Topic: How to control a lamps intensity (Read 7661 times) previous topic - next topic

radickal

Hello everyone,

I'm novice on this and i'm researching on how to start with my Arduino Dicemilia.

I wanna control the luminous intensity of a lamp like you could do it turning the potenciometer button of a living room. I've been looking for an electronic gadged that allows Arduino to send an analogic signal output to this object, and after that this object would give the proper potency to the lamp, so the lamp would bright more or less.

Does somethink like that exist?

Thanks in advance.

sebswed

I realize this is an old topic but I will just give my input as others might be working on a similar project.
Asuming you have a dimmable lamp (not all lamps are dimmable) i Think the easiest way would be to use an electronic dimmer where you control the dimmer with your digital output. Keep in mind that most dimmers require a minimum load to work correctly. Connecting a lower load might couse your lamp to flicker and reduce lifespend.

Say your dimmer requires a minimum load of 40W to work correctly and you have a 10W dimmable CFL, you would need to connect 4 lamps to reach your minimum load.
Nederlands, Svenska, English

smeezekitty

Basically you could probably send the direct PWM signal to a traic and it should work ok.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Techone

Quote
Basically you could probably send the direct PWM signal to a traic and it should work ok.


That may not work directly controling a traic < --- proper rated , with a traic opto-coupler, yes, much better. the digital output control the led of the opto, and the triac reacting and controling the bigger triac. Now, that may work.  And dealing with main voltage, safety is a must. 

smeezekitty


Quote
Basically you could probably send the direct PWM signal to a traic and it should work ok.


That may not work directly controling a traic < --- proper rated , with a traic opto-coupler, yes, much better. the digital output control the led of the opto, and the triac reacting and controling the bigger triac. Now, that may work.  And dealing with main voltage, safety is a must. 

I oversimplified it. Hooking up a TTL IC to a triac directly will probably make the magic smoke come out.
You should always use proper isolation like an optoisolator or magnetic isolator when dealing with high voltages.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Techone

I will do an experiment this week-end using a opto and triac. I will use a 12 V AC source to control a light bulb and see what happen  <--- that could be breadboard. And I will construct a test rig for the AC main test.

smeezekitty


I will do an experiment this week-end using a opto and triac. I will use a 12 V AC source to control a light bulb and see what happen  <--- that could be breadboard. And I will construct a test rig for the AC main test.

I have some people use peak detection and complex logic to implement dimming.
I really do not see why. Personally I have not tested it but in theory, chopping the 60 or 50hz at "random" points in the wave with hardware PWM shouldn't make too much difference since it will still average out the same. Light bulbs are fairly effective low pass filters.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Techone

I did the experiment. I use a 12 V AC in with a 12 V light bulb. I included picture of my setup and a schematic. No 120 V AC test yet. I need to change the value of R2 to control the curent going into the Triac gate. My setup is about 6 mA to the gate using 1 K.
The limiting resistor of 330 is the LED side of the optocoupler.

First, I did the "blink" test. Pass and it is flashing. But I did the PWM test, and I did not see a difference at all. Because, when the light bulb is on and going off, a next pulse will turn on and so fourth. A led can switch on / off fast, but not a light bulb, it is just too slow to responce an PWM signal. So to my eyes, it seem ON. A slow pulse will blink it.

So, the light bulb need to see a voltage reduction for a dimming effect to work. Therefore, a different circuit is needed for a dimming to work.

smeezekitty

#8
Mar 05, 2012, 03:30 am Last Edit: Mar 05, 2012, 03:33 am by smeezekitty Reason: 1

I did the experiment. I use a 12 V AC in with a 12 V light bulb. I included picture of my setup and a schematic. No 120 V AC test yet. I need to change the value of R2 to control the curent going into the Triac gate. My setup is about 6 mA to the gate using 1 K.
The limiting resistor of 330 is the LED side of the optocoupler.

First, I did the "blink" test. Pass and it is flashing. But I did the PWM test, and I did not see a difference at all. Because, when the light bulb is on and going off, a next pulse will turn on and so fourth. A led can switch on / off fast, but not a light bulb, it is just too slow to responce an PWM signal. So to my eyes, it seem ON. A slow pulse will blink it.

So, the light bulb need to see a voltage reduction for a dimming effect to work. Therefore, a different circuit is needed for a dimming to work.


Even with PWM values down to like 1??
I find this very surprising.
Using a similar but 6v version of the same bulb on DC, it dims just fine with PWM.
If the duty cycle is significantly reduced, I find it hard to believe that the filament will reach and maintain full temperature.
I would guess maybe the triac is not behaving how you expect it to. Do you have a scope to test it with?
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

retrolefty

#9
Mar 05, 2012, 03:58 am Last Edit: Mar 05, 2012, 04:00 am by retrolefty Reason: 1
To control AC lamp intensity using arduino outputs and thyristors is more complex then it may first appear. First you need a AC zero crossing detector so that the Arduino knows the proper time to start waiting until firing of the triac device, zero delay would equal full brightness, 8.333 millisecond delay would give 0% brightness. Triacs are just back to back SCRs and you can only control when they start conduction, as once fired only at zero crossing will the device turn off and be avalible for the next trigger command. As the built in arduino PWM analogWrite() command has no built in way to synchronize with an external AC zero crossing detector signal, one really has to roll their own PWM like function. Also one should use a optoisolator between the ardino output pin and the triac gate circuit.

Lefty

smeezekitty

#10
Mar 05, 2012, 04:32 am Last Edit: Mar 05, 2012, 07:13 am by smeezekitty Reason: 1
The thing I didn't realize is that a triac is an SCR.
I wonder if it is possible to have a PNP and a NPN transistor in parallel E <-> E and C <-> C each with a diode facing the opposet direction in series with it
And using two opto-isolators, driving the base with the polarity of the other line.
I have posted a schematic for a device that *may* theoretically work but it is completely untested.
Resistors omitted for simplicity but obviously necessary. This *should* allow for instantaneous switching almost irregardless of the AC wave phase.
oops, forgot to attach.
I actually tested it on LTSpice circuit simulator and it seems to work great.
I just do not have two opto-isolators to test it.
Basically it applies the base current through the opto-isolators. This resolves the polarity difference of the base current.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Techone

Let re-cap here.

A dimmer work by reducing the voltage at the load. It "cut" the AC sine wave, to created a lower voltage effect.

So you need a circuit at the AC side to convert the PWM pulse into a partial cut AC sine wave.

I included a diagram what I am talking about.


smeezekitty


Let re-cap here.

A dimmer work by reducing the voltage at the load. It "cut" the AC sine wave, to created a lower voltage effect.

So you need a circuit at the AC side to convert the PWM pulse into a partial cut AC sine wave.

I included a diagram what I am talking about.



A light bulb is mostly a resistive device so that all that matters is average power.
It does not care much what the sine wave looks like. If you make "chops" out of the AC wave with a PWM signal, then the bulb will heat less proportionally. If you tried the same test circuit with a mosfet instead of a triac and DC instead of AC, I am willing to bet that it would dim exactly as you would want it to. The reason your test circuit did not work is because the triac does not stop conduction instantaneously.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Techone

I respect your opinion.

You have to agree with me with this : A light bulb don't react quickly. 

My experiment raison is : if it work on a small scale --> 12 V ac, than I simply modify the circuit to control 120 V AC main.  I know a simple ON / OFF will work. <-- The "blink" code. As long I change the resistor value going to the Triac gate to acoomodate for the higher voltage.

The point on this tread is to control AC main going into a light bulb and doing it safely. Let work on this. I will try it at my end. 

retrolefty

Quote
The point on this tread is to control AC main going into a light bulb and doing it safely. Let work on this. I will try it at my end.


Again you will need to include a zero crossing detector for any chance of success when using thyristor class devices (triac/scr). They are switch devices and require proper gate trigger timing relative to the AC waveform.




Go Up