Difference between revisions of "Sensor-Dust"

From Microduino Wiki
Jump to: navigation, search
 
(15 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
|-
 
|-
 
|
 
|
[[File: Microduino-Dust.jpg|400px|thumb|center| Microduino-Dust]]
+
[[File: Microduino-Dust.jpg|200px|thumb|right| Sensor-Dust]]
 +
The product number of Sensor-Dust is: '''MSDT62'''
  
 
Microduino-Dust is a PM2.5 sensor.
 
Microduino-Dust is a PM2.5 sensor.
  
 
==Sensor Pin Introduction==
 
==Sensor Pin Introduction==
{{Sensor_explain
+
{{ST_Pinout
|nameA=[[Sensor-Dust]]
+
|st_name=Dust Sensor
|modeA=Soft serial port tx
+
|pin3=Analog Input
|modeB=Soft serial port rx
 
 
}}
 
}}
 +
 
==Features==
 
==Features==
 
*Adopt SHARP GP2Y1010AUOF air quality sensor;  
 
*Adopt SHARP GP2Y1010AUOF air quality sensor;  
*Independent air duct and fast detection speed;
+
*Serial port communication.
 +
 
 
==Specification==
 
==Specification==
*Working voltage: 4.5V~5.5V
+
*Sensor voltage  
*Detection sensitivity: 0.5V/0.1mg/m3
+
**3.3V~5V working voltage
*1.27mm-spacing 4Pin-to-6Pin interface;
+
 
*Soft serial port (D4,D5) communication.
+
*Sensor size
 +
**Board size: 23.5mm*13mm
 +
**1.27mm-spacing 4Pin connected with sensorhub
 +
**The CAD drawing of the sensor: '''[[File:Sensor_CAD.zip]]'''
 +
 
 +
*Connection
 +
**This sensor can be connected to the  following interfaces: '''D4/D5'''
  
 
==Document==
 
==Document==
*Schematic: '''[[File: Microduino_Dust.Zip]]'''
+
*Schematic diagram: '''[[File: Sensor-Dust.Zip]]'''
 +
*Main sensor: '''[[File:Sensor-Dust_datasheet.pdf ]]'''
  
 
==Development==
 
==Development==
  
Microduino-Dust can be applied in outdoor air quality detection or indoor dust detection.
+
===Program Download===
 +
*Download and unzip the program '''[[File:Sensor-Dust_Test.zip]]'''
  
==Application==
+
===Programming===
*All hardware needed: [[Microduino-CoreUSB]], [[Microduino-sensorhub]], [[Microduino-IO split]], a USB cable and several wires; 
+
{{Upload
** Make sure you build Microduino IDE or refer to: [[Microduino Getting started]]
+
|nameA=[[Microduino-Core]], [[Microduino-USBTTL]]
*Program
+
|nameB=[[Microduino-USBTTL]]
<source lang="cpp">
+
|boardName=Microduino/mCookie-Core(328p), Atmega328P@16M,5V
 +
|fileName=Sensor-Dust Test.ino
 +
}}
  
#define FAN_PIN 10      //Fan control pin
+
===Hardware Setup===
#define LED_PIN 12      //Sensor LED control pin
+
*Referring to the following diagram, connect the Sensor-Dust to digital interface D4/D5 of '''[[Microduino-Sensorhub]]'''.
#define DUST_PIN A0    //Sensor detection
+
<br>
#define TIME1 280     
+
[[file:Microduino-sensorhub_Dust.JPG|thumb|400px|left]]
#define TIME2 40
+
<br style="clear: left"/>
#define TIME3 9680
+
===Result===
 +
*After download, open the serial monitor.
 +
*The detected PM2.5 intensity will be printed out in cycle in the serial monitor.
  
int dustVal = 0;
+
==Application==
float dustVoltage = 0;
+
It can be used to detect the air quality and indoor dust and so on.
float dustDensity = 0;
 
 
 
void setup(){
 
  Serial.begin(9600);
 
  pinMode(FAN_PIN, OUTPUT);
 
  pinMode(LED_PIN, OUTPUT);
 
  digitalWrite(FAN_PIN, LOW);
 
}
 
 
 
void loop(){
 
  digitalWrite(FAN_PIN, HIGH);    //Open the fan before detecting
 
  delay(3000);
 
  digitalWrite(FAN_PIN, LOW);    //Close the fan after 3s delay
 
  digitalWrite(LED_PIN,LOW);      //Turn on LED inside the sensor 
 
  delayMicroseconds(TIME1);      //Wait for 280us
 
  dustVal = analogRead(DUST_PIN); //Analog value sampling 
 
  delayMicroseconds(TIME2);      // Wait for 40us
 
  digitalWrite(LED_PIN,HIGH);    //Turn off the LED
 
  delayMicroseconds(TIME3);
 
  dustVoltage = dustVal * (5.0/1024.0);    //Convert the analog value to voltage value.
 
  dustDensity = 0.17 * dustVoltage - 0.1;  //Convert the voltage value to dust density (Output unit: mg / m³)
 
  Serial.println(dustDensity);
 
  delay(1000);
 
}
 
</source>
 
*Software:
 
*Stack all modules together and then connect the Dust sensor's fan control interface with the D10 pin of the Sensorhub with a wire.
 
*Connect Microduino-Dust sensor's control detection interface to the IO splitter's IN interface with a wire. And then connect the IO splitter's A-OUT interface to Sensorhub A0, the IO splitter's *B-OUT interface to Sensorhub D12.
 
*Open Arduino IDE, copy the program to IDE and then choose the right board from Tools→Board and then compile.
 
*Select the right port from Tools→Serial Port in Arduino IDE after compiling, then download program.
 
*After the download, you can open the serial monitor. After the Dust sensor's fan works for three seconds, the serial console will display the current air dust density and the Dust sensor will have another detection after one second.
 
  
 
==Purchase==
 
==Purchase==
  
 
==History==
 
==History==
 
==Pictures==
 
 
*Front
 
[[file: Microduino-Dust-F.JPG|thumb|600px|center|Microduino-Dust Front]]
 
*Back
 
[[file: Microduino-Dust -b.JPG|thumb|600px|center|Microduino-Dust Back]]
 
|}
 

