Arduino Uno: PM2.5 sensing revisited

0

Today it’s finally the time to revisit the blog post on using the Honeywell HPMA115S0 particle sensor with an Arduino Uno board. The basics of the operation of the HPMA115S0 and a preliminary version of this code that works with Arduino Due are published in this blog post, so please take a few minutes and read it.

After publishing that blog post, so many of you have asked me to come with a way to make this sensor work with an Arduino Uno. It’s relatively easy to do it, but one must overcome two minor issues:

  • Albeit the HPMA115S0 is powered from a 5V supply, it uses 3.3V logic. To make it work with an Arduino Uno, one must use a logic level converter. In this blog post, I used one BOB-12009 from Sparkfun.
  • The Arduino Uno has a single serial port, which is commonly used to communicate with the PC. The only way to make the PM2.5 sensor work with the Arduino Uno is to use SoftwareSerial, with some minor changes in the code and some quirks that are explained below.

Connections and schematic

The wires used in the blog post to connect the sensor were all red colored.  Getting the right way to connect things was a bit difficult for some people, so I tried to make things a bit easier this time.

HPM Series Particle Sensor pinout

HPM Series Particle Sensor pinout

In the above picture, we can see the sensor with its connector. The pin numbering is a bit odd, with PIN1 near the fan and PIN8 to the edge of the sensor. Only four pins are used in this project: Vcc, RX, TX, and GND.

HPM Series Particle Sensor - connection detail

HPM Series Particle Sensor – connection detail

The wires are still all red, but I’ve put some colored heat shrink tubing on some wires to increase visibility:

  • red is Vcc
  • yellow is TX – this goes to SoftwareSerial RX pin
  • blue is RX – this goes to SoftwareSerial TX pin
  • black is GND

The sensor is connected as follows:

Honeywell PM2.5 sensor Arduino Uno connections

Honeywell PM2.5 sensor Arduino Uno connections

We can see that the logic level converter receives both 5V (red wire) and 3.3V (orange wire) from the Arduino board. GND is connected both to the PM2.5 sensor and to the logic level converter. The sensor is powered from 5V (red wire going to pin2 of the sensor).

Pin11 of the Arduino Uno is SoftwareSerial TX pin and will go to the HV4 pin of the logic level converter. The opposite LV4 pin goes to pin7 of the HPMA115S0 sensor,

Pin10 of the Arduino Uno is SoftwareSerial RX pin and will go to the HV3 pin of the logic level converter. The opposite LV3 pin goes to pin6 (TX) of the HPMA115S0 sensor.

Beloe there are some pictures of the sensor connected to an Arduino Uno:

1 2
Share.

Leave A Reply

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