I was asking myself wether it's possible to power my nodemcu board (version 3) with a usb powerbank, like a smartphone, but the powerbank should then be recharged by a solar panel. So this is basically like it could look like: enter image description here

I know, there should be some charge regulation, but i would just like to know, if that circuit would be able to charge the powerbank? According to the Hardware Layout, it could be possible, but i am not definetly sure about that. Maybe you can give me some input about that.


You can not connect a solar panel just like that. There is a voltage regulator at the output of the power bank to get 5V out of the some number of Li-Ion cells and you can not charge the power bank backwards through the output. You must charge Li-Ion cells directly, that is why there is a separate input used for charging the battery pack. If you want to have a battery backup for NodeMCU you have to use a charging board and a MOSFET to switch off the battery output whenever the battery is being charged. The charger must supply enough power for both charging the battery and supplying NodeMCU.

When there isn't voltage at the charger (and NodeMCU) input, MOSFET should switch on the output from the battery and you have to use a diode (in a similar way you used it in your schematics) to prevent beckfeeding when working on battery. It should be Schottky diode with low forward voltage.

  • Thanks for the info :) Well i am sad about that, but it sounds plausible indeed. – Thomas Richter Dec 12 '16 at 11:30
  • You're welcome :-) You can search for Microchip's document an1149 (Designing A Li-Ion Battery Charger and Load Sharing System) to get an idea how to use the p-MOSFET and Schottky diode to make battery backup with one 18650. Just replace the MCP chip with cheap 1A Li-Ion charging board and put 5V step-up (boost) board from eBay between that circuit and NodeMCU and that's it. Both boards are very small and you can buy them for about $1 each. – Chupo_cro Dec 12 '16 at 11:48
  • Sounds great. Thanks for your help! – Thomas Richter Dec 12 '16 at 12:07
  • The internal wiring varies from case to case. Most power banks have a separate connector for input and output as in this picture. If you can use the same input/output to charge/use the power bank then it already has some internal circuitry similar to the circuit desciribed in an1149. If you can use the same connector for charging and powering some other device, then your connection will work - as that is NodeMCU in parallel with the power bank. But not many power banks are made that way. – Chupo_cro Dec 12 '16 at 12:12
  • Yes i guess your approach is the simplest one :) Thanks you helped me a lot! – Thomas Richter Dec 12 '16 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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