- 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.
-
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
- via 9600bps serial port
- analog voltage output 0-3.7V
- Vo output is connected to ESP32 ADC33 port
- internal LED is driven by NPN transister 2N5551 from
GPIO39GPIO_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.
- 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)
- ThingsBoard is recommended to visualize data by its dashboard. I'm running ThingsBoard on Raspberry pi.
- in case there is no WiFi AP available, Mobile phone users near AIR BENTO can read out sensor values without application.
- https://github.com/e-radionicacom/SHT21-Arduino-Library
- I got i2cCheckLineState() : invalid State sda=0 scl=1 BusInvalidState TwoWire() can't init error by recent compilation then , replaced Arduino-esp32 to https://github.com/stickbreaker/arduino-esp32 and https://github.com/markbeee/SHT21 Thanks to espressif/arduino-esp32#464
- public NTP server https://developers.google.com/time/
-
https://media.digikey.com/pdf/Data%20Sheets/Sharp%20PDFs/GP2Y1014AU0F_Spec_2-6-15.pdf
-
technical detail of GP2Y10's analog front end
http://www.ti.com/lit/ug/tidub65c/tidub65c.pdf
- Why GPIO33 is used for ADC
refer to "ADC2 Channel cannot be used when WiFi is in use #440"
espressif/arduino-esp32#440
WiFi is always ON , not good for longer battery operation.
- https://www.co2meter.com/blogs/news/23987521-high-co2-levels-in-your-car
- AIR-BENTO in the car
- SHT21 I2C bus observed by CY7C68013A-56 EZ-USB FX2LP USB board
https://sigrok.org/wiki/Lcsoft_Mini_Board - software logic analyzer
https://sigrok.org/wiki/PulseView
SHT21 command write
SHT21 command read