Pages: [1]   Go Down
Author Topic: Digital AC Dimmer Module (WARNING: LETHAL VOLTAGES INVOLVED).  (Read 2648 times)
0 Members and 1 Guest are viewing this topic.
South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
/*

 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:
/*

 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);

}
« Last Edit: December 27, 2012, 07:34:48 am by grantporter » Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6619
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, you can substitute a bridge rectifier with a higher voltage rating.
Logged

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.

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1389
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok great,

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

Regards
Grant
Logged

South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Craiova - Romania
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Hi, I have more sites: http://www.tehnic.go.ro http://www.niqro.3x.ro http://www.niq.go.ro http://nicuflorica/blogspot.com/
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

see  http://youtu.be/ampFrowXZBE  smiley-kitty
Logged

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

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2892
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

--> 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

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Edison Member
*
Karma: 29
Posts: 2455
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Pages: [1]   Go Up
Jump to: