ro[ecL uescrlpLlon: 1he clrculL uses boLh an alr-quallLy sensor (MC 133) and a LemperaLure sensor (LM 33) Lo measure Lhe polluLlon levels and Lhe LemperaLure levels of Lhe surroundlngs respecLlvely. 1he alr-quallLy sensor glves values ln volLages, and Laklng Lhe room value as Lhe base level, we [udge Lhe polluLlon level of Lhe surroundlng. values were Laken ln Lhe room, on Lhe roadslde and aL Lhe maln gaLe. 1hey progresslvely show greaLer polluLlon levels. 1he LLus dlsplay a blnary condlLlon of a polluLed envlronmenL.
Crlglnal lan: We lnLended Lo use Av8 ALmega, whlch could be embedded on a small C8 along wlLh Lhe sensors. 1hls board would have been much more compacL, and llghLer Lhan Ardulno and hence more sulLable Lo be aLLached Lo a hellum balloon laLer. lor Lhe power supply we planned on uslng a Ll-o 7v baLLery along wlLh a 3v volLage regulaLor, as our sensors and mlcro-conLroller work on volLages close Lo 3v.
WhaL we dld: We used Ardulno Mlcro-conLroller Lo lnLerpreL Lhe volLage readlngs from Lhe olluLlon and 1emperaLure Sensor, and glow Lhe LLus accordlng Lo wheLher Lhe polluLlon was hlgher or lower Lhan a Lhreshold value.
MC 133 Ardulno LM 33 LLus MC 133 (olluLlon Sensor) ClrculL:
lor LesLlng, Ardulno was connecLed Lo a compuLer, whlch provlded power Lo Lhe Ardulno and allowed us Lo see Lhe volLage readlngs from Lhe sensor on Lhe Serlal MonlLor. 1hree seLs of MeasuremenLs were Laken:
Maln 8oad 8oadslde PosLel 8oom
1he values around 1 are Lhe volLage readlngs from Lhe polluLlon sensor. 1he values around 30 are Lhe LemperaLure readlngs. Accordlngly we seL our Lhreshold volLage from Alr Sensor Lo 1.3 v.
Ardulno Code:
int pollutionpin = 3; int temppin = 5; float a = 0; float b = 0; float pvalue = 0; float tvalue = 0; float v[100]; //this array will store last 100 readings from pollution sensor int pos = 0; float mean = 0; //mean of elements of the array v
void loop() { delay(10); a = analogRead(pollutionpin); pvalue = float(a*5)/float(1024); b = analogRead(temppin); tvalue = float(b*5)/float(10.24); mean = mean - v[pos]/100; //subtracts the reading taken 100 cycles earlier from the mean v[pos] = pvalue; //replaces the oldest value in the array with the newest mean = mean + v[pos]/100; //adds the new reading to the mean pos = (pos+1)%100; //moves ahead in the array, which is now the position of the oldest value in the array
if (pos == 99){ Serial.println(tvalue); if (mean<1.5) { Serial.println("Air is Polluted"); digitalWrite(6,HIGH); //LED 6 is red (polluted air) digitalWrite(5,LOW); //LED 5 is green (good air) } else{ Serial.println("Air is Good"); digitalWrite(6,LOW); digitalWrite(5,HIGH); } } }
1o go ahead wlLh our plan of uslng Lhe ALmega, we goL access Lo an Av8 ALmega programmer clrculL and learned how Lo program ALmega for our pro[ecL. We also LesLed our ALmega code by uslng an LLu Lo dlsLlngulsh hlgh volLage lnpuLs from low volLage lnpuLs.
roblems: Slnce, Lhe alr-quallLy sensor had Lo be conLlnuously heaLed for aL-leasL 24 hours before measuremenL, lL had Lo be kepL connecLed Lo Lhe power supply. AbrupL power cuLs wasLed a loL of heaLlng Llme. Ardulno board ls qulLe huge Lo lmplemenL Lhe acLual balloon ldea.
roposed Work: Clven some more Llme, we could use Lhe Av8 codlng LhaL we learnL and lmplemenL Lhe enLlre clrculL on a smaller board and use Lhe balloons. WhaL was lefL was Lo place an Av8 ALmega ln-place of Ardulno, aLLach a Ll-o baLLery wlLh a volLage regulaLor Lo power Lhe clrculL and solder lL onLo a small clrculL board.
Who dld WhaL: !anakl SheLh - ro[ecL plannlng, codlng and sensor daLa collecLlon/LesLlng SarLhak 8agarla - ro[ecL plannlng, clrculL deslgnlng/bulldlng and codlng Abhl[eeL Mukhekar - Sensor daLa collecLlon/LesLlng ?ashasvl Alladl ([olned laLe) - ClrculL bulldlng and solderlng (could noL be done for shorLage of Llme)