Arduino: measuring PM2.5 and PM10 with Honeywell HPMA115S0

9
Some of the links on this blog are affiliated links. READ MORE

An essential aspect of measuring air quality is to determine the number of small particles. That is, things smaller than 10µm and 2.5µm. Such tiny particles are roughly the size of a microbe and can penetrate the lungs,  causing many health issues.

But how we can measure such small things? Most often, this is done via laser scattering: a laser light source illuminates small particles as they are pulled through the detection chamber. As these particles pass through the laser beam, the variations in light intensity are recorded by a photodetector. Those variations can be further analyzed to determine number and size of particles.

Amongst other sensors that use this technology lies the Honeywell HPMA115S0-XXX, a calibrated sensor with digital output via UART protocol. The sensor can determine PM2.5 and PM10 in concentrations up to 1000µg/m3, with an accuracy of ±15%.

When measuring, the fan draws the air in through the air inlet. Particles in the air go through the detection chamber, where they pass through the laser beam. The light reflected off the particles is captured and analyzed by a proprietary algorithm, and the amount of particles in the air is determined. The sensor is internally calibrated, so all we have to do is read the results on the UART interface,

The sensor can operate in the -10°C to 50°C interval, with humidity up to 95%RH, non-condensing, Its lifespan is about 20,000 hr in continuous mode.

The sensor has a very small connector. The datasheet specifies the mating connector as Molex 51021-0800. Be warned, that part no. is only for the plastic housing, it comes without pins.

Honeywell HPMA115S0-XXX particle sensor

Honeywell HPMA115S0-XXX particle sensor

I deeply hate crimping such smaller connectors, so I tried to find an easier alternative. And I have found some pre-crimped PicoBlade, Molex 06-66-0015 cables.

Molex ready made cable

Molex ready made cable

You might notice I haven’t populated the whole connector as some pins are not connected internally.

[Update May 18. 2018]: As correctly stated by Lloyd in the comments section, there was a mistake in the original blog post. I have inadvertently used a picture from the making of the project which showed incorrect wiring. This has been corrected and replaced with the picture below:

HPM Series HPMA115s0 pinout

HPM Series HPMA115s0 pinout

Wiring of the sensor requires only four pins:

Pin 2 (Vcc) goes to the 5V pin on the Arduino board.
Pin 6 (UART TX) goes to the RX pin of the Arduino board. This pin uses 3.3V logic level.
Pin 7 (UART RX) goes to the TX pin of the Arduino board. This pin uses 3.3V logic level.
PIN 8 (GND) goes to GND pin of the Arduino Board.

Pin 1 (3.3V output) is left unused.  The wire is in not connected, as the Arduino board provides its own 3.3V power supply.

Please observe the pin numbering, with the rightmost pin being pin #1 (close to the fan), and the leftmost pin being pin #8.

Now, the sensor is ready to be used. What about communicating with an Arduino?

1 2 3
Share.

9 Comments

  1. I was not able to get this to work at all. It looks like you are using softserial in order to declare Serial3 but you never do that. Is your code incomplete?

    • Hi Jon,
      The Flip & Click board I used is an Arduino Due clone. It has 3.3v logic levels, so it matches the requirements of the Honeywell sensor. Also, the board has four hardware serial ports, so there’s no need to use software serial.

  2. Lloyd Brown on

    It appears the photo of the HPMA and connector wiring is incorrect. The connectors are numbered from right to left. 1-3.3V; 2-5V; 3-N/A; 4-N/A; 5-Test; 6-TX output; 7-RX input; 8-GND. As per the Honeywell Data Sheet.

    It appears from the wiring from the HPMA to the Flip and Click this was discovered and an additional wire was put in to cover the numbering being from right to left.

    That might be why Jon’s circuit did not work assuming he wired it like the HPMA and connector photo and assumed the numbering was left to right. Luckily I noticed before I hooked power to it. Still have to hook it up but think that would have been a problem had I assumed left to right numbering.

    • Teodor Costachioiu on

      Hello Lloyd,

      I’ll check this first thing tomorrow morning, and I will make the required updates if needed.

      Thank you very much for your comment, it helps a lot to receive such feedback on my blog posts.

  3. debajyoti dash on

    Hi TEODOR COSTACHIOIU,
    I am a student working on atmospheric sciences at University of Hyderabad, India. Currently I am working on collecting atmospheric data using unmanned platforms. Since nobody in my team is from electronics background we are finding it difficult to use HPMA115S0-XXX air quality monitoring sensor with Arduino uno microprocessor. We strictly want to stick to Arduino uno because we have already built our unmanned platform and have been acquiring other atmospheric parameters using various sensors using Arduino uno. It would be difficult on our part to shift to other microprocessors. We came across your blog and really found it interesting. It would really be a great help if you can provide us with detailed schematics and a working code on Arduino IDE for UNO. We promise you to credit you by acknowledging your contribution to our project in any paper we publish (It would basically be an atmospheric science paper).Please feel free to contact me via email and help us at the earliest.

    • Teodor Costachioiu on

      Hi,

      The code I have posted should work fine on the Uno. The problem lies in the fact that the sensor uses 3.3V logic, and is powered from 5V. The Uno can provide 5V power, but it also uses 5V logic.

      My suggestion is to use some level translators on the serial (TX and RX) lines, so the sensor couls still work on 3.3V logic. Like this one https://www.sparkfun.com/products/12009.

      • debajyoti dash on

        I tried as you suggested but I am getting an error message saying “serial3 was not declared in this scope”can you help me with this.

        • Teodor Costachioiu on

          Hi,

          Hi,

          Serial3 is available only on Arduino Mega/Due. Arduino Uno has only Serial.

          You can sacrifice PC serial debugging and connect the particle sensor on pins 0 and 1 of Arduino Uno, and change from Serial3 to Serial in the code.
          Or you can use software serial – https://www.arduino.cc/en/Reference/softwareSerial – and use any spare pins of Arduino Uno.

          • debajyoti dash on

            I finally decided to go for arduino mega. But the problem is now I am getting both pm 2.5 and pm10 reading as zero continuously. Can you think of any possible errors?

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.