0% found this document useful (0 votes)
12 views5 pages

Amangill

robotic

Uploaded by

Manish Kumar
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)
12 views5 pages

Amangill

robotic

Uploaded by

Manish Kumar
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/ 5

Worksheet 2.

Student Name: Aman Gill UID:22MCA20981


Branch: MCA Section/Group: 4-B
Semester: 4th Date of Performance: 21/02/24
Subject Name: Internet of Things Subject Code: 22CAH751

1. Aim/Overview of the practical:


Design the circuit and WAP to interface Temperature Sensor (LM36) or DHT11 sensor and Arduino
Uno.

2. Apparatus

Hardware Requirements
• Arduino Uno Board
• Wires
• Resisters
• LCD
• TMP
• Bread Board
• Power Supply

Software requirements
• Arduino 2.2.1 IDE

3. Circuit Diagram (TinkerCad):


Coding:
// include the library code for LCD display:

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

// Defining pin

#define temp A5

void setup()

// set up the LCD's number of columns and rows:

lcd.begin(16, 2);

pinMode(temp, INPUT);

lcd.clear();

lcd.print("Temperature: ");

//Global Variable

float pre_temp = 0;

void loop()

{
float temperature = 0;

temperature = ((analogRead(temp) * 0.004882814) - 0.5)*100;

if(pre_temp != temperature)

lcd.setCursor(0,1);

lcd.print(" ");

lcd.setCursor(0,1);

lcd.print(temperature);

lcd.print(" C");

pre_temp = temperature;

Precautions:

• Stable Power Supply: Ensure your Arduino gets a stable 5V power supply to avoid erroneous
readings from the sensor.
• Correct Pin Connections: Double-check all connections according to the pin assignments in your
code.
• Sensor Placement: Place the sensor in a position where it has a clear line of sight to the object you're
measuring. Avoid surfaces that can absorb sound waves (like soft materials) directly in front of it.
• Avoid Water or Dust: Protect the sensor from water or dust, which can interfere with its operation.
• LCD Contrast: Adjust the potentiometer to ensure the LCD display is clear and readable under your
lighting conditions.
• Use Delays Wisely: In the loop, ensure there's a sufficient delay to allow the LCD to refresh without
flickering but not so long that it causes noticeable lag in distance updates.

5. Learning outcomes (What I have learnt):

1. Understanding Sensor Operation: Learn how temperature sensors like the LM35 and DHT11 function
and how they output data.
2. Circuit Design: Gain hands-on experience in designing and building circuits on a breadboard.
3. Programming Skills: Improve programming skills with Arduino, including reading sensor data,
performing calculations, and outputting results.
4. Serial Communication: Learn how to use serial communication to send data from Arduino to a computer
for debugging and monitoring.
5. Data Conversion: Understand how to convert raw sensor data into meaningful temperature (and
humidity for DHT11) readings.
6. Use of Libraries: Learn how to use external libraries in Arduino projects (specifically for the DHT11
sensor).
7. Problem-Solving: Develop troubleshooting and problem-solving skills through debugging hardware and
software issues.

Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):

Sr. No. Parameters Marks Obtained Maximum Marks


1. Conduct 12 marks
2. Worksheet 8 marks
3. Viva 10 marks
Total 30 marks

DATE : SIGNATURE :

You might also like