In this article we discuss about powering small devices that need to be autonomous for years with a case study on a real application.

###Requirements
There are more and more often the need for a small, very low power device to be self powered with a long lasting energy source. For remote sensors, IoT devices, beacons or similar, the maintenance could be very expensive or even impossible because they are sealed or placed in a difficult to reach location, meaning that they have to be autonomous for a long time, even several years.

In order to achieve this goal there are three actions that can be performed:

* Get energy from the environment (Energy Harvesting)
* Reduce power consumption
* Optimize energy source

## Energy Harvesting
Let’s skip this first topic for now, it’s an huge argument which deserves to be focused in a dedicated article series.

## Power consumption
The components developers are implementing more and more advanced techniques to reduce power needs from their products. Talking about **M**icro **C**ontroller **U**nits, you can reduce dinamically the clock frequency when less computational power is required, switch off peripherals and/or sections of the **MCU** if not needed (**Power Domains**), putting the MCU itself in a status which represents the best compromise between consumption and responsiveness for your application.

In this case study we are using a devices developed exactly with this concepts in mind: @article=’yarm’

It uses [ATMEL SAM L21](http://www.atmel.com/products/microcontrollers/arm/sam-l.aspx) one of the less energy hungry, though powerful, 32 bit MCU

Here there are some explanations of the power reducing techniques applicable for this MCUs family

* [ Low Power Features of SAM L Series Devices](http://www.atmel.com/Images/Atmel-42412-Low-Power-Features-of-SAM-L-Series-Devices_ApplicationNote_AT04296.pdf)
* [ Ultra Low Power Techniques](http://www.atmel.com/images/atmel-42411-ultra-low-power-techniques-at06549_application-note.pdf)
* [ Power-Reducing Features](http://www.atmel.com/images/Turn_Power-Reducing_Features_into_Low-Power_Systems.pdf)

Of course also sections of the circuit in addition to the MCU must be carefully power optimized and switched off when not needed. Eg.: the supply of those sections can be driven with a mosfet through an I/O pin of the MCU enabling other power domains to control.

After reducing the power consumption, we have to optimize the regulators used to adapt the input power to the devices needs. There is no choice, to save energy a **switching regulator** must be used; but not all the existing buck or boost regulators are optimized to have a good efficiency in low power conditions and a **quiescent current** compatible with our long lasting needs. We must, infact, keep in mind that most of the time the MCU will be in a more or less deeper sleep mode, where it consumes less than the quiescent corrent of many “normal” switching regulators. Even when the MCU is running, the absorbed current value falls in a bad zone of the **efficiency curve** for standard regulators. The [Texas Ultra-low-power Step-Down Buck DCDC Converter TPS62740](http://www.ti.com/product/TPS62740) can supply up to 300mA with a quiescent current of 360nA, meaning that it can be left on forever without draining significant current from the external supply. It has also interesting further features for the low power devices development, an efficiency up to 90% at very low output current, a secondary switchable output to create a second power domain and the output voltage selectable by software. These last two features are very useful in our specific application and will be detailed below in the circuit description.

##Energy source
There are many different chemistry used for the batteries. Each one of them exists for its specific feature that fits the specific need. In our case we need a battery with a good energy density

But, first of all, we need batteries with a very low self discharge rate. This automatically excludes secondary (rechargeable) batteries.

Among **primary** (not rechargeable) batteries there is a good choice range. The **Lithium-thionyl chloride** (or **LTC,** or **Li-SOCl2**) batteries fit most of the requirements for an autonomous device

The **less than 1%/year self-discharge rate** and a **up to 15 years and more shelf life and operational life** assign to them the first place in our ranking.

Also the stable cell voltage during the discharge is a good feature in order to drain all the energy from the source

This kind of technology is stable and wide spread among many producers, allowing a good choice for price, availability, capacity, different sizes and contacts type.

A list of features descriptions for some producers

* [Maxell](./ER_15e.pdf)
* [Varta](http://www.varta-microbattery.com/applications/mb_data/documents/sales_literature_varta/handbook_primary_lithium_cylindrical_series_er_en.pdf)
* [Tadiran](http://www.tadiranbat.com/assets/tl-4903.pdf)
* [Saft]
* [Information sheet](./LiSOCl2.pdf)
* [LS14500](./LS14500.pdf)
* [Selector guide](./Selector-guide_2016-54083-2-0516_BD.pdf)

_______

As often happens there is a drawback for this apparently perfect battery: to drain all the theoretical energy from this kind of primary source we must get a low amount of current from them. Also if the maximum admitted current drain is some dozens of mA, we cannot get more than few mA to guarantee a good performance. The graphic below shows how the performance is related to the current absorption.

Let’s study a solution to solve this issue. In an application such the one we are discussing on, the system needs to work just some times a day, for a short period, than it sleeps for a long time. Let’s say the MCU wakes it up eight times a day, enables the sensors to read the environment parameters, switch them off again, transmit the computed data to the central system with some kind of wireless system, and go to sleep again. All this can be hypothesized in a consumption of 30mA for a 30″ period every 3h and an overall leakage of 10μA for the rest of the day.

All of that leads to the use of a capacitor. Luckily the currently available **supercapacitors** design have bypassed all the main issues they have had in the past: high **E**quivalent **S**eries **R**esistance and high **D**irect **C**urrent **L**eakage.
[AVX](http://www.avx.com/products/supercapacitors/) produces a series of **[supercaps](./AVX-SCM.pdf)** in a small enough size, at a cheap price, with an **ESR** range of 300-55mΩ, in a **DCL** range of 2-70μA from **0.47 to 7.5 Farad**.

We now have all the building blocks to design a complete [schematic](./ACME-SYN-01.pdf).

The primary LTC battery charges the supercap through a resistor that limits the current to a maximum of 2-3mA in order to use the cell for its full capacity. The capacitor is used to directly supply the programmable step-down regulator. The main Vout supplies the YARM. The YARM MCU controls the output voltage through 4 GPIO from 1.8 to 3.3V in 15 steps. Another GPIO is used to enable the second regulator output when we need to switch on the sensor(s). If the sensors work only with 5V power supply an high efficiency boost converter [TPS61070](http://www.ti.com/product/TPS61070) is planned. Analyzing the [schematic](./ACME-SYN-01.pdf) we can notice another GPIO which enables, through a mosfet, the resistors divider used to measure the battery charge level. Attaching the resistors to the battery only when needed is another power saving technique. Looking at the discharge curve, someone can argue that it could be hard to find the battery charge level with a so sharply sloped curve at the end of the battery life but, if the X axis spreads for some years, we can imagine to have at least several days to transmit many battery alert messages.

The resulting circuit is shown in the picture below. It can accept 0.47, 1 or 1.5F supercap, according to the power needs.

###Supercap choice

Which is the right value for the supercapacitor? It depends from the usage we are planning. Let’s perform some practical test to parameterize the circuit and orient the choice.

Test set:

* Battery voltage = 3.6V
* Limiting resistor = 1kΩ
* Supercap = 1F
* Load resistance = 120Ω

The test has be done using [UltraDMM](http://www.ultradmm.com/) software. This can collect the values got from a [UNI-T UT61E](http://www.uni-trend.com/productsdetail.aspx?ProductsID=1174&ProductsCateId=909&CateId=909) serial connected multimeter and log them in a spreadsheet with timestamp

The test set

The first parameter to find is the time the capacitor needs to be full charged and which maximum current is drained from the battery. The charts below show a current of about 3mA for the first few minutes (right for the battery life) and a full charge time of about two hours (good to have a maximum of 12 measurements a day).

A more detailed chart about charging time.

This graph is related to a discharge on a 120Ω resistor (about 30mA). We can read the parameters we need: the supercap can supply 30mA for 24″ before going down to 3V and for 1′ before 2V. As aforementioned, this explains the reason of the choice for a voltage selectable regulator. If we select Vout=2V, the current drained from the capacitor is less because of the conversion factor on the switching regulator. Furthermore we have more time before the Vcap goes below the threshold.

| Vin | Vout | I load | Efficiency | I cap |
|——-|——-|———–|—————|———–|
| 3.6V | 3.3V |30mA | 0.9 | 24.75mA |
| 3.6V | 2V |30mA | 0.9 | 15mA |

Because most of the devices can work with a 2V supply, we are able to choose the best compromise beetwen performances and duration. Inversely, keeping the duration of the measure we can decrease the pause period and increase the measurements frequency.

And now the conclusions. The table below shows a calculated duration of the battery in some different conditions. A more accurate estimation can be done only knowing the exact time, current, pauses, etc. in a specific application. The duration can vary also with the environment temperature, that affects a lot the characteristiscs of the battery and of the supercap. But now we know that correctly fine tuning the software we can achieve the goal of some years of autonomous operation life.

Of course the same basic principles can be applied changing the source with a one able to supply only few costant mA or with an inconstant energy flow. The supercap stores the energy in a long time period and gives it back to the device in a peak.