Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Fingerling42 committed Sep 27, 2024
1 parent 38baabd commit 135a99f
Showing 1 changed file with 85 additions and 62 deletions.
147 changes: 85 additions & 62 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,73 @@
# Robonomics Sensor Firmware for SDS011, DHT22, BMP180, BMP/E 280 and many more sensors
# Firmware for Sensors of Altruist Civil Station

This repository is a fork of the [airRohr Sensor Firmware](https://github.com/opendata-stuttgart/sensors-software). We have added several new features, including a Noise Meter, a Geiger Counter, and a VOC sensor. Additionally, support for [Robonomics Decentralized Sensors Network](https://sensors.social/#/) has been integrated to enhance functionality.
This repository is dedicated to the firmware for the Altruist Civil Station with support for SDS011, DHT22, BMP180, BMP/E 280, and other sensors. It is a fork of the [airRohr Sensor Firmware](https://github.com/opendata-stuttgart/sensors-software). We have added several new features, including a noise meter, a Geiger counter, and a VOC sensor. Additionally, integration with Robonomics has been added to turn sensors into a full-fledged [distributed sensor network](https://sensors.social).

More information you can find in [Robonomics Academy](https://robonomics.academy/en/learn/sensors-connectivity-course/overview/).
More information can be found in the guides on [Robonomics Academy](https://robonomics.academy/en/learn/sensors-connectivity-course/overview/).

## Features:
* many environmental and air quality sensors can be used concurrently
* Integration in Sensor.Community (formerly Luftdaten.Info)
* Configuration via HTTP in local WiFi or with a Sensor-as Access-Point
* Support for OLED- and LCD-Displays (SSD1306, SH1106 and LCD1602, LCD2004)
* Wide selection of API integrations for measurement reporting
* Used with ESP8266 (NodeMCU v2/v3 and compatible) and ESP32 (experimental)

* Many environmental and air quality sensors can be used concurrently
* Integration with Sensor.Community (formerly Luftdaten.Info)
* Configuration via HTTP in local WiFi or with the sensor as an access point
* Support for OLED and LCD displays (SSD1306, SH1106, LCD1602, and LCD2004)
* A wide selection of API integrations for measurement reporting
* Compatible with ESP8266 (NodeMCU v2/v3 and compatible) and ESP32 (experimental)

## Sensor Setup

* You can find more information about how to get the sensor in [Sensor Hardware](https://robonomics.academy/en/learn/sensors-connectivity-course/sensor-hardware/) guide in Robonomics Academy.
You can find more information about acquiring the sensor in the [Sensor Hardware guide](https://robonomics.academy/en/learn/sensors-connectivity-course/sensor-hardware/) on Robonomics Academy.

Detailed information about sensor setup can be found in the [Setting up and connecting sensors](https://robonomics.academy/en/learn/sensors-connectivity-course/setting-up-and-connecting-sensors/) article.

* And the detailed information about sensor setup you can find in [Setting up and connecting sensors](https://robonomics.academy/en/learn/sensors-connectivity-course/setting-up-and-connecting-sensors/) article.

## Additional Information
## WiFi Configuration

### WiFi configuration
If a (previously) configured WiFi is not reachable within 20 seconds after power-on,
the firmware flips itself into AP mode and creates a WiFi network in the form `RobonomicsSensor-\[Sensor-ID\]`.
If a (previously) configured WiFi is not reachable within 20 seconds after power-on, the firmware switches into AP mode and creates a WiFi network in the form `RobonomicsSensor-[Sensor-ID]`.

This WiFi network is by default unencrypted. When a client connects to this, it will get
redirected to the sensors web server `http://192.168.4.1/` which allows initial configuration.
This WiFi network is by default unencrypted. When a client connects to it, they will be redirected to the sensor's web server `http://192.168.4.1/`, which allows initial configuration.

Configurable is
Configurable options include:
* WiFi Access Point to use
* Options for measurements (Sensors to poll, intervals..)
* Measurement options (sensors to poll, intervals, etc.)
* APIs to send the measurements

The unencrypted Access Point for initial configuration will turn itself off after about
10 minutes. In order to reactivate please power cycle the board.

---
The unencrypted Access Point for initial configuration will turn itself off after about 10 minutes. To reactivate it, please power cycle the board.

### Build and Flash Firmware from Source
## Build and Flash Firmware from Source

To build the firmware you need [Platformio](https://platformio.org/) tool. In this article, we'll provide instructions on how to build the firmware with [Platformio core](https://docs.platformio.org/en/latest/core/installation/index.html).
To build the firmware, you need the [Platformio](https://platformio.org/) tool. In this article, we'll provide instructions on how to build the firmware with [Platformio core](https://docs.platformio.org/en/latest/core/installation/index.html).

Clone the repo:

```bash
git clone https://github.com/airalab/sensors-software.git
cd sensors-software
```

Build the firmware:

```bash
pio run -e nodemcuv2_en
```
Firmware binary file will be in `builds` folder.

To flash the device, connect it to the computer with a USB cable and run
The firmware binary file will be in the `builds` folder.

To flash the device, connect it to the computer with a USB cable and run:

```bash
pio run -t upload -e nodemcuv2_en
```

---
## Contributing

### Contributing
To add your Connectivity Robonomics Server to the sensors firmware, fork this repository and edit the [robonomics_servers.h](./robonomics_servers.h) file. Add your server to the list in the following format:

To add your Connectivity Robonomics Server to sensors firmware, fork this repository and edit [robonomics_servers.h](./robonomics_servers.h) file. Add your server in a list in the following format:
```bash
{"<server_address>", <Region>}
```
Use one of the following variables fo region:

Use one of the following variables for the region:

```
INTL_REGION_GLOBAL - Global Servers
INTL_REGION_EU - Europe
Expand All @@ -77,71 +78,71 @@ INTL_REGION_NA - North America
INTL_REGION_SA - South America
```
For example:

```
{"connectivity.robonomics.network", INTL_REGION_GLOBAL}
```

Then make a pull request.

---
## DHT22 Humidity Reporting

### DHT22 Humidity Reporting
The DHT22 sensor is originally an indoor sensor. For outdoor use, it appears to be rather sensitive to water condensation after reaching 100% relative humidity, which can cause it to stay at a 99.9% value for a very long time (sometimes indefinitely). Additionally, it appears to be sensitive to high UV light, which can cause the sensor to crash until it is hard power-cycled.

The DHT22 sensor is originally an Indoor sensor. For outdoor use it appears to be rather
sensitive to water condensation after 100% rel.Humidity that keep it for very long time
(sometimes forever) at 99.9% value. Also it appears to be sensitive to high UV light,
which tends to cause the sensor to crash until hard power-loss restarted.
Better experiences have been reported with a BME280 or SHT3x sensor, so consider using those instead.

Better experiences have been made with a BME280 or SHT3x sensor, so consider those instead.
## Debug via USB-Serial

---
Connecting or powering via a computer USB will provide a USB serial connection with the settings 115200 baud. By default, the sensor will provide human-readable debug information of configurable granularity through this connection.


### Debug via USB-Serial
## Save as CSV

Connecting/Powering via a computer USB will provide USB serial with the settings 115200 baud.
By default the sensor will provide human readable debug information of configurable granularity
there.
All measurements can also be read as CSV via USB-Serial when using the USB port with the settings 9600 Baud 8N1. To avoid interference from debug options (see earlier section), set debug to "None" in the configuration.

---
## Wiring and Sensors

### Save as CSV
![https://raw.githubusercontent.com/opendata-stuttgart/meta/master/files/nodemcu-v3-schaltplan-sds011.jpg](https://raw.githubusercontent.com/opendata-stuttgart/meta/master/files/nodemcu-v3-schaltplan-sds011.jpg)

All measurements can also be read as CSV via USB-Serial when using the USB port in the
settings 9600 Baud 8N1. In order to avoid interfering of debug options (see earlier section)
set debug to None in the configuration.
Please refer to the [Pinout of NodeMCU v2 and v3](https://github.com/opendata-stuttgart/meta/wiki/Pinouts-NodeMCU-v2,-v3) for much more detailed information about the individual pin functions.

---

### Wiring

![https://raw.githubusercontent.com/opendata-stuttgart/meta/master/files/nodemcu-v3-schaltplan-sds011.jpg](https://raw.githubusercontent.com/opendata-stuttgart/meta/master/files/nodemcu-v3-schaltplan-sds011.jpg)
### SDS011 (serial)

Please refer to the [Pinout of NodeMCU v2 and v3](https://github.com/opendata-stuttgart/meta/wiki/Pinouts-NodeMCU-v2,-v3) for much more detailed information about the individual pin functions.
> **Note**: Serial connections are always crossed (RX on one side is connected with TX on the other side).
### SDS011 (serial)
**Note**: Serial connections are always crossed (RX on one side is connected with TX on other side)
* Pin 1 (TX) -> (RX) Pin D1 (GPIO5)
* Pin 2 (RX) -> (TX) Pin D2 (GPIO4)
* Pin 3 (GND) -> GND
* Pin 4 (2.5m) -> unused
* Pin 5 (5V) -> VU
* Pin 6 (1m) -> unused

---

### DHT22

* Pin 1 => 3V3
* Pin 2 => Pin D7 (GPIO13)
* Pin 3 => unused
* Pin 4 => GND

---

### DS18B20 (OneWire interface)
Please check your version (pinout) at [https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf]
Uses the same PIN D7 as DHT22, so DHT22 OR DS18B20 can be used.

Please check your version (pinout) at [https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf].
The DS18B20 uses the same PIN D7 as the DHT22, so only one of them (DHT22 or DS18B20) can be used at a time.

* GND -> Pin GND
* DQ -> Pin D7 (GPIO 13)
* VCC -> Pin 3V3 or Pin VU

---

### PMS1003 to PMS6003

Pinout:
8 7 6 5 4 3 2 1

Expand All @@ -154,7 +155,10 @@ Pinout:
* Pin 7 (NC) -> unused
* Pin 8 (NC) -> unused

---

### PMS7003

Pinout PMS7003:
9 7 5 3 1
10 8 6 4 2
Expand All @@ -168,7 +172,10 @@ Pinout PMS7003:
* Pin 9 (TX) -> Pin D1 (GPIO5)
* Pin 10 (SET) -> unused

---

### Honeywell PM sensor

Pinout:
8 7 6 5 4 3 2 1
* Pin 1 (3.3V) -> unused
Expand All @@ -180,13 +187,19 @@ Pinout:
* Pin 7 (RX) -> Pin D2 (GPIO4)
* Pin 8 (GND) -> GND

---

### BMP180 / BME/P280 / HTU21D / SHT3x (I2C)

* VCC -> Pin 3V3
* GND -> Pin GND
* SCL -> Pin D4 (GPIO2)
* SDA -> Pin D3 (GPIO0)

---

### SPS30 (I2C, 5V)

Pinout:
1 2 3 4 5
* Pin 1 (5V) -> Pin VU/VIN
Expand All @@ -195,23 +208,33 @@ Pinout:
* Pin 4 (SEL) -> Pin GND
* Pin 5 (GND) -> Pin GND

### LCD1602 (I2C, 5V - check your version)
---

### LCD1602 (I2C or 5V versions)

* VCC -> Pin VU
* GND -> Pin GND
* SCL -> Pin D4 (GPIO2)
* SDA -> Pin D3 (GPIO0)

---

### OLED displays with SSD1306 (I2C, 128x64 pixels)

* VCC -> Pin VU
* GND -> Pin GND
* SCL -> Pin D4 (GPIO2)
* SDA -> Pin D3 (GPIO0)

### GPS NEO 6M (serial) !!! USE AT OWN RISK, in combination with PM sensor the firmware may crash !!!
VCC and GND can be provided by board (use 3.3v!)
---

### GPS NEO 6M (serial)

> **Warning**: USE AT YOUR OWN RISK. In combination with the PM sensor, the firmware may crash!!!
**Note**: Serial connections are always crossed (RX on one side is connected with TX on other side)
VCC and GND can be provided by the board (use 3.3V only).

* TX von Neo -> Pin D5 (RX)
* RX von Neo -> Pin D6 (TX)
> **Note**: Serial connections are always crossed (RX on one side is connected with TX on the other side).
* TX von Neo -> Pin D5 (RX)
* RX von Neo -> Pin D6 (TX)

0 comments on commit 135a99f

Please sign in to comment.