Description
3 Relays 5V 2A HK23F-DC5V-SHG
Tutorial: How to Use 3 Relays 5V 2A HK23F-DC5V-SHG
Relays allow you to control electrical circuits with a logic signal. Ideal for projects requiring isolation and protection.
What you need
- 3 relays HK23F-DC5V-SHG
- Arduino or similar microcontroller
- 5V power supply
- Electrical wires
Steps
- 1. Check that the supply voltage is 5V on both poles of the relay.
- 2. Connect the VCC of the relay to the 5V of the Arduino.
- 3. Connect the GND of the relay to the GND of the Arduino.
- 4. Connect the COM contact of the relay to an electrical component (e.g., an LED).
- 5. Connect the NO contact of the relay to a resistor (220Ω) and then to the VCC.
- 6. Connect the NC contact of the relay directly to the VCC.
- 7. Connect a digital pin of the Arduino to the COM pin of the relay.
- 8. Upload the Arduino code to control the relay.
Example code
```
void setup() {
pinMode(2, OUTPUT);
}
void loop() {
digitalWrite(2, HIGH);
delay(2000);
digitalWrite(2, LOW);
delay(2000);
}
```
Mini project
Build a virtual switch to turn an LED on and off. Connect the relay’s COM pin to the LED, the NC pin to VCC, and the NO pin to a resistor and VCC.
Common mistakes
- Incorrect power supply: ensure it is 5V.
- Incorrect connections: check that the pins are connected correctly.
- Wrong pin: use only the COM, NO, and NC pins.
- Missing resistor: ensure the resistor is present to protect the LED.
Recommended accessories
- Arduino Uno
- LED
- 220Ω Resistor
- 5V Power Supply
Frequently asked questions
How can I protect the relay from a short circuit?
Connect the relay to a protection circuit with a fuse or circuit breaker.
Can I use a power supply other than 5V?
Check the datasheet to see if the relay supports other voltages.
For which types of projects is it more useful?
For projects that require isolation and protection between electrical and logic circuits.
Can I connect multiple relays to a single Arduino board?
Yes, but make sure the power supply is sufficient for all the relays.







Reviews
There are no reviews yet.