element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
NI LabVIEW Community
  • Products
  • Dev Tools
  • NI LabVIEW Community
  • More
  • Cancel
NI LabVIEW Community
LabVIEW Challenge Blogs Final Project Blog # Air Quality Index (AQI) Test and Automation
  • Blog
  • LabVIEW Challenge Blogs
  • Forum
  • Documents
  • Quiz
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join NI LabVIEW Community to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: swathic
  • Date Created: 27 Oct 2023 6:17 PM Date Created
  • Views 1443 views
  • Likes 0 likes
  • Comments 3 comments
  • nitrogen dioxide
  • Sulphur Dioxide
  • test automation
  • Carbon Monoxide
  • Particle matter
  • LAbVIEW challenge
  • 'A Course in LabVIEW and Test Automation'
  • Air Quality Index
  • ozone
Related
Recommended

Final Project Blog # Air Quality Index (AQI) Test and Automation

swathic
swathic
27 Oct 2023

In present days air pollution is increasing as it has more impact with raise in temperature, humidity, pressure, wind, etc. The increase in CO, CO2, NO2, TVOC, PM, UV effect the human health in different ways, it creates sick to all categories of people from kids to elders. The pollution is also danger to animals, birds, plants, creatures, etc. The sources of pollution are many like factories smoke, forest fires, vehicles smoke, crop residues burning, land fillings burning. AQI is used to represent the quality of air present around. Air Quality Index is a number used to convey the quality of air by the government to the general public. Air quality deteriorates with an increase in the concentration of pollutants. The Air Quality Index represents the severity of pollution for ordinary people.

image

There are eight major pollutants to be taken into account for AQI calculation,

Particulate matter (PM10 or PM2.5)

Nitrogen dioxide (NO2)

Ozone (O3)

Carbon monoxide (CO)

Sulphur Dioxide (SO2)

ammonia (NH3),

and lead (Pb).

0-50: air quality is good

51-100: satisfactory air quality 

101-200: moderate air quality

201-300: air quality is poor 

301-400: very poor air quality

401-500: severe range of AQI

The formula to calculate AQI is the same as per the Indian CPCB and US-EPA. The AQI is calculated using the equations separately for parameters. For example, if you wish to calculate AQI on the basis of four parameters, use the equation four times, and the worst sub-index communicates the AQI. A subindex is a linear function (two different yet related notions) of the concentration of pollutants.
Ip = [IHi – ILo / BPHi – BPLo] (Cp – BPLo) + ILo

Where,

Ip = index of pollutant p
Cp = truncated concentration of pollutant p
BPHi = concentration breakpoint i.e. greater than or equal to Cp
BPLo = concentration breakpoint i.e. less than or equal to Cp
IHi = AQI value corresponding to BPHi
ILo = AQI value corresponding to BPLo

The Graphical programming is done in LabView to get the output color according to the level of Air Quality. The below figures shows the Labview graphical method used to produce the Air quality Index level.

Initially for single trace gas is designed and tested it was working well then implemented to the group of trace gases. Below figure shows Single trace gas testing with automation.

image

As a part of the project SubVIs are created to make the diagram as simple and below figure shows the concentration related SUBVI for NO2 gas likewise for all gases Index values and concentration breakpoint SubVIs are created.

image

The mathematical relation for calculating Index for pollution is created as Sub-VI to look the diagram as simple as it can be below figure shows the mathematical relation sub-VI.

image

Finally implementing all the calculations the result is shown in the form of color code which indicated the level of Air quality as AQI. As said earlier different color is used to specify the Air quality same is shown in this test automation. The below figure is the Front Panel diagram of LabView showing the gas concentrations, levels and color code.

image

Block Diagram of LabView is shown in below figure for representing the color of Air Quality Index.

image

The following video shows how the automation is done with LabVIEW software.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

NEXT LEVEL:

The Labview VI is modified to generate the color through PWM signal in the Raspberry Pi PICO the below figures shows how the PWM signal will choose the RGB colors for Pollution indication.  

image

image

image

image

image

image

Graphical program running to select RGB colors on PWM GPIO pins in Raspberry PI

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

The graphical program should be uploaded to Raspberry Pi to generate RGB color through its GPIO pins. The sensors read data and process in the LabVIEW and the result will be displayed by the Hardware kit to indicate the level of pollution.

It was good experience for me as a beginner to LabView to design the project for AQI. 

After all the testing and automation finally the VI for AQI is created to indicate the AQI level with Color code using RGB LED & Raspberry PI PICO is shown in below figure.

image

Hardware Circuit:

The GPIO pins of Raspberry PI PICO are connected to the RGB LED. The output of the pins are made into PWM signal generator and the output make the LED from LOW to HIGH with a level of 0-255.  

Interfacing the RGB LED to Raspberry PI PICO is shown in below figure.

image

Final video on producing the output on Raspberry PI PICO is  shown below.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

The air quality devices are useful in households, shopping malls, offices, schools, hospitals, industrial sites, mining areas, factory sites, forest regions, etc to notice the air quality when the environment is affected by air pollution. In many major cities due to traffic, urbanization, waste burning causes the increase in pollution as to clean pollution by nature it takes more time because the production is more. 

References:

1) https://www.ni.com/en/shop/labview.html

2) https://urbanemissions.info/tools/aqi-calculator/

3) https://www.pranaair.com/blog/what-is-air-quality-index-aqi-and-its-calculation/

4) /technologies/test-and-measurement/b/blog/posts/pst-have-you-worked-with-the-pico-scpi-labtool?CommentId=9aceea40-5005-42d2-8799-e3bdaf9de2b1

5) https://www.raspberrypi.com/products/raspberry-pi-pico/

6) /products/devtools/ni-labview/b/blog/posts/lesson-10---labview-and-the-raspberry-pi-pico-using-the-scpi-labtool?ICID=labview-DCH-enrollment

7) https://github.com/jancumps/pico_scpi_usbtmc_labtool/releases/tag/v0.6.2

8) /technologies/test-and-measurement/b/blog/posts/pst-program-the-pico-scpi-labtool

9) /products/devtools/ni-labview/rt/roadtests/642/a_beginner_-_course_in_labview_and_test_automation?ICID=ni-labview-DCH-topbanner#pifragment-7188=4&pifragment-7189=7

  • Sign in to reply
  • swathic
    swathic over 1 year ago

    Final Video on LabView and Raspberry PI PICO is done.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • swathic
    swathic over 1 year ago in reply to Jan Cumps

    Thanks for the comment.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 1 year ago

    Where is the LabVIEW part?

    This is not a unique article. Published before by Shikha Sharma in  2021: https://www.pranaair.com/blog/what-is-air-quality-index-aqi-and-its-calculation/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube