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

Revision as of 08:16, 24 May 2024 by Registered User
Under construction.png Coming soon


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

Info white.png Information
The bill of material to reproduce the demo can be found here.


1. Presentation of the demo

1.1. Purpose

The aim of this demo is to illustrate the STM32U0's 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 share measured data wirelessly.

1.2. Configurations

This demo can be configured in two versions.

  • The first one is referred as the Data logger only configuration. It consists of one STM32U083C-Discovery kit powered by one Layer photovoltaic module. Every second, measured temperature or illuminance is displayed on the LCD segment display. By pressing the joystick blue hat of the discovery kit, the user can change which data is being displayed.
  • The second one is referred as the Data logger & RF configuration. It consists of two modules, the Data logger & Transmitter module, and the Receiver & Display module.
    • The first one is based on the first configuration of the demo, on top of which an X-Nucleo-S2868A2, an RF expansion board is plugged. In addition to measuring temperature and illuminance, and displaying one of the two measures on the LDC segment display, it sends each second the 2 measures thanks to the RF module.
    • The second one is a module which receives the data and displays it on an LCD screen. It is based on a Nucleo-U083RC on top of which 2 expansion kits, an X-Nucleo-S2868A2, to receive the data, and an X-Nucleo-GFX01M2, with the LCD screen, are plugged. The 2 received measures are displayed in real time on LCD screen, and variations are shown live on a graph chart.
Info white.png Information
The software of the data logger works for both configurations. During initialization, it detects whether the X-Nucleo-S2868A2 is present or not, and adapts behavior depending on that.

2. How the demo works

2.1. Schematics

The figure below shows schematics of the Data logger only configuration on the left, and of the Data logger & RF configuration on the right.

DemooU0 Schematics of standalone and RF versions.
Schematics of the two configurations of the demo.

2.2. Demo principle

The following flowchart and graph describe the 3 main phases of the Data logger module: the boot phase, the initialization phase, and the measurement phase.

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

After connecting the panel, the capacitor starts to charge (1). When voltage first reaches the POR voltage (1.65V) (2), only the minimum instructions are done before entering stop 2 mode, to consume as little energy as possible. Hence, in this time frame, only PVD is set to level 6 to wake up the STM32U0 when voltage will reach 3.0V (3). This is the critical part of the initialization.

Once voltage reaches 3.0V for the first time (4), initialization of the peripherals can start (5). GPIOs, LCD, ADC, communication with the temperature sensor, and, if present, communication with the RF module are initialized. RTC is also configured to wake-up the MCU every second. Then, the MCU enters stop 2 mode until wake-up from RTC (6).

At wake-up, it is first checked that the capacitor is charged enough by checking whether voltage is over 2V (7). If yes, the measurement phase is entered (8). Temperature is measured by the STT22H temperature sensor included in the discovery kit. Light is measured by measuring voltage provided by the panel, as explained in the following part. If the RF module is present, measured data is sent. Last step is to enter stop 2 again to retrieve energy (9).

2.3. Illuminance measurement

The image below illustrates the flow of current outside of the illuminance measurement phase. PA0 is in open drain output high configuration, so current flows to the capacitor and the STM32U0.

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

The illuminance is deduced from the current supplied by the photovoltaic module, as both are proportional. The current supplied by the photovoltaic module is deduced by measuring the voltage across the photovoltaic cell when its current is flowing through a resistor only. This voltage is measured by one of the ADC of the STM32U0.

So, the following formula is used to deduce illuminance from the measured ADC voltage:

Where:

is the ambient illuminance.

is the current provided by the photovoltaic module.

is the voltage measured by the ADC.

is a proportionality constant.

is the value of resistor R1.


Info white.png Information
If needed, and values can be changed in the software.

To have the current of the photovoltaic module to flow through only, PA0 is configured in open drain output low, and a diode isolates the photovoltaic cell and the resistor from the capacitor. The figure below illustrates the flow of current during the illuminance measurement phase.

Image illustrating the current flow while measuring voltage of the PV cell
Second phase: measurment of illuminance.


3. How to reproduce

3.1. Bill of material

Info white.png Information
To reproduce the Data logger only configuration, only material in bold is needed.

Data logger & Transmission module

Receiver & Display module

3.2. Reproduction of Data logger & Transmission module

Info white.png Information
To reproduce the Data logger only configuration, only steps 1 to 5 must be followed

The 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 STM32U083-DK
  • 1. Connect PV- to battery– pin.
  • 2. Connect PV+ to CN7-38 (PC1).
  • 3. Connect a diode between CN7-38 (PC1) and battery+ pin.
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 of the DK, or wires can be soldered directly on the bottom side of the DK.

The image below shows the modifications to do on the 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. Connect 100µF capacitor in the dedicated slot of the DK.
  • 5. Connect 2.2kΩ resistor between A4 (PC1) and A0 (PA0).
  • 6. Connect 300kΩ 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-S2868A2.

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


3.3. Reproduction of Receiver & Display module

Image below shows modifications to do on X-Nucleo-S2868A2.

Image showing modifications to do on bottom side of X-Nucleo-S2868A2 of the Receiver and display module.
Modifications to do on bottom side of RF module X-Nucleo-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-U083RC:

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 the 2 SSQ-119-03-T-D 19x2 connectors on Nucleo-connectors.
  • C3. Plug X-Nucleo-S2868A2 on Arduino-connectors.
  • C4. Plug X-Nucleo-GFX01M2 on SSQ-119-03-T-D connectors.


3.4. Software

Under construction.png Coming soon

4. External links

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