302 LAB REPORT #06 (Thinkercad)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Department of EEE

Lab Report:06

Course Code: EEE302 Course Name: Microprocessors &


Interfacing Laboratory
Sec: 01

Semester: Summer 2021 Experiment Name: Smart Street Light


Project using Arduino Uno, LDR, and
LED.

Group members: Name of Lab Instructor:


1. Name: Adnan Hossain
ID: 2019-2-80-015 Fakir Mashuque Alamgir

2. Name: Amit Mondol


ID: 2019-2-80-009

Date of submission: 31-08-21 Experiment No: 6


Abstract:
This experiment presents the work of Photoresistor and interfacing LDR with an Arduino, and
then programming the Arduino in such way that when light intensity decreases the Light is turn
on and when light intensity increases the Light is turn off.

Objective: The main purpose of this experiment is to get familiarized with the photoresistor and
create a smart street light using Arduino.

Theory and Experimental Methods:


This experiment is about interfacing LDR with an Arduino, and then programming the Arduino
in such way that when light intensity decreases the Light is turn on and when light intensity
increases the Light is turn off. If we want to achieve this work then we need to performed it on
Thinker CAD.
In this experiment we need to use Arduino UNO. Basically, Arduino is an open-source
electronics platform based on easy-to-use hardware and software. Arduino is able to read inputs
and turn it into outputs.
Arduino UNO Pin category are power, reset, analog pins, input output pins, serial pin, External
Interrupt’s pin, PWM, SPI, inbuilt LED, TWI, AREF.
So here are the details of all of the pin’s category of Arduino UNO:
1. Power: In power category there are four pins exist. These are Vin, 3.3V, 5V, GND.
Details of those pins:
 Vin: Input voltage to Arduino when using an external power source.
 5V: Regulated power supply used to power microcontroller and other components on the
board.
 3.3V: 3.3V supply generated by on-board voltage regulator. Maximum current draw is 50
mA.
 GND: ground pins.

2. Reset: Reset is use for resets the microcontroller.


3. Analog Pins: Analog category has six pins and these are A0-A5. These pins are Used to
provide analog input in the range of 0-5V.

4. Input/Output Pins: This category’s pins are Digital pins 0-13. These pins used as input or
output pins.

5. Serial: It has two pins. One is Rx it uses as 0 and another one is Tx it uses as 1. And these
pins are basically used to receive and transmit TTL serial data.

6. External Interrupts: Its pins names are 2,3. These are used to trigger an interrupt.
7. PWM: Its pins name is 3,5,6,9,11. It Provides 8-bit PWM output.

8. SPI: This category’s pins are 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK). And these
are Used for SPI communication.

9. Inbuilt LED: It pin name as 13. It uses to turn on the inbuilt LED.

10. TWI: This category’s pins are A4 (SDA), A5 (SCA). And used for TWI communication.

11. AREF: This pin use to provide reference voltage for input voltage.

In this experiment the photoresistor lead is connected to the 5V of the Arduino, the GND lead of
the photoresistor is connected with GND and A5. Then we have connected all the equipment’s
following the fig.1. Then we write the code in (fig.2) and completed the experiment.

Result and Discussion:

Fig.1: connections of the circuit.


Fig.2: Code for our microcontroller

Fig.3: When Light intensity is less. (Light is glowing)


Fig.4: When we increase Light intensity. (light is still glowing)

Fig.5: When we increase Light intensity furthermore. (light is not glowing)


In this experiment we have learned the use of photoresistor. When we simulate our experiment,
we can see that our Light is glowing first. When we increase the light intensity using the
photoresistor and set it at the middle, we have checked that the light is still glowing. Then when
we increase the light intensity furthermore and set it at the end, we have checked that the light
stop glowing.

Conclusion: This experiment teaches us about using of Thinker CAD. All of the things of
Arduino and how a Photoresistor works.

References:
1. https://components101.com/microcontrollers/arduino-uno
2. https://youtu.be/lv6Uhk1mRBA

You might also like