Product Introduction #
The relay is composed of iron core, coil, armature, contact reed and so on.
When a certain voltage is added to both ends of the coil, a certain current will flow through the coil, resulting in an electromagnetic effect, and the armature will overcome the pull of the return spring to attract the core under the action of the electromagnetic force, thus driving the moving contact of the armature and the static contact (normally open contact). When the coil is powered off, the electromagnetic suction also disappears, and the armature will return to the original position in the spring’s reaction force, so that the moving contact and the original static contact (normally closed contact) are released. This suction, release, so as to achieve the purpose of conduction in the circuit, cut off.
For the “normally open, normally closed” contact of the relay, it can be distinguished as follows:
The static contact in the disconnected state when the relay coil is not energized is called “normally open contact” (NO).
The static contact in the on state when the relay coil is not powered on is called the “normally closed contact” (NC).
Relays generally have two circuits, low voltage control circuit and high voltage working circuit.
Parameter Specification #
Parameters | Value/Description |
Operating voltage | 5V |
Rated load | 10A 250VAC/10A 24VDC |
Control signal | digital signal |
Size | 4.72cm*2.38cm |
Wiring Diagram #
Note:Expansion board is attached to esp32 controller board.
Relay Module | ESP32 |
VCC | 5V |
GND | GND |
Sign | Pin 32 |
Sample Code #
void setup(){
pinMode(32, OUTPUT);// Set pin 32 to output mode
}
void loop(){
digitalWrite(32, HIGH);// Set pin 32 to high (on))
delay(1000);
digitalWrite(32, LOW);// Set pin 32 to low (off)
delay(1000);
}
Note: If you are using an Arduino board, then change the pin in the program to PIN7, and then connect the hardware pin to PIN7 and upload the program.
Test Result #
After you have successfully connected the line according to the wiring diagram and successfully uploaded the correct program, your machine will turn for 1 second and stop for 1 second.
Related Resources #
Get One Now #
B2B Business: info@acebott.com