Battery-free perpetual weather station

December 26, 2022

Tell me the steps

It is now possible to create low-power remote microcontroller projects that can run indefinitely without batteries and not fail even in the event of a power outage. Let that sink in.

As an example, we'll show you how to build a LoRa-based weather station that's powered solely by solar panels. Its code is written in CircuitPython, running on a popular hobby microcontroller board: the Adafruit Metro M0 Express. The novelty is that it can retain the status of the weather measurement program, even during periods of total darkness when it runs out of power. It's called intermittent computing or perpetual computing, and it opens up a new world of durable electronics, where many applications will run well, and virtually forever, without depending on a battery.

The trick is a specially modified version of the CircuitPython interpreter that is resilient to power failures. (Not the language - the CircuitPython syntax remains intact). This means that we don't need to power our weather station with a continuous power source, such as a battery. Instead, we harvest energy from a solar cell and temporarily store it in a capacitor. The system will start when the capacitor contains enough energy to run some code, and the program will pick up where it left off before the power failure. In this way, we can collect weather information opportunistically without relying on a potentially polluting battery and frequent trips to replace this battery.

Finally, we can build truly perpetual, battery-less, power-autonomous embedded systems using off-the-shelf components! We proved the concept in 2020 with our Battery Free Game Boy project led by Jasper de Winkel, where we powered the game with solar panels and the kinetic energy of player button presses. We have now brought it to CircuitPython.

We call our system BFree. You can program your microcontroller in standard CircuitPython, and a specially designed expansion board stores the intermediate state of the computation during power outages. Then your microcontroller can pick up where it left off and continue to run CircuitPython properly when power returns!

Battery Free Game Boy, September 2020, excerpt from ACM Proceedings on Interactive, Mobile, Wearable, and Ubiquitous Technologies

How does BFree work?

BFree consists of two elements: an expansion board ("Shield") attached above the Metro M0 Express and software running seamlessly on the Metro M0. This combination allows CircuitPython applications written for the Metro M0 to continue where they left off after a power outage. BFree is designed to operate in an environment with insufficient power to continuously power the Adafruit Metro M0.

The BFree shield houses a Texas Instruments MSP430FR series microcontroller. The peculiarity of this microcontroller is the presence of non-volatile RAM in the form of ferromagnetic RAM (FRAM). This type of nonvolatile memory is low-power and byte-addressable. It works like a standard SRAM, but with the advantage of not losing its data when the power goes out. It's a better choice than flash memory, which consumes a lot of power to write and requires writing an entire "page" at a time.

The BFree software is a modified version of CircuitPython (which we call BFree-core) which communicates with the BFree shield via an SPI connection. BFree has several checkpoint strategies available to know when and what to store...

Battery-free perpetual weather station
December 26, 2022

Tell me the steps

It is now possible to create low-power remote microcontroller projects that can run indefinitely without batteries and not fail even in the event of a power outage. Let that sink in.

As an example, we'll show you how to build a LoRa-based weather station that's powered solely by solar panels. Its code is written in CircuitPython, running on a popular hobby microcontroller board: the Adafruit Metro M0 Express. The novelty is that it can retain the status of the weather measurement program, even during periods of total darkness when it runs out of power. It's called intermittent computing or perpetual computing, and it opens up a new world of durable electronics, where many applications will run well, and virtually forever, without depending on a battery.

The trick is a specially modified version of the CircuitPython interpreter that is resilient to power failures. (Not the language - the CircuitPython syntax remains intact). This means that we don't need to power our weather station with a continuous power source, such as a battery. Instead, we harvest energy from a solar cell and temporarily store it in a capacitor. The system will start when the capacitor contains enough energy to run some code, and the program will pick up where it left off before the power failure. In this way, we can collect weather information opportunistically without relying on a potentially polluting battery and frequent trips to replace this battery.

Finally, we can build truly perpetual, battery-less, power-autonomous embedded systems using off-the-shelf components! We proved the concept in 2020 with our Battery Free Game Boy project led by Jasper de Winkel, where we powered the game with solar panels and the kinetic energy of player button presses. We have now brought it to CircuitPython.

We call our system BFree. You can program your microcontroller in standard CircuitPython, and a specially designed expansion board stores the intermediate state of the computation during power outages. Then your microcontroller can pick up where it left off and continue to run CircuitPython properly when power returns!

Battery Free Game Boy, September 2020, excerpt from ACM Proceedings on Interactive, Mobile, Wearable, and Ubiquitous Technologies

How does BFree work?

BFree consists of two elements: an expansion board ("Shield") attached above the Metro M0 Express and software running seamlessly on the Metro M0. This combination allows CircuitPython applications written for the Metro M0 to continue where they left off after a power outage. BFree is designed to operate in an environment with insufficient power to continuously power the Adafruit Metro M0.

The BFree shield houses a Texas Instruments MSP430FR series microcontroller. The peculiarity of this microcontroller is the presence of non-volatile RAM in the form of ferromagnetic RAM (FRAM). This type of nonvolatile memory is low-power and byte-addressable. It works like a standard SRAM, but with the advantage of not losing its data when the power goes out. It's a better choice than flash memory, which consumes a lot of power to write and requires writing an entire "page" at a time.

The BFree software is a modified version of CircuitPython (which we call BFree-core) which communicates with the BFree shield via an SPI connection. BFree has several checkpoint strategies available to know when and what to store...

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow