MPQ4-S-112D-A

UTSOURCE - Sep 11 - - Dev Community

DIY Electronics Project: Building a Remote-Controlled Fan Switch with the MPQ4-S-112D-A Relay

In the realm of DIY electronics, creating functional and practical devices is both satisfying and educational. One such project is constructing a remote-controlled fan switch, which not only demonstrates the basics of electronics but also adds convenience to everyday life. For this project, we’ll use the MPQ4-S-112D-A relay, a versatile and reliable component ideal for switching AC loads safely and effectively.

Components Needed
MPQ4-S-112D-A Relay: A single-pole, double-throw (SPDT) relay capable of switching AC loads.
IR Remote Control and Receiver Module: To send and receive control signals wirelessly.
Microcontroller (e.g., Arduino): To interpret the IR signals and control the relay.
Fan or Light Fixture: The AC device you will control.
Power Supply: For powering the microcontroller and IR receiver (typically 5V).
Breadboard and Jumper Wires: For prototyping your circuit.
Diode (e.g., 1N4007): To protect the relay from back EMF.
Resistors and Capacitors: For signal conditioning and stabilization.
Circuit Design

  1. Relay Connections The MPQ4-S-112D-A is a compact relay with four pins: two for the coil and two for the switch contacts. Here’s how to connect it:

Coil Pins: Connect these to the microcontroller through a transistor for switching. The coil pins are marked as A1 and A2 on the relay.
Switch Contacts: The relay has three switch contacts: COM (Common), NO (Normally Open), and NC (Normally Closed). For switching the fan on and off, connect the AC fan’s power line to the COM pin and the NO pin. When the relay is energized, it will close the circuit between COM and NO, turning on the fan.
Note: Ensure you use appropriate insulation and safety measures when working with AC power.

  1. IR Receiver Connection
    Connect the IR receiver module to the microcontroller. The module typically has three pins: VCC, GND, and OUT. Connect VCC to the 5V power supply, GND to ground, and OUT to one of the digital input pins on the microcontroller.

  2. Transistor for Relay Control
    To control the relay with the microcontroller, use an NPN transistor as a switch. Connect the base of the transistor to a digital output pin on the microcontroller through a current-limiting resistor (e.g., 220Ω). Connect the emitter of the transistor to ground and the collector to one coil pin of the relay. The other coil pin connects to the power supply.

Place a diode (e.g., 1N4007) across the relay coil to protect against voltage spikes caused by the relay's inductive load.

Writing the Firmware
The microcontroller will need to interpret signals from the IR remote and activate the relay accordingly. Here’s a simple example using an Arduino:

Image description
Replace YOUR_REMOTE_CODE with the actual IR code for the button you wish to use.

Testing and Calibration
After assembling your circuit and uploading the firmware, power up the system and test the functionality. Use the remote control to send a signal and observe if the relay activates the fan as expected. Ensure that all connections are secure and properly insulated.

Safety Precautions
Working with AC power involves inherent risks. Always ensure the power is off while assembling the circuit. Use insulated tools, verify all connections, and if unsure, consult with a professional.

Conclusion
Building a remote-controlled fan switch with the MPQ4-S-112D-A relay is a rewarding project that combines practical application with fundamental electronics principles. By using a relay to switch AC loads safely and an IR module for wireless control, you create a convenient and functional device. This project not only enhances your technical skills but also adds a touch of automation to your home. Enjoy your new remote-controlled fan switch and continue exploring the world of DIY electronics!
www.utsource.net

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player