Skip to content

coniferconifer/AIR-BENTO

Repository files navigation

AIR BENTO CO2 and dust monitor by ESP32

Improve Decision-Making Performance by AIR BENTO

watch CO2 and dust levels at home/car/workplace , vent breathless air

  • Winsen MH-Z14A CO2 sensor
  • SHARP GP2Y1014AU0F dust/smoke sensor
  • Bosch BMP180 pressure sensor GY-68
  • Sensirion SHT21 humidity sensor GY-21
  • runs on ESP32 NodeMCU board
  • 128x64 mono color OLED display is supported
  • works as a MQTT client over WiFi or a BLE device are packed in BENTO lunch box.

what's new

  • GPIO39->GPIO12 for GP2Y LED control. (GPIO39 does not work for pulse output. ) Sep 16,2018

  • GPIO34->GPIO14 for SPI/SD1306. (ESP32 GPIO34-39 can not be used for OUTPUT) Sep 16,2018

  • watch dog timer is introduced

  • By using the latest Arduino core for ESP32 with BLE , the compiled flash memory reached to 104%, so that #define BLE at AIR-BENTO is changed to an option by default.
    Update Arduino core for ESP32 WiFi chip , then use "Partition Scheme" in "Tools" menu in Arduino IDE and select "No OTA(large APP)" , this program will fit in the space in case of #define BLE

  • SHT21 humidity sensor is supported in May/14/2018 by #define HUMIDITY (due to i2c error , I replaced Arduino core and SHT21 library to https://github.com/stickbreaker/arduino-esp32 and https://github.com/markbeee/SHT21

  • GY-21 board with SHT21

  • wirings are changed to use BMP180 as of April/30/2018

  • #define DEEPSLEEP for ESP32 deep sleep is supported in May 13,2018

Fig.1 AIR BENTO

CO2 sensor Winsen MH-Z14A

  • via 9600bps serial port

Dust sensor SHARP GP2Y1014AU0F or maybe GP2Y1010AU0F

  • analog voltage output 0-3.7V
  • Vo output is connected to ESP32 ADC33 port
  • internal LED is driven by NPN transister 2N5551 from GPIO39 GPIO_NUM_12 (Fig.2)
  • max Vo output goes up to 3.7V and exceeds ESP32 max GPIO input voltage spec 3.6V , so Vo is clipped by shotkey diode 1N5819 to protect GPIO33. (Fig.2) , but this may be harmful to the last stage amplifier of GP2Y1016AU0F.
    Voltage divider by resisters or another operational amplifier that has 0.8x gain may be better solution for product level quality.

GY-68 BMP180 pressure sensor (Apr/30/2018)

  • connected via I2C (GPIO21 as SDA , GPIO22 as SCL)
  • GY-68 BMP180 has 3.3V linear regulator on board and SDA,SCL are pulled up to 3.3V, so, I supply 5V to VCC pin. (depending on your hardware)

AIR BENTO posts sensor values to MQTT server via WiFi

  • ThingsBoard is recommended to visualize data by its dashboard. I'm running ThingsBoard on Raspberry pi.

AIR BENTO broadcasts sensor values as bluetooth device name

  • in case there is no WiFi AP available, Mobile phone users near AIR BENTO can read out sensor values without application.

License: Apache License v2

References

CO2 sensor:

SSD1306 OLED display library from

GY-68 BMP180 pressure sensor

BMP180 library

SHT21 library (New!)

PubSubClient

MQTT server with visiualization tools

Time display

Dust sensor:

trouble shooting:

remaining issues

  • WiFi is always ON , not good for longer battery operation.

"Elevated Indoor Carbon Dioxide Impairs Decision-Making Performance"

"High CO2 Levels in Your Car"

pulseview by sigrok project is quite useful

CO2 measureing may be a brain activity monitor

Fig.6 CO2 graph

dust sensor detects when I'm home

Fig.7 I'm home at around 13:23, humidity , dust and co2 level jumped!