Wish List 0

Pm2.5 Sds011 Module

Rs. 1,985.00 Rs. 2,263.00

-The SDS011 the usage of precept of laser scattering,can get the particle attention between zero.3 to 10um inside the air.
-It with virtual output and integrated fan is solid and reliable.

Technical Parameters:
Measuring output: PM2.5,PM10
Range: 0.0-999.9 ug/m3
Power supply voltage: 5V
Maximum working current: 100mA
Sleep current: 2 mA
Operating temperature range: -20-50℃
Response time: 1s
Serial data output frequency: 1 time/s
Particle diameter resolution: Less than 0.3um
Relative error: 10%
Product size: 71x70x23mm"

SPECIFICATIONS:

Pin Name Explain:

-CTL  Control pin, reserved

-1um >0.3 Micron particle concentration, PWM Output

-5V 5V power input

-25um >2.5 Micron particle concentration, PWM Output

-GND GND

-R Serial port receiver RX

-T Serial port transmission TX


OVERVIEW:

-Accurate and Reliable: laser detection, stable, good consistency;

-Quick response: response time is less than 10 seconds when the scene changes;

-Easy integration: UART output (or IO output can be customized), fan built-in;

-High resolution: resolution of 0.3ug/m3

PACKAGE INCLUDES:

1 PCS x Pm2.5 Sds011 Module


//SOURCE CODE TAKEN FROM BELOW LINK

//https://create.arduino.cc/projecthub/plouc68000/portable-fine-dust-pm10-analyzer-with-large-oled-digits-1c20c2

// UNO version of PM10 Analyser

#include "SoftwareSerial.h"

SoftwareSerial mySerial(2, 3); // RX, TX for SDS011 sensor ( to keep Serial monitor available )


#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);  // for 1306 type OLED, I2C / TWI


// Global Variables

static unsigned char buf[7], buffSDS[25];

unsigned int PM2_5,PM10=0;


// Sub Routines


// Update OLED Display

void draw(void) {

  /* for the line with PM2.5 value */

  if ( PM2_5>999 ) PM2_5=999 ;// overflow is 999

  val_to_string(PM2_5); 

  

  u8g.setFont(u8g_font_fub30);// Large font

  u8g.drawStr( 0, 31, buf); // 

  u8g.setFont(u8g_font_unifont);

  u8g.drawStr( 75, 10, "PM2.5");

  buf[0]='µ';

  buf[1] = '\0';

  u8g.drawStr( 75, 10+2+10, buf); 

  u8g.drawStr( 82, 10+2+10, "g/m3"); 

  

  // for the line with PM10 value

  if ( PM10>999 ) PM10=999 ;// overflow

  val_to_string(PM10); 

  

  u8g.setFont(u8g_font_fub30);// Large font

  u8g.drawStr( 0, 65, buf); // 

  u8g.setFont(u8g_font_unifont);

  u8g.drawStr( 75, 34+10, "PM10");

  buf[0]='µ';

  buf[1] = '\0';

  u8g.drawStr( 75, 34+10+2+10, buf);

  u8g.drawStr( 82, 34+10+2+10, "g/m3");  

}



/* convert int into buf[] to BCD string to be OLED printed */

void val_to_string(int val){


  int deca[5];

  deca[4]=10000;

  deca[3]=1000;

  deca[2]=100;

  deca[1]=10;

  deca[0]=1;


  char digit[10];

  digit[0]='0';

  digit[1]='1';

  digit[2]='2';

  digit[3]='3';

  digit[4]='4';

  digit[5]='5';

  digit[6]='6';

  digit[7]='7';

  digit[8]='8';

  digit[9]='9';


  buf[0]='0';

  buf[1]='0';

  buf[2]='0';

  buf[3]='\0'; // string terminator, only 3 digits needed

  buf[4]='0';

  buf[5] = '\0'; // not used


  for ( int8_t i=2; i>=0 ; i=i-1 )

  {

    byte d=0;

    while (( val-deca[i]) >= 0)

    { val=val-deca[i];

      buf[2-i]=digit[++d];

    }

  }  

}



void setup() {

  // put your setup code here, to run once:


// init 1306 I2C OLED 

 u8g.setColorIndex(1); // monochrome  

 

// Read SDS011 on Serial 

mySerial.begin(9600);  // 

mySerial.setTimeout(200);

mySerial.readBytesUntil(0xAB,buffSDS,20); // read serial until 0xAB Char received


// Serial Monitor

Serial.begin(115200);  

}



void loop() {

  // put your main code here, to run repeatedly:


 // LCD Update

  u8g.firstPage();  

  do {

    draw();

  } while( u8g.nextPage() );


// Read SDS011

mySerial.readBytesUntil(0xAB,buffSDS,20);


// Serial monitor, print the HEX bytes received in buffSDS

//Serial.write(buffSDS,10);

for ( int8_t i=0; i<10 ; i=i+1 )

  {

  Serial.print( buffSDS[i],HEX);

  Serial.print(" ");

  }

Serial.println("");


  

PM2_5 = ((buffSDS[3]*256)+buffSDS[2])/10; // extract PM2.5 value

Serial.print("PM2.5: ");

Serial.println(PM2_5);


PM10 = ((buffSDS[5]*256)+buffSDS[4])/10; // extract PM10 value

Serial.print("PM10: ");

Serial.println(PM10);


delay(500);

}


15 days

Write a review

Please login or register to review