Skip to content

Weather station created for VarnaLab (maker/hacker space in Varna, Bulgaria)

Notifications You must be signed in to change notification settings

VarnaLab/WS-VarnaLab-LoRa

Repository files navigation

LoRaWAN Weather station created for VarnaLab in Micropython

За български език ТУК

This project uses the following libs:

  1. LoRaWAN for micropython: here
  2. SDS011 micropython driver: here
  3. BME280 micropython driver: here

Components

  1. SDS011 dust sensor

dust sensor

  1. BME280 temperature, pressure and humidity sensor

temperature, pressure and humidity sensor

  1. Microcontroller LILYGO TTGO LORA32

You should download the specific micropython firmware from here

ttgo lora esp32

Pinout

pinout ttgo lora32

Connections

bmе280 works over I2C bus. Connect to the following MCU pins sda = 21, scl= 22

Dust sensor works over UART. Connect to the following MCU pins rx = 16, tx = 17

Configurations settings

Wifi and The Things Network settings are located in the file config.py You have to create a device in TTN. It works only with ABP authentication since micropython driver doesn't support OTAA. The file ttn_payload_formatter_function.js contains а javascript function which formats the payload for TTN processing. Don't forget to change above_sea_level variable in that function to match your location's altitude in meters. This function has to be put in the following place in TTN:

Applications > [your application] > End devices > eui-[your device id] > Payload formatters > Uplink

This function is made to work with the struct, located in the MCU code.

File upload

It is important to upload the files on the MCU with the following file structure:

MCU file structure

Extras (Bluetooth)

There is a class (esp32ble.py) in Extras folder, which class allows using the esp32 bluetooth. I still haven't implemented it in the main.py file, but it can be used for UART debug, while the weather station is working. There is sample code in the same folder.

Extras (MQTT)

Lilygo micropython formware doesn't have umqtt module preinstalled, so you have to upload the umqtt directory from the repo to your board.

About

Weather station created for VarnaLab (maker/hacker space in Varna, Bulgaria)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published