Power Budgeting - am I on the right track? - Page 1
Forum section: electronics / beginners

author: NanoHawk
author_rank: Contributor
timestamp: June 26, 2020, 02:44:43 am
content: I am at the beginning stage of designing an IOT device. I'd like some feedback on if I'm doing my calculations correctly.I will be using one of a couple variations of a NodeMCU type device based on the ESP8266 series of devices. It will have a sensor payload connected and report back data once per hour. I plan to have it sleep for 55 minutes between reporting sessions to optimize power consumption.Ideally, I want to power this with a single 18650. I see this feeding a boost converter to get to 5v and then picking an acceptable voltage regulator to get back down to 3.3v so that I have 5v and 3.3v available. A single 18650 keeps the project smaller, the component count lower, and any product less expensive. One thing I learned in past projects is that you have to relentlessly drive down costs and that starts with design choices.I'm starting with trying to estimate my power consumption. Past projects have been powered by mains voltage, so I didn't think much about power consumption on my embedded devices. Ignoring the wild claims of various battery sellers, I think I can reliably get 2500 mah cells and that I should be able to regularly use half of that, or 1250mah.The datasheet claims 1.1ma in deep sleep mode, but I think this is bound to be higher, so I'm budgeting 25ma at all times, which works out to 22 hours per day.The datasheet also claims 70 to 100ma in various situations for run current. So I'm going to budget for 250ma. I don't know what my power management or sensors will draw. I have not gotten that far yet. I don't expect them to draw much power. The device will run for 5 minutes per hour which aggregates to 2 hours of run time per day.So that gives me 55mah of base load per day and 1050 mah of run load per day. (.025A * 22 hours + .25A*2 hours)This sums to approximately 1100 mah which suggests that it should be feasible if power consumption is what I'm estimating or less.Here is where I'd like feedback:1) Am I making any mistakes in my power calculations?2) Is my assumption of power availability valid for 18650 cells?

author: bdunham7
author_rank: Super Contributor
timestamp: June 26, 2020, 04:06:34 am
content: 1) your math is OK, but you don't have actual measurements and not all of your devices are included. Datasheets and SWAG estimates can be a sort of starting point, but you need to tighten those numbers up as soon as you can to avoid problems later.2) yes, you are being quite conservative.Two question leap to mind: Do you really need a 5 volt line? Do you really need a 5 minute run time to report your data? Being overly conservative may lead to a future criticism that your product underperforms relative to the competition. Similar devices may run a week or more per charge instead of one day It isn't just cost issues that are relentless.Can you tell us what sort sensor payload or what, generally, is it reporting?

author: NanoHawk
author_rank: Contributor
timestamp: June 26, 2020, 12:40:23 pm
content: Thank you for the feedback.Right now I'm just designing the core module with the idea that various sensor payloads can be attached. The first application is monitoring beehives. So it will be a load cell, a temperature / humidity probe, and I've had a couple of people ask about GPS, although that's a different animal entirely so it's out of scope right now.The initial variation is wifi only (Node MCU 1.1) but I've identified the LilyGo T-Call as a suitable GSM/GPRS option for cellular data using Hologram.IO for inexpensive coverage.In an ideal world I'd roll my own, but the reality is I can't build the modules for as cheap as NodeMCU and LilyGo do. I have contemplated just buying the Espressif modules and seating them on my own board to conserve space.There are products on the market that do this, they are just crazy expensive and I think I can build a better mousetrap. Eventually I want to be able to offer a solar option which is why I'm focusing on power management from the get go. My calculation there is that 4 hours of sunlight needs to be able to recharge the battery. The big dilemna is how much bad weather do I need to be able to endure with battery capacity? I'll probably make that call when I'm a little further down the road and have some real numbers to plug back into the equation. It's also likely that it may not take 5 minutes per hour to do the work, in which case consumption could go down further.

author: Psi
author_rank: Super Contributor
timestamp: June 26, 2020, 12:44:52 pm
content: I find it easier to work in "milli-amp milli-seconds" or "micro-amp milli-seconds" instead of the normal "milliamp hours"Then put it into excel and you can add things up for daily usage. 10ms of this current. 4000 seconds of that current...Then convert back at the end to work out battery life

author: Kasper
author_rank: Frequent Contributor
timestamp: June 26, 2020, 03:23:46 pm
content: If you haven't already done this, check out randomnerdtutorials. Best ESP resource on the web.https://randomnerdtutorials.com/esp8266-deep-sleep-with-arduino-ide/I have not confirmed this but that says ESP8266 can get down to 20uA. You have to be careful about other parts, particularly the quiescent current of your boost regulator and maybe the LDO also though SMPS seem to in general be worse than LDOs for that. I would just use LDO and try to work with only 3.3V or 3.0V. If you add 5V parts then you probably need a level shifter too. Is it worth adding a 5V boost and a level shifter just in case? Maybe plan to add 5V boost and level shifter as expansion with whatever 5V parts you add.ESP32 and the new ESP32-S2 are also options worth considering. I'm a big fan of the ESP32-WROOM32 modules but the new S2 looks good too.For tracking, particle has some neat options and offer sim cards with low data plans for $3/month, or atleast they did last time I checked, a few years ago. The new ESP32-S2 has a distance sensing feature that might save you from needing GPS.Another thing to check out is the ESP32-cam. That would hurt your power budget but it would be cool to make time lapse video of bee hive construction.

author: NanoHawk
author_rank: Contributor
timestamp: June 27, 2020, 02:42:43 am
content: I feel silly for asking, but what is an LDO and a SMPS?A camera would wreck more than my power budget... it would be a monster for data.Hologram has a base plan of $1 / mo for 1MB of data. That is a lot of data if you manage your I/O properly and minimize chatty network activity.My prior project had a version that relied on the ATTiny85. I'm a big fan of designing for what you need as it generally has cost benefits.The ESP286-MOD is what's in my NodeMCU unit. I'm seriously considering just buying an ESP-07S or ESP-12F and reflowing it onto the board. What I like about that is that it reduces board size and gives me more control over what is on the board. There are some general purpose things on the NodeMCU that I don't need ... anyhow... it does have the USB interface which is nice.For now, I'm just going to use a few off the shelf units for prototyping and proof of concept. Once I have it working on the bench I'll get deeper into rev .1I'm also fleeing Eagle. I've been most unhappy with Autodesk for acquiring Eagle and essentially destroying my license. I tried using the new version and found it to have some improvements and a host of Fusion360 like irritations. I felt like if I had to relearn a tool it was time to change. I really have disliked Fusion 360 for a long time. It's just a bad interface and the workflow for 3D printing is nasty. Things don't come out right from F360 and they do from other sources.I really like Altium Circuit Studio (Designer is a bit rich for my budget), but decided to give KiCad the honor. Free is a very attractive price and if I'm doing Open Source Hardware with an Open Source Framework (Arduino) then I should probably design it on similar software. So that slows me down as I muddle through learning KiCad.If I fail out of KiCad then I'll move to Circuit Studio. So far I like what I see on KiCad and there is lots of tutorial and documentation for it. The library piece seems a bit cumbersome. I half expect it to ask me to insert a 5.25 Single Sided, Single Density diskette to load parts.I did do one test board already in KiCad. I built a simple PCB that has female pin headers to receive the NodeMCU and adjacent male pins to go onto a breadboard. I really don't need this item, but I wanted to validate that I can design a PCB based off measurements and get a workable unit back from OSHPark. That validates the tool chain to create PCB's before I get into doing alot of layout and custom parts. My experience with Eagle is that I wound up drawing many of my components. Probably has to do with where I get them.I probably should source from Mouser, DigiKey, Newark, etc... but when I can I order stuff from Tayda, eBay, and AliExpress. I like Mouser the best, but their prices are high enough that I wonder if they are buying it on eBay and reselling it sometimes. So as long as the spec is conservative I'm fine with using Tayda's relays.... example a 250v 10A relay is safe to use for switching 2A @ 125VAC in my view.

author: bdunham7
author_rank: Super Contributor
timestamp: June 27, 2020, 02:50:23 am
content: LDO = Low Drop Out, as in LDO voltage regulator, one that can continue to operate with a much smaller difference between Vin and Vout. Some, perhaps most, LDO regulators will default to a straight pass-thru as the voltage drops below the minimum until some shut-off voltage is reached. This may extend the operating time of your battery powered device and was why I was asking if you really needed a 5 volt line.SMPS = Switch Mode Power Supply

author: NanoHawk
author_rank: Contributor
timestamp: June 27, 2020, 03:24:17 am
content: Yea, I pretty much have concluded that I need to use a Boost switching power supply to take the input from a single 18650 and boost it to 5v. I expect to need 5v for sensors and the chips that read them like the load cell op-amp for weight.From there the ESP8266 itself is a 3.3v device... so I can either use an inexpensive 7803 (or similar) or parallel a buck/boost device to produce 3.3v which is probably the more efficient solution. It just becomes a lesser of the available evils question regarding how to facilitate the needed power.If it turns out I can keep everything 3.3v then I still need to find an inexpensive buck/boost switching regulator.

author: bdunham7
author_rank: Super Contributor
timestamp: June 27, 2020, 05:26:33 am
content: Quote from: NanoHawk on June 27, 2020, 03:24:17 amYou might want to read this recent discussion:https://www.eevblog.com/forum/renewable-energy/concept-for-low-current-battery-solution-1ma-3v3/msg3089388/#msg3089388You might also want to look up the TPS7A05 LDO regulator and see what it is about. You probably don't need to boost the Li-ion battery output for the 3.3V line.

author: Kasper
author_rank: Frequent Contributor
timestamp: June 27, 2020, 06:17:09 am
content: USB is a nice add-on for the ESPs specially at low quantity when cost and size dont matter so much.I like the attiny85. I made a 1 sq. in. lipo charger and power switch with it. It has a neat feature where you can measure Vcc voltage without wasting any pins. You set Vcc as ADC max and set internal reference voltage as ADC input. Handy for keeping track of battery voltage, assuming you aren't using a regulator.For time lapse video, you could store on micro SD card and download it all after hive is built.I use circuit studio mostly. Have used KiCAD a bit. I prefer circuit studio but I think I'll end up on KiCAD eventually as it improves over time and circuit studios bugs and blocked features become more and more apparent over time. I really like how easy it is to bulk edit the BOM in KiCAD. For 3D, I use FreeCAD. Don't have much to compare it to but I like it.