

A PWM (Pulse Width Modulation) relay is an electromechanical switch designed to control the power delivered to a load using PWM signals. By varying the duty cycle of the PWM signal, the relay enables precise control over parameters such as motor speed, LED brightness, or heating element intensity. This makes it an efficient and versatile component for applications requiring variable power control.








Below are the key technical details and pin configuration for a typical PWM relay:
| Parameter | Value |
|---|---|
| Operating Voltage | 5V, 12V, or 24V (model-dependent) |
| Control Signal Voltage | 3.3V or 5V (logic level) |
| PWM Frequency Range | 100 Hz to 10 kHz |
| Maximum Load Current | 10A (varies by model) |
| Contact Type | SPDT (Single Pole Double Throw) |
| Duty Cycle Range | 0% to 100% |
| Isolation | Optocoupler-based isolation |
| Operating Temperature | -20°C to 85°C |
| Pin Name | Description |
|---|---|
| VCC | Power supply input for the relay module (5V, 12V, or 24V depending on model). |
| GND | Ground connection for the relay module. |
| PWM_IN | Input pin for the PWM signal (3.3V or 5V logic level). |
| NO (Normally Open) | Normally open contact for the load connection. |
| NC (Normally Closed) | Normally closed contact for the load connection. |
| COM | Common terminal for the load connection. |
Below is an example of how to control a PWM relay using an Arduino UNO to dim an LED:
// Define the PWM pin connected to the relay's PWM_IN pin
const int pwmPin = 9; // PWM-capable pin on Arduino UNO
void setup() {
pinMode(pwmPin, OUTPUT); // Set the PWM pin as an output
}
void loop() {
// Gradually increase brightness
for (int dutyCycle = 0; dutyCycle <= 255; dutyCycle++) {
analogWrite(pwmPin, dutyCycle); // Write PWM signal to the relay
delay(10); // Small delay for smooth transition
}
// Gradually decrease brightness
for (int dutyCycle = 255; dutyCycle >= 0; dutyCycle--) {
analogWrite(pwmPin, dutyCycle); // Write PWM signal to the relay
delay(10); // Small delay for smooth transition
}
}
Relay Not Switching Properly
Load Not Receiving Power
Overheating
PWM Signal Interference
Q: Can I use a PWM relay with a 3.3V microcontroller like ESP32?
A: Yes, as long as the relay supports 3.3V logic levels for the PWM_IN pin.
Q: What happens if I use a PWM frequency outside the specified range?
A: The relay may not operate correctly, leading to erratic switching or reduced efficiency.
Q: Can I control multiple relays with a single microcontroller?
A: Yes, as long as you have enough PWM-capable pins and the microcontroller can handle the required processing load.
Q: Is the relay suitable for AC loads?
A: Yes, but ensure the relay's contact ratings are compatible with the AC voltage and current of your load.