In daily life, we generally use 220V AC to drive the electrical equipment. Sometimes we will use the switch to control the electrical appliance. If directly connect the switch to the 220V AC circuit, once electric leakage happened, people are in danger. Considered with safety, we particularly design this keyestudio single relay with terminal block of NO (normally open) and NC (normally closed), which is active at High.

In this project, you will learn how to use our relay module and micro:bit to control an LED module on and off. (note that for easy wiring, the circuit does not add 220V voltage, still use 5V.)

Component Required


Component Introduction
Single Relay Module:
This module uses a high-quality SONGLE 5V relay. The relay output is by a light-emitting diode, can be controlled through digital IO. It can be used to control lighting, electrical and other devices of high current or voltage.
When supply high voltage to S end, the relay is driven, that is, normally open (NO) connected, normally closed (NC) disconnected.
When supply low voltage to S end, the relay is turned off, that is, NO is disconnected, and NC connected.
In this way, we connect the 220V AC circuit to NO or NC terminal block, more safe and convenient through 5V voltage control.

Hardware Hookup

Ready to start hooking everything up? Check out the wiring diagram and hookup table below to see how everything is connected.






Insert micro:bit into the edge connector of the expansion board.
Note:micro:bit will always stay attached to the expansion board in the following sessions.


If you are not familiar to make code, don’t worry. Firstly, you can enter this link: to know more about microbit blocks.
Then you can directly enter the to edit your project program. Below is an example code we have done for you.


Example Result
Done wiring and powered up, send the code to MICROBIT. When relay is connected, LED module lights up, and then relay is disconnected, LED module is off, with an interval of one second, repeatedly.