Wemos D1 Mini R2 5V VIN

Hey there,

I have a small Wemos D1 Mini R2 and can’t find anything about the max current output on the 5V VIN Pin if I power the Wemos over the micro USB port. Can anyone help me out?

My project is to attach a 7 LED ring with WS2812b on the GND and 5V on the board itself. I want to keep the Wemos alive :slight_smile:

The ring looks like my attachment.

Untitled.png

Generally, usb can provide up to 500mA. The Wemos consumes around 80mA on average, when connected to WiFi. There are spikes of much higher current use but these are very short, so if you attach a large cap to the 5V pin, like 470uF or even 1000uF, that should take care of those. This leaves your circuit with about 420mA in theory, but you should plan to stay well clear of that in practice.

7 x ws2812b could in theory consume 7 x 60mA = 420mA. That's right on the limit, but in practice these LEDs rarely consume that much. All 7 LEDs at full brightness white would be the maximum current. Full brightness in any single colour like red/blue/green would only be 1/3rd of that.

The two main libraries for controlling ws2812 (NeoPixel and FastLED) both have an overall brightness setting which will help you control how much current will be used. The FastLED library even has a setting which will allow you to specify the maximum current/power and automatically reduce the brightness of the strip to stay under that max.

So I think you will be ok with 7 LEDs. It would be interesting to hear back from you about how much current your 7 LEDs are consuming on full brightness white (using a multimeter).

OK, let's look at the circuit: |500x350 There is a diode feeding the 5 V pin from the USB connector, rated at one Amp, so that will be OK for your 420 mA. The USB source will most likely provide 500 mA just fine.

And the series diode - plus "sag" in the USB supply will probably drop enough voltage to make the logic level from the ESP8266 adequate to drive the WS2811s, otherwise you would need to use a 74HCT14 with two inverters cascaded, to provide level conversion. (A 74HC04 would probably do just as well.) Trust you will not be mounting the LED ring very far from the WeMOS D1 Mini, just a couple of inches. A 470 µF capacitor across the 5 V and ground would however be a good idea.

Thank you all for your help :slight_smile: So the main answer I get from here is, that the USB power is passed through the 5V PIN :wink:

Because I’m not that good right now in electricity I just want to ask to be sure to don’t damage anything.

And yeah my project looks like this. Printing this cube (attachment), put in a Wemos D1 Mini and the LED ring at the bottom, so both of these modules are close to each other (1 cm maybe?). The power source would be a Nintendo Switch out of it’s USB 3.0 port.

In this setup the LEDs will light up the yellow color… so nope they won’t need the max current they could use. I don’t know if I will ever need the max brightness of them.

Untitled.png

Since clone D1 Minis sometimes have marginal regulators, I put the big cap (1000µF, 6.3V) on the 3.3V pin instead of the 5V pin. That seems to work quite well. I don't get any scope-observable sag there during transmissions.

ShermanP: Since clone D1 Minis sometimes have marginal regulators, I put the big cap (1000µF, 6.3V) on the 3.3V pin instead of the 5V pin.

Actually, that is a valid point here. I was suggesting the capacitor to even out the current demand of the LEDs, which are 5 V and may peak at 420 mA.

A capacitor is perhaps desirable on the 3.3 V of the ESP however the regulator should always be able to provide the current burst to the ESP as it transmits. The regulator limitation is more that it may overheat since it lacks a proper heatsink in these designs and that the 3.3 V regulator function of a USB to serial chip is inadequate for the purpose.

Paul__B:
Actually, that is a valid point here. I was suggesting the capacitor to even out the current demand of the LEDs, which are 5 V and may peak at 420 mA.

A capacitor is perhaps desirable on the 3.3 V of the ESP however the regulator should always be able to provide the current burst to the ESP as it transmits. The regulator limitation is more that it may overheat since it lacks a proper heatsink in these designs and that the 3.3 V regulator function of a USB to serial chip is inadequate for the purpose.

does that mean it would be great to install a capacitor between gnd and 3.3 and also between gnd and 5volts?

