Grove - Laser PM2.5 Sensor (HM3301)
The Grove - Laser PM2.5 Sensor (HM3301) is a new generation of laser dust detection
sensor, which is used for continuous and real-time detection of dust in the air.
Different from the pumping dust detection sensor, the HM-3301 innovatively uses fan
blades to drive air, and the air flowing through the detection chamber is used as a test
sample to perform real-time and continuous test on dust of different particle sizes in the
air.
This module is suitable for dust detectors, intelligent air purifiers, intelligent air
conditioners, intelligent ventilation fans, air quality testing, haze meters, environmental
monitoring and relative products and applications.
Features
High sensitivity on dust particles of 0.3 μm or greater
Real-time & continuous detection of dust concentration in the air
Based on laser light scattering technology, readings are accurate, stable, and consistent
Low noise
Ultra-low power consumption
Specification
Item
Value
Operating Voltage
3.3V / 5V
Operating temperature
‐10~60Ԩ
Operating humidity
10%~90%RH (non‐condensing)
Partical size
3 channels‐‐ 2.5µm, 5µm, 10µm
Range
(PM2.5 standard value)
1~500µg/ m3 (Effective range)
1000 µg/ m3 (Maximum range)
Resolution
Concentration: 1µg/ m3
Counting concentration: 1s/0.1L
Stability time
30 seconds after power‐on
Interface
I2C
I2C address
0x40
Typical applications
Air purifier / air conditioner
Air quality testing equipment
Industrial PM value analysis
Dust and smoke detection and analysis
Real-time PM2.5, PM10, TSP detector
Multichannel particle counter
Environmental testing equipment
Hardware Overview
Pin Out
Working Principle
The HM-3301 Dust Sensor is based on the advanced Mie scattering theory. When light
passes through particles with quantity same as or larger than wavelength of the light, it
will produce light scattering. The scattered light is concentrated to a highly sensitive
photodiode, which is then amplified and analyzed by a circuit. With specific
mathematical model and algorithm, the count concentration and mass concentration of
the dust particles is obtained.
The HM-3301 dust sensor is composed of main components such as a fan, an infrared
laser source, a condensing mirror, a photosensitive tube, a signal amplifying circuit and
a signal sorting circuit.
Platforms Supported
Arduino
Raspberry Pi
BeagleBone
Wio
LinkIt ONE
Caution
The platforms mentioned above as supported is/are an indication of the module's
hardware or theoritical compatibility. We only provide software library or code examples
for Arduino platform in most cases. It is not possible to provide software library / demo
code for all possible MCU platforms. Hence, users have to write their own software
library.
Getting Started
Play With Arduino
Hardware
Materials required
Seeeduino V4.2
Base Shield
Grove ‐ Laser PM2.5 Sensor (HM3301)
Note
1 Please plug the USB cable gently, otherwise you may damage the port. Please use
the USB cable with 4 wires inside, the 2 wires cable can't transfer data. If you are not
sure about the wire you have, you can click here to buy
2 Each Grove module comes with a Grove cable when you buy. In case you lose the
Grove cable, you can click here to buy.
Step 1. Connect the Grove - Laser PM2.5 Sensor (HM3301) to port I2C of GroveBase Shield.
Step 2. Plug Grove - Base Shield into Seeeduino.
Step 3. Connect Seeeduino to PC via a USB cable.
Note
If we don't have Grove Base Shield, We also can directly connect this module to
Seeeduino as below.
Seeeduino
Grove Cable
Grove ‐ Laser PM2.5 Sensor (HM3301)
GND
Black
GND
5V or 3.3V Red
VCC
SDA
White
SDA
SCL
Yellow
SCL
Software
Attention
If this is the first time you work with Arduino, we strongly recommend you to see Getting
Started with Arduinobefore the start.
Step 1. Download the Seeed_PM2_5_sensor_HM3301 Library from Github.
Step 2. Refer to How to install library to install library for Arduino.
Step 3. Restart the Arduino IDE. Open the example, you can open it in the following
three ways:
a. Open it directly in the Arduino IDE via the path: File → Examples → PM2.5
sensor → basic_demo.
b. Open it in your computer by click the basic_demo.ino which you can find in the
folder XXXX\Arduino\libraries\Seeed_PM2_5_sensor_HM3301master\examples\basic_demo, XXXX is the location you installed the Arduino
IDE.
c. Or, you can just click the icon
in upper right corner of the code block to copy
the following code into a new sketch in the Arduino IDE.
1#include "Seeed_HM330X.h"
2
3#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
4 #define SERIAL SerialUSB
5#else
6 #define SERIAL Serial
7#endif
8
9
10HM330X sensor;
11u8 buf[30];
12
13
14const char *str[]={"sensor num: ","PM1.0 concentration(CF=1,Standard particulate matter,unit:ug/m3):
15",
"PM2.5 concentration(CF=1,Standard particulate matter,unit:ug/m3): ",
16
"PM10 concentration(CF=1,Standard particulate matter,unit:ug/m3): ",
17
"PM1.0 concentration(Atmospheric environment,unit:ug/m3): ",
18
"PM2.5 concentration(Atmospheric environment,unit:ug/m3): ",
19
"PM10 concentration(Atmospheric environment,unit:ug/m3): ",
20
};
21
22
23err_t print_result(const char* str,u16 value)
24{
25 if(NULL==str)
return ERROR_PARAM;
26
27 SERIAL.print(str);
28 SERIAL.println(value);
29 return NO_ERROR;
30}
31
32/*parse buf with 29 u8-data*/
33err_t parse_result(u8 *data)
34{
35 u16 value=0;
36 err_t NO_ERROR;
37 if(NULL==data)
return ERROR_PARAM;
38
39 for(int i=1;i