ENS160: Difference between revisions

From NURDspace
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Project
{{Project
|ProjectParticipants=met name Bertrik maar Folkert heeft ook een schroevendraaier toegepast
|Name=ENS160 TVOC sensor
|Name=ENS160 TVOC sensor
|Skills=Hacking, Electronics, Sensors
|Skills=Hacking, Electronics, Sensors
Line 5: Line 6:
|Niche=Smelling stuff
|Niche=Smelling stuff
|Purpose=Fun
|Purpose=Fun
|Picture=whyunopicture.png
|Picture=Tvoc.png
|Tool=Yes
|Tool=Yes
|Location=WC
|Location=WC
Line 12: Line 13:


== What ==
== What ==
It's a sensor that measures volatile organic compounds (VOC).
It's a sensor that measures total volatile organic compounds (TVOC).
 
== Hardware ==
See https://nl.aliexpress.com/item/1005006125242045.html
See https://nl.aliexpress.com/item/1005006125242045.html


== Hardware ==
Sensor consists of a wemos d1 mini and an ENS160/AHT21 module.
Sensor consists of a wemos d1 mini and an ENS160/AHT21 module
The AHT21 is used to compensate the readings of the ENS160.


Connections:
Connections:
Line 36: Line 39:
# Enable logging
# Enable logging
logger:
logger:
  level: INFO
# Enable Home Assistant API
api:
  encryption:
    key: "geheim"
ota:
  platform: esphome
  password: "geheim"
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Tvocsensor Fallback Hotspot"
    password: "geheim"


i2c:
i2c:
Line 48: Line 70:
       name: "AHT21 Humidity"
       name: "AHT21 Humidity"
       id: tvoc_humidity
       id: tvoc_humidity
   - platform: ens160
   - platform: ens160_i2c
    address: 0x53
     eco2:
     eco2:
       name: "ENS160 eCO2"
       name: "ENS160 eCO2"
Line 59: Line 82:
       temperature: tvoc_temperature
       temperature: tvoc_temperature
       humidity: tvoc_humidity
       humidity: tvoc_humidity
     update_interval: 60s
     update_interval: 10s
    address: 0x53
 
</pre>
captive_portal:
    </pre>
 
== pics or it didn't happen ==
 
[[File:Tvoc-sensor.jpg]]

Latest revision as of 15:10, 29 June 2024

ENS160 TVOC sensor
Tvoc.png
Participants
Skills Hacking, Electronics, Sensors
Status Active
Niche Smelling stuff
Purpose Fun
Tool Yes
Location WC
Cost
Tool category Electronics

ENS160 TVOC sensor

Tvoc.png {{#if:Yes | [[Tool Owner::met name Bertrik maar Folkert heeft ook een schroevendraaier toegepast | }} {{#if:Yes | [[Tool Cost::{{{Cost}}} | }}


What

It's a sensor that measures total volatile organic compounds (TVOC).

Hardware

See https://nl.aliexpress.com/item/1005006125242045.html

Sensor consists of a wemos d1 mini and an ENS160/AHT21 module. The AHT21 is used to compensate the readings of the ENS160.

Connections:

  • Vin = wemos 5V
  • GND = wemos GND
  • SDA = wemos D2
  • SCL = wemos D1

Software

It is programmed with ESP-home:

esphome:
  name: tvocsensor
  friendly_name: tvocsensor

esp8266:
  board: d1_mini

# Enable logging
logger:
  level: INFO

# Enable Home Assistant API
api:
  encryption:
    key: "geheim"

ota:
  platform: esphome
  password: "geheim"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Tvocsensor Fallback Hotspot"
    password: "geheim"

i2c:
  
sensor:
  - platform: aht10
    variant: AHT20
    temperature:
      name: "AHT21 Temperature"
      id: tvoc_temperature
    humidity:
      name: "AHT21 Humidity"
      id: tvoc_humidity
  - platform: ens160_i2c
    address: 0x53
    eco2:
      name: "ENS160 eCO2"
    tvoc:
      name: "ENS160 Total Volatile Organic Compounds"
    aqi:
      id: ens160_air_quality_index
      name: "ENS160 Air Quality Index"
    compensation:
      temperature: tvoc_temperature
      humidity: tvoc_humidity
    update_interval: 10s

captive_portal:
    

pics or it didn't happen

Tvoc-sensor.jpg