Introduction
PM 2.5 sensor is a professional sensor for detecting PM2.5 and PM10. It is used for testing the air quality. It has good consistency and high accuracy,which can be accurate to a single unit of digit.
Shipping List
Hardware
Features
- Accuracy:Laser detection, stable and consistent.
- Fast Response: Less than 10 seconds' response to the occasion change.
- Easy to Integrate:Serial port output, with a built-in fan.
- High resolution:Enable to recognise particles with diameters smaller to 0.3um.
- Working Voltage:5V
- Max Working Current:100mA
- Sleep Current:3mA
- Working Temperature:-20-50℃
- Data Output Time:1 second
- Serial Port Data Sending Frequency:1 time per second
- Relative Tolerance:10%
- Product Dimension:71x70x23mm
Application
- Available to be applied to PM2.5 detectors, air purifiers, filtering systems, etc..
Pins Instruction
Pin | Name | Note |
---|---|---|
1 | NC | NC |
2 | 1um | >0.3um particle intensity, PWM output |
3 | 5V | 5V power input |
4 | 25um | >2.5um particle intensity, PWM output |
5 | GND | Ground |
6 | RXD | Serial port receive RX |
7 | TXD | Serial port send TX |
Dimension:
Data Output
Read by PWM
Read by Serial Port
Serial Port Protocol:96008N1.(Speed Ratio 9600, 8 bits, no parity, 1 stop bit)
Serial Port Report Time: 1+0.5 second
Data Frame(10 byte):header+command+data(6 byte)+checksum+tail
0 header AA
1 command C0
2 data 1 PM2.5 lower byte
3 data 2 PM2.5 high byte
4 data 3 PM10 lower byte
5 data 4 PM10 high byte
6 data 5 0(retain)
7 data 6 0(retain)
8 checksum checksum
9 tail AB
Checksum:Sum from data 1 to data 6.
Data Frame(10 byte):header+command+data(6 byte)+checksum+tail
0 header AA
1 command C0
2 data 1 PM2.5 lower byte
3 data 2 PM2.5 high byte
4 data 3 PM10 lower byte
5 data 4 PM10 high byte
6 data 5 0(retain)
7 data 6 0(retain)
8 checksum checksum
9 tail AB
Checksum:Sum from data 1 to data 6.
PM2.5 data content: PM2.5(ug/m3) = ((PM2.5 high byte x 256) + PM2.5 lower byte)/10
PM10 data content:PM10(ug/m3) = ((PM10 high byte x 256) + PM10 lower byte )/10
PM10 data content:PM10(ug/m3) = ((PM10 high byte x 256) + PM10 lower byte )/10
Example
Arduino
Circuit Connection
Code
#define pm25Pin 14
#define pm10Pin 15
void setup() {
pinMode(pm25Pin, INPUT);
pinMode(pm10Pin, INPUT);
Serial.begin(9600);
}
void loop() {
Serial.print("PM2.5 = ");
Serial.println(pulseIn(pm25Pin, HIGH, 1500000) / 1000 - 2);
Serial.print("PM10 = ");
Serial.println(pulseIn(pm10Pin, HIGH, 1500000) / 1000 - 2);
}
Micro:bit
Circuit Connection
Code
For the whole code, see this link: https://makecode.microbit.org/_83oYC4DcVc5z
Or you can click Download in the page below to download all example code.
Other
Relative Accessary
Freaduino UNO Rev2.2 MB_EFUNO
BBC Micro:bit Board for Coding & Programming
ElecFreaks Micro:bit Breakout Board ( Octopus:bit)
https://www.elecfreaks.com/12348.html
没有评论:
发表评论