How to activate 5v relay with esp32

Hi I am trying to trigger a 5v volt relay with my esp32 which can only ouput a max of 3.3v so I am wondering what to do. I saw some people talk about using a Level shifter.

I nor anyone else has any idea of what your 5.0 volt relay actually is? Based on your question my answer is use a transistor to drive the relay making sure the transistor max current is well above your relay current. Relay or relay module? Relay is just a relay while relay module is a relay on a board with other components. Less more information this is as good as it gets.

I also suggest you read how to use this forum and how to ask a question.

Ron

Nothing nearly so drastic. Here's the kind of thing you need:

Transistor_relay_driver_example

Please note that the component values in the picture are EXAMPLES ONLY. Choose a transistor that can pass enough current (and a comfortable margin) for your relay coil. Choose a base resistor that will pass enough current to fully turn the transistor on (but no so small as to exceed the amount of current you can safely ask of an ESP32 output pin).

Googling transistor relay driver will give you lots more information.

1 Like

Do you have an individual "plain" relay or a relay module? Post a picture, datasheet or webpage where you bought it.
Remember, there are hundreds of different 5 volt relays, so "a 5V relay" doesn't help much. :smiley:

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.