running nodemcu + motor + ws2812b led from one power source

Basically I am still in a planning stage and something I am stuck with. I would appreciate guidance/help to stop me going down the wrong and/or expensive path!

I have three components

  1. 12v 7w DC motor (I think thats 0.50amp?)
  2. 144 led WS812B 1meter strip - 5V (assuming roughly 7amp when all fully lit)
  3. nodemcu (3V, 0.5amp I believe?)

Instead of having three separate power supply, I would like to have 1 power source to supply to three of the above devices.

At first, I thought of getting power supply 20v, then using voltage divider using resistance so that it will split 20v into three different voltage (12v, 5V, 3V). However, I am led to believe its not a good idea to have any "load" (ie the motor?) which can effect the voltage to the led and nodemcu (and burn them out possibly?). What I could do with is something that will definitely give me the three voltage I need whether any of them used or not (ie led or motor may be turned off) - does such a thing exist?

Other suggestion (from a friend) was I should forget the 20v power supply brick that I have got and go direct to the mains (240v, uk) to a transformer. This transformer I am looking at gives out 2 x 20Vac. I then need to convert that Vac to Vdc using some sort of "bridge diode + capacitor". this will give me 2 x 12Vdc. One 12Vdc will supply the motor, and the other 12Vdc will be split with a voltage divider (5v+3v) to drive the nodemcu and led.

Whats the best way to do this? A few other terms crops up in my research - Voltage Regulator and Linear Regulator - is that what I should research more into?

As you can see, probably nothing make sense as I am just a wonna-be-electrician! Any guidance/help would be much appreciated.


(ps, the idea is to make a spinning globe with the LEDs on the outside of the globe, which will show images when spinning fast enough - just in time for xmas!)

Since most of your power requirements are at 5V, I'd get a 5V power supply rated at 10 amps (you could probably get away with less since I doubt you will have all 144 leds totally on at the same time, drawing max amperage)

Then look into a "buck boost converter" they can step the voltage up for your DC motor and down for your nodemcu. They are way more efficient that a linear regulator

Thanks for the suggestion blh64, and would certainly would take a look. I did look at buck-converters, but most seems to be only handling less then 7amp which is what I needed for the LED, but will have another look again.

So, it sounds like you don't need to total the Voltage of all the devices - as you can boost it up or down. All I have to worry about is the amps - is that correct?

Do I...
a. add a voltage divider (by resistance) to divide 5V into something like 3V, 1V, 1V. Then boost the 3V to 12V for the motor, 1V to 5V for the LED and 1V to 3V for nodemcu?
b. should I boost the 5V to 20V, then use the voltage divider (by resistance) into 3 separate V for each device?

What about this "load" business with voltage divider? I got the impression that you shouldn't put any load on any of the output as other outputs voltage would be effected. Ie, if the motor load is low, more voltage will be passed to the led or nodemcu, or have I read that wrong?

much appreciated of any answers.

Forget about the resistor voltage dividers. They are completely the wrong solution for powering anything. They rely on the fact that only very tiny amounts of current are taken from them i.e. they simply will not work.

The converters (you'll need two) don't need to handle 7A. That's why you use a 5V power supply because the current for the LEDs comes direct from that.

The 12V up-converter only needs to handle the power for the motor, less than 1A.

The 3.3V down-converter only needs to handle the power for the NodeMCU, much less than 1A.


many thanks for you super advice, and I think I got some sort of circuit in my head in place. I just realise that my nodemcu also has a 5Vin pin with a build in regulator to convert it to 3.3V, so I guess it means I don’t need a buck convertor to convert the 5v to 3.3V. So I think my circuit will look something like…

(don’t know if I can link images or upload it here yet!)

Here’s how you can put the image into your post: link

When you do connect it all up, make sure you connect all the grounds together (power supply V- to leds AND nodemcu AND buck converter)

are you are correct. I did kinda knew that. My crude circuit diagram didn't deserve any justice! Correct image which hopefully it correct this time.

And thanks for that link about uploading images

A 5 to 12 V converter is not a "buck" converter! :astonished:

A motor is not "12v 7W". Need a proper specification. It may require substantially more than 1 A to start.

I would look for a power supply which provides both 12 V and 5 V, these should be readily available.

Such as this:

ah might be a slip of a incorrect terminology used here (I hope cos I've already ordered a couple of components!) Buck converter converts down, whereas a buck-boost converts up.

so I guess I should have said a buck-boost from 5v to 12v.

I didn't realise that there could be a "start up" amp when starting the motor up. It doesn't say in the spec, except 0.05amp no-load current, 0.52amp rated current amp and 0.96 stall current amp

I did see this dual output power supply - I think I discounted it due to the size/weight of the power supply. Fingers crossed, a buck-boost will do the job, otherwise will have a look at this power supply you mentioned.

The start current can be equal to the stall current. But it only gets that high if there is a considerable load on the motor and it only lasts for a very short time before it drops to the running current. It's generally no problem at all for batteries but can cause problems for power supplies and DC-DC converters. Most can handle some overload but not all.