How to power a nodemcu (esp8266) and relay without usb?

Hi everyone, I am trying to design a simple IoT switch circuit with protection feature (like a fuse).
So the components I have so far are: NodeMCU ESP8266, 5v relay module and Toggle on/off switch.
I was thinking about using HI-Link HLK-PM01 to power the nodemcu (3.3v or 5v pins). But was wondering how to power the 5v relay module? I tried researching the web and only found this Power ESP8266 with HLK-PM03 Converter | Random Nerd Tutorials. Can someone please help me with any suggestion?

Thanks.

It would have to be the 5V pin. Connecting 5V to the 3.3V pin would cause damage.

The module you mention is 5V, and the relay module is 5V. What exactly are you wondering about?

Thanks for replying. So my concern is that can I power the relay and nodemcu via the Hi Link 5v converter and is the fuse properly rate? [refer to the image]

The Hi Side input to your power supply is 100 to 240 VAC 0.1 Amp. Do you really want to fuse it at 1.0 Amp? I would likely settle for 1/4 Amp or 250 mA. Just over twice the rated input current. Make sure also your fuse is rated for your mains voltage. Using the 5.0 volt out I would run with about a 500 mA fuse. Slow blow on the in and fast blow on the out. Your 5V 1A fuse on the 230 VAC input is a poor choice.

Wire it as you drew it and it should work out fine.

Ron

HI-Link HLK-PM01 is 5V 0,6A. Not so much. At least 1A is a better choice. 70% efficiency isn't a lot. There are better. The power supply is a TH PCB type. MeanWell MPM-05-5 is 1A and has 78% efficiency. Inrush current 25A@115V AC or 45A@230V AC!!!. Maybe 1A is less.

What relays module you use? How many mA for active relays?

NodeMCU will draw < 100mA on average, even when connecting to WiFi. You may have read about much higher currents but these are momentary spikes which should not be a problem in practice, especially if you use sufficient smoothing caps on the 5V 3.3V line, like in the link you shared, but not shown in your diagram.

Relay coil will also probably be < 100mA for each relay, but you should check that.

Safer to power the NodeMCU with a 5volt cellphone charger, connected to the USB socket.
You then can 'steal' 5volt for one relay module from the 5volt pin of the NodeMCU.
Leo..

Its just 1 relay (JQC-3FF-S-Z) 5v DC rated 10/15A 125/250AC. I think it should be drawing around 75-100mA. I will have a look at your proposed power supply module. Thanks for the advice.

This project is a learning process for me. Your solution is not suitable for my application. Thanks for commenting Leo.

Ohh, wasn't planning on using those 5v caps because I thought the nodemcu had a built-in 5v regulator. So I guess I have to implement them.

It does have a regulator, but it's a 3.3V regulator, not a 5V regulator and in any case a regulator cannot supply those extra spikes of current, which is probably above it's maximum. Caps can do that. They need to be on the output side of the regulator to do it. They store energy/charge at 3.3V and when the esp chip needs those spikes of current, they can help supply it.

There are caps onboard the nodeMCU which may mean the external caps are unnecessary. But to ensure maximum wi-fi range, the external caps are a good idea.

EDIT: just realised I made an error in post #6 and corrected it. Those caps are on the 3.3V line in the link you posted. To attach similar caps to the the nodeMCU, you can connect them to the 3.3V pin.

My five cents.

As marked in the original post diagram, use only the GND that´s next to VIN.

I´ve tried to use other NodeMCU V3 GND pins to connect the incoming -5V (for easier cable connection´s sake in my own design) and they don´t work.

Apparently you have to stick to VIN and the GND next to it.

1 Like

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