#400 The Best Power Source for ESP32/ ESP8266 Projects
Summary
TLDRThis video script offers a comprehensive guide for powering small projects with a focus on 3.3-volt microcontrollers like the ESP32. The presenter discusses five common use cases: mains-powered devices, solar-powered devices, battery-operated continuous usage, devices running 24/7 with periodic wake-ups, and event-triggered devices. Solutions include USB power for mains, solar panels with battery backup for outdoor use, and various battery options for portable and low-power applications. The script also addresses design considerations, such as power regulators, deep sleep modes, and non-volatile memory for data retention. A decision tree is provided to help viewers choose the best power solution for their specific project needs.
Takeaways
- 🔌 The video discusses powering small projects with a focus on 3.3-volt microcontrollers (MCUs), using the ESP32 as an example.
- 🛠️ There's no one-size-fits-all power solution, so the video presents different strategies for five common use cases.
- 🏠 For mains-powered devices, the author recommends using standard USB or 5-volt powered development boards and a USB power brick for compact setups.
- 🌞 Solar power is suggested for outdoor applications, with small solar panels and a 3.7-volt battery to store energy, along with a 3.3-volt regulator for the MCU.
- 🔋 Portable battery-operated devices for short operations can use boards with built-in displays and GPS, like the TTGO boards, which are favored for their compactness and features.
- 🕒 Devices that run 24/7 and wake up periodically should focus on low power consumption, often using replaceable batteries due to the simplicity and longevity.
- 🛑 For devices triggered by events and working in short moments, two approaches are presented: deep sleep mode or complete shutdown with a mechanical switch.
- 🔋 The video mentions the use of LiFePO4 batteries as a good alternative to Li-ion batteries for low power consumption devices due to their chemistry and availability.
- 📶 The author advises caution with different versions of development boards, especially regarding pinouts and power requirements, to avoid compatibility issues.
- 🛠️ Additional circuitry may be needed for mechanical switch-based devices to ensure reliable operation and message transmission.
- 🔄 The importance of using non-volatile memory or EEPROM for storing data in devices that completely power off is highlighted to prevent data loss.
Q & A
What are the five most popular use cases for powering small projects mentioned in the script?
-The five use cases are: 1) Devices powered by mains; 2) Solar-powered devices; 3) Battery-operated devices for continuous usage with short operations; 4) Battery-operated devices that run 24/7 and wake up regularly; 5) Devices that monitor an event and work for short moments.
Why does the script focus on 3.3 volts for powering MCUs and sensors?
-The script focuses on 3.3 volts because most current MCUs and sensors work on this voltage, and it uses the ESP32 as an example for the concepts.
What is the recommended power supply for mains-powered devices in the script?
-For mains-powered devices, the script recommends using cheap standard USB or 5-volt powered development boards and a USB power brick for power.
How does the script suggest dealing with power outages for mains-powered devices?
-For dealing with power outages, the script suggests using battery-operated ports tested in a previous video, which have the needed circuitry to charge a Li-ion battery and can survive power outages for many hours.
What type of solar panel and battery combination is suggested for outdoor applications in the script?
-For outdoor applications, the script suggests using a 5.5 or 6-volt solar panel with a TP-4056 Li-ion charger and a power path to charge a 3.7-volt battery.
Why is a 3.3-volt regulator needed when using a 4.2-volt maximum battery with a 3.3-volt MCU?
-A 3.3-volt regulator is needed to step down the battery voltage because most 3.3-volt MCUs are not rated up to the 4.2 volts maximum of those batteries.
What is the preferred method for powering portable devices used for short operations like weather balloon receivers?
-The preferred method is using TTGO boards with a built-in display and, if needed, an SMA connector for antenna connection.
How does the script suggest optimizing battery life for devices that run 24/7 and wake up periodically?
-The script suggests omitting a built-in charging circuit and using replaceable batteries, as replacing batteries annually is often easier than recharging remote devices.
What is the advantage of using mechanical switches for devices that are triggered externally, like a mailbox notifier?
-Mechanical switches allow the device to be completely off and not consume current when not triggered, which is excellent for situations where triggers are infrequent.
How can data be retained when the MCU is switched off in devices that use mechanical switches?
-Data can be retained by storing it in non-volatile memory or EEPROM before the MCU is switched off, although this method has a limited number of write cycles.
What is the purpose of the flow diagram provided at the end of the script?
-The flow diagram is intended to help users decide the best power solution for their projects by answering a series of questions related to their specific use case.
Outlines
🔌 Powering Small Projects with Various Use Cases
The speaker introduces a video focused on powering small projects, highlighting a curated list of solutions for five common use cases. The video aims to guide viewers on choosing and building power solutions for their projects. The presenter, known for his Swiss accent, emphasizes the importance of focusing on different use cases rather than a one-size-fits-all approach. The discussion primarily revolves around 3.3-volt microcontrollers (MCUs), using the ESP32 as an example. The speaker also mentions the importance of subscribing to the channel for regular updates on sensors and microcontrollers.
🌞 Solar and Battery Power Solutions for Outdoor Devices
This paragraph delves into the specifics of powering outdoor devices, such as solar-powered light sensors. The speaker recommends small and affordable solar panels paired with a battery to provide continuous power even when sunlight is not available. A 5.5 or 6-volt solar panel is suggested, along with a TP-4056 Li-ion charger and a power path management circuit. For voltage regulation, a 3.3-volt regulator is necessary due to the maximum voltage of 4.2 volts of the battery, which is higher than the voltage rating of most 3.3-volt MCUs. The use of a PCB with an HT7333 regulator and capacitors is recommended for minimal power consumption during deep sleep. Programming is facilitated through a USB-to-serial adapter with a 3.3-volt feature, and the speaker advises caution when using standard battery-operated boards due to voltage limitations.
🔋 Options for Battery-Operated Devices with Continuous and Event-Based Usage
The speaker discusses two types of battery-operated devices: those used for continuous operations and those that operate on event triggers. For continuous usage, the focus is on minimizing power consumption, with the speaker suggesting the use of replaceable batteries due to the ease of replacing over recharging, especially for devices that run for extended periods. For event-based devices, two approaches are presented: keeping the MCU in deep sleep mode to conserve power or completely switching off the device with a mechanical switch. The latter is advantageous for infrequent triggers as it eliminates power consumption when not in use. The speaker also addresses the challenge of ensuring that a mechanical switch provides sufficient power to transmit a message and proposes a solution involving additional circuitry with FETs. Lastly, the importance of storing data in non-volatile memory before the MCU is switched off is highlighted.
Mindmap
Keywords
💡Powering
💡ESP32
💡Mains Power
💡Solar Power
💡Battery-Operated Devices
💡3.3 Volt Regulator
💡Deep Sleep
💡Microcontroller Unit (MCU)
💡USB Power Brick
💡LiPo Battery
💡TTGO Boards
💡AXP192 Chip
💡Non-Volatile Memory
Highlights
Introduction to the video on powering small projects with a focus on 3.3-volt microcontrollers (MCUs) and sensors.
Discussion on the lack of a one-size-fits-all power supply and the importance of focusing on different use cases.
Explanation of the first use case: mains-powered devices, utilizing standard USB or 5-volt powered development boards.
Recommendation of a mini board for mains-powered projects due to its small size and availability of many pins.
Suggestion to use a cheap USB power brick or a compact 5-volt power supply for power in mains-powered projects.
Introduction to the second use case: solar-powered devices, emphasizing the use of small and cheap solar panels.
Recommendation of a 5.5 or 6-volt solar panel with a TP-4056 Li-ion charger for solar-powered projects.
The need for a 3.3-volt regulator between the battery and the MCU in solar-powered projects.
Use of a USB to serial adapter with a 3.3-volt feature for programming solar-powered projects.
Introduction to the third use case: battery-operated devices for continuous usage without sleep.
Recommendation of TTGO boards for portable devices due to their built-in display and compact size.
Explanation of the fourth use case: battery-operated devices that run 24/7 and wake up periodically.
Discussion on the benefits of using LiFePO4 batteries over Li-ion for low power consumption devices.
Introduction to the fifth use case: devices that monitor an event and only work for short moments.
Suggestion to use deep sleep mode or a mechanical switch for event-triggered devices to save power.
Recommendation of the TRIG board for extremely low current draw and periodic wake-ups.
Discussion on the use of non-volatile memory or EEPROM to store information before the MCU is switched off.
Conclusion emphasizing the importance of distinguishing use cases to determine the best power solution.
Call to action for viewers to comment with their use cases or better solutions for community learning.
Presentation of a simple flow diagram for decision making regarding power solutions for different use cases.
Transcripts
are you interested in my way of powering
small projects
after many discussions and evaluations i
created a favorite list with solutions
for the five most popular use cases
why did i choose them and how can you
build them
after the video you should have a
decision tree for your future projects
gritsy youtubers here is the guy with
the swiss accent with a new episode and
fresh ideas around sensors and
microcontrollers
remember if you subscribe you will
always sit in the first row
because most of the current mcu's and
sensors work on 3.3 volts i will
concentrate on this voltage and use the
esp32 as an example
however all concepts can be used for
other 3.3 volt mcus
unfortunately there is no
one-size-fits-all power supply this is
why i do what we always should do
i focus on different use cases
the first use case is about devices
powered by mains like this receiver for
my weather station or the bluetooth
receiver for my xiaomi body scale of
video number 307
number two
solar-powered devices like my light
sensor
number three battery-operated devices
for continuous usage like these tiny
receivers for weather balloons or this
lora tracker
both devices are only used for short
operations
use case number four battery-operated
devices that run 24 x 7 and regularly
wake up
like temperature and humidity sensors
number five
devices that monitor an event and only
work for short moments like this mailbox
notifier or this amazon dash button what
is my solution for the simplest use case
the mains powered devices
i use cheap standard usb or 5 volt
powered development boards because these
boards do not have to save energy for
this application
they also offer a usb connector for
programming and debugging
by the way this mini board is my current
favorite because it offers many pins and
is small
most of the time i solder the wires
directly onto the pcb without pin
headers
for power i usually use a cheap usb
power brick and
if i want everything in a single and
compact case i add such a small 5 volt
power supply right in the project case
as i did for this home automation
watchdog of video number 385
by the way you find all links to the
products i use in the video description
if you fear power outages i suggest
using one of those battery-operated
ports tested in video number 387
they all have the needed circuitry to
charge a lion battery
such boards will survive power outages
of many hours without problems
here my favorite has the same form
factor with additional battery circuitry
please pay attention to use either a
short or a quality usb cable otherwise
the esp32s can create brown outs because
of the cable loss
what about use case number two
it is mainly for outdoor applications
where we can use solar power
these days small and cheap solar panels
provide enough energy for a typical
project
of course we need a battery to bridge
times without sun
no not a tesla powerball just a small
single lion sill
in this scenario we do not have to save
every microampere i suggest using a 5.5
or 6 volt solar panel then we can use a
simple
tp-4056 lyon charger with a power path
as shown in video number 383 to charge a
3.7 volt battery
because the maximum voltage of those
batteries is 4.2 volts and most 3.3 volt
mcus are not rated up to this voltage we
have to add a 3.3 volt regulator between
the battery and the mcu
the best solution is to use such a pcb
with a bare module an ht7333
regulator and one or two capacitors as
suggested by the datasheet
these boards only consume microamperes
during deep sleep
for programming i use such a usb to
serial adapter make sure you have a
model with a 3.3 volt feature
you could also use standard battery
operated boards because the chips on
these sports should support up to 6.5
volts but again please consult the
diagram and the data sheets before you
try
by the way i usually remove all leds on
those boards because they just consume
power if deployed in a case
can you also use standard development
boards without the battery
yes but i suggest using an hd 7333
regulator and connect power to the 3.3
volt because the standard
ams-1117 regulators stop working at
about 4 volts
low dropout is only marketing in this
case keep in mind that these boards need
quite some power during deep sleep
because of the additional parts on the
board
next is use case number three portable
devices used for short operations like
the receiver to search for weather
balloons or mapping gateway coverage
they are battery operated and do not
sleep at all
here i love those ttgo boards because
they have a built-in display
you even get versions with the laura
chip on board then you can decide if you
want an sma connector mounted on the
board or connected via a pigtail
creating cases is easier for the version
with a pigtail however i prefer the sma
version
for all location-based applications the
t-beam is perfect it has a battery a gps
and a lora chip on board and is very
compact if you want to add an oled
display please pay attention to choose
the right one with the correct pin out
maybe you order it together with a board
then you know at least who is
responsible if it does not fit by the
way it uses the axp192
chip for powering
this is a very capable chip which also
has a built-in on off function for
example
the only pain in the butt for most tt go
boards is the different versions with
different pin outs
their naming is not at all intuitive and
you have to pay extreme attention to
find out which version you have and
which pin out you have to use
be also aware that they often do not use
standard pins for i square c
so you have to select the right board in
your ide otherwise the pin definitions
are wrong and your display will remain
black or your sensors will not work
at least they have all information
including diagrams published on github
i really hope they will learn something
and give their boards clear names and
print them on the boards it seems that
the newer ones at least have the
versions marked on the silk screen what
about use case number four which is also
battery operated but runs 24 times 7.
to get a decent battery life these
devices sleep most of the time and
periodically wake up
here every micro ampere counts because
it reduces battery life
after some iterations i concluded that
because these devices run for month or
even years on one battery omitting a
built-in charging circuit considerably
reduces the complexity of our design and
increases its autonomy
maybe you even use disposable batteries
instead of rechargeable ones
replacing batteries once a year is often
easier because charging a battery takes
much longer than just replace it
unfortunately i do not see a lot of
ready-made boards for this use case
maybe we will see a change in the future
the simplest version uses a live fipo 4
battery instead of a lighon battery and
connects it directly to a bare bone
module
because live f4 batteries have a maximum
voltage of 3.6 volts we do not need a
regulator and so we can avoid its losses
liveapo4 batteries became more popular
over the years and you get them in
various versions
i will show you the proper usage of such
batteries in a future video
to extend battery life even further you
can use the trig board which is
optimized for extremely low current draw
and offers periodic wake ups without
deep sleep
if you want to use disposable batteries
you have the choice of two or three aaa
or 3 volt
cr123a lithium cells
because the maximum voltage of 3 aaa
cells is more than 3.6 volts you need a
voltage regulator and with only two of
them your processor will stop working
before they are empty but they have a
lower sales discharge current
than rechargeable batteries and also do
not need a low voltage protector that
also consumes a few microamperes
deep sleep has two advantages the mcu
can wake up without an external trigger
and the rtc memory in the esp32 keeps
its information during deep sleep
other chips like the old atmel also keep
their data during deep sleep
what is left
a use case similar to the one just
discussed the main difference is that an
external source triggers it
good examples are this amazon dash clone
or this mailbox notifier maybe i will
show you my newest design in a future
video
here we have two possibilities we can
deep sleep the board and wake it up with
an external triggering pulse
or we switch it completely off with a
mechanical switch
if we use deep sleep the design
considerations are the same as in use
case number four because the mcu is
always on and most of the time in deep
sleep however if we can use a mechanical
switch we can get an additional
possibility we can switch the board
completely off and switch it on with a
mechanical switch
this has the advantage that it does not
consume current if not triggered
especially for situations we do not
expect many triggers per time this is an
excellent solution
a window sensor against burglars for
example will hopefully not trigger too
often or my mailbox notifier only
triggers twice a day once for my wife's
newspaper and once for the packets from
china for me
the rest of the time it is completely
switched off
one problem has to be solved for many
applications
if the mechanical switch is on too short
for transmitting a message we have to
add some additional circuitry
in video 101 i showed you a possibility
with only one p-channel fit
however it is not reliable because it
depends on the inner circuit of the mpu
this is why i propose to add a second
fit here is the diagram
these transistors are connected in
parallel to the mechanical switch and
are operated by a pin
as soon as the mechanical switch powers
the mcu it switches the n-channel fit on
now the gate of the p-channel fet is at
nearly zero volts and a parallel path
exists to power the mcu
when the switch is off the esp32 still
is powered through the p-channel fit
as soon as all tasks are done the mcu
switches itself off and waits for the
following mechanical trigger
if you use a to-220 and an smd fit you
can easily create such a small pcb
the threadboard also works for this use
case
and tobias built the microwave capper
for the same purpose
these boards also switch the mcu off and
therefore it loses all data
suppose you want to keep the information
store it in a non-volatile memory or
eeprom before the mcu is switched off
keep in mind that ee prompts wear out
and you probably cannot do this for more
than ten thousand times
but this is enough for my mailbox
notifier
did i forget your use case or do you
have better solutions
please comment and we will learn
together
i promised a simple flow diagram for
decision making here it is
just answer the questions and you will
get the use case and what solution i
propose
what do we have to remember
there is no one size fits all but if we
distinguish use cases we can determine
the best solution for each case
most current boards and projects use
lion batteries however liveapo 4
batteries often are the better choice
they become more and more available
devices with low power consumption do
not need an onboard charging circuit it
is often better to use replaceable
batteries for them because replacing a
battery every year is easier than
recharging remote devices
unfortunately we still do not find many
such devices on the market
the trick board and the microwave copper
are interesting boards for special cases
however they are not cheap
as always you find all the relevant
links in the description
i hope this video was useful or at least
interesting for you if true please
consider supporting the channel to
secure its future existence thank you
bye
Browse More Related Video
![](https://i.ytimg.com/vi/TGe69283Xzo/hq720.jpg)
Сонячні панелі на балконі – реально? | EcoFlow Delta 2 + Solar Panel + PowerStream
![](https://i.ytimg.com/vi/ZJwM1_WUFJM/hqdefault.jpg?sqp=-oaymwEXCJADEOABSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCdlkgTnuHsWpIqb7QZdxRNptrrUg)
solar energy option (Ncse)#jntuh #btech#semester
![](https://i.ytimg.com/vi/gKowmivUwEE/hqdefault.jpg?sqp=-oaymwEXCJADEOABSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBCQ2JsZY4yzOE5WoJ63NUAEjj6Iw)
Common Input Devices and LEDs in Laptops
![](https://i.ytimg.com/vi/-a3UxEx8_Xk/hq720.jpg)
Summer Fun or Work - This Battery Has Something Special...
![](https://i.ytimg.com/vi/rWihYOz1Qwg/hqdefault.jpg?sqp=-oaymwEXCJADEOABSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBDllL9lesyG-Bl9_UgX4VBgcs-Rg)
GM Launches Home Energy Ecosystem! Full Tour - EV Charging, Bidirectional Power, & Battery Storage
![](https://i.ytimg.com/vi/uHEPBzYick0/hq720.jpg)
Microsoft vs. Apple: Satya Nadella Says AI-Focused Copilot+ PCs Beat Macs | WSJ
5.0 / 5 (0 votes)