Introduction
I’ve decided to try to put together a solar powered wireless weather station this summer. It will consist of two parts: an outstation comprising of a pressure/temperature sensor attached to an STM32F030 MCU; all powered by a cheap solar panel and a rechargeable battery. The MCU will use an NRF905 radio module to send data back to a base station within the house which will display it on screen. Power consumption in the outstation will have to be kept to a minimum.
The base station will consist of an STM32L011 Nucleo board and an NRF905 module. It will interface to the host PC using the built-in UART.
The pressure/temperature sensor
About a year ago I bought a BMP180+HMC5983 module from dx.com. The BMP180 component is a very sensitive atmospheric pressure and temperature sensor with an I2C interface. The HMC5983 is a digital magnetometer may have a future role to play in the weather station.
The outstation MCU
I have previously posted a description of how to mount the STM32F030 TSSOP-20 MCU on a breadboard friendly breakout board. These MCU’s can be configured to consume very little energy. I had several of these lying around so the seemed the logical choice.
Wiring
The image above shows the wiring involved. The bmp180 module has built-in pull-up resistors so its quite simple. The code on the other hand is quite complicated. The BMP180 has a very strange conversion routine that takes the sensor outputs and converts them to pressure (in Pascals) and temperature (in degrees C x 10). The measurement results are output via the UART TX pin on PA9. I connected this to the host PC using a USB/Serial converter.
The code can be found here. It includes a lot of debugging code that was useful during development. This is very much version 0.1 as it does not take power consumption into account in any way. That will be the subject of a future post.
One thought on “Weather station part 1: Pressure and temperature”