This is short tutorial how to send data from sensor connected to The Things Network via LoRaWAN to Weather Underground. I will use Scidrom air quality sensor whic I developed for students in local school. Just a quick reminder the “AQ” sensor detects PM10, PM2,5 particles, air pressure, temperature and humidity and solar radiation in visible in UV spectrum. More details are available in older post.
The solar radiation shield is a low cost DIY device to protect temperature, relative humidity and other sensors from the weather, while shielding them from the sun for highest accuracy. Provided here are instructions and files. It require some CNC machinig, but then it could be assembled in minutes. It is made from plant pot saucers.
The Pressure, temperature and humidity sensor based on MS5637 HDC1080 originally (Rev. 2) operates via RS485 interface and multidrop HDLC-like protocol. I decided to simplify this for use with Raspberry Pi, arduion or any other mass platforms. First, I took away the RS485 transceiver and second, I simplified the communication.
USB/RS485 module on a single sided board worked successfully for several months. The code is now stable and I decided to order small batch of double sided PCBs for this project. Here is documentation:
This is anothe small module to measure air pressure, temperature and humidity. Two sensors are on-board: MS5637 and HDC1080. Microcontroller is small cortex M0 in TSSOP-20 housing from STM: STM32F070CxP. The SN65HVD72DGKR provides RS485 interface functionality with half duplex mode. Voltage regulator, reverse polarity protection and some LED indicators are provided on-board. Complete module is 10x55mm, produced on single-sided PCB, easily producible in every home lab with proto-PCB capability.
Testing of sensors with RS485 using PC without proper interface is not possible. Since RS232 interfaces are very rare, the interface should be hooked to USB. The interface between USB and RS485 can be soldered with one of the many FTDI interfaces with added RS485 driver, or bought as assembled module. There is always the third option. I made it from scratch.
I took smallest STM32F0 with USB and UART interface. The best thing with UART in the STM32F0 is that signal for driver enable is provided within hardware. The complete pinout of the microcontroller is: