A 1-channel relay module provides control for a single independent relay. This makes it ideal for controlling high-power loads using low-power control signals from microcontrollers like Arduino, GLYPH, or even Raspberry Pi. Here’s how it works:Documentation Index
Fetch the complete documentation index at: https://learn.pcbcupid.com/llms.txt
Use this file to discover all available pages before exploring further.
Components
- Relays: Relay can independently control a high-power (Both AC / DC) device.
- Control Pins: There is one input pin (IN) for controlling the relay.
- Power Supply: A single power source is used for the relays 5V
- Protection: Has an optocoupler for electrical isolation between the control and relay circuits.
Pin Configuration
- VCC: Power supply for the module (5V).
- GND: Ground connection.
- IN: Control signal for Relay 1.
- COM, NO, NC: Relay 1 switching terminals.
Relay Contacts
- COM (Common): The input terminal.
- NO (Normally Open): Open by default, closes when the relay is activated.
- NC (Normally Closed): Closed by default, opens when the relay is activated.
Working
- Each relay channel works independently, following the same principles as a single-channel relay:
- When Control Signal is LOW (0V): The associated transistor remains off. The corresponding relay coil is de-energized. The relay’s Normally Open (NO) contact stays open
- When Control Signal is HIGH (3.3V/5V): The associated transistor turns on, allowing current to flow through the relay coil. The coil energizes, creating a magnetic field that pulls the armature. The relay’s NO contact closes, completing the circuit for the connected load.
-
Operation Sequence
- IN HIGH: Activates Relay to control the Load.
- IN LOW: Deactivates the relay, disconnecting the load.
Applications
- Home Automation: Controlling lights and fans independently.
- Industrial Automation: Managing two separate devices or motors.
- DIY Projects: Operating appliances remotely with microcontroller-based projects.
Step 1: Hardware Required
- GLYPH-C3
- GMOD-Single Channel Relay Module
- Jumper Wires
- Power Supply
- AC Bulb
Step 2: Circuit Diagram
Connect the relay module as follows: Relay IN → GPIO8 (Control Pin) Relay VCC → 3.3V or 5V (Check relay voltage requirement) Relay GND → GND
Step 3: Code Setup
Step 4: Upload the Code
- Connect the Board
- Connect your GLYPH board to your computer
-
Select the Board and Port
Do the following settings in your Arduino IDE,
Tools > Board > esp32 > Pcbcupid GLYPH C3
Tools > Portand select the port connected to your GLYPH.Tools > USB CDC on Boot >Enabled
- Upload the Code
- Click the upload button (➡️ icon) or use the shortcut
CTRL + Uin Arduino IDE to upload the code to the board.
Step 5: Observe the Output
The relay will turn ON for 2.5 seconds, then OFF for 2.5 seconds, and this cycle will repeat.
- Some relay modules are active LOW, meaning they turn ON when LOW and OFF when HIGH. If your relay behaves unexpectedly, try inverting the digitalWrite() logic.
- Ensure the relay’s power rating matches the device you want to control.
- You may hear a clicking sound as the relay switches states.
