Code Monkey home page Code Monkey logo

co2_traffic_light's Introduction

CO2 Traffic Light

DIY CO2 sensor with traffic light and 7-segment display for air quality indication.

Purpose

I wanted to be able to measure the CO2 content of the air inside my appartment and the office. The targets are:

  • To preventing the spread of the corona virus (adhering to the guidelines) I need to be able to know when the room needs fresh air (especially useful when colleagues are in the same office space)
  • Prevent high CO2 content in the room since this impacts directly my productivity and ability to think straight (especially useful during work hours)

7-segment version

DIY CO2 sensor with the following features:

  • CO2 sensor (Telaire T6713, PDF datasheet) for measuring real air CO2 content (it is not a equivalent CO2 sensor)
  • 7-segment display (TM1637, 4 digits, PDF datasheet controller) to show current CO2 measurement in ppm (unit for CO2)
  • RGB LED (WS2812B, PDF datasheet) as traffic light to show the current air quality assessment. The following values are averaged over multiple online sources regarding CO2 threshold levels and were experimentally tested to be good values (air feels "stuffy" vs. air feels "clean"):
    • 0 to 1600 ppm: green light, air quality is good
    • 1600 to 2200 ppm: yellow light, air quality could be better, please air the room
    • above 2200 ppm (max for sensor is 5000 ppm): red light, air quality is bad, concentration problems could occur above this threshold, air room as soon as possible
  • Push button with 2 functions:
    • short press (< 1 s): change brightness of RGB LED and 7-segment display. Useful to adjust brightness for use at night or with direct sunlight.
    • long press (>= 10 s): start and perform calibration of CO2 sensor (Telaire T6713). Calibration takes about 7 to 8 minutes to complete.
  • Central microcontroller module (Arduino Nano, Pinout, PDF datasheet microcontroller ATMega328P) outputs new CO2 ppm value as simulated serial port with 115200 baud. You can use general tools for accessing the serial data or use my Python scripts:
    • serial_logger_v5_working.py: Logging serial data
      • Records to .csv files
      • Names .csv files after current date and time
      • Creates counter at end of file name if file with same name is present
      • Starts new .csv file after midnight to keep data steam manageable
      • Creates time stamps in front of measurement data and records this to .csv files as the first element in each line
    • plot_serial_data_v2_working.py: Plot measurement data to live graph with .png export

Notes

  • There is a small window in front of the RGB LED which was printed using clear PLA (noname brand material)
  • The main body and rear plate were printed using PLA Prusament Galaxy Black which prints very nicely. Layer height was 0.2mm using a Prusa i3 MK3S with standard prusament settings set in Prusa Slicer.

Block diagram


LCD display version

It is planned to complete a version with LCD display (Nokia 5110) that has several more features:

  • Nokia 5110 LCD display (has background LED), PDF datasheet controller
  • Push buttons, 3x, SMD: For navigating on screen menu on LCD screen
  • Night light LED (warm white, 5V, PWM dimming) for soft room illumination at night
  • Photoresistor (GL5516 with 5 to 10 kOhm at 10 Lux) for detection ambient light levels (can be used to dim RGB LED, Night light LED and/or display backlight)
  • Connector for BMP180 sensor module, PDF datasheet: Can measure temperature and ambient barometric pressure. Values will be display on LCD as well
  • Connector for NRF24L01 communication module, PDF datasheet:
    • Use case 1: Communicate with separate Arduino that activates fan to vent room when CO2 levels are too high
    • Use case 2: Communicate with Raspberry Pi for recording measurement values

co2_traffic_light's People

Contributors

alasterer avatar

Watchers

 avatar  avatar

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.