Devices & Components
Arduino Nano
SHARP GP2Y1014AU0F Dust Sensor
Relay Module (Generic)
90mm*90mm*25mm PC fan
Hardware & Tools
Soldering iron (generic)
Software & Tools
Arduino IDE
Project description
Code
Arduino_smoke_absorber.ino
arduino
1/*Automatic Solder fume Extractor 2 * BY 3 * ABID HOSSAIN 4 * The Fume Extracture turns on when it detects any somoke.... 5 * 6*/ 7 8int SensorPin = A5; 9int led = 7; 10float SensorOut = 0; 11float SensorVo = 0; 12float Dust = 0; 13float Voltage_noDust = 0.12; //calibrate by changing this 14float K = 0.5; //Sensitivity from the datasheet 0.5V/ugm/m^3 15int relay= 2; 16 17void setup() 18{ 19 pinMode(led,OUTPUT); 20 pinMode(relay,OUTPUT); 21 Serial.begin(115200); 22 delay(10); 23 digitalWrite (relay, HIGH); 24 delay(5000); 25 digitalWrite (relay, LOW); 26 27} 28 29void loop() 30{ 31 digitalWrite(led,LOW); //turning on the led 32 delayMicroseconds(280); //wait for 0.28ms 33 SensorOut = analogRead(SensorPin); //read the sensor output voltage 34 delayMicroseconds(50); //wait for 50us 35 digitalWrite(led,HIGH); //turning off the led 36 delayMicroseconds(9670); //wait for (10000-280-50)=9670us 37 SensorVo = SensorOut*(5.0/1024); //calculating sensor output voltage 38 Dust = (SensorVo-Voltage_noDust)*100/K; //calculating Dust density(ugm)/m^3 39 40 if ( Dust < 0) 41 { 42 Dust = 0.00; 43 } 44//Serial.println(Dust); 45//delay(100); 46 47if (Dust > 100){ 48 digitalWrite (relay, HIGH); 49 delay(5000); 50} 51else { 52 digitalWrite (relay, LOW); 53} 54} 55
Downloadable files
solder_fume_exrt_bb_0uHLbo9Mmy.png
solder_fume_exrt_bb_0uHLbo9Mmy.png

solder_fume_exrt_bb_0uHLbo9Mmy.png
solder_fume_exrt_bb_0uHLbo9Mmy.png

Comments
Only logged in users can leave comments