5V DC
5V DC
50mA (approx.)
10A at 250V AC or 30V DC
150 ohms (approx.)
AgSnO2 (Silver-Tin Oxide)
100,000 operations (minimum)
-40C to 85C
-40C to 125C
25.5 x 18.5 x 15.5mm
Precautions
Ensure the relay module is handled and stored in a static-safe environment to prevent damage from electrostatic discharge.
Operate the relay module within the specified voltage and current ratings to prevent overheating and damage.
Use suitable wiring and connectors to ensure reliable connections and to prevent electrical shock hazards.
Follow proper safety precautions when working with high-power devices and electrical systems.
5V 10A PCB Mount Sugar Cube Relay - SPDT DocumentationOverviewThe 5V 10A PCB Mount Sugar Cube Relay - SPDT is a compact, high-power relay module suitable for a wide range of IoT applications. This relay module features a single-pole double-throw (SPDT) configuration, allowing it to switch between two circuits or devices. With a maximum current rating of 10A and a voltage rating of 5V, this relay is ideal for controlling high-power devices such as motors, solenoids, and lamps.PinoutThe relay module has a 5-pin PCB mount connector with the following pinout:| Pin | Function |
| --- | --- |
| 1 | VCC (5V) |
| 2 | IN (Input Signal) |
| 3 | COM (Common) |
| 4 | NO (Normally Open) |
| 5 | NC (Normally Closed) |Operating PrincipleThe relay operates by applying a 5V signal to the IN pin, which energizes the relay coil, switching the COM pin between the NO and NC pins.Code Examples### Example 1: Arduino ControlIn this example, we'll use an Arduino Uno board to control the relay module.
```c++
const int relayPin = 2; // Choose a digital pin on your Arduino boardvoid setup() {
pinMode(relayPin, OUTPUT);
}void loop() {
digitalWrite(relayPin, HIGH); // Turn the relay ON
delay(1000);
digitalWrite(relayPin, LOW); // Turn the relay OFF
delay(1000);
}
```
### Example 2: Raspberry Pi Python Control (using RPi.GPIO library)In this example, we'll use a Raspberry Pi board to control the relay module using Python.
```python
import RPi.GPIO as GPIO
import timeGPIO.setmode(GPIO.BCM)
relay_pin = 17 # Choose a GPIO pin on your Raspberry Pi board
GPIO.setup(relay_pin, GPIO.OUT)while True:
GPIO.output(relay_pin, GPIO.HIGH) # Turn the relay ON
time.sleep(1)
GPIO.output(relay_pin, GPIO.LOW) # Turn the relay OFF
time.sleep(1)
```
### Example 3: ESP32 MicroPython ControlIn this example, we'll use an ESP32 board to control the relay module using MicroPython.
```python
import machine
import timerelay_pin = machine.Pin(15, machine.Pin.OUT) # Choose a GPIO pin on your ESP32 boardwhile True:
relay_pin.value(1) # Turn the relay ON
time.sleep(1)
relay_pin.value(0) # Turn the relay OFF
time.sleep(1)
```
Important NotesEnsure the relay module is properly mounted on a PCB with suitable heat dissipation to prevent overheating.
Use a suitable voltage regulator to supply 5V power to the relay module.
When switching high-power devices, consider adding a flyback diode or snubber circuit to prevent back-EMF damage to the relay.By following these examples and guidelines, you can effectively use the 5V 10A PCB Mount Sugar Cube Relay - SPDT in your IoT projects.