Go Down

Topic: Digital AC Dimmer Module (WARNING: LETHAL VOLTAGES INVOLVED). (Read 2985 times) previous topic - next topic

grantporter

Dec 27, 2012, 12:37 pm Last Edit: Dec 27, 2012, 01:34 pm by grantporter Reason: 1
Hi Guys,

I bought a Digital AC Dimmer Module from InMojo and it worked great for a while until the bridge rectifier popped, I am not sure if the rectifier I ended up with was just a dud.

But now I have a small problem, I cannot get hold of the replacement part in my country for D1 = DF1504S, and the closest bridge rectifier I can get is the W10M, our electronics store in my town was out of stock of the W04M which appears to be the closest match to the DF1504S so I bought the W10M hoping it will suffice as a replacement, obviously it is not a SMD type but I can make a plan to fit it on the board.

Our power in my country is rated at 230VAC @ 50hz, so my question is will the W10M work as a replacement for the DS1504S/W04M, as it has higher Peak Reverse Voltage, higher RMS Bridge Input Voltage and higher DC Blocking Voltage and the rest of the electrical characteristics are identical...

Here is the datasheet showing the comparative W04M and W10M characteristics: http://www.futurlec.com/Diodes/W04M.shtml and as can be seen here: http://pdf1.alldatasheet.com/datasheet-pdf/view/82169/COMCHIP/DF1504S.html, the DF1504S electrical characteristics are identical to the W04M, so is it possible to use the W10M and it's higher voltage ratings as a replacement for the DF1504S/W04M

Regards
Grant


Here is the schematic and pcb layout:





Sketch for 50hz

Code: [Select]

/*

AC Light Dimmer - Inmojo
AC Voltage dimmer with Zero cross detection

Author: Charith Fernanado http://www.inmojo.com charith@inmojo.com
License: Released under the Creative Commons Attribution Share-Alike 3.0 License.
http://creativecommons.org/licenses/by-sa/3.0
Target:  Arduino

Attach the Zero cross pin of the module to Arduino External Interrupt pin
Select the correct Interrupt # from the below table

Pin    |  Interrrupt # | Arduino Platform
---------------------------------------
2      |  0            |  All
3      |  1            |  All
18     |  5            |  Arduino Mega Only
19     |  4            |  Arduino Mega Only
20     |  3            |  Arduino Mega Only
21     |  2            |  Arduino Mega Only

*/

int AC_LOAD = 3;    // Output to Opto Triac pin
int dimming = 128;  // Dimming level (0-128)  0 = ON, 128 = OFF

void setup()
{
 pinMode(AC_LOAD, OUTPUT);      // Set the AC Load as output
 attachInterrupt(0, zero_crosss_int, RISING);  // Choose the zero cross interrupt # from the table above
}

void zero_crosss_int()  // function to be fired at the zero crossing to dim the light
{
 // Firing angle calculation :: 50Hz-> 10ms (1/2 Cycle)
 // (10000us - 10us) / 128 = 75 (Approx)
 int dimtime = (75*dimming);      
 delayMicroseconds(dimtime);    // Off cycle
 digitalWrite(AC_LOAD, HIGH);   // triac firing
 delayMicroseconds(10);         // triac On propogation delay
 digitalWrite(AC_LOAD, LOW);    // triac Off
}

void loop()
{
 dimming = 128;
 delay(100);
 dimming = 75;  
 delay(100);
 dimming = 25;  
 delay(100);

}


Sketch for 60hz

Code: [Select]

/*

AC Light Dimmer - Inmojo
AC Voltage dimmer with Zero cross detection

Author: Charith Fernanado http://www.inmojo.com charith@inmojo.com
License: Released under the Creative Commons Attribution Share-Alike 3.0 License.
http://creativecommons.org/licenses/by-sa/3.0
Target:  Arduino

Attach the Zero cross pin of the module to Arduino External Interrupt pin
Select the correct Interrupt # from the below table

Pin    |  Interrrupt # | Arduino Platform
---------------------------------------
2      |  0            |  All
3      |  1            |  All
18     |  5            |  Arduino Mega Only
19     |  4            |  Arduino Mega Only
20     |  3            |  Arduino Mega Only
21     |  2            |  Arduino Mega Only

*/

int AC_LOAD = 3;    // Output to Opto Triac pin
int dimming = 128;  // Dimming level (0-128)  0 = ON, 128 = OFF

void setup()
{
 pinMode(AC_LOAD, OUTPUT);      // Set the AC Load as output
 attachInterrupt(0, zero_crosss_int, RISING);  // Choose the zero cross interrupt # from the table above
}

void zero_crosss_int()  // function to be fired at the zero crossing to dim the light
{
 // Firing angle calculation :: 60Hz-> 8.33ms (1/2 Cycle)
 // (8333us - 8.33us) / 128 = 65 (Approx)
 int dimtime = (65*dimming);      
 delayMicroseconds(dimtime);    // Off cycle
 digitalWrite(AC_LOAD, HIGH);   // triac firing
 delayMicroseconds(8.33);         // triac On propogation delay
 digitalWrite(AC_LOAD, LOW);    // triac Off
}

void loop()
{
 dimming = 128;
 delay(100);
 dimming = 75;  
 delay(100);
 dimming = 25;  
 delay(100);

}

dc42

Yes, you can substitute a bridge rectifier with a higher voltage rating.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

jackrae

You also need to consider why the bridged "popped" in the first placed.  It could simply have been defective or  it may have failed because of a problem elsewhere, so simply replacing the bridge may not cure the problem.

grantporter

Ok great,

I was thinking and hoping this wouldn't adversely affect the stability the circuit.

Regards
Grant

grantporter

Well I didn't notice any unusual overheating issues when it ran previously, and I have tested all other components and they all check out ok, so I am assuming it was just a defective part.

So I'll hook up the bridge rectifier and take it from there!

Regards
Grant

niq_ro

is not better to reinvent the wheel, but to improve it's less work and better results

If a line transient 'pops' one of the four diodes in the bridge all the rest will fail fairly quickly especially if under full load because the remaining one will see the full load instead of it being shared by the two that are conducting at any time in a good bridge rectifier.

Bob
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

thefoxfoy

think so,it may have failed because of a problem elsewhere, so simply replacing the bridge may not cure the problem.

cjdelphi

I really don't understand the "WARNING" part... you're the one doing this not me.... what are you warning me from? accidentally electrocuting myself accidentally while watching your youtube video?

on a side note, if one used a solid state relay, and used pwm to control the brightness, would a typical bridge rectifier handle the switching speed?  with the SSR I could literally switch on the SSR while supplying AC the other end switching at that speed providing it too is up to the job....

alternative is to downsize to a 12v bulb use a power transistor...

Go Up