Latest revision as of 23:22, 30 March 2017

Language: English  • 中文
Sensor-Dust

The product number of Sensor-Dust is: MSDT62

Microduino-Dust is a PM2.5 sensor.

Sensor Pin Introduction

Sensor backpin.png

Dust Sensor
General Pin Out Sensor / Trinket's Pin Out
PIN1 (GND) GND
PIN2 (VCC) VCC
PIN3 (SIGNAL-A) Analog Input
PIN4 (SIGNAL-B) Not Connected
  • General Pin Out is the standard pin out of a Sensor / Trinket connector.
  • Sensor / Trinket's Pin Out is this specific Sensor / Trinket's wiring in relation to the General Pin Out.
  • SIGNAL-A / SIGNAL-B are signals that could be digital input, digital output, analog input or analog output. Or special signals such as serial communication (SoftwareSerial, IIC (I2C), etc) or other special signals.
  • Not Connected refers to the Pin not being used for this particular Sensor / Trinket.
  • Read more about the hub module.

Features

  • Adopt SHARP GP2Y1010AUOF air quality sensor;
  • Serial port communication.

Specification

  • Sensor voltage
    • 3.3V~5V working voltage
  • Sensor size
    • Board size: 23.5mm*13mm
    • 1.27mm-spacing 4Pin connected with sensorhub
    • The CAD drawing of the sensor: File:Sensor CAD.zip
  • Connection
    • This sensor can be connected to the following interfaces: D4/D5

Document

Development

Program Download

Programming

  • Follow the Software Getting Started Guide.
  • Select the Board, Processor and Port.
  • Click [File]->[Open], browse to the project program address, and click "Sensor-Dust Test.ino" to open the program.
  • After confirming all these items are correct, click "→" to download the program to the development board.

Hardware Setup

  • Referring to the following diagram, connect the Sensor-Dust to digital interface D4/D5 of Microduino-Sensorhub.


Microduino-sensorhub Dust.JPG


Result

  • After download, open the serial monitor.
  • The detected PM2.5 intensity will be printed out in cycle in the serial monitor.

Application

It can be used to detect the air quality and indoor dust and so on.

Purchase

==History==