The aim of the MeteoFox project was to design an autonomous weather station, using solar energy and Sigfox connectivity. The SPSWS is the main processing board of the device.
This second version is very close to the first one in terms of architecture and components, but outdoor constraints were taken into account to deploy the device on the field.
Below are the main improvements:
- PCB form factor fitted to an outdoor enclosure (Bud Industries AN-2855-A).
- Integrated GPS antenna replaced by an SMA connector.
- I2C bus connector added to connect weather sensors outside (MSM, or LUSM + THPSM modules). Only a temperature and humidity sensor remains for PCB monitoring.
- USB power connected to front DC-DC converter (in parallel of the solar input), this way none hardware modification required to use the AT mode.
- Separate SPI bus for ADC and transceiver to optimize power management.
- New MCU with higher number of pins and more flash memory.
- Programming interface (SWD) not shared with a used peripheral.
- EMI shielding added on the Sigfox RF circuitry.
However some featured have been removed:
- No more PA, since a discrete design is difficult with a 3.3V supply (no more compatible RF transistor). As a consequence, the device will only operate in ETSI bands.
- Hardware timer removed, since RTC will be much more energy efficient.
See weather sensors modules projects (LUSM & THPSM):
Below is the functional block diagram of the board.
The board is designed to operate with a solar panel (0-25V input range). A first DC-DC converter regulates the solar voltage at 2.7V to charge a supercap and store energy. The second DC-DC converter harvests the supercap voltage to provide the main 3.3V supply.
An hardware trigger controls the last DC-DC converter. Its function is to create an hysteresis signal on the enable input of the converter:
- The converter is enabled when the supercapacitor voltage exceeds a given threshold (~2.1V), higher than the converter start voltage (~0.7V).
- Once activated, the trigger lets the converter work at best effort until the 3.3V output is lost due to lack of energy (supercapacitor voltage under the start voltage).
This trigger prevents from an unstable loop which can appear at power-up:
- Supercapacitor voltage reaches the converter start voltage.
- The converter starts and provides a 3.3V output.
- The board warms up, generating a current peak (decoupling capacitors, etc...).
- The supercapacitor voltage slightly decreases due to the current peak and falls below the converter start voltage (that was just reached).
- The converter becomes off and the loop restarts.
This block was designed in hardware since power status is totally unknown. It is much more reliable than a software control that would have required a continuous power.
The hardware trigger is performed with voltage detectors, a NOR latch and an RS latch (also made with NOR latches).
For test purpose, the board can also be powered by a 3.3V LDO supplied by the USB connector.
The table below gives some current drain figures. Sleep current is the most critical parameter to optimize energy harvesting since the device is sleeping approximately 99% of the time. Total supply current are measured on the +3.3V supply without DC-DC converters.
|MCU current in sleep mode||I(MCU,sleep)||7||µA|
|Total supply current in sleep mode||I(sleep)||13||µA|
|ADC conversion current (~500ms every 10s)||I(ADC)||3.5||mA|
|Total supply current during GPS fix||I(GPS)||35||mA|
|Total supply current during RF transmission||I(RF)||80||mA|
Note: RF transmission current can be halved by using RFO pin of the SX1232 instead of PA-BOOST (improvement).
MCU and programming interface
The SPSWS HW2.0 is based on an STM32 microcontroller developped by STMicroelectronics: the STM32L081CBT6 in LQFP–48 package. It is clocked by a 16MHz TCXO to ensure baud-rates accuracy in a wide range of temperature. An external 32.768kHz crystal is also used for RTC clock.
The MCU is programmed through the standard SWD interface.
Analog and digital measurements
Analog measurements are performed by an external 8-channel 12-bits ADC:
- 1 channel is connected to a 2.048V bandgap for calibration.
- 2 channels are used for internal monitoring: solar cell voltage and supercap voltage.
- 5 channels are available for external connection. They are typically used to read an external LDR (light measurement) and a wind direction sensor.
Digital measurements are performed with multiple sensors connected on a I2C bus:
- Internal temperature and humidity sensor for PCB monitoring.
- External weather sensors modules (see MSM, LUSM and THPSM boards).
5 GPIOs of the MCU are also available for external connection, with optional pull-down or pull up resistor and optional RC filter. Those GPIOs are typically used to connect a wind speed sensor and a rain gauge.
The SPSWS HW2-0 has an RF front-end composed of a sub-GHz transceiver, an RX LNA, a TX filter, an RF switch and a common antenna connector.
It is used to transmit weather data over long range IoT networks such as Sigfox. LPWANs are very well suited for this application for 3 main reasons:
- Data quantity is low, weather data can be packaged on a few bytes and does not require high speed transmission.
- Low power communication enables energy harvesting (solar cell + supercap in this case), so that the device is autonomous.
- The weather station can be placed is very isolated places thanks to the long range performance.
The SPSWS HW2-0 embeds a GPS module and an antenna connector, which can be used for geolocation and RTC time synchronization.
The board can communicate with an external application through a bidirectional UART (including UART-USB converter and USB connector).
The software embedded in the STM32 MCU was developed under Eclipse and GNU MCU plugin. The source code is available on GitHub @ https://github.com/Ludovic-Lesur/SPSWS