Alcoholmeter with MQ3 sensor

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
lnadal
Date:
Sat Apr 09 14:18:50 2011 +0000
Parent:
1:5a58f03abfe9
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:15:00 2011 +0000
+++ b/main.cpp	Sat Apr 09 14:18:50 2011 +0000
@@ -2,7 +2,7 @@
 
 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. 
@@ -10,32 +10,38 @@
 Teacher: Lluis Nadal.
 Students: Agnes Garriga, Manel Tuells.
 
-***************************************************************************************************
+*********************************************************************************
 
-Sensor: MQ-3 alcohol sensor.(http://www.sparkfun.com/;  http://www.bricogeek.com/shop/).
+Sensor: MQ-3 alcohol sensor.(http://www.sparkfun.com/;
+http://www.bricogeek.com/shop/).
 
 MQ-3 sensor wiring:
-H1(5V), H2(ground), A(5V), B (R load = 500 Ohm - 1%), R load (mBed pin 20 - ground).
+H1(5V), H2(ground), A(5V), B (R load = 500 Ohm - 1%),
+R load (mBed pin 20 - ground).
 
 Analog out (for datalogger or multimeter): mBed pin 18 (1V = 1000 ppm).
 
 
 
-MQ-3 sensor response is not linear. Calibration was done by passing air (with a fishtank air pump)
+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.
+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.
+A 500 Ohm-1% load resistor was selected in order to achieve a measuring range
+of 3000 ppm.
 
-After a bit difficult calculations, the sensor response was aproximated in a five degree polynomial:
+After a bit difficult calculations, the sensor response was aproximated in a
+five degree polynomial:
 
 X = V(in)
 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
+(the manufacturer recommends 24) 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! 
@@ -44,7 +50,7 @@
 THIS FREE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. ENJOY IT.
 
 */
-//**********************************************************************************************
+//*******************************************************************************
 
 
 #include "mbed.h"