

Buy anything from 5,000+ international stores. One checkout price. No surprise fees. Join 2M+ shoppers on Desertcart.
Desertcart purchases this item on your behalf and handles shipping, customs, and support to Macau.
๐ก Light up your projects with precision and power โ donโt get left in the dark!
The MOSFET Trailing Edge AC LED Light Dimmer by IotMug offers advanced, flicker-free dimming control compatible with both incandescent and dimmable LED bulbs. Supporting up to 500W output and multiple dimming methods, it seamlessly integrates with popular microcontrollers like Arduino and Raspberry Pi, making it the ultimate choice for smart lighting projects and professional ambiance control.
| Actuator Type | electronic" or "solid-state |
| Asin | B0CL3RLKLC |
| Best Sellers Rank | #862,310 in Tools & Home Improvement (See Top 100 in Tools & Home Improvement) #1,330 in Dimmer Switches |
| Brand Name | IotMug |
| Circuit Type | 1-way |
| Color | Black |
| Compatible Devices | Arduino, Raspberry Pi, ESP8266, ESP32, Adafruit boards |
| Connectivity Protocol | X-10 |
| Connector Type | Screw |
| Contact Material | Metal |
| Contact Type | Normally Open |
| Control Method | App |
| Control Type | Advanced |
| Controller Type | Microcontroller |
| Current Rating | 5 Amps |
| Customer Reviews | 3.8 3.8 out of 5 stars (5) 3.8 out of 5 stars |
| Item Dimensions | 1.97 x 3.54 x 0.47 inches |
| Manufacturer | IotMug |
| Material Type | Metal |
| Model | Mosfet Trailing Edge Dimmer |
| Mounting Type | Surface Mount |
| Number Of Items | 1 |
| Number Of Positions | 1 |
| Operating Voltage | 110 Volts |
| Operation Mode | automatic |
| Part Number | Mosfet Trailing Edge Dimmer For Arduino |
| Smart Home Compatibility | Smart Home Compatible |
| Switch Type | Dimmer Switch |
| Terminal | Through Hole |
| Unit Count | 1.0 Count |
| Wattage | 5 watts |
User
Good product, excellent support
Works well and can implement any dimmer waveform. Excellent service, would buy from this vendor again.Here is a version of the script for the ESP32-S3 using the latest timer API (that was changed in a way that breaks the existing timer based scripts)#define GATE 5#define ZERO_CROSS_PIN 4#define FREQ 8333hw_timer_t *gateTimer = NULL; //timer 1Mhz resolutionint dimmerLevel = 0;int timerActive = 0;long counter = 0;long counter2 = 0;long start = 0;long end = 0;void ARDUINO_ISR_ATTR ZeroCrossISR(){if (dimmerLevel > 0 && timerActive == 0) {digitalWrite(GATE, HIGH);timerAttachInterrupt(gateTimer, &TimerISR); //attach callbacktimerAlarm(gateTimer, ((FREQ * dimmerLevel) / 4096), true, 0);timerWrite(gateTimer, 0);//timerRestart(gateTimer);timerStart(gateTimer);timerActive = 1;counter++;//start = micros();}else digitalWrite(GATE, LOW);delayMicroseconds(100); // debounce zero-crossing}}void ARDUINO_ISR_ATTR TimerISR(){digitalWrite(GATE, LOW );//end = micros();timerStop(gateTimer);timerActive = 0;counter2++;}void setup(){Serial.begin(9600);while (!Serial){}pinMode(ZERO_CROSS_PIN,INPUT_PULLUP);pinMode(GATE,OUTPUT);digitalWrite(GATE, LOW);attachInterrupt(ZERO_CROSS_PIN, &ZeroCrossISR, FALLING);gateTimer = timerBegin(1000000);timerAttachInterrupt(gateTimer, &TimerISR);}void loop(){/*Serial.print("Still running... ");Serial.print(counter);Serial.print(", ");Serial.print(counter2);Serial.print(" Microsecs = ");Serial.println(end - start);*/dimmerLevel = 0;for (int i = 0; i < 4096; i += 50) {dimmerLevel = i;}for (int i = 4090; i >= 0; i -= 50) {dimmerLevel = i;}delay(5000);}
User
It works great, but
The code offered will not compile! Customer Service??? Non existent. I developed this code that works as of 10/11/24 Good Luck!// Pin Definitionsconst int zero_cross_pin_ip2 = 2; // Input from zero-crossing detectorconst int mosfet_op9 = 9; // MOSFET gate control (PWM output)int dimming_level = 255; // Dimming level (0-255), adjust for brightness// Time per half cycle for 50Hz = 10000 microseconds (10ms), for 60Hz = 8333 microseconds (8.33ms)int AC_half_cycle = 72000; // Adjust for 50Hz or 60Hz AC - 72000 works best for my application// Zero crossing interrupt handlervolatile bool zeroCrossDetected = false;void zeroCrossISR() {zeroCrossDetected = true;}void setup() {pinMode(mosfet_op9, OUTPUT);pinMode(zero_cross_pin_ip2, INPUT);// Attach interrupt to zero-crossing pin (RISING signal)attachInterrupt(digitalPinToInterrupt(zero_cross_pin_ip2), zeroCrossISR, RISING);Serial.begin(9600);delay(234);Serial.println("dimmer_AI2");delay(234);} // end setupvoid loop() {if (zeroCrossDetected) {zeroCrossDetected = false;// Map dimming level (0-255) to time delay (0-AC_half_cycle)int delayTime = map(dimming_level, 0, 255, AC_half_cycle, 0);// Wait for the delay time (to control phase cut)delayMicroseconds(delayTime);// After the delay, turn the MOSFET ON to allow current to pass for the rest of the cycledigitalWrite(mosfet_op9, HIGH);// Keep MOSFET ON for the remaining cycledelayMicroseconds(AC_half_cycle - delayTime);// Turn MOSFET OFF at the end of the half-cycledigitalWrite(mosfet_op9, LOW);}// Optionally, update dimming level from Serial input for dynamic controlchar i_read = 'x';int enter = 0x0A;int got_serial = false;char heres_what_i_read = ']';if (Serial.available() > 0) {i_read = (Serial.read());if (i_read != enter) {heres_what_i_read = i_read;}if (heres_what_i_read == 'd') {dimming_level = dimming_level - 10;Serial.print("dimming_level "); Serial.println(dimming_level);}if (heres_what_i_read == 'u') {dimming_level = dimming_level + 5;Serial.print("dimming_level "); Serial.println(dimming_level);}}} // end loop
User
Good for my test bench
Preformed as intended and easily turned in to a tester with additional parts. It just Works
User
Excellent Dimmer!
This board worked perfectly for my project of building a wireless DMX controlled dimmer. Here is the included demo code re-written for use with ESP-32:#include <Arduino.h>#define DEBUG true //set to true for debug output, false for no debug output#define DS if(DEBUG)Serial // DS = Debug Serialhw_timer_t *gateTimer = NULL;int dimmerLevel = 0;#define GATE 45#define SCALEFACTOR 32 // ((80 MHZ / 80 prescale) / 120 hz) / 256#define ZERO_CROSS_PIN 46void IRAM_ATTR Zero_Cross_Interrupt(){if (dimmerLevel > 0){digitalWrite(GATE, HIGH);timerAlarmWrite(gateTimer, SCALEFACTOR*dimmerLevel, true);timerAlarmEnable( gateTimer);timerWrite( gateTimer, 0);timerStart( gateTimer);}else{digitalWrite(GATE, LOW);}delayMicroseconds(400); // debounce zero-crossing}void IRAM_ATTR onGateTimer(){digitalWrite(GATE, LOW );timerStop( gateTimer);}//***************************************************************************void setup(){#if DEBUGSerial.begin(115200);while (!Serial){}#endifpinMode(ZERO_CROSS_PIN,INPUT_PULLUP);pinMode(GATE,OUTPUT);digitalWrite( GATE, LOW);attachInterrupt(ZERO_CROSS_PIN, Zero_Cross_Interrupt, FALLING);gateTimer = timerBegin(0, 80, true);timerAttachInterrupt(gateTimer, &onGateTimer, true);timerAlarmWrite(gateTimer, 4000, true);}void loop(){dimmerLevel = 0;for (int i=0;i<250;i++){dimmerLevel++;delay(100);}for (int i=250;i>0;i--){dimmerLevel--;delay(100);}}
User
Excellent Product - Useful for controlling LED lighting
Great product. Very simple to use so long as you understand how to do leading and trailing edge algorithms.Clean design - worked first time. Great results and the MOSFETs hardly get warm when driving 10 LED lamps.Will be using this board for all my future LED lighting control
Trustpilot
5 days ago
2 weeks ago