NodeMCU doing many things!

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
smartsoldier
New user
Posts: 6
Joined: 13 Aug 2018, 00:51

NodeMCU doing many things!

#1 Post by smartsoldier » 18 Aug 2018, 00:26

Right now I have 2 NodeMCUs on my bedside table. One has a DHT22 (3.3v) and HC-SR501 (5v). The other has a Nextion 2.4in touchscreen (5v). Can I move the Nextion to the first NodeMCU and free up the 2nd for more projects? I'm wondering if I can pull 5v to the HC-SR501 and the Nextion and be fine.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: NodeMCU doing many things!

#2 Post by ThomasB » 18 Aug 2018, 05:43

The HC-SR501 and Nextion have 3.3V logic levels. So they are directly compatible with the ESP8266 and do not require logic level conversion. Use 5V to power them and wire their signals to the GPIO pins.

- Thomas

smartsoldier
New user
Posts: 6
Joined: 13 Aug 2018, 00:51

Re: NodeMCU doing many things!

#3 Post by smartsoldier » 18 Aug 2018, 15:27

ThomasB wrote: 18 Aug 2018, 05:43 The HC-SR501 and Nextion have 3.3V logic levels. So they are directly compatible with the ESP8266 and do not require logic level conversion. Use 5V to power them and wire their signals to the GPIO pins.

- Thomas
Thanks I understand their signals will be perfectly compatible. My question was concerning electricity (amps or wattage idk) implications of pulling 5V from the NodeMCU for these two different items. Is there a scenario where they are alright on their own, but if I power them both from a single 5V pin on the NodeMCU there won't be enough power?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: NodeMCU doing many things!

#4 Post by TD-er » 18 Aug 2018, 16:59

The NodeMCU boards have a direct connection from the USB +5V line to the V_in line.
So if your USB power supply has enough power and the USB cable used isn't too flimsy, then it should work.
If you expect short peaks in the consumed current, you may want to add some (not too large) capacitor to cover those peaks, but I think the power consumption of the Nextion is mainly based on the backlight of the LCD, so that will be quite constant.

So in short, if in doubt, or experiencing issues, try a bigger (thicker wires) USB cable. But that's an advice applicable to almost all applications here :)

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: NodeMCU doing many things!

#5 Post by ThomasB » 18 Aug 2018, 17:42

So in short, if in doubt, or experiencing issues, try a bigger (thicker wires) USB cable. But that's an advice applicable to almost all applications here
That is golden information. Both USB cables (inadequate copper size) and poor quality USB power supplies (excess ripple, noisy, etc.) seem to be common sources of ESP8266 troubles. The ESP8266 needs very clean power for stable operation.

- Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests