Estimated Power Profile Visualization Tool

You could also do it in LTspice. It’s free, and ASCII input in the design files, so you could add a script if needed to insert values into the LTSpice design file from another program (like Excel)

You could just add a lot of current pulse generators and fill in to those generators from the external files. A lot, since then you do not need to alter the schematics, just fill 0 in those not used

I’m pretty sure that ST’s STM32CubeMX has a tool like this built into its IDE. I played around with it recently when I setup a project but I didnt have any low power requirements, so I didn’t dive too deep. Obviously only useful for STM32 devices.

I could only find this video online which looks like an older version.

https://youtu.be/NHgm7dBorRY

Like piecewise linear? That’s an interesting idea. That could handle more complicated sequences for a single sensor:

  • 1ms, 1uA #wakeup
  • 2ms, 5uA #start sample
  • 10ms, 5uA #wait
  • 10us, 6uA #read value
  • [inactive], 0.5uA

Yes, that kind of thing, but with a configuration language that allows for adding more devices.

Better to use a VSRC and Vpulse, that way you get infinite pulses and steady state contributions. Actually the VSRC could be piecewise liniear, so you can take account for very slowly moving values (like wearout, increased leakage over time)

I’ve started a requirements gathering document for this idea. Anyone who’s interested or has ideas they want to share, please feel free to edit (it should be open for anyone to edit). I’ve tried to summarise what’s been mentioned in the thread here, and I have some ideas for how to do the software side of things, but it’s quite rough.

1 Like

I wonder too:

Time related cadences:
Many devices are used by people, this means they don’t run at steady duty cycles, instead the run at different prescribed duty cycles at different times of the day and days of the week.

Example:
A soap dispenser in an office building

Mon-Friday
12am-8am - 10 load events per hour
8am-11am - 30 Load events per hour
11am - 1pm - 100 load events per hour
1pm-5pm - 30 load events per hour
5pm-12am - 5 load events per hour

Sat & Sunday:
All day - 5 load events per hour

Yes you could integrate this into a single number but I like the idea of a tool doing it for me, makes it easier for revision control.

Another aspect is potentially adding randomness/tolerence to the sim, yes it reverts to the mean in a nominal sense but how to calculate the min/max battery life?

The estimate is only as accurate as your model. That is true no matter what tool you use. It is not real until you confirm the model parameters with actual measurements an realistic operating scenarios. The usage scenario is also very elusive. It is usually an average that has wide variations. Things like the operating temperature and pulsed load performance of the battery are often missed. A detailed model is quite complicated. For me, most of the time, the accuracy is not worth the effort required to generate a super detailed model. With all the variability, what accuracy can you achieve? So, I do a my best model in the allotted task time and the de-rate it by 25-50%.

I like the spreadsheet approach. It is much more intuitive to me. The capability to create custom graphs and calculations nice for enhancing understanding and optimizing the system design. Spreadsheets are much easier to explain to non-Spice users. Spice could be useful for estimating loads and timing on some things.

Make sure you allow for very infrequent events such as commissioning or an on over the air upgrade for a wireless device. That could be specified as x events per lifetime.

2 Likes

Just read the Google Doc. Oh, you’re a professional, and you’re taking this seriously! I’m excited!
I made only one comment because the requirements that are most useful to me may not be the same as for other folks.

Half seriously, for now. I think it would be an interesting and potentially useful thing to do, but I need to finish off one or two other projects before I start on this. Once I get started I’ll try to put a simple prototype together quickly so there’s something concrete to discuss.

1 Like

I’ve done lots of scientific modelling and simulation in the past, and you’re 100% right that validation against reality is critical with any kind of modelling. I think the main utility of tools like the one we’re proposing is for comparison between scenarios and as a communication tool. Your model might only give you quite inaccurate absolute results, but it can at least give you some idea of how much design changes might cost you. And those things, if they’re presented in a simple enough way, can be useful for communicating with non-technical (or just less technical) people.

1 Like

This was something I wanted to ask about. Do people do Monte Carlo simulations for these kinds of things? Knowing your maximum power consumption in an “everything on 100% duty cycle” situation is useful, but it’s also useful to get an idea of the distribution of power consumption values in scenarios that are likely in real operation. If there are multiple different processes that could be going on at the same time, one way to do that is to use a statistical model of event occurrence (which might be as simple as a Poisson process with a given event rate) to get an idea of how often events co-occur and the impact they have on power consumption.

I guess the answer to that depends a lot on the application, but was that the sort of thing you were thinking about in terms of randomness in simulations?

I have done simulated power analysis using python models, and it can help you better understand more complicated systems and interactions. For simple IoT sensor-style products, just building it can be a better path. Creating ever more complicated models is often a game of diminishing returns.


Regarding JSON, I would not recommend it for a user-facing configuration script, unless you go with something like JSON5. YAML, TOML, and a domain-specific language (I typically use executable Python, security cautions apply) are other options.


@ian Not sure where you see this going, but Joulescope could be a sponsor. Not a huge budget, but could at least be something.

I also am very interested in adding battery modeling to the Joulescope UI. We haven’t gotten around to this yet.

I’ll try to get some sort of prototype together that we can kick around and decide whether it’s worth doing something more extensive. Won’t happen very quickly, because I need to close out a couple of current projects before I start seriously on something new, but I’d hope to get started on it in the next 2-3 weeks.

(Also, thanks for the pointer to JSON5. I’d not seen that before.)

I’ve only seen this done for static current draw, and then only when the datasheet mins and maxes stacked too high.