Skip to content

Commit

Permalink
First version of complete documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hpsaturn committed May 19, 2020
1 parent dbfbee3 commit 2e81124
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 2 deletions.
124 changes: 122 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,124 @@


# CanAirIO
Complete rewriting of CanAirIO device firmware. Old repo: https://github.com/kike-canaries/esp32-hpma115s0

Citizen science project with mobile and fixed sensors for measuring air quality (PM 2.5) using low-cost sensors and smartphones. Built with a `ESP32` module board and `Panasonic particle meter` dust sensor, interfaced with an [CanAirIO Android app](https://github.com/kike-canaries/android-hpma115s0).

<a href="https://play.google.com/store/apps/details?id=hpsaturn.pollutionreporter" target="_blank"><img width="150" src="screenshots/gplayicon.png"></a>


**Warnning**: it is a complete rewriting of CanAirIO device firmware. Old repo: https://github.com/kike-canaries/esp32-hpma115s0

---

## Firmware

For compiling and upload the current firmware, please firts install [PlatformIO](https://platformio.org/install) or include the project in your `Arduino IDE`. Also you need the [Git](https://git-scm.com/downloads) software. Please check that the commands `pio` and `git` works fine in your OS.

### Compiling and Installing

First, please clone this repo:
```python
git clone https://github.com/hpsaturn/CanAirIO.git
```

Connect your device to USB cable , enter to `CanAirIO directory and run:

```python
pio run --target upload
```

You should have something like this:
```python
Building .pio/build/ttgo-display/firmware.bin
RAM: [== ] 19.7% (used 64684 bytes from 327680 bytes)
Flash: [========= ] 86.4% (used 1698140 bytes from 1966080 bytes)
esptool.py v2.6
============== [SUCCESS] Took 33.86 seconds ==================

Environment Status Duration
---------------- -------- ------------
ttgo-display SUCCESS 00:00:33.861
ttgo-display-ota IGNORED
============= 1 succeeded in 00:00:33.861 =====================
```
### OTA update

**Optional** you could send OTA updates of this firmware with:

```python
pio run -e ttgo-display-ota --target upload
```

It will be try to send the firmware to CanAirIO.local host on your network, it this does not working, you can try to add IP parameter with `--upload-port=your_esp_ip`.

# Android CanAirIO application

For now you need any Android device with Bluetooth 4 or above. You can download the CanAirIO app from [GooglePlay](https://play.google.com/store/apps/details?id=hpsaturn.pollutionreporter), keep in mind that it is in continuos development then please any feedback, report errors, or any thing please let us knowed it via our [contact form](http://canair.io/#three) or on our [Telegram chat](https://t.me/canairio)

You have **two configuration options** of your CanAirIO device from the app:

## Mobile Station Mode

For record tracks on your device (Sdcard) or publish it to the cloud (share), please follow the next steps:

### Connection to device

<a href="https://github.com/kike-canaries/esp32-hpma115s0/blob/master/images/device_connection.jpg" target="_blank"><img src="https://raw.githubusercontent.com/kike-canaries/esp32-hpma115s0/master/images/device_connection.jpg" width="640" ></a>

### Recording track and share

<a href="https://github.com/kike-canaries/esp32-hpma115s0/blob/master/images/app_track_record.jpg" target="_blank"><img src="https://raw.githubusercontent.com/kike-canaries/esp32-hpma115s0/master/images/app_track_record.jpg" width="640" ></a>

**NOTE**: Also all recorded tracks will be saved in the `/sdcard/canairio/` directory on `json` format.

---

## Static Station Mode

![CanAirIO Schematic](screenshots/influxdb_grafana.jpg)



Also, you can connect your CanAirIO device to the WiFi and leave this like a fixed station. For this you need configure it in `settings` section:

### Settings

<img align="right" width="300" src="screenshots/canairio_app_settings.jpg">


- **Station Name**: for example: `PM25_Berlin_Pankow`
- **Wifi Name and Password**: Your Wifi network credentials.
- **InfluxDB Cloud**: Database name: `canairio` hostname: `influxdb.canair.io` like is showing in the screenshots

### Tools

- Reboot device: Only for restart your CanAirIO device
- Factory Reset: For set all settings to default on your CanAirIO device


# Electronic components

## Schematic

![CanAirIO Schematic](docs/schematic.jpg)

## Components

| Description | Alternative store link |
|----------------------------|-------------------------------|
| TTGO T-Display |[AliExpress option](https://bit.ly/2z21vti) |
| Panasonic SN-GCJA5 |[Mouser international option](https://bit.ly/3bMmRYC) |
| Bosch BME680 |[AliExpress option](https://bit.ly/2LIB0eR) |
| DC-DC Booster ** |[AliExpress option](https://bit.ly/2LMm7Ip) |
| Lipo Battery 3.7 *** |[Amazon option](https://amzn.to/2FtzE5c)|
| | |

** NOTE: Untested, meanwhile I have a 2n2222 for enable/disable the boost, but I think that it will be work.
*** Any lipo battery with max size: 25x48x8 mm aprox. Please see the 3D box model. The battery in the link has 8.8x47x19.7 mm and is the ~500mAh.

---

# Feedback

Please let us know about your questions on our [forum](https://foro.canair.io/), [contact](http://canair.io/#three) form or on our [Telegram](https://t.me/canairio) chat.

Binary file added docs/schematic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/schematic_CanAirIO_v2.2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/ttgo-tdisplay-pinmap.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/canairio_app_settings.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/gplayicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2e81124

Please sign in to comment.