Code Monkey home page Code Monkey logo

air-bento's Introduction

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!

air-bento's People

Contributors

coniferconifer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

air-bento's Issues

GY-21 with SHT21 / GP2Y1014AU0F voltage

Hi,
I am not very good at the electronics subject. I read the readme.md and I do not get few parts.

GY-21 board with SHT21 has 5V SDA/SCL pins , use FET 3.3V-5V level converter to connect to ESP32 I2C bus.

I checked the documentation and it looks it can work fine with 3.3V, so why you did you use 5V + level converter here?

Second thing regarding GP2Y1014AU0F:

Vo output goes up to 3.7V, so Vo is clipped by shotkey diode 1N5819 to protect GPIO33.

I checked "Dust sensor -> wiring", but how does this work? Should not be the diode connected in serial - I mean between V0 and GPIO33? I assume that the Shottky diode should drop the 3.7V to something like 3.3V? Alternatively could the level converter be used here instead?

The photos and documentation are very helpful, however could you please add a wiring scheme? It may be a hand draw. Alternatively I can recommend a fritzing software to make a digital one.

PS: I am really curious, because I am building a similar project - an "indoor air station" with following sensors:

  • MH-Z14A for co2
  • dust GP2Y1014AU0F (the wiring scares me) or PLANTOWER PMS5003 (seems very easy, power 5V, logic 3.3V - serial protocol, but it consumes the serial pins which gives best results from MH-Z14A)
  • BME280 for Temperature Humidity and Pressure (it seems to be too 3.3V)
  • MQ-4 for methane (long term plan)
  • MQ-9 for carbon monoxide (long term plan)
    and some LCD + online monitoring (I uploaded data to google spreadsheet via ifttt hook)

See my repos: ESP32-pms5003 , ESP32-MH-Z14A with LCD

Best regards,
Rafal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.