Relay connected to Arduino,
Node MCUor ESP32and bulb switching
The SPDT Relay(30A) is a high-quality Single Pole Double Throw Relay (SPDT). The Relay consists of a coil, 1 common terminal, 1 normally closed terminal, and one normally open terminal. When the coil of the relay is at rest (not energized), the common terminal and the normally closed terminal have continuity.
When the coil is energized, the common terminal and the normally open terminal have continuity. This relay’s coil is rated up to 5V and the contact is rated up to 30A (@250VAC, 30VDC). You can use it to control high current devices.
When the object is detected the Arduino Pin 7 gets change in status and this should be used to pull the Pin 12 High which would trigger the relay which in turn switches the bulb On. Instead of using 230volt bulbs we are using 12volt DC bulbs as they are safer.
The same way when the object is detected the Node MCU Pin GPIO7 gets change in status and this should be used to pull the Pin GPIO12 High which would trigger the relay which in turn switches the bulb
The same way when the object is detected the ESP32 Pin GPIO7 gets change in status and this should be used to pull the Pin GPIO12 High which would trigger the relay which in turn switches the bulb.