Skip to content

This project implements an embedded software framework designed to interface with and manage air quality sensors for real-time environmental monitoring.

License

Notifications You must be signed in to change notification settings

microchip-pic-avr-solutions/embedded-framework-for-air-quality-sensor

Repository files navigation

Microchip Technologies Inc.

Embedded-framework-for-air-quality-sensor

This repository presents a generic embedded framework designed to simplify the integration and management of various air quality sensors in embedded systems.

The primary goal is to provide a unified API that allows developers to interface with multiple sensor types such as: SGP30, SGP40, EN161, and CCS811 using the same set of functions and data structures.

Hardware Used

  • SAM D21 CURIOSITY NANO EVALUATION KIT or PIC18F56Q71 CURIOSITY NANO EVALUATION KIT
    • One of the core goals of this framework is to ensure it works on any Microchip (MCHP) microcontroller unit (MCU). The abstraction layers and hardware interface modules are designed to be portable across the entire Microchip MCU portfolio, making it easy to deploy your air quality monitoring solution on any MCHP device.
  • CURIOSITY NANO BASE FOR CLICK BOARDS
  • Supported Sensors:
    • SGP30: A multi-pixel gas sensor for air quality monitoring from sensirion
    • SGP40: A digital VOC sensor for indoor air quality applications from sensirion
    • EN161: Air quality sensor from from ScioSense
    • CCS811: A low-power digital gas sensor for monitoring indoor air quality from ScioSense

Software Used

Related Documentation

The repository is organized to help quickly understand and implement the Embedded-framework-AQ-sensor in embedded projects. Here is how the structure supports the development:

Developing with Embedded Framework

  1. Add the Embedded-framework-AQ-sensor to the project

    • Right click on the project
      rightclickproject
    • Add Existing item from Folders
      addexisting
    • Click on Add folder
      addfolder
    • Select the Embedded-framework-AQ-sensor and select all file types. Click Select, then Add.
      embedded-framework
  2. Depending on the architecture of the Microcontroller the developer will have to change the following:
    a. generic_driver_interfaces.h:

    • Depending on the I2C functions, change the function parameter
      genericdriver

    b. AQIsensor.c

    • Add the respective function names to the generic_comms interface
    • XC32 compiler doesn't support "__delay_ms", therefore in such cases create the function with same name and include the delay logic
      aqsensorc

    c. AQIsensor.h

    • Add I2C header file for I2C function calls, GPIO header file and the system header file
      header1
    • Add respective GPIO pins based on where the external sensors are connected on the mikroE ports of the base board
      header2
    • Add the delay function based upon the compiler

Running the Example project

  • To run the example project, navigate to the folder corresponding to the target device (PIC18F56Q71 or SAMD21G17D)
  • Each folder contains a README file with detailed instructions on hardware connections, software setup, and project execution
  • Follow the steps in the respective README documents to successfully build and run the air quality sensor framework example on the chosen Microchip MCU

About

This project implements an embedded software framework designed to interface with and manage air quality sensors for real-time environmental monitoring.

Resources

License

Stars

Watchers

Forks

Packages

No packages published