top of page

Fire Alarm System Project by Interfacing Arduino with Temperature & Gas Sensor using TinkerCad

Updated: Feb 13

Simulation software is generally used before the circuits and devices are built. It is not only that small devices can be designed on software, complex and large circuits/devices can be simulated. By this, damage can be avoided when all the hazards and implications can be avoided in the simulation itself.

In this article, we are going to design a Fire Alarm circuit using a few electrical components like Temperature and Gas sensors using TinkerCad and interface it with Arduino. Let's start with the components we will require to build the circuit in the #TinkerCad software.

Hardware Requirements.

These components are not required while building it in the simulation software. To build the circuit manually, click on the links given below to buy the components required.

  1. Arduino UNO Board.

Develop a stronger concept in Arduino through this article:- What is Arduino?

Arduino UNO
Arduino UNO

#Arduino board is a microcontroller that is used to accept inputs from sensors connected and provide an output action on the desired device connected to it. The sensor inputs can be from light-detecting sensors, motion sensors (Ultrasonic or IR), temperature sensors, etc. The output from this device can be received through other output devices such as LED, Buzzer, Serial monitor, etc.

Buy Arduino UNO from here.

2. LM-35 Temperature Sensor

LM-35 Flame Sensor
LM-35 Flame Sensor

LM-35 #Temperature Sensor gives an analog output based on the instantaneous temperature value. This analog output is proportional to the instantaneous input.

Buy LM-35 Sensor from here.

3. Gas sensor

MQ2 Gas sensor
MQ2 Gas sensor

The gas #sensor is used to measure the concentration or presence of gas in the atmosphere. It is also used to detect smoke in the air. Based on the gas, a potential difference is generated by changing the resistance of the material present inside the sensor. The output is measure in terms of Voltage.

Buy Gas sensor from here.

4. Resistors

1k Ohm Resistor
1k Ohm Resistor

Resistors are passive devices that restrict the flow of current or divide the voltage through the circuit. The input power passes through these resistors and then to the sensors to avoid damage.

Buy Resistors from here.

5. Breadboard


The breadboard is the basic component of any circuit building process. All components, be it input sensors or output display devices are connected to the power supply, microcontroller using wired connections through a breadboard. The holes in the breadboard are in series. There are various sizes like full-sized, half-sized, and mini breadboard.

Buy breadboard from here.

6. LED


Light Emitting Diode is a commonly used light source. It is a semiconductor that emits light when current flows through it.

Buy LED from here.

7. Piezo Buzzer

Piezo Buzzer
Piezo Buzzer

It is an electrical component that generates a beep sound on receiving an input. It works on the principle of #piezo crystal.

Buy Piezo buzzer from here.

8. Jumper Wires

Jumper Wires
Jumper Wires

These are the main components that are used to establish the connections between different devices of the circuit.

Buy Jumper Wires from here.

NOTE: The description of the electrical components is given for reference. We don't need the physical components for this project. The circuit simulation is done in the TinkerCad software.

Software Requirement

TinkerCad circuit simulation software.

TinkerCad LOGO
TinkerCad Logo

It is an online simulation software used for circuit design. It has all the electrical components required to built circuits and runs them.

Visit the TinkerCad website.

Circuit Connections

Circuit Diagram
Circuit Diagram

The circuit connections are as follows.

Firstly, we need to connect one line of the breadboard to the ground and the other to the power supply. This is done by connecting the 5V pin of the Arduino Board to one line of connection pins on the breadboard. The other line of the breadboard is connected to the ground terminal of the Arduino Board. These lines will be connected to other devices.

The Temperature sensor has three pins. Ground, Vout, and Vs (Supply). The Vs pin that has a range of 4-20V is connected to the power supply line of the breadboard. The Ground terminal of the sensor is connected to the ground line of the breadboard. The Vout terminal of the temperature sensor is connected to one of the Analog pins of the Arduino Board, A1.

Now let us learn how the connections are done with the Gas sensor. This sensor has 6 pins. 3 pins of the gas sensor are directly connected to the power supply line of the breadboard. Amongst the other 3 pins of the sensor, one pin is connected to one of the Analog pins of the Arduino Board, A0. The pin in the middle is connected to the ground line of the breadboard. The third pin of the sensor is connected to a resistor and then connected to the ground line.

The piezo buzzer is externally connected to the circuit. The ground pin of the #buzzer is connected to the ground line of the breadboard. Another pin of the buzzer is connected to the digital pin, PIN 7 of the Arduino Board.

Lastly, the LED is connected to the Arduino directly. The cathode of the LED is connected to the GND pin of Arduino and the anode of the LED is connected through a resistor to the digital pin 13 of the Arduino.



Circuit when working.
Circuit when working.

Let us first learn how to work on TinkerCad #simulation software. Once on the TinkerCad page, select circuits, and search for the components required. The components are to be dragged and brought to the circuiting screen. The connection needs to be made by selecting the jumper wires. Corresponding colors for the wires can be selected.

Learn more about TinkerCad in detail.

Coming to the working of the circuit, we can understand it in two parts.

Part 1: Temperature sensor and its output.

The Temperature sensor takes in input and when the temperature increases, the voltage increases, and hence the output initiates the functioning of the Buzzer. For every one degree increase in temperature, there is a 10mV increase in the voltage.

Part2: Gas sensor and its output.

A gas sensor is also used to detect smoke along with the concentration of gases. Based on the type of gas present in the atmosphere, a potential difference is developed by changing the Resistance of the material present inside the sensor and the same is measured as output.

The Concentration of the gas is measured in ppm and the output analog value is needed to be converted into digital which is done by the #ADC (Analog to Digital Converter) present in the sensor itself. Based on the condition given in the code, the LED glows or remains OFF.

Watch the below-given project video for the practical explanation of designing the circuit and to know how the simulation #software works.

Project Video By - Navya Tatiparthi

Simulation software plays a major role in the building of large circuits as they help analyze the working of the circuit before it can be built practically. It helps us create a #virtual design of the circuit we want to build and avoid damages to the circuit if in case we don't know, beforehand about the correct circuit connections.

For more projects through TinkerCad click here.

Simulation software can help us build more effective and efficient projects as it provides validation for the circuit we will be building using the actual components. Design your own circuit, run the code in the software, and validate your project.



bottom of page