Archive for June, 2010
Hooking up a gas sensor is more or less the same as with the voltage divider model but it has an extra twist. The MQ Series sensors which I used for gas sensing (average cost= $5) have a heating element to react with the gases they detect. I’ve played with the MQ-2 – General combustible gas, MQ-3 – Alcohol, MQ-4 – Natural gas & Methane, MQ-5 – LPG or Propane, and the MQ-7 – Carbon Monoxide (CO).
For the analog sensing it is the same as the classic voltage divider model (see the notes on the main sensor post). Because I use an XBee analog input to read the sensor output value, the V+ is at 3.3V (which is what the XBee runs on) and the V- is at Gnd.
Here’s the schematic I set up (click to see a larger view):
It might seem more complicated than it needs to be, but basically we have a 5V regulator supply (w/ 7805) for the heater element, a 3.3V regulator supply (MCP1700-3302E/TO; same as the Adafruit XBee Adapter PCB) to power the XBee module, then the MQ series device. I’ve connected the gas sensor output to pin 20 of the XBee module, so we’ll be reading the gas sensor voltage on analog input 0.
One thing to note about these sensors is that they are not calibrated to detect specific parts per million, etc. They can also be affected by the ambient temperature and humidity. I’ve used them primarily to know when the gas concentrations are high or low, trending up or down.
Here’s a live sample graph of the data tracked at Pachube.com:
The spikes you might see on the chart are, I am pretty sure, generated by some problem of collection downstream of the sensor and the xbee radio. Hopefully, I’ll get this resolved soon.
Next Post: FSR Sensor
Next Group: Radio:XBee