Arduino Projects

Dust Sensor DSM501A with Arduino, PM10 & PM2.5 Air Quality Monitoring

Dust Sensor DSM501A:

Dust Sensor DSM501A with Arduino, PM10 & PM2.5 Air Quality Monitoring- When it comes to Air quality monitoring; particles are defined by their diameter PM2.5 and PM10 particles. Now, you might be thinking what are PM2.5 and PM10 particles?

Dust Sensor

Well, PM stands for Particulate Matter, and it’s also called particle pollution. Particles that are 10 microns or less in diameter are called (PM10) and particles that are 2.5 microns or less in diameter are called as PM2.5.  Both PM2.5 and PM10 particles can be inhaled. But the fine particles PM2.5 pose the greatest health risk. These fine particles can get deep into lungs and some may even get into the bloodstream. Exposure to these particles can affect a person’s lungs and heart. So, I will be focusing more on the PM2.5 particles.

Dust Sensor

The DSM501A Dust sensor is one of the cheapest dust sensors on the market and it is capable of detecting PM2.5 as well as PM10 particles.

So, in today’s article, you will learn how to make a low-cost Air Quality monitoring system using DSM501A Dust Sensor, Arduino Nano, and SSD1306 Oled display module. Anyway, before I am going to explain the DSM501A Dust Sensor technical specifications, its interfacing with Arduino, and its programming, first let’s watch the DSM501A dust sensor and Arduino-based Air Quality monitoring system in action.

Altium Designer + Altium 365 + Octopart:

Arduino LoRa Free SMS

Altium 365 lets you hold the fastest design reviews ever. Share your designs from anywhere and with anyone with a single click. it’s easy, leave a comment tagging your teammate and they’ll instantly receive an email with a link to the design. Anyone you invite can open the design using a web browser. Using the browser interface, you’re able to comment, markup, cross probe, inspect, and more. Comments are attached directly to the project, making them viewable within Altium designer as well as through the browser interface. Design, share, and manufacture, all in the same space with nothing extra to install or configure. Connect to the platform directly from Altium Designer without changing how you already design electronics. Altium 365 requires no additional licenses and comes included with your subscription plan.

Get real-time component insights as you design with Octopart built into Altium 365. Octopart is the fastest search engine for electronic parts and gives you the most up-to-date part data like specs, datasheets, cad models, and how much the part costs at different amounts etc. Right in the design environment so you can focus on your designs. Start with Altium Designer and Activate Altium 365. Search for electronic parts on Octopart.

Dust Sensor

I have connected the DSM501A Dust sensor and Oled display module as per the circuit diagram which I will explain in a minute. Right now on the display, you can see the particle concentration and the message clean. So, when the concentration of particles is less than 1000 the message Clean will be printed. Likewise, when the concentration of particles is between 1000 and 10000 then the message Good will be printed. If the concentration of particles is between 10000 and 20000 then the message Acceptable will be printed. If the concentration of particles is between 20000 and 50000 then the message Heavy will be printed. And if the concentration of particles is greater than 50000 then the message Hazard will be printed. For the practical demonstration, I am going to use Smoke.

Dust Sensor

You can see the particle concentration value on the Oled display module. It successfully detected the smoke. For the practical demonstration watch video given at the end of this article. I am sure by now, you might have got an idea of how does this system work. So, without any further delay let’s get started!!!

Amazon Links:

Arduino Nano USB-C Type (Recommended)

DSM501A Dust Sensor

SSD1306 Oled display Module

Other Tools and Components:

ESP32 WiFi + Bluetooth Module (Recommended)

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

DSM501A Dust Sensor:

Dust Sensor

DSM501A Dust Sensor module is a low-cost particles density monitoring sensor and it is capable of detecting PM2.5 as well as PM10 particles. I have already talked much about PM2.5 and PM10 particles right in the beginning.


The supply voltage is 5 volts

Power consumption is 90mA

The operating temperature range is from -10 to +65 Degrees Celsius.

The operating Humidity Range is 95%

Detectable particle size is approximately 1micron

Output Signals are PWM

Time for Stabilization is 1 minute after power is turned ON

The DSM501A consists of

  • Light Emitting Diode (LED) Lamp
  • Detector * Signal amplifier circuit
  • Output drive circuit 1
  • Output drive circuit 2
  • Heater-induced air flow

Dust Sensor

Pinout and description:

Dust Sensor

It has a total of 5 wires. And don’t get confused with the colors. Just follow the pin numbers. As per the datasheet,

  • Pin number 1 is the Vout1 control.
  • Pin number 2 is the Vout2 output(PWM).
  • Pin number 3 is the VCC.
  • Pin number4 is the Vout1 output (PWM). And
  • Pin number 5 is the ground.

Dust Sensor

Your dust sensor might have different color wires. So, just follow the pin numbers and forget about the colors.

Sensor Characteristics vs Low ratio

Dust Sensor


The dust sensor module DSM501 should be installed vertically and kept away from any artificial current of air by fans. In case it is used for air purifier of which fan located in front or rear part, it should be installed at either side of the housing, but not too much deep inside of the housing. There also need to have slits near the module so that air can come inside. In addition, please pay attention to structure and placing location of the application to avoid any adhesive particles (such as oil, etc) getting into the module, which may cause malfunction by sticking to the optical part. Moisture presence inside of the module may cause malfunction of the sensor. Please avoid the location where condensation may frequently occur.

DSM501A with Arduino:

Dust Sensor

Connect Pin 3 of the DSM501A dust sensor with the Arduino 5 volts. Connect Pin 4 of the dust sensor with the Arduino pin 8. Pin 4 of the dust sensor is the Vout1 output. Finally, connect pin 5 of the dust sensor with the Arduino ground.

The VCC and Gnd pins of the SSD1306 Oled display module are connected with the Arduino 3.3V and ground pins. While the SDA and SCL pins of the Oled display module are connected with the A4 and A5 pins.

On the left side, you can see a 5V regulated power supply based on the LM7805 voltage regulator. If you are powering up your Arduino using your laptop or computer then there is no need for this external 5v regulated power supply.

Required Libraries:

As usual, before you start the programming, first of all, make sure you download the Adafruit_GFX.h and Adafruit_SSD1306.h libraries.

DSM501A Arduino Programming:


The Vout1 Output pin of the dust sensor is connected with the Arduino pin 8. Right now, I am using only the Vout1, if you want you can also define a pin for the Vout2. Anyway, the purpose of this code is to find the particles concentration and display it on the Oled display module. And at the same time, we use some if conditions to check if the particles concentration is increased, and then accordingly different messages are printed on the Oled display. So, that’s all about the programming.

Watch Video Tutorial

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button