Want to use an ESP32 to control high-voltage devices like lights, fans, and motors? This video is for you! I'll walk you through everything you need to know about using a relay module with your ESP32. You'll learn what a relay is, how it works, and how to safely wire it to your ESP32 microcontroller. I'll also provide sample Arduino and ESPHome code and a show a few common-use examples. Get ready to expand your Internet of Things (IoT) projects!
What you'll learn:
• What are relays and why are they essential for IoT projects?
• Wiring a relay module to an ESP32.
• Understanding the code to control the relay.
• Safety tips for working with electronics and high-voltage devices.
If you've ever wanted to build an ESP32-based device to control another device of a different voltage, you'll know how after watching this video.
Chapter Links:
=============
00:00 Intro
01:55 Relay Basics
04:17 Voltage and Current Considerations
05:09 Parts Used
06:06 Determining Relay Current Draw
08:22 Relay Pinouts and Jumpers
12:16 3V Relay Wiring and Testing
16:30 5V Relay Wiring and Testing
18:55 Switching Between Two Circuits
19:59 Switching LED Data Signals
20:49 Using a Relay with Arduino/C++
22:02 Integrating Arduino/C++ into Home Assistant
22:53 Using a Relay with ESPHome
24:04 Additional Info & Wrap Up
Parts Used or Shown:
===================
3V Relay:
https://amzn.to/4pvqKIT5V Relay:
https://amzn.to/3I9O7XrESP32:
https://amzn.to/46CoE1a3.3V/5V Buck Converter:
https://amzn.to/48h3qIHLogic Level Shifter:
https://amzn.to/3IDJ29ZProtoboard:
https://amzn.to/46zjWktBreadboard Jumpers:
https://amzn.to/46PZWeODupont Jumpers:
https://amzn.to/4nF1m1sLever Nuts:
https://amzn.to/4pJhXmKNormally-Open Push Buttons:
https://amzn.to/3W3pkaLVariable (3-12V) Power Supply:
https://amzn.to/4nCMLnLKaiweets Digital Multimeter:
https://amzn.to/3VATPonSome of these links may be Amazon affiliate links. Use of these links will not affect your pricing, but as an affiliate this channel may earn a small commission if you make a purchase.
Additional Info and Links:
=========================
ESPHome GPIO Switch:
https://esphome.io/components/switch/gpio/ESPHome Base Switch Config:
https://esphome.io/components/switch/MQTT Videos:
-----------
MQTT Basics:
https://youtu.be/Q0S0xOW35k8 Creating MQTT entities in Home Assistant:
https://youtu.be/WYyPMHqMV-wAdding MQTT Discovery to your Project:
https://youtu.be/VHiCtZqllU8It takes significant time, effort and occasionally substantial expense to create these videos. If you'd like to help support this channel and future content, or just say thanks, you can consider buying me a cup of coffee:
https://www.buymeacoffee.com/resinchemtech#esp32 #relay #homeassistant #arduino