How to develop ultra-low-power and battery less demo with STM32U0 MCUs

Revision as of 14:35, 14 May 2024 by Registered User (Center equation)
Under construction.png Coming soon


This article is about STM32U0 battery less demo. It provides explanations on how the demo works and describes step-by-step how to reproduce it.


1. Purpose of the demo

The goal of this demo is to illustrate the STM32U0 best-in class ultra-low power capabilities. It is running without battery thanks to Dracula technologies inkjet Printed Organic Photovoltaic module, which harvests energy for the STM32U0 MCU. This is a luxmeter and thermometer demo with data being displayed on an LCD segment display, and the possibility to send data thanks to a radiofrequency module. The demo can also work standalone without RF module. So, the demo exists in 2 versions without the RF module, referred as standalone version, and with it, referred as RF version in this document.

2. How the demo works

2.1. Schematics

The figure below shows schematics for both standalone and RF versions. The data logger and Transmitter module of RF version is based on standalone version, on which RF module and one resistor is added. Both are working with the same software, adapting whether it detects presence of RF module or not.

DemooU0 Schematics of standalone and RF versions.
Schematics of standalone and RF versions.

2.2. Demo principle

The following flowchart and graph describes the principle of the demo.

Flowchart describing the principle of the demo, and related graph showing the evolution VDD over time.

When voltage is first reaching POR voltage and reset is first released, the idea is to enter Stop2 mode as quickly as possible to save energy. To do so, only PVD is set to level 6 to wake up the STM32U0 when voltage will be at 3.0V. This is the critical part of the initialization.

Once voltage reaches 3.0V for the first time, initialization of peripheral can start. This is in this phase that GPIOs, LCD, ADC, communication with the temperature sensor, and, if used, communication with the RF module are initialized. RTC is also configured to wake-up the MCU every second. Then, the MCU enters stop2 mode until wake up from RTC.

After waking up, the measurement phase is entered. Temperature is sent by STT22H temperature sensor included in the discovery kit. Light is measured by measuring voltage provided by the panel as explained in part Light measurement. If RF module is present, measured data is sent with this module. Finally, stop 2 mode is entered again to retrieve energy.

2.3. Light measurement

Image below illustrates the flow of current outside of the light measurement phase. PA0 is in open drain configuration so current flows to the capacitor and the STM32U0.

Image illustrating current flow when charging of capacitor
First phase: charge of capacitor.

To measure the light, the current through resistor R1 is deduced from the measuring of the voltage provided by the photovoltaic module.

Following formula is then used to deduce luminosity from measured ADC voltage.

To measure the voltage provided by the photovoltaic module, PA0 is configured in output pull-down mode. The diode prevents the current of the capacitor from flowing to the ADC. Figure below illustrates the flow of current during light measurement.

Image illustrating the current flow while measuring voltage of the PV cell
Second phase: measure of current through R1.

3. How to reproduce

3.1. Bill of material

Info white.png Information
To reproduce standalone version, only material in bold is needed.

Data logger

Display

3.2. Reproduction of data logger

Info white.png Information
To reproduce standalone version, only steps in bold must be done.

Image below shows the connections to do on bottom side of STM32U083-DK.

Image showing connections on bottom side of STM32U0 discovery kit
Connections on bottom side of STM32U0 discovery kit
  • 1. Connect PV- to battery–
  • 2. Connect PV+ to CN7-38 (PC1)
  • 3. Add a diode between CN7-38 (PC1) and battery+
Info white.png Information
For steps 2 and 3, connections on the battery pins can be done by plugging on the pins on the front side, or wires can be soldered directly on the bottom side of the DK

Image below shows the modifications to do on front side of STM32U083-DK and X-Nucleo-S2868A2.

Image showing modifications and connections to do on top of STM32U0 DK and RF module
Modifications and connections to do on top of STM32U0 DK and RF module
  • 4. Add 100µF capacitor
  • 5. Add 2.2kΩ resistor between A4 (PC1) and A0 (PA0)
  • 6. Add >100kΩ pull-up resistor between VREF (CN5-3) and D7 (CN9-8)
  • 7. Remove JP1

Image below shows the modifications to do on bottom side of X-Nucleo-S2868A21.

Image showing modifications and connections to do on bottom side of RF module (S2868A2)
Modifications and connections to do on bottom side of RF module (S2868A2)
  • 8. Cut CN9-9 and CN9-10
  • 9. Connect CN5-8 connected to JP1-1
  • 10. Remove R12


3.3. Reproduction of display

Image below shows modifications to do on S2868A2.

Image showing modifications to do on bottom side of RF module (S2868A2) of the Receiver and display module.
Modifications to do on bottom side of RF module (S2868A2) of the Receiver and display module.

The following solder bridges are to be opened.

  • A1. R10 - Disconnect SDN from D7.
  • A2. R11 - Disconnect SPI SCLK from D3.
  • A3. R12 - Disconnect GPIO0 from A0.
  • A4. R13 - Disconnect CSN from A1.
  • A5. R14 - Disconnect GPIO1 from A2.
  • A6. R15 - Disconnect GPIO2 from A3.
  • A7. R16 - Disconnect GPIO3 from A5.

The following solder bridges are to be closed.

  • B1. R6 - Connect SPI SCLK to D13.
  • B2. R9 - Connect CSN to D10.
  • B3. R18 - Connect GPIO0 to A4.
  • B4. CN9-3 on R19 (or R10) - Connect SDN to D2. [1]

Image below shows the connections and the modification to be done on Nucleo-U08RC:

Image showing connections and modification to be done on Nucleo-U083RC
Connections and modification to be done on Nucleo-U083RC
  • C1. Cut CN7-36 (conflict on this pin between the 2 extension kits).
  • C2. Plug 2 SSQ-119-03-T-D 19x2 connectors on Nucleo-connectors.
  • C3. Plug S2868A2 on Arduino-connectors.
  • C4. Plug GFX01M2 on SSQ-119-03-T-D connectors.

3.4. Software

  1. D6 and D7 connectors are used by the display module, so neither of them can be used for SDN pin.