#400 The Best Power Source for ESP32/ ESP8266 Projects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
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
Info
Channel: Andreas Spiess
Views: 40,915
Rating: undefined out of 5
Keywords: AliExpress, arduino, arduino project, beginners, BJT, diy, do-it-yourself, eevblog, electronics, esp32, esp32 datasheet, esp32 project, esp32 tutorial, esp8266, esp8266 project, FET, FET tutorial, Field Effect Transistor, greatscott, guide, hack, hobby, how to, iot, lora, lorawan, n-channel, nodemcu, npn, p-channel, pnp, project, simple, smart home, ttgo, tutorial, wemos, wifi, Raspberry Pi, Zoom, Microsoft, Teams, Home Assistant, Aliexpress, Amazon, Banggood, power, TP4056, Solar
Id: FrCgQgahzsI
Channel Id: undefined
Length: 14min 29sec (869 seconds)
Published: Sun Sep 05 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.