Relay related knowledge

 This is the relay, there are three interfaces on the left, VCC (3.3v), GND, and COM, NO, NC on the right of IO. If the IO port on the left receives a low level, the internal coil of the relay will work, and then supply power. The switch is closed from the NC terminal to the NO terminal, and the NO terminal starts to close. For example, you can connect the negative pole of the speaker to the negative pole of the power supply, and the positive pole of the speaker Connect with the com of the relay, and connect the positive pole of the power supply with the NO of the relay. When the IO port provides a low level, the NO and com form a loop and the speaker will work.

as shown in the picture

 In fact, we can understand the relay as a conditional switch. When a certain condition is met, the relay will automatically work, just like this horn, which is connected to the normally open end, but whether the horn works is determined by the relay. The specific function of the relay can be seen

Types and uses of relays (zhihu.com)

Guess you like

Origin blog.csdn.net/weixin_62599865/article/details/130877085