3
\$\begingroup\$

I'm using this ESP8266 board, which has a Vin pin.

This link - says specifically that Vin get a direct 5V from USB's DC. But when measuring it using a voltmeter, I get 0.1V (2 boards were checked and got the same result).

Can someone explain what is true? (My goal is exactly to get a direct 5V from external USB).

\$\endgroup\$
6
  • \$\begingroup\$ It is input, not output. \$\endgroup\$
    – Eugene Sh.
    Oct 9, 2018 at 16:45
  • \$\begingroup\$ Did see the link ? \$\endgroup\$
    – guyd
    Oct 9, 2018 at 16:46
  • \$\begingroup\$ Did you have a USB plug inserted and providing power to the ESP8266 board when you measured the pin voltage? \$\endgroup\$ Oct 9, 2018 at 16:59
  • 1
    \$\begingroup\$ @Guy.D "Of course"? I won't make assumptions on what you've done. What was it plugged into? Do you measure 5V at the USB connector? What are you using as your ground reference? Have you checked the link's claim, and measured a short between the USB connector 5V and the VIN pin? These kinds of details matter. \$\endgroup\$ Oct 9, 2018 at 17:25
  • 1
    \$\begingroup\$ @KevinKruse - 1) MCU was plugged using micro-usb to a wall adapter. 2)the result measured between Vin to GND on MCU board 3) I followed wire-up and text, that says in a very implicit way how to connect. I hope my additional inputs suffice. \$\endgroup\$
    – guyd
    Oct 9, 2018 at 17:40

1 Answer 1

5
\$\begingroup\$

This link - says specifically that Vin get a direct 5V from USB's DC

Yes, it does say that. However it shows only one type of NodeMCU board. Not all NodeMCU boards are exactly the same.

I believe that your "problem" NodeMCU board is slightly different than the "working" version which is shown on that web page.


Looking at photos of the "problem" board from your supplier's link, I noticed this part of the PCB is different than the "working board". See the 2 diodes in the red ring:

cropped view of top of "problem" NodeMCU ESP8266 PCB
(Image source - Vendor "ModuleFans" on AliExpress)

I suspect these 2 diodes are forming a Diode-OR for the two possible 5V inputs - the USB port and the Vin pin. This will prevent backpowering whichever of those two power supply sources is not used.

That means you cannot use Vin pin as a power output on that version of the board.


The photos of the "working" board are a little smaller, but in the equivalent part of this PCB, I think I see only 1 diode in the red ring:

cropped view of top of "working" NodeMCU ESP8266 PCB
(Image source - Losant Blog)

This is probably only protecting the USB Vbus pin from being backpowered, if power is being supplied via Vin.

If my hypothesis is correct, then that board would allow power out to the Vin pin, when power is supplied via USB.


You would need to find and compare the schematics of the two boards (or reverse-engineer that part of the two boards yourself) to be completely sure. However my hypothesis, and seeing the different components on those two boards, support and explain the test results you have seen.

\$\endgroup\$
5
  • \$\begingroup\$ WOW ! I was following pin my my board, and compared it to the one on that link- and I was absolutely sure they were the same. thank you very much !! too bad I can;t get that Vin I need though ( any idea will be appreciated ). Guy \$\endgroup\$
    – guyd
    Oct 9, 2018 at 17:54
  • \$\begingroup\$ @Guy.D too bad I can;t get that Vin I need though ( any idea will be appreciated ) - If you are sure you will only use the Vinpin as an output to power peripherals, and will never connect a power source there, and if you confirm that one of those diodes has its anode connected to the Vin pin, then you could consider shorting that diode (either leaving the physical diode in place or not, depending on soldering equipment etc.). After that, you would effectively "defeat" the backpowering protection to the Vin pin. (I take no responsibility for this suggestion, without a schematic). \$\endgroup\$
    – SamGibson
    Oct 9, 2018 at 18:03
  • \$\begingroup\$ @Guy.D - You're very welcome, glad I could help :-) \$\endgroup\$
    – SamGibson
    Oct 9, 2018 at 18:30
  • \$\begingroup\$ Can you please help if Wemos D1 mini’s 5v pin will supply 5v for that job? \$\endgroup\$
    – guyd
    Oct 16, 2018 at 8:42
  • 1
    \$\begingroup\$ @Guy.D - Based on this schematic for the Wemos D1 Mini v3.0.0 then yes, that one would supply the USB Vbus voltage, minus a schottky diode drop, to the 5V pin. It depends whether your board claiming to be a Wemos D1 mini, really matches that schematic or not (there are various clones available). Also, the actual voltage available on the 5V pin depends on what voltage is supplied via the USB connector (minus the schottky diode drop). \$\endgroup\$
    – SamGibson
    Oct 16, 2018 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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