Connect ESP32 and relay of 5V

igorgaj87
Posts: 1
Joined: Fri Jun 03, 2022 3:01 pm

Connect ESP32 and relay of 5V

Postby igorgaj87 » Sat Jun 04, 2022 3:05 pm

How connect esp32 and relay of 5V, if GPIO pin is 3.3V?, in practice with me, on relay is always same status (on GPIO HIGH-LOW green led light on relay is always on, this lamp only change intesity)? I have and HW-221 level shifter and I'm afraid I'll burn the ESP32 plate.

ESP_Sprite
Posts: 9591
Joined: Thu Nov 26, 2015 4:08 am

Re: Connect ESP32 and relay of 5V

Postby ESP_Sprite » Sun Jun 05, 2022 2:19 am

The canonical way is to use a mosfet or BJT transistor. Random link to more info: you can safely use the first schematic presented there.

Who is online

Users browsing this forum: No registered users and 152 guests