What happen When the signal input gets power
Wednesday, October 16, 2019
Edit
When the signal input gets power, the electromagnet turns on and completes the circuit, causing the normally disconnected circuit to connect to power, as well as the normally connected terminal to disconnect from power. By choosing which terminal we plug into, we can decide if we want our switch to normally be connected or disconnected to power before we sent it a signal to switch.
Adding an ESP8266 Board
Once we have a relay able to respond to a sensor, we can control it even more precisely by communicating with it through a microcontroller. When the microcontroller we connect it to also has the ability to connect to Wi-Fi, it becomes possible to operate the relay remotely from any device connected to the same network. The ESP8266 is a popular chipset for prototyping IoT devices in Arduino and happens to be perfect for this application.
Because the ESP8266 chip is so easy to program, we can select a development board like the D1 Mini or the NodeMCU to combine with a power relay. These ESP8266-based boards are cheap and easy to work with, costing around $2.50 when purchased from Chinese suppliers online. If you're willing to wait for overseas delivery, entire home automation projects become relatively cheap to add Wi-Fi functionality to. When purchasing off Amazon or the like, it's still very affordable.
@Mr.X