

The circuit described is designed to control an AC-powered LED bulb using a microcontroller, specifically an ESP32 (30 pin) module. The circuit includes a 5V adapter to step down the 220V AC power to 5V DC, which powers both the ESP32 and a relay module. The relay module is used to switch the LED bulb on and off. The ESP32 controls the relay module via one of its digital pins. The circuit is powered by two separate 220V AC power sources, one for the LED bulb and one for the 5V adapter.
+, -hot wire, neutral wirehot wire, neutral wireAC In 1, AC In 2, 5V, GNDcommon contact, normally open, normally closed, trigger, V-, V+EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3+ connected to the normally open pin of the Relay Module.- connected to the hot wire of Power 220V (Source 2).hot wire connected to AC In 1 of the 5V Adapter.neutral wire connected to AC In 2 of the 5V Adapter.hot wire connected to the + pin of the LED Bulb AC / Bombillo AC.neutral wire connected to the common contact pin of the Relay Module.AC In 1 connected to the hot wire of Power 220V (Source 1).AC In 2 connected to the neutral wire of Power 220V (Source 1).5V connected to Vin of the ESP32 and V+ of the Relay Module.GND connected to GND of the ESP32 and V- of the Relay Module.common contact connected to the neutral wire of Power 220V (Source 2).normally open connected to the + pin of the LED Bulb AC / Bombillo AC.trigger connected to D13 of the ESP32.V+ connected to 5V of the 5V Adapter.V- connected to GND of the 5V Adapter.Vin connected to 5V of the 5V Adapter.GND connected to GND of the 5V Adapter.D13 connected to trigger of the Relay Module.There is no code provided for the ESP32 microcontroller. To complete the circuit functionality, code would need to be written and uploaded to the ESP32 to control the relay module based on the desired logic (e.g., switching the LED bulb on and off based on a schedule or sensor input). The code would typically be written in C or C++ using the Arduino IDE or the ESP-IDF framework and would involve setting up the GPIO pin connected to the relay module as an output and then toggling it to control the state of the relay.