Gas Detector / Indicator (USB Powered) With Arduino
by StijnID in Circuits > Arduino
130370 Views, 259 Favorites, 0 Comments
Gas Detector / Indicator (USB Powered) With Arduino
ArduSniffer
This Instructable shows how to build a gas detector / indicator using an arduino.
The finished product is USB powered and displays the amount of detected gas on a led display.
In this design the reset button on the arduino is also working.
This project will cost you between €25,- and €65,- depending on the quality of the parts you want to use, the links to order the parts are included in step one.
Luckily, the arduino (which is the biggest investment here) can be easily reused for other projects.
Materials & Tools
The first thing you need to do is gathering the required materials,
for starters it is advised to use the electronics described here.
Ofcourse when you are more experienced you could display the data in a completely diffent way,
the arduino has great oppertunities for this.
Tools
- hot glue gun
- sharp knife
- metal ruler
- some drawing tools
(depending on your personal preference)
Materials
- arduino nano
€39,95 http://iprototype.nl/products/arduino/boards/nano
or €11,44 http://www.dealextreme.com/p/nano-v3-0-avr-atmega328-p-20au-module-board-usb-cable-for-arduino-118037?item=92 (this includes cable!)
- usb cable
€3,95 http://iprototype.nl/products/accessoires/cables-wires/mini-usb-cable
- usb powerplug (optional)
€8,95 http://iprototype.nl/products/accessoires/power/usbadapter
- gas sensor
€5,95 http://iprototype.nl/products/components/sensors/methane-CNG-gas-sensor-MQ-4
- led display
€1,39 http://iprototype.nl/products/components/led-lcd/led-display-red
- cardboard or other material for the exterior (you can use the included drawing and print it on thick paper)
or order the 3D printed exterior
* parts are also available at sparkfun.com *
Mounting the Parts
Next, you have to mount the parts into the housing.
Use the drawing provided in the previous step or create something yourself,
The 3D printed exterior has a mounting clip for the arduino built in.
The pictures illustrate how to mount the parts using the hot glue gun.
As you can see I used some small pieces of cardboard glued together for spacers and mounting supports,
this is particularly important if you want the reset button on the arduino to work properly.
Make sure to securely glue the parts into place but still keep the electronic contact points and button clean.
Wiring
Once you have all the parts in place you can wire them.
connect the arduino to the sensor and led display according to the documents below.
If you have doubts, feel free to send me a message.
In the picture I used quite long wires that have female headers on them,
for a permanent version you could choose to solder the wires.
Sensor wiring
http://wiring.org.co/learning/basics/airqualitymq...
Led display wiring
Uploading Code
The arduino needs to be programmed,
this is very easy to do.
Use the software provided on www.arduino.cc
- go to the site
- click on 'download'
- download and unpack the 0023 version (needs no installation)
Now you can open the included code file and upload it to the arduino.
The file needs to be in a folder with the same name tag.
(the arduino software will create this for you when you try to open the file)
For instructions check the arduino website.
Downloads
Testing
Now you can test your gas detector!
Change the thresholds in the code if you are not satisfied with the reaction of the sensor.
Instructions can be found on the www.arduino.cc website.