Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use PWM Relay: Examples, Pinouts, and Specs

Image of PWM RelayDesign with PWM Relay in Cirkit Designer

Introduction

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 speed, brightness, or temperature. This makes it an efficient and versatile component for applications requiring variable power delivery.

Explore Projects Built with PWM Relay

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Wi-Fi Enabled Motion-Activated Lighting System with Radar Sensor: A project utilizing PWM Relay in a practical application
Wi-Fi Enabled Motion-Activated Lighting System with Radar Sensor

This circuit is designed to control an AC LED bulb using a 220V power source, with an infrared motion sensor and an MMWave radar sensor providing input signals. The two-channel relay is used to switch the LED bulb on and off based on the sensor inputs, while the ESP8266 microcontroller is likely programmed to process the sensor data and control the relay. A converter is included to interface between the sensors, microcontroller, and the relay, ensuring proper voltage levels.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

The PWM relay typically has the following pin configuration:

Pin Name Description
VCC Power supply input for the relay module (e.g., 5V, 12V, or 24V).
GND Ground connection for the relay module.
PWM IN PWM signal input to control the relay's switching behavior.
NO (Normally Open) Normally open terminal for the load connection.
NC (Normally Closed) Normally closed terminal for the load connection.
COM Common terminal for the load connection.

Usage Instructions

How to Use the Component in a Circuit

  1. Power the Relay Module: Connect the VCC and GND pins to the appropriate power supply (e.g., 5V, 12V, or 24V, depending on the relay model).
  2. Connect the Load:
    • For devices that should be powered when the relay is active, connect the load between the NO (Normally Open) and COM (Common) terminals.
    • For devices that should be powered when the relay is inactive, connect the load between the NC (Normally Closed) and COM terminals.
  3. Provide a PWM Signal: Connect the PWM signal source (e.g., a microcontroller like Arduino) to the PWM IN pin. The duty cycle of the PWM signal will control the relay's switching behavior.
  4. Adjust the Duty Cycle: Vary the duty cycle of the PWM signal to control the power delivered to the load. For example:
    • A 50% duty cycle delivers half the power.
    • A 100% duty cycle delivers full power.

Important Considerations and Best Practices

Example: Using a PWM Relay with Arduino UNO

Below is an example of how to control a PWM relay using an Arduino UNO:

// Example: Controlling a PWM Relay with Arduino UNO
// This code generates a PWM signal on pin 9 to control the relay's duty cycle.

const int pwmPin = 9; // PWM output pin connected to the relay's PWM IN pin
int dutyCycle = 128;  // Initial duty cycle (50% of 255 for 8-bit PWM)

void setup() {
  pinMode(pwmPin, OUTPUT); // Set the PWM pin as an output
}

void loop() {
  analogWrite(pwmPin, dutyCycle); // Write the PWM signal to the relay
  delay(1000); // Keep the current duty cycle for 1 second

  // Increase the duty cycle by 10% every second
  dutyCycle += 26; // 26 is approximately 10% of 255
  if (dutyCycle > 255) {
    dutyCycle = 0; // Reset to 0% duty cycle after reaching 100%
  }
}

Troubleshooting and FAQs

Common Issues and Solutions

Issue Possible Cause Solution
Relay does not switch on/off as expected. Incorrect PWM signal frequency or duty cycle. Verify that the PWM signal is within the specified frequency and duty cycle.
Load is not powered. Incorrect wiring of the load to the relay terminals. Double-check the connections to the NO, NC, and COM terminals.
Relay module overheats. Exceeding the relay's current or voltage ratings. Ensure the load does not exceed the relay's maximum ratings.
PWM signal not detected by the relay. Insufficient voltage or current from the PWM source. Use a stronger PWM signal or check the microcontroller's output settings.

FAQs

  1. Can I use a PWM relay with an AC load?

    • Yes, as long as the load voltage and current are within the relay's AC ratings.
  2. What happens if I use a PWM frequency outside the specified range?

    • The relay may not respond correctly, leading to erratic switching or failure to operate.
  3. Can I control multiple relays with a single microcontroller?

    • Yes, as long as each relay is connected to a separate PWM-capable pin on the microcontroller.
  4. Is optocoupler isolation necessary?

    • While not mandatory, optocoupler isolation is highly recommended to protect the control circuit from high-power loads.

By following this documentation, you can effectively integrate a PWM relay into your projects for precise and efficient power control.