У нас вы можете посмотреть бесплатно 8 Controlling Relay Boards from an ESP32 или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
This tutorial provides a comprehensive guide on using an ESP32 microcontroller to operate relay modules, which act as electronic switches for high-voltage appliances like lamps. The author explains the physical wiring process, detailing how to connect power, ground, and signal pins to the board's GPIO outputs. Safety is emphasized throughout the demonstration, particularly when handling 220V electricity and choosing between normally open and normally closed circuit configurations. To illustrate the concept, the guide presents Arduino IDE code that allows a user to trigger the device at timed intervals or via text commands sent through a serial monitor. By following these steps, hobbyists can bridge the gap between low-power microchips and heavy-duty electrical hardware for home automation projects. The provided link leads to a tutorial on controlling relay boards using an ESP32 microcontroller, specifically to manage high-voltage devices like a 220V lamp. Relays act as electronically operated switches that allow a low-power device (the ESP32) to safely turn on and off devices that require much higher voltage. Hardware Connections To set up the system, you must connect the relay module to the ESP32 using female-to-female jumper wires. The wiring configuration is as follows: • GND/Minus Pin: Connects to the GND pin of the ESP32. • VCC Pin: Connects to the 5V pin to power the module. • Signal Pin: Connects to a digital pin; the source uses GPIO 2. On the high-voltage side, the relay typically has three leads: Common (C), Normally Open (NO), and Normally Closed (NC). To control a lamp, you generally cut one of the lamp's power wires and connect one end to the Common lead and the other to the Normally Open lead. In this setup, the circuit is broken by default and only closes when the ESP32 sends a "High" signal. Conversely, using the Normally Closed lead means the device stays on by default and turns off when the relay is activated. Safety Warning The sources emphasize that working with high-voltage supplies (like 220V) is extremely dangerous and can lead to injury or death. You should exercise extreme caution and can even test your code using the relay's built-in LED before connecting any high-voltage components to ensure the logic is working correctly. Programming the ESP32 The tutorial covers two primary methods for controlling the relay through the Arduino IDE: 1. Automated Control (Blink): By setting the relay pin as an OUTPUT, you can use digitalWrite(relayPin, HIGH) to activate the relay and LOW to deactivate it. Using delay(2000) allows you to create a loop where the lamp toggles every two seconds. 2. Manual Control (Serial Monitor): You can update the code to listen for specific text commands from your computer. By initializing the Serial Monitor at a baud rate of 115200, you can program the ESP32 to turn the lamp "on" when it receives that string and "off" when it receives the corresponding command. Troubleshooting If you encounter a "connecting" message while trying to upload your code to the ESP32, you should hold down the "boot" key on the board to allow the upload to proceed. Additionally, when using the Serial Monitor, ensure the "no line ending" option is selected for the commands to be read correctly by the code. -------------------------------------------------------------------------------- Analogy for Understanding Relays: Think of a relay as a light switch controlled by a finger you don't have to move yourself. The ESP32 is like a brain sending a tiny electrical pulse (the signal) to a mechanical finger (the relay). That finger then flips the heavy-duty wall switch (the high-voltage circuit) for you. This keeps your "brain" safe from the high-voltage "electricity" behind the wall while still giving you full control over the light. Define the purpose of a relay in high voltage circuits. Describe the wiring connections between an ESP32 and relay module. Contrast the behavior of normally open and normally closed circuits.