


They are suitable for alarm devices but not with a guaranteed sensitivity. Semiconductor (SnO2) sensors like the MQ2 are sensitive a broader slection of gases, stronger variation between different gases and less stable calibration. Catalytic sensors for flammable gases have an acceptable selectivity for all gases of this type. You get some electrochemical sensors with specific selectivity, e.g. There are no cheap and simple sensors with selectivity and stable calibration. If you need a sample of CO2, consider using the cartridges for a 'pellet pistol' or a 'wine bottle charger'.You'll have to rig up some kind of 'pierce and save' system, but it is a very cheap way to get 'small bottles' of CO2!.įvM which type do u suggest that i will use? Unless you want 'lab grade' results, you should be fine with the 'short cut'. Test and record your 'clean air' value, then use the motorcycle exhaust as the 'bad air' concentration. Well, you've already got a 'short cut' method. Pls i still need more info on the calibration OR if there is any other way i can do this without the calibration, I will be happy to follow the short cut. I asked a friend and he said that i must do the calibration in a LAB where I can produce a controlled level of gas concentration and then use a standard sensor to measure the concentration.
#ARDUINO SENSORS TUTORIAL MQ2 TUTORIAL CODE#
I have tested it with this code and the sensor is working because inside my room (without smoke) the LCD display a number from 63 to 75 and outside with smoke from motorcycle exhaust it was displaying up to 215. The test code is just a simple ADC code that will get the analog input from the sensor, convert and display it on LCD and/or hyperterminal. I have started with simple test code to confirm if the sensor is working. You know, that this type of sensor won't be able to detect gases selectively?įvM which type do you suggest that i will use? Name of the gas before to display it on the LCD.Īsmboy, the arduino code i will like to convert to ccs is in the second link i posted first, shown below: Sensitive to regular air components and inert gases like carbon dioxide. You know, that this type of sensor won't be able to detect gases selectively? Except for not being The sensor can operate at temperatures from -20 to 50☌ and consumes less than 150 mA at 5 V. The sensor can measure concentrations of flammable gas of 300 to 10,000 ppm. If you show the CODE you are having trouble with - help might appear/ĭisplay the name and concentration of the gas (in PPM) MQ2 flammable gas and smoke sensor detects the concentrations of combustible gas in the air and ouputs its reading as an analog voltage. I have all the components with me including the sensor.
#ARDUINO SENSORS TUTORIAL MQ2 TUTORIAL HOW TO#
Please i will like someone to help me with simple ccs sample codes, tutorials or some advice on how to convert the Arduino to ccs. I was trying to convert the code to CCS but the problem is that it has some float functions which generate some errors during compilation. I googled for tutorial or sample codes and found this link: If the concentration is too high it will sound an alarm. Has anyone used this MQ-2 Smoke/PG/CO/Gas SensorĪm trying to build a simple gas monitoring project that will detect gas leakage and display the name and concentration of the gas (in PPM) on 16x2 lcd and am using PIC16F887. Send them to anyone used this MQ-2 Smoke/PG/CO/Gas Sensor Please do not post bug reports on this forum. When this code is uploaded to the Arduino board, the sensor will have to first stay dormant for about 20 minutes during which time the sensing material is being warmed up.Īfter the warm up we can be able to see the concentration of the smoke on the LCD and if the concentration goes above the set threshold, in this case 300 then the alarm will sound.CCS :: View topic - Has anyone used this MQ-2 Smoke/PG/CO/Gas SensorįAQ Forum Help Official CCS Support Search Register Profile Log in to check your private messages Log inĬCS does not monitor this forum on a regular basis. SensorValue = analogRead(MQ2pin) // read analog input pin 0 Int sensorValue //variable to store sensor valueĭelay(20000) // allow the MQ-6 to warm up Code for smoke detection system using MQ2 Gas sensor.
