Gas Detector / Indicator (USB Powered) With Arduino




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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: 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.

- hot glue gun
- sharp knife
- metal ruler
- some drawing tools
   (depending on your personal preference)

- arduino nano
   or €11,44 (this includes cable!)

- usb cable

- usb powerplug (optional)

- gas sensor

- led display

- 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 *

Step 2: 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.

Step 3: 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

Led display wiring

Step 4: Uploading Code

The arduino needs to be programmed,
this is very easy to do.

Use the software provided on
- 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.

Step 5: 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 website.

Be the First to Share


    • Instrument Contest

      Instrument Contest
    • Make it Glow Contest

      Make it Glow Contest
    • STEM Contest

      STEM Contest

    44 Discussions

    I have a question. can arduino uno is capable to replace the arduino nano in this project? reply me please. I really need the answer for our project. thank you so much.

    1 reply

    Reply 3 years ago

    you need to change the gas module for that

    Excuse me sir, I'm about to modify this project and I add some other materials like buzzer and LED. can you help on how to put the schematic of these materials? I badly need it. :( thanks.


    5 years ago on Introduction

    Hi, i have a rookish question, i made the circuit and it works but anytime the sensor senses gas and let's say number 4 is displayed, after some secs the gas evaporates and the blinking loop starts again number 4 is displayed again!! If the gas will be heavier and let's say number 6 is on the display after a while the blinking loop comes up but this time number 6 comes up again! how can i change it? i know it has something to do with the sum-break routine. P.s. the same happens to your video because you haven't put any delay before breaks it's not visible but if you pause it you will see that you have the same problem!


    5 years ago on Introduction

    Hi ! your project looks great but I made this with an arduino uno and I have a problem with the display:

    When I connect all pins to the arduino starting by the first on the left bottom (of the display) to the digital pin 2 until the tenth to the pin 9 and the third and the eighth to the positive and ground, the arduino doesn't work and it turns off. Are all the connections right ? Can you help me please ? The display needs a resistor? Thanks.

    Sorry for my bad english but I'm an italian student and I don't speak english very well.

    3 replies

    Reply 5 years ago on Introduction

    sounds like you are short-circuiting something. does this help:


    Reply 5 years ago

    I have this kind of segment display is this different from your display ? I understood that my display works only with 5v connection and a 330 ohm resistor in the two wiring display connections. Please can you help me ? If you want could you help me by email ? Thanks for the link but the wiring doesn' t work but I could learn a lot of informations with that link. I appreciate your attention to much. :)


    Reply 5 years ago

    I am GianlucaS1 and I posted that comment on the top


    5 years ago

    Can you send me something how to wire the gas sensor?


    Reply 5 years ago on Introduction

    sorry, the link is not working anymore since this is an old project.


    5 years ago

    Can you send me a video of how to do the wiring?


    5 years ago

    Can you send me a video of how to the wiring


    Reply 5 years ago on Introduction

    Hi, arduino's have a standard reset pin. Connect a button to both the reset pin and ground, pushing the button will completely reset the arduino.


    Reply 5 years ago on Introduction

    On the arduino nano there already is a reset button, you can use this as shown in the template.