In 2017 I published here at Hackster.io a WIFI-connected, battery-powered ePaper project which shows the local rain forecast for my hometown based on an open weather API. The predicted rain probability still helps me every day to decide whether I can take the bicycle or not.
In the last months I migrated this project to a new, LoRaWAN-based device. Apart from the display and the weather API, everything was newly developed having ultra-low power consumption in mind: As a result, instead of using a relatively large 2.000mAh Li-Ion-battery this device can now be powered by a ten times smaller 200mAh CR2032 coin cell which runs for more than two years instead of one month.
Optionally, the device can have some PV cells on its backside. If there is sufficient daylight available (i.e. next to a window), it can run even without a battery (and obviously without a power-cable too:-).... self-powered and energy-autark thanks to harvesting the light and charging a supercapacitor. This means there is no manual recharging or replacing of empty batteries needed anymore!
HARDWAREI am using the popular LoRa module RFM95W together with an ATmega328p microcontroller. The power management IC is based around the AEM10941 from e-peas. This energy harvester PMIC supports solar cells with MPPT, charges a supercap with the incoming light and supports a backup battery in case there is not sufficient light available.
The ePaper booster circuitry is based on my Paperino project, and can be deactivated with a load switch to reduce the current consumption during the sleeping cycles.
SOFTWAREThe Arduino-compatible LoRaWAN stack is based on the excellent Ideetron/Nexus low power sketches. The ePaper library is based on PL_microEPD, my fork of Adafruit_GFX for small ePaper displays from Plastic Logic. The library is optimized to work with a tiny MCU having only 2kB SRAM.
ULTRA-LOW POWER- The ePaper updates are based on a two-greylevel configuration (instead of the default four-greylevel configuration). This setup reduces the update time from ~700ms to ~300ms, which translates to an energy-saving of ~-55%.
- The ePaper updates are based on a delta-mode configuration. This ePaper-specific settings means instead of the whole screen only changing pixels are updated.
- During the EPD image itself, we put the microcontroller to sleep to save energy
For this example we use the weather info from the open weather API DarkSky.net together with the backend console of TheThingsNetwork(TTN), both are wired together via Node-RED. The LoRa-weather station connects in a pre-defined interval with the TTN-backend and loads the newest data to the node. It is sufficient to do this every two hours or so, like this we don't exceed the TTN download limit of max. ten messages/day.
FLOW 1 - Save weather data to TTN consoleIn this example we will request the weather info from the open weather API at DarkSky.net. The relevant information will be parsed and sent to the console of TheThingsNetwork.
The relevant Node-RED flow can be seen below. Requesting a new weather API call can be triggered via a predefined timer (timer, i.e. hourly) or after the node came online and just downloaded the present weather data (ttn uplink). With this setup we assure that there is always weather data available, no matter when the node came back online the last time. The orange box extract payload now parses the received html code and extracts only the relevant weather data we are interested in. As a result, the data size decreases from several kilobytes down to less than ten bytes. This payload is now configured in ttn-downlink to be downloaded to our weather station when it is online next time.
The basic flow of the Arduino sketch on the LoRa ePaper node is shown here:
The device sleeps for a predefined interval to minimize the current consumption. When the node wakes up (and sufficient energy is available at the battery or supercap-mode), it executes the function send_and_receive, which sends a message to the TTN console to initiate the download of the scheduled payload data. The received data is then extracted and shown on the ePaper screen.
NextA first small production batch is currently running and once successfully tested it will be also available at Tindie. The project will be open source.





Comments