Mads Chr. Olesen Offers a "Quick and Dirty" Guide to Battery-Powered Wemos LOLIN D1 Mini Projects

Complete with a runtime calculator, this guide will get your Wemos LOLIN D1 Mini projects portable in no time at all.

ghalfacree
almost 3 years ago β€’ HW101 / Internet of Things

Developer Mads Chr. Olesen has written a guide to anyone looking to take a Wemos LOLIN D1 Mini project off the bench and out into the field, providing a quick reference to connecting a lithium-ion battery and using its sleep functionality β€” and even a calculator for working out the runtime per charge.

"The Wemos D1 Mini is an ESP8266 based prototyping board with WiFi connectivity and countless applications. It becomes even more useful in battery-powered applications, where with the proper setup, it can run low-powered for months at a time β€” or only hours if done incorrectly," Olesen explains. "This is the quick and dirty guide to running a Wemos D1 Mini powered by Lithium-Ion batteries. We will be blatantly ignoring several design specifications, so double check everything before using in a critical project."

Anyone looking to make a Wemos LOLIN D1 Mini project portable could do worse than follow this handy guide. (πŸ“·: Mads Chr. Olesen)

In the guide, Olesen makes a few key recommendations β€” including figuring out whether your need your device to sleep and wake up on a timer, an external trigger, or to remain connected to the network at all times, and picking the right power source. "[You need a] TP4056 module with 'discharge protection', most modules with more than one chip [have] this, but be careful! What you don’t want is anything resembling a power bank or battery shield with a regulated output (5V or 3V). These are practically useless, simply a more expensive battery holder!"

Explaining that off-the-shelf power banks and batteries shields are often poorly built and have a high quiescent current from the use of switch-mode power supplies, Olesen recommends instead connecting the lithium-ion battery of your choice, like an 18650 cell, to the TP4056 charge controller β€” and then on to the LOLIN D1 Mini, which should be wired for an external device as an interrupt to wake it from sleep or have two pins shorted to wake from its internal timer.

The page includes a calculator with adjustable variables to estimate battery life. (πŸ“·: Mads Chr. Olesen)

In addition to a wiring diagram and code examples for the two wake-up modes, Olesen has also added a handy tool into the guide: a calculator to estimate how long the LOLIN D1 Mini can run from a given battery. "Of course the consumption can be brought even lower," Olesen notes. "Some chips are unused but partly connected and will have some leakage (LEDs, [the] USB chip on the Wemos). Making it even leaner is outside the scope of quick and dirty."

The full guide is available on Olesen's website. Those looking to follow it, however, should heed the warning: "Lithium-ion batteries always command healthy respect, due to the energy they store," Olesen writes. "Do not use bad cells, and do not leave batteries unattended in places where a fire can develop, especially while charging. That being said, the setup given here should be as safe as most other lithium-ion battery projects."

ghalfacree

Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.

Latest Articles