Skip to content

Final Project

Over the past two weeks, I have been working on a project aimed at helping many people with a simple design and low cost. I applied the knowledge I gained from Fablab over the past eight weeks to this project.
My project is a gas and heat detector. On this page, I will discuss the project in detail

General Information

My idea comes from the need for a cheap and effective sensor. A few years ago, in Bahrain, three members of a family died due to gas poisoning while they were asleep. We can avoid such a catastrophe and future incidents by using my project.

My idea is to benefit from Arduino accessories — the DHT11 Sensor, MQ-2 Gas Sensor, and Buzzer — . In my project, I use an Arduino Nano and a Nano I/O Expansion Shield. This type of Arduino allows for a compact final design in a small box, meaning we can place the sensor in any source of gas

In my project, I designed the power source to be able to take power from any socket. It takes readings from the sensor every second to make it more effective. The output can be viewed in the Arduino program, which will display the humidity percentage and temperature in both Celsius and Fahrenheit, in that order.

Bill of Material

Qty Description Price
8 Connection Wire BD 0.05
1 Arduino Nano 22.40 $
1 Nano I/O Expansion Shield 5.99 $
1 Buzzer BD 0.5
1 DHT11 Sensor 0.86 $
1 MQ-2 Gas Sensorx 7.99 $
4 Allen Screw 0.15 $

How I Make the Project

My project consists of two parts, which are:

Electrical Part

I discussed all the components in detail during week 8, where I mentioned the names of the parts in the “General Information” paragraph. Here, I will talk about different aspects, specifically the type of Arduino I used

Arduino Nano Specification

The Arduino Nano is a small, compact, and versatile microcontroller board. It is a popular choice for building electronic projects due to its small size, affordability, and extensive compatibility with Arduino IDE.

The Arduino Nano operates at 5V and is powered by an input voltage of 7-12V. It features 14 digital I/O pins (6 as PWM), 8 analog input pins, and offers 32 KB of flash memory, 2 KB of SRAM, and 1 KB of EEPROM. It is ideal for breadboard projects and embedded applications.

Nano I/O Expansion Shield Specification

The Nano I/O Expansion Shield is a board designed to expand the capabilities of the Arduino Nano. It makes the Nano more accessible for prototyping and project development by breaking out all of its pins and providing easier connectivity options for modules, sensors, and other peripherals.

The Arduino Nano enhances usability with pin accessibility, featuring 3-pin headers (Signal, VCC, GND) for easy connections to sensors and actuators, along with male and female headers for flexibility. It includes VIN and VOUT pins for external power, 3.3V and 5V outputs, and I2C and SPI headers for communication modules. Designed for the Arduino Nano but adaptable to similar boards, it supports various sensors and motors. Additional features include secure screw terminals, a reset button, and power indication LEDs.

All that future make it as best choose to make the final shape small and acceptable.

Code Use to Program the Arduino

#include <EduIntro.h>

DHT11 dht11(A0); //creating the object sensor temp & Hume

int C;   // temperature C readings are integers
float F; // temperature F readings are returned in float format
int H;   // humidity readings are integers
int sensorThres = 200; 


void setup() {
  // initialize digital pin Busser as an output.
  pinMode(10, OUTPUT);
  // initialize serial communications at 9600 bps
  Serial.begin(9600);
}


void loop() {

  // read the input on analog pin 0:
  int sensorValue = analogRead(A5);
  // print out the value you read:
  Serial.println(sensorValue);
  delay(1);  // delay in between reads for stability


  dht11.update();

  C = dht11.readCelsius();      // Reading the temperature in Celsius degrees and store in the C variable
  F = dht11.readFahrenheit();   // Reading the temperature in Fahrenheit degrees and store in the F variable
  H = dht11.readHumidity();     // Reading the humidity index

  // Print the collected data in a row on the Serial Monitor
  // Serial.print("H: ");
  // Serial.print(H);
  // Serial.print("\tC: ");
  // Serial.print(C);
  // Serial.print("\tF: ");
  // Serial.println(F);
  // delay(100);                // Wait one second before get another temperature reading 

  Serial.print(H);
  Serial.print(" ");
  Serial.print(C);
  Serial.print(" ");
  Serial.println(F);
  delay(100);
  ///


  if (sensorValue > sensorThres || C > 45 )

  {
  digitalWrite(10, HIGH);  // turn the LED on (HIGH is the voltage level)
  }
  else
  {
  digitalWrite(10, LOW);  // turn the LED off (LOW is the voltage level)
  }
  delay(1000);                // Wait one second before get another temperature reading
}

This Arduino code monitors temperature and humidity using a DHT11 sensor connected to pin A0 while reading from an analog sensor on pin A5. It initializes serial communication and configures an output pin for a buzzer. The code continuously reads and prints the humidity and temperature data to the Serial Monitor. If the analog sensor value exceeds a threshold or the temperature goes above 45°C, it activates the output device; otherwise, it turns it off. This setup effectively combines environmental sensing with a simple alert mechanism, making it suitable for real-time condition monitoring.

3D Priner Part

The best shape I found is small because if it were larger, it would be difficult to find a good place for it. The electrical components used helped to achieve that goal. Fusion 360 is the program used to create the shape. Vernier calipers helped us obtain accurate dimensions and familiarize ourselves with the dimensions of the box.

We print the shape in 3D printer three times to reach final

while printing

Final Result

Short Video How it Work

Overview of My Project in Short - Video Presentation

Future Plant

Future enhancements for the gas and heat detector project include integrating wireless connectivity (Wi-Fi/Bluetooth) for real-time alerts and remote monitoring, implementing data logging for pattern analysis and hazard prediction, and improving power management with rechargeable batteries or solar panels for continuous operation. Additionally, integrating the device with smart home automation systems can enable automatic responses, such as shutting off gas valves or activating ventilation. A more user-friendly interface with visual and auditory alerts will enhance usability, while expanding the sensor array to detect multiple gases will increase its versatility in various environments. These improvements will make the detector a more comprehensive and reliable safety solution.


Last update: February 6, 2025