Difference between revisions of "LoraWanDustSensor"

From RevSpace
Jump to navigation Jump to search
(The plan)
Line 11: Line 11:
 
The plan is to create a system consisting of:
 
The plan is to create a system consisting of:
 
* a sensor that measures airborne particulate matter and sends the measurement data using LoRa/TheThingsNetwork to a central location.
 
* a sensor that measures airborne particulate matter and sends the measurement data using LoRa/TheThingsNetwork to a central location.
* a backend that collects the data from TTN and forwards it to a project like luftdaten.info
+
* a backend that collects the data from TTN and forwards it to luftdaten.info
  
 
This has been done before by other people, but can't find any really good examples:
 
This has been done before by other people, but can't find any really good examples:
* source code location is obscure, I will publish source code on github and put up documentation on this wiki
+
* source code location is obscure, I will publish all source code on github and put up documentation on this wiki
* payload format is non-standard, I'd like to use something relatively universal and standard, so I think I will use the Cayenne LPP format.
+
* payload format is non-standard, I'd like to use something relatively universal and standard, so I think I will try to use the Cayenne LPP format.
 +
 
 +
Sensors join the network using OTAA (instead of ABP), that way I try to minimize the setup of each individual node.  
  
 
So I'd like to just re-invent the wheel properly this time.
 
So I'd like to just re-invent the wheel properly this time.
  
=== Sensor ===
+
== Hardware ==
 +
The node is based on Arduino.
 
The sensor will be an SDS-011, just like in the luftdaten project.
 
The sensor will be an SDS-011, just like in the luftdaten project.
  
 
I will take a glance at how this sensor is being "driven" in this project, e.g. typical on-off times, averaging, etc.
 
I will take a glance at how this sensor is being "driven" in this project, e.g. typical on-off times, averaging, etc.
 
+
* 145 second cycle time
The node is based on Arduino.
 
To compile the code, platformio is used, probably with the following libraries:
 
* https://github.com/fcgdam/TTGO_LoRa32
 
  
 
To do the LoRa stuff, I will probably use an ESP32 with an RFM95 built in.
 
To do the LoRa stuff, I will probably use an ESP32 with an RFM95 built in.
 
The ESP32 is already very similar to the ESP8266 currently used in the luftdaten project.
 
The ESP32 is already very similar to the ESP8266 currently used in the luftdaten project.
  
=== Data collection ===
+
== Software ==
The plan is to use TheThingsNetwork, it publishes the received measurement data back onto an MQTT stream.
+
=== Node ===
 +
To compile the code, platformio is used, probably with the following libraries:
 +
* https://github.com/fcgdam/TTGO_LoRa32
 +
* LMIC
  
Sensors join the network using OTAA (instead of ABP), so there is no need for setting up each node individually.  
+
=== Data forwarding ===
 +
I will use a Java program to subscribe to this MQTT stream, decode the telemetry packets and forward them to luftdaten.
 +
There is no storage of measurement data in the Java application.
  
I will use a Java program to subscribe to this MQTT stream.
 
 
=== Data forwarding ===
 
 
I've already developed some Java code that publishes the measurement values towards luftdaten.info.
 
I've already developed some Java code that publishes the measurement values towards luftdaten.info.
RIVM has already built their own gateway from luftdaten towards samenmeten, so I won't have to code anything for that.
+
Also I've developed code before to subscribe to the TTN MQTT stream.

Revision as of 23:36, 14 December 2018

Project LoRaWAN dust Sensor
350px
LoRaWAN airborne particulate matter sensor
Status Initializing
Contact bertrik
Last Update 2018-12-14


The plan

The plan is to create a system consisting of:

  • a sensor that measures airborne particulate matter and sends the measurement data using LoRa/TheThingsNetwork to a central location.
  • a backend that collects the data from TTN and forwards it to luftdaten.info

This has been done before by other people, but can't find any really good examples:

  • source code location is obscure, I will publish all source code on github and put up documentation on this wiki
  • payload format is non-standard, I'd like to use something relatively universal and standard, so I think I will try to use the Cayenne LPP format.

Sensors join the network using OTAA (instead of ABP), that way I try to minimize the setup of each individual node.

So I'd like to just re-invent the wheel properly this time.

Hardware

The node is based on Arduino. The sensor will be an SDS-011, just like in the luftdaten project.

I will take a glance at how this sensor is being "driven" in this project, e.g. typical on-off times, averaging, etc.

  • 145 second cycle time

To do the LoRa stuff, I will probably use an ESP32 with an RFM95 built in. The ESP32 is already very similar to the ESP8266 currently used in the luftdaten project.

Software

Node

To compile the code, platformio is used, probably with the following libraries:

Data forwarding

I will use a Java program to subscribe to this MQTT stream, decode the telemetry packets and forward them to luftdaten. There is no storage of measurement data in the Java application.

I've already developed some Java code that publishes the measurement values towards luftdaten.info. Also I've developed code before to subscribe to the TTN MQTT stream.