This project was created by RT-Thread Community developer, Ma Jianjia, at the University of Southampton.
About this project
The goal is to build a small and versatile weather station. But before introducing this project, I shall mention my other project DeepPlankter. DeepPlankter is a tiny autonomous water drone ship that could sail in the ocean for months using wave-propelled underwater wings. Sailing alone is fun though, if we can collect some meaningful data during the sailing will be even more exciting.
Thus, a weather station is perfect to fit this purpose! Imagine that the ship is measuring wind velocity on a 10 metres high wave at the centre of a storm. So challenging.
There are some goals of the weather station:
The electronics on the ship is supplied by solar panels so is the weather station. The solar panels have a peak power rating of 10W, or 40Wh in a sunny summer day. However, this 10W will need to supply the main controller, GPS, satellite, rudder servos, and charge batteries for over-nights supplies.
A rough estimation is <100mA average current for the whole ship. The weather station should have a maximum 10mA average current.
The drone is small, with a deck width of only ~12cm. Ideally, the dimensions of the weather station should be less than the width of the deck. When installing it on the ship, it should be placed as high as possible. Elevating a large mass on the mast decreases the stability of the ship.
While keeping it small, implement as many digital sensors as possible.
There are 2 DIY analogue sensors, the ultrasonic anemometer and infrared rain sensor onboard.
If you need the code and repository address, please leave us a comment below.
Features and functions
For the hardware V1.1
-PCB dimension: Φ48 mm
-Anemometer (2x2 Ultrasonic transducer array 40k/200kHz)
-Rain sensor (IR Optical type)
-Lighting sensor (AS3935)
-IMU & eCampass (BMX160)
-RGBI light sensor (APDS-9250)
-Barometer, humidity, temperature sensor (BME280)
-USB (CDC and/or MassStorage)
-Normal + GNSS: ~45mA
-Normal + GNSS + ESP8266(MQTT @ 1Hz): ~100mA
Digital sensors are used whenever it is available. Today's digital sensors are easy to use as long as they are connected to I2C correctly. The onboard sensors were all up in a day.
The rain sensor is consist of a pair of an IR transmitter and a receiver. The method is to use the reflection of a piece of trapezoid glass (hand made..). When droplets land on the surfaces of glass, it will reduce the reflection, therefore the signal magnitude on the receiver will change. We can either use calibrated absolute value or use the covariance. This sensor will not be accurate. Even when on the sea, droplets from large waves can easily keep the sensor wet all the time.
Ultrasonic Anemometer is the most difficult sensor but also the most challenging sensor. The anemometer uses a reflection of the ultrasonic beam to measure the speed of air in 2 horizontal direction..ideally. The reality is much complicated, it well worth a separate document. A good project by Hardy Lau mentioned most of the principle and information.
One of the advantages of the ultrasonic anemometer is it needs NO MOVING PARTs to measure wind speed and wind direction.
For the lighting sensor (AS3935), I could not make an easy test to validate my antenna design.
For the RGBIR sensor, we cannot calibrate the sensor using a cosine corrector which the light sensor usually used. I have no tools that can calibrate this sensor. RGBI sensor can provide colour data than a single lumen meter.
IMU and eCampass are not needed for a stationary mounted weather station. But in sailing, its high mounted location is perfect for navigation where fewer inferences than in the hull (the ship's main controller).
An additional small size GPS module can be connected to one of the UART, to provide clock calibration even we do not the location in stationary mount. It is much helpful when sailing, to provide a secondary GPS location.
The microphone can measure the noise level if calibrated. When on the ship, it can record the sound of the ocean. A very interesting application is to use TinyML for sound recognition applications, such as Speech Command Spotting, bird finding... or detecting illegal logging in a forest. I will train and use NNoM to deploy a neural network model for speech command, to control the functions.
There are many ways to configure or communicate to QingStation, but none of them is wireless. So we probably cannot just connect to a smartphone App to control it unless a wireless module is connected to one of the ports. However, I have to implement a USB CDC device, which works well in Android phone as a serial port.
The methods I intended to use are:
A configuration file (JSON) in SDCard - implemented.
USB port (A virtual UART device, also known as CDC) - future;
LPUART1 (act as AT Server for configuration) - future;
Currently, the JSON method is the primary method. Because it is easy to use and the settings are obvious. Plugging an empty SD card, QingStation will write a default configuration file called config.json. Unplug the sd card and revise it using any text editor. The new configuration will be reloaded on the next system power-up.
USB port and UART require the PC to have a terminal or some tools that can talk through a serial port. AT CMD is ok to use but setting are not easily done by a human.
For the LPUART, I plan to make it dedicated to AT server or client. When it is used as AT server, the QingStation can be configured by Arduino or other user boards and provide data for them. When it is used as AT Client, it can control other devices to send data directly to servers, such as BLE modules, LoRA, or GPRS/4G. RT-Thread already supports common AT hardware, including SIM800C. With RT-Thread's rich supports for IoT software packages, it is straightforward to implement Internet, MQTT and others.
I have built 4 prototypes and printed a few different enclosures for testing.
Most of the sensors I mentioned are running (except the microphone.)
The rain sensor is not yet calibrated, but the data seems related to the level of rain.
Anemometer is running steadily in wind < 30m/s
The QingStation can publish MQTT through WIFI modules(ESP32 and EPS8266) or 2G module (SIM800c)
It can receive OTA firmware updating through MQTT.
I will keep posting building logs for the most difficult sections here, including the design and turning of the ultrasonic anemometer, rain sensors and others.