Alcoholmeter with MQ3 sensor

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
lnadal
Date:
Sat Apr 09 14:15:00 2011 +0000
Parent:
0:05d4673b2832
Child:
2:5bb97fd609cb
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Apr 09 14:04:34 2011 +0000
+++ b/main.cpp	Sat Apr 09 14:15:00 2011 +0000
@@ -2,14 +2,15 @@
 
 Range: 0-3000 ppm.
 
-*************************************************************************************************************************
+****************************************************************************************************
 
-This project was done in 2010-11 school year in Molins de Rei (Barcelona, Spain) in Lluis de Requesens Secondari School. 
+This project was done in 2010-11 school year in Molins de Rei (Barcelona, Spain)
+in Lluis de Requesens Secondari School. 
 
-Tacher: Lluis Nadal.
+Teacher: Lluis Nadal.
 Students: Agnes Garriga, Manel Tuells.
 
-**************************************************************************************************************************
+***************************************************************************************************
 
 Sensor: MQ-3 alcohol sensor.(http://www.sparkfun.com/;  http://www.bricogeek.com/shop/).
 
@@ -20,8 +21,10 @@
 
 
 
-MQ-3 sensor response is not linear. Calibration was done by passing air (with a fishtank air pump)  through a dilute solution of ethanol in water.
-The resulting air saturated of ethanol vapor and water vapor, was continuously introduced in an open container containing the sensor. Th voltage across a load resistor was measured.
+MQ-3 sensor response is not linear. Calibration was done by passing air (with a fishtank air pump)
+through a dilute solution of ethanol in water.
+The resulting air saturated of ethanol vapor and water vapor, was continuously introduced in an 
+open container containing the sensor. Th voltage across a load resistor was measured.
 
 A 500 Ohm-1% load resistor was selected in order to achieve a measuring range of 3000 ppm.
 
@@ -31,7 +34,8 @@
 ppm =  2.71494E+02*X - 3.10999E+02*X^2 + 6.85051E+02*X^3 - 3.47587E+02*X^4 + 7.47499E+01*X^5
 
 
-For more accurate readins is recommended a minimum heating time of 5 minutes (24 hours is recommended for the manufacturer) but 1 minute give satisfactory results.
+For more accurate readins is recommended a minimum heating time of 5 minutes (24 hours is recommended
+for the manufacturer) but 1 minute give satisfactory results.
 After heating, the sensor is autozeroed by averaging 5 measures.
 
 In heating and in autozero operations the sensor must be left away of alcohol vapors! 
@@ -79,7 +83,7 @@
 TextLCD lcd(p24, p26, p27, p28, p29, p30); // Wiring microcontroller - LCD:
 // rs(4), e(6), d4(11), d5(12), d6(13), d7(14) (R/W(5) a 0)
 
-DigitalIn pushbutton = p8; // Pushbutton (normally open). Stops initial heating time when it is pressed. .
+DigitalIn pushbutton = p8; // Pushbutton (normally open). Stops initial heating time when it is pressed.
 AnalogOut output(p18); // Analog output to a multimeter or datalogger (1V = 1000 ppm).