nicedevil: does that mean it would be great to install a capacitor between gnd and 3.3 and also between gnd and 5volts?

I would be sticking by my original advice. The 5 V capacitor will suppress interference from the PWM affecting the LED commands, The regulator will generally be able to manage the bursts of RF transmission.

The WeMOS D1 Mini is supposed to be complete and adequate as is, it is the LED strip that is the additional component.

I would just say that when I was looking into genuine vs clone D1 Minis, I found reports that the regulator used in some clones comes in either 150mA or 300mA versions, and there was reason to believe the 150mA version had been used. So that's why I put the cap on the 3.3V pin. But I don't have any I/C stuff running off the 5V line, so the only place where stable voltage matters is on 3.3V. You have the WS28112b stuff running on 5V, so it makes sense to put the cap there. If you can put a scope on the 3.3V line when transmission is going on, that would tell you if you also need a cap there. Andreas Spiess has a nice Youtube video on this subject:

https://www.youtube.com/watch?v=wf_msvWv1jk

Good old Andreas!

Modules too small, wrong capacitors on regulator.

Ok, the caps are already ordered :)

Thank you all for your advice.

I tested my setup the last few days a bit and it is also working without the cap and using the FastLED setting for the max powerdraw.

Unfurtunately my multimeter is telling me "OL" if I want to meassure the mA on 5V... was a cheap one.

nicedevil:
Unfurtunately my multimeter is telling me “OL” if I want to meassure the mA on 5V… was a cheap one.

My multimeter is the same, cannot measure over 200mA using the “normal” probe socket. But there is a second socket for measuring up to 10A.

PaulRB:
My multimeter is the same, cannot measure over 200mA using the “normal” probe socket. But there is a second socket for measuring up to 10A.

Tested this as well :wink:
But then it only shows 0.00

I think it is because it was a cheap one and can’t measure such low mA on the 10A socket. I already ordered a new one… hope that will do the job much better…

But still I’m not sure if I’m doing my job at measurement right :wink:

The black wire is hold on the GND and the red wire is hold on the 5V PIN on my LEDs, the multimeter is set to 10A and the socket with 10A is used as well.

You should get a reading on the 10A position/socket, even if it is only 0.3A for example. Are the LEDs lighting up?

nicedevil: The black wire is hold on the GND and the red wire is hold on the 5V PIN on my LEDs, the multimeter is set to 10A and the socket with 10A is used as well.

I'm not clear on how you are connecting the meter. It must be in line with the current flow, so that the current that lights the LEDs is flowing through the meter.

PaulRB: I'm not clear on how you are connecting the meter. It must be in line with the current flow, so that the current that lights the LEDs is flowing through the meter.

It does ;)

And sure I turned all the LED on in White to get max readout.

nicedevil: The black wire is hold on the GND and the red wire is hold on the 5V PIN on my LEDs, the multimeter is set to 10A and the socket with 10A is used as well.

OK, let me put it another way. It sounds, from the description you gave, like you are connecting the meter incorrectly. It sounds like you are shorting all the current available from the psu through the meter, and may have blown the fuse in the meter. If your power supply is less than 10A, you may have damaged that also.

To correctly measure current, you must connect the meter as part of the circuit, for example with the red probe to the + terminal of the PSU and the black probe to the + connection on the leds. Leave the ground/- connection from the PSU to the leds connected directly by wire.

I am puzzled as well. If you tried to measure current by connecting the probes to 5V and Ground, you probably burned out a fuse that's inside your meter, and will need to replace that before you can measure current at all.

Exactly. And unfortunately, many cheap meters (including my meter) don't have a fuse on the 10A input, only on the other input (e.g. 250mA fast blow).

However, I would imagine that if your blow the 10A input, there would be obvious signs that you had done something wrong, like very hot, very bad smells. You would notice. So hopefully you have not done that.

Are you aware of any meters which do have a fuse on the 10 A terminals?

The fusible rating of the actual shunt itself would be more like 30 A (100 mV at 10 A is 1 W dissipation, it would require 30 A to dissipate 10 W) and the PCB will most likely fuse first.