0% found this document useful (0 votes)
3 views6 pages

Gedion

The experiment involved simulating a temperature and humidity sensor using an Arduino microcontroller in Proteus. It successfully generated random environmental data, displaying temperature and humidity readings on a virtual terminal, despite the physical sensor being non-functional in simulation mode. The experiment demonstrated effective interfacing of environmental sensors with microcontrollers and reinforced the use of Proteus and Arduino IDE for simulation and programming.

Uploaded by

aliudaniel601
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

Gedion

The experiment involved simulating a temperature and humidity sensor using an Arduino microcontroller in Proteus. It successfully generated random environmental data, displaying temperature and humidity readings on a virtual terminal, despite the physical sensor being non-functional in simulation mode. The experiment demonstrated effective interfacing of environmental sensors with microcontrollers and reinforced the use of Proteus and Arduino IDE for simulation and programming.

Uploaded by

aliudaniel601
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

EXPERIMENT NO THREE (3)

INTRODUCTION

The experiment Is to stimulate temperature and humidity sensor using proteus


using Arduino microcontroller and to see the output of the result

Temperature and humidity sensor is a device that measures both the temperature
and humidity of an environment. It typically combines a temperature sensor and
a humidity sensor, either as separate components or integrated into a single
unit. These sensors convert the measured physical quantities (temperature and
humidity) into electrical signals that can be read and displayed by other
devices.

Temperature measure the degree of coldness and hotness of the surrounding air
or object

Humidity sensor measure the amount of water vapour present in air

COMPONENT NEEDED

1. Arduino UNO[4.0]
2. DHT 11 (Temperature and Humidity sensor)
3. Ground
4. Virtual terminal
5. Power

Software’s for the stimulation and programming the Micro-controller are:


Proteus and Arduio IDE(for writing and uploading of the code)

EXPERIMENT PROCEDURES

Step 1: Open our proteus application, and create a new project and save it as
“Gas sensor stimulation” or whatever you wish

Step 2: Adding the entire component needed for the stimulation as mention
above by:

1. Go to “pick device” menu and search for “arduino uno” and add to the
workspace
2. Using the same process but this time searching for “DHT 11” and adding
It also
3. Then going to the “virtual instrument mode” and add virtual terminal
4. Them to the “Terminal mode” and add the “Ground”
5. Also from the “Terminal Mode” we add Power

Step 3: Connection of the component

1) DHT11:
i) pin 1 (VDD) is connected to the “power”
ii) pin 2(DATA) is connected to “pin2” in arduino uno
iii) pin3(GND) is connected to the “Ground”
2) Virtual Terminal:
i) “RXD” connected to “pin1” of the Arduino.
ii) “TXD” connected to “pin0” of the Arduino.
3) CIRCUIT DIAGRAM

Step 4: Writing a program for the project with “C” programming language

1) Open our Arduino IDE


2) And write a code that will tell the microcontroller what to do.

CODE

/*

* Simulated Temperature and Humidity Sensor


*

* Code Written by Daniel and Gedion DANIEL AND GEDION

* Simulates random temperature and humidity values and prints them to Serial
Monitor

*/

void setup() {

Serial.begin(9600);

randomSeed(analogRead(A0)); // Seed the random number generator

void loop() {

//Generate random temperature and humidity

float temperature = random(180, 350) / 10.0; // Simulate 18.0°C to 35.0°C

float humidity = random(300, 900) / 10.0; // Simulate 30.0% to 90.0%

//print label for temperature its value and celsius symbol

Serial.print("Temperature: ");

Serial.print(temperature);

Serial.print(" °C\t");

//print humidity label it's value and percentage symbol

Serial.print("Humidity: ");

Serial.print(humidity);
Serial.println(" %");

delay(1000); // Wait for 2 seconds before next reading

3) Install the DHT library in the Arduino IDE


i) Go to sketch, then include library and manage library

ii) Then search for DHT sensor library


iv) ADAFRUIT unified sensor and ADAFRUIT sensor library
4) Them we Verify the code and copy the .hex file
5) Them open our proteus and double click on Arduino UNO and paste the
.hex file
6) And stimulate

OBSERVATION

During the simulation of the temperature and humidity sensor using Proteus and
Arduino UNO, the system successfully generated and displayed simulated
environmental data on the virtual terminal. The values of temperature (in °C)
and humidity (in %) were updated at 1-second intervals.

Since a physical DHT11 sensor cannot function in simulation mode within


Proteus, the program used random number generation to simulate realistic
temperature and humidity readings (ranging from 18.0°C to 35.0°C for
temperature and 30.0% to 90.0% for humidity). This allowed for effective
testing of the data acquisition and display logic in the absence of live sensor
input.

The virtual terminal correctly received and displayed formatted data, confirming
that:

 The serial communication setup was working.


 The code logic for generating and formatting values was valid.
 The connections in the Proteus workspace were appropriate.

CONCLUSION

The simulation of the temperature and humidity sensor using Proteus and
Arduino UNO was successfully implemented. Although the actual DHT11
sensor could not function physically in the Proteus environment, the use of
randomly generated values effectively mimicked real-world sensor behavior.
The Arduino code accurately simulated temperature and humidity readings and
displayed them in real-time on the virtual terminal.

This experiment demonstrated a good understanding of how environmental


sensors interface with microcontrollers and how to simulate their behavior in a
virtual environment. It also reinforced the use of Proteus for hardware
simulation and the Arduino IDE for programming and uploading code.

You might also like