[vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”Introduce” tab_id=”1398157469-1-60″][vc_column_text]Air quality sensor is to detect the density of tiny particles in the air, because it is the change of “quantity”, so we need to use AD transform to get different values.
Positive view
Back view
[/vc_column_text][/vc_tab][vc_tab title=”Part List and Diagram” tab_id=”1398157469-2-10″][vc_column_text]
1 x Arduino UNO
3 x female to male jumper wires
1 x Air Quality Sensor
The diagram as follows:
- Air quality sensor VCC – > Arduino UNO 5V
- Air quality sensor GND – > Ardiono UNO GND
- Air quality sensor SENS – > Arduino A0 pin
- Air quality sensor NC do not need to connect
[/vc_column_text][/vc_tab][vc_tab title=”Test Code” tab_id=”1398157609595-2-9″][vc_column_text]The code as follows:
void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: int a; a = analogRead(A0); Serial.println("now the Air quality sensor is :"); Serial.println(a); delay(500); }
[/vc_column_text][/vc_tab][vc_tab title=”Test Result” tab_id=”1398157612057-3-5″][vc_column_text]
unload the code into Arduino UNO , open the monitor, you can see the similar result as the figure 1
Release the gas of the lighter to the detection area of the air quality sensor, the value will increase for the gas released from the burning lighter, you can see the result as the figure 2
Remove the lighter, you can see the value decrease, as in figure3
[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]
Leave a Reply
You must be logged in to post a comment.