DynamicDevices / mitems

My Items - LoRa based inventory control system
1 stars 0 forks source link

Powering issues and estimations #3

Open goatchurchprime opened 5 years ago

goatchurchprime commented 5 years ago

Aiming for a 150mAh battery, which gives 3hrs of operation at high power, but 2 years at 10 microAmps. Does the battery control circuit become significant then?

What wiring pins should it take to get past the regulators?

How do we recharge the battery? (when the microUSB is not accessible)

How does the device measure its battery use?

A final board would have its battery regulator on the board, connected to a bare lipo, and this may have the information on battery use known to it.

In the meantime, the device should estimate its cycle time and up time in order to calibrate its battery use. A fast frequent cycle that runs it down in less than a day should get estimates pretty quickly.

We should have a mode that operates on a frequent wakeup cycle (of long durations) to be able to make estimation experiments automatically and pretty quickly in order to know the variability (a) per battery, (b) per microcontroller board, (c) at different temperatures, (d) after storage.

ajlennon commented 5 years ago

The way I usually visualise the sleep/wake cycle is something like this.

sleepwakecycle

So the cycle is

Deep Sleep / Low Power

Over long periods (months/years) of time the quiescent currrent consumption becomes important. To deal with this we need to look at

Most notably we don't need a battery charging circuit for our design and we don't need a USB<->serial bridge on board for production units. This also impacts cost.

Other considerations are that early TTGO variants have external flash which can't be turned off. The upcoming Wifi Stick in #6 apparently uses an ESP32 variant which addresses this

Runtime

Radio On Time

Guesstimates

I've put some finger in the air figures in here

What I'd normally do is put a spreadsheet together based on the above model which allows us to play with consumptions and timings to give an overall power budget and thus device lifetime

ajlennon commented 5 years ago

How do we recharge the battery? (when the microUSB is not accessible)

We aren't intending to recharge the battery in a production device are we?

ajlennon commented 5 years ago

Useful tips -

http://iot-bits.com/ultra-low-power-design-esp32-10-tips/

ajlennon commented 5 years ago

ULP power here

Scenarios Power consumption
Deep-sleep 6 μA
Delay Nop 1.4 mA
GPIO Toggle 1.4 mA
SAR_ADC Sampling 2.3 mA

https://github.com/espressif/esp-iot-solution/blob/master/documents/low_power_solution/esp32_ulp_co-processor_and_assembly_environment_setup_en.md

ajlennon commented 5 years ago

TI Notes on how pins should be configured

When configuring a pin as GPIO, the recommendations for obtaining the lowest power consumption are the following:

  • If a pin is not connected to anything If pin does have an internal (IPU/IPD) resistor Either: You can set the pin as an output and drive it in the same direction as the internal pull resistor or You can leave the GPIO configured as an input if there is an IPU/IPD. If pin does not have an internal (IPU/IPD) resistor. The pin can be driven either high or low.
  • If a pin is connected to an external pull resistor Set the pin as an output and drive it in the same direction as the external pull resistor.
  • If a pin is connected to an external driver If pin does have an internal (IPU/IPD) resistor. Ideally, set the external driver to drive the bus in the same direction as the internal pull resistor on the device pin that it is connected to. If pin does not have an internal (IPU/IPD) resistor. Prevent external driver from toggling the value of this pin Pin can be externally driven either high or low.
  • If a pin is connected to an external receiver. If pin does not have an internal (IPU/IPD) resistor. Set the device pin as an output and the pin can be driven either high or low. If pin does have an internal (IPU/IPD) resistor. Drive the pin in the same direction as the internal pull resistor.

http://processors.wiki.ti.com/index.php/General_Guidelines_for_Reducing_I/O_Power_Consumption