2

I am new to Arduino and electronics so please correct me if I made a mistake.

Many sensors and actuators require 5V. The Lolin NodeMCU V3 has outputs of 3.3V. I want to have them working together.

I have read that the VIN pin outputs the voltage of the USB power source, which is around 5V. I bet that many sensors and actuators can be connected to VIN.

I guess that the main difference with the VCC pin of other boards is the accuracy and stability of the potential.

1) What about the amperage? (I guess that the max amperage of the USB power supply is divided between the board and sensors/actuators connected). How does it compare with the VCC output of, let say, an Arduino UNO?

2) How important is in most practical cases not having exactly 5V? (clearly, I am not considering using the sensors for extremely accurate measurements). I am interested in things like movements/distance/light/accelerometers/humidity etc. sensors and LCD displays, relays, small motors, etc..

I have seen that many sensors have a not so narrow range of working voltages. That makes me think that small oscillations in the USB voltage may not be significant.

3) Is there a better yet simple way to connect 5V devices to this board?

Thank you in advance.

9
  • I fear you lost your bet. ;-) As the name VIN suggests the Vin pin is used to supply your nodemcu with an external power (up to 20V). That's if you do not want to connect the USB port, or need more power than your USB supply can handle. There is a VU pin that provides the power 5V from the USB connection. See the following link for more details: henrysbench.capnfatz.com/henrys-bench/… It would be more practicable, if you power the sensors and use that power also for the nodemcu. Commented Jan 16, 2020 at 17:13
  • Also, be careful if you connect 5V sensor pins with the 3.3 V nodemcu pin (IO pins). That could (sorry would) kill your nodemcu.The maximal current you can draw from the nodemcu power pins is defined by the voltage regulator (~ 800 mA) and the capabilities of your power supply (which we do not know). That is valid for the USB port and VU pin too. Commented Jan 16, 2020 at 17:21
  • nodemcu's vin is more like 4.4v than 5.0v. the nodemcu's IO is generally 4.4v tolerant. i use lots of 5v sensors with mine just fine, running at 3.3v or 4.4v. if in doubt you can level shift, but i've only had to do that once (of dozens+dozens) fwiw.
    – dandavis
    Commented Jan 16, 2020 at 18:04
  • 1
    @user1420303 Sorry I might not be exact/clear enough. I don't advised you to use the VU pin ( that can also have different names ). I just mentioned it, as the pin where you have access to the USB power. My advice would be use an external 5 Volt power supply to power the sensors and the NodeMCU with it. To power the MCU use the Vin pin. In case you want to drive motors or servos or power LEDs, it's even better to use separate power supplies for them. My PC has USB ports that can only drive 500mA. That wouldn't be enough to drive the NodeMCU and a couple of motors. Commented Jan 17, 2020 at 9:57
  • 1
    You've mentioned projects that use the Vin Pin to access the 5Volt line of the MCU. I don't know what projects you've seen. But the ones I know have routing nets that are named "5V", that are connected to the Vin pin and the sensors VCC pins. But they are also connected to a e.g 7805 Regulator or a LM317 or some more efficient ones. So effectively they power the NodeMCU and the Sensors with that external supply. (As I advised you in the last comment.) Commented Jan 17, 2020 at 10:03

2 Answers 2

2

What about the amperage? (I guess that the max amperage of the USB power supply is divided between the board and sensors/actuators connected). How does it compare with the VCC output of, let say, an Arduino UNO?

The 5V pin is connected directly to the 5V of the USB. Whatever your USB port can provide the 5V can provide, minus the current used by the ESP8266.

How important is in most practical cases not having exactly 5V? (clearly, I am not considering using the sensors for extremely accurate measurements). I am interested in things like movements/distance/light/accelerometers/humidity etc. sensors and LCD displays, relays, small motors, etc..

That all depends on the device. Read the datasheet. Look at the Electrical Characteristics. It will tell you the recommended (and the absolute maximum) voltage range.

Is there a better yet simple way to connect 5V devices to this board?

Again, it all depends on the devices. Many many devices that are marketed as 5V are in fact "anything from 2.8V to 5.5V" or something like that. Read the datasheets!

The NodeMCU is a tricky board to use with 5V because there is no isolation between the USB power and the 5V pin's power. You can't power the board through the 5V pin and still be able to use the USB port or you risk destroying the USB port or computer that the NodeMCU is plugged into. If possible you really want to be running as many 3.3V devices as you can, or to keep any external 5V supplies completely separate (except ground, of course) from the 5V of the NodeMCU.

4
  • the 5v pin isn't directly connect to usb, it's a misnomer; there's a diode in series. a rather measly current capability diode too, imho, which makes it tougher to run 5V RGB LED strips...
    – dandavis
    Commented Jan 16, 2020 at 23:14
  • @dandavis Not according to the schematic I saw. The diode was between both the USB and the 5V pin and the input to the regulator.
    – Majenko
    Commented Jan 17, 2020 at 0:52
  • On my amica boards I see ~4.5 volts, and can pull up to half an amp or so. on my lolin boards, the voltage is actually somewhere under VCC: I can't power anything from it, not even a DHT-11. I suppose there may be several designs being sold as "nodemcu" though, so we could all be right.
    – dandavis
    Commented Jan 17, 2020 at 1:30
  • 1
    @dandavis There is a lot of Chinese crap out there now with zero documentation, yes.
    – Majenko
    Commented Jan 17, 2020 at 1:31
2

nodemcu gives 3.3 V output voltage. This output voltage is not considered sufficient by many components. So my recommendation is logic converters. The most logical solution to convert 3.3V voltage to 5V. Thus, the elements used with 5V will work stably.

Not the answer you're looking for? Browse other questions tagged or ask your own question.