ESP8266 MOD 07 relay control with P-channel MOSFET at 3.3V

Customer:

I have a 3.3V 600mA power supply powering an ESP8266 MOD 07. A pin from the ESP goes to a relay with 5 pins that is not on the board. I was told to use a P-channel MOSFET for this, but I’m wondering if that’s possible with a 3.3V supply.

When I use NPN or PNP transistors, the relay flickers on and off several times before stabilizing and staying on. This doesn’t happen every time, only sometimes.

Where could the problem be? I’m confident the issue is with the transistor not passing enough current.

The relay is powered from the +3.3V and GND of the supply, with the transistor input pin connected to an ESP pin.

Originally submitted via email support on 5 February 2018. Migrated to the forum for community visibility.

Soldered Support:

You can use a P-MOSFET regardless of the 3.3V supply.

To help you with this specific case, please send us your schematic of how these parts are connected.

Briefly, it should work like this: https://www.electronics-tutorials.ws/articles/switch5.gif

We also offer a Relay Module which makes using relays much easier.