GitHub - TUDSSL/BFree: BFree: Enabling Battery-free Sensor Prototyping with Python
5 min read
BFree: Enabling Battery-free Sensor Prototyping with Python - GitHub - TUDSSL/BFree: BFree: Enabling Battery-free Sensor Prototyping with Python

This is the official public repository for a battery-free prototping platform with CircuitPython for the Adafruit Metro M0 Express. This repository contains all the sources needed to get started using CircuitPython without any batteries!

Project Overview


Batteries are bad for the environment, and many embedded applications do not rely on a constant flow of energy. However, just connecting an energy-harvesting source to a microcontroller does not fully solve the problem. Energy from harvested sources is not constant and maybe not enough to continuously run the device, so we have to buffer some energy (typically in a capacitor). When a certain amount of energy is collected, the system activates for some seconds.

It would be problematic if the program would start from the beginning every time the system restarts. Going into a sleep mode might also be problematic, as you never know when the energy returns.

This work focuses on continuing a Python application where it left off when the system restarts after a power failure, called intermittent-computing We achieve this without any involvement from the user or any modifications to the Python code!

All the magic happens internally in our modified version of the CircuitPython interpreter (added as a submodule in software/BFree-core), which works together with our BFree shield. Everything is entirely open-source and accessible through this GitHub repository.

The above figure presents: (A) the BFree hardware shield; (B) example Python code executed on the Adafruit Metro M0 Express board with the BFree shield; (C) the BFree shield with Adafruit Metro M0 Express board running a battery-free temperature measurement station; (D) the BFree system in the wild.

How it works

For the user (maybe you!), the intermittent-computing aspect is entirely invisible. Internally, the modified CircuitPython interpreter communicates with the BFree shield and decides when to make a so-called "checkpoint." A checkpoint…
Read full article