0% found this document useful (0 votes)
9 views

Automatic Night Lamp Using Arduino

Uploaded by

fadewe3628
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)
9 views

Automatic Night Lamp Using Arduino

Uploaded by

fadewe3628
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/ 11

JIIT

P HY SI C S L AB - 1
ST
BT E C H C SE – 1 SE ME ST E R

A U T O M A T I C NI G HT L A MP U SI NG
AR D U I NO

SU BMIT T E D BY : SU BMIT T E D T O :
O m Ag ar w al - 2 4 0 1 0 3 0 2 0 4 MR .BHU BE SH
G au r ang g ar g - 2 4 0 1 0 3 0 2 1 3 C HAND E R JO SHI
Bh r at g ar g - 2 4 0 1 0 3 0 2 2 1
C E R T IFIC AT E
T h is is t o ce r t if y t h at t h e p r o j e ct b as e d
lab o r at o r y r e p o r t t it le d ‘A U T O MA T IC
NIG HT L AM P U SING A R D U INO ’ is
s u b m it t e d b y g r o u p o f O M ag ar wal,
G au r an g gar g an d B hr at gar g , s t u dyin g in
B .T e c h C SE , B at ch B - 4 . T h i s p r o j e c t h as
b e e n s at is f act o r ily co m p le t e d an d
ve r i f i e d d u r i ng 2 0 2 4 - 2 0 2 5 u n de r t h e
s u p e r vis io n o f Mr . BH U B E SH C HA N D R A
J O SHI
AC K NO W L E D GE ME
NT

In t h e ac co m plis h m e n t o f t h is pr o j e ct
s u cce s s f u lly, m an y pe o ple h ave
be s t o we d u p o n t h e ir b le s s ing w it h
s u p po r t , W e w o u ld lik e t o t h an k all t h e
p e o p le w h o h ave b e e n c o n ce r ne d w it h
t h is p r o j e ct . I w o u ld lik e t o e x p r e s s m y
g r at it u de t o o u r pr o f e s s o r Mr . W h o s e
valu ab le g u id anc e h as b e e n t h e o ne t h at
h e lpe d u s f in is h t h is pr o j e ct . H is
s u g g e s t io n h as s e r ve d in co n t r ib u t in g
t o w ar ds t h e co m p le t io n o f t h e p r o j e ct
A ut o m at ic Nig h t L am p U s in g
A r du ino

INT R O D U C T IO N :
Automation basically means to invent a method which reduces
or eliminate human efforts. In this project, we have automate a
night lamp via a simple interfacing of Arduino and Relay .

The control systems for the automation purpose can either be


open loop or closed loop meaning it can work either with a
single input parameter or in response to the output fed as the
input as in case of closed loop systems.

Automation has many pros like :

1. Increase in productivity

2. Predictable quality (Quality Improvement)

3. Increased robustness

4. Great output consistency


5. Reduction in human labour expenses

6. Highly accurate

7. Reduces human efforts in monotonous works.

In this project we have made a lamp turn on or off by itself


when the circuit detects an appreciable change in the intensity
of light and for achieving that we are going to use the two most
common tools used for automation i.e. Arduino and Rela9
interfacing along with the would be achieved by the Proteus
software.

C o m po ne nt s R e q uir e d :
1. Arduino – microcontroller

2. Relay 5 Volts

3. LDR (Light Dependent Resistor)

4. 10K Ohms

5. Transistor BC547

6. DC Supply 9volts

So f t w ar e R e q u ir e d :
1.Arduino IDE
2.Proteus

A u t o m at ic N igh t L am p C ir cu it D iagr am :
C om po ne nt D e s cr ipt ion
Ar du ino U NO
Arduino is basically a development board which is open source
and primarily utilizes the Microchip ATmega328P
microcontroller and is manufactured by Arduino.cc. The board
comes with a set of input/output pins comprising of digital and
analogue which can be interfaced to different expansion
boards and external circuits.

R e lay
9 is an electromagnetic switch which can be operated
electrically and made to turn on and off AC/DC appliances. It
can be controlled even with a low voltage of 5 volts like the
output provided by the Arduino pins.

LDR

LDR (Light Dependent Resistor) is a variable resistance


component that can vary its resistance value with the change in
intensity of light and it works on the photoconductivity principle.
The value of resistance decreases with increase in the intensity
of light. It is used in light-sensitive detector circuits and light
activated switching circuits.

T r an s is t or

A transistor is basically a semiconductor device which is


employed to amplify or switch electronic signals and power. It
is made up of semiconductor material and has 3 terminals to
connect with an external circuit.

A small value of current at its base terminal controls a large


value of current at its emitter and collector terminals. A fixed dc
voltage is required at transistor terminals to operate in the
desired region of its characteristic curves. Transistor, when
used for amplification purpose, is kept biased so that it is partly
on for all inputs and the amplified output signal is taken at the
emitter. For switching applications, the transistor is biased so
that it remains fully ON if signal at base terminal is present and
it gets completely OFF in the absence of base signal.

So f t w ar e D e s cr ip t io n
Pr ot e us

Proteus design suite comes under the category of proprietary


software which is employed to perform electronic design
automation. This software is very handy for the electronic
design engineers and respective technicians for the purpose of
creating schematics and the prints in electronic form termed
as PCB layout. The software was developed in Yorkshire,
England by Labcenter Electronics Ltd. and comes with multi-
language support which are English, French, Spanish and
Mandarin.

Ar d u ino ID E

Arduino IDE is a software that can be used on various


platforms. Hence, it’s a cross-platform application and was
developed using the programming language java. It has a soul
purpose of writing the sketch and uploading it on Arduino
compatible boards. The supported languages are C and C++
which are a bit modified and depends upon the library being
used.

Code in Arduino :
void setup()

Serial.begin(9600);

}
void loop()

//only change value of the sesitivty "nothing else"....

int sensitivity = 80;

int sensorValue = analogRead(A0);

if(sensorValue<sensitivity)

digitalWrite(13,HIGH);

else

digitalWrite(13,LOW);

delay(100);

Serial.println(sensorValue); }

Code explanation :
In void setup , it talks about basic structure setup.

Serial.begin(9600)-sets the baud rate for serial data


communication.

In void loop

Sensitivity- we set sensitivity of the photo resistor to detect the


change in luminous conditions

Here we apply “if else” conditions for comparison. Initially it is


set to a analog value of 80.

Then if the value is more than 80 means the light is on and if


the value is less then the room is dark

Sensor value = analogRead(A0)

It tells the jumper wire of the photo resistor is connected to


analog pin “A0”

DigitalWrite is just a kind of function which has High value for


just turn on and low for turn off and 13 tells the pin no. Of
Arduino which supplies signals for it.

Delay (100 mili second) tells there will be a delay after a


continuous on situation to off conditions

Serial.println(sensorValue) prints the analog signal on the


serial monitor

Nig h L am p C ir cu it W o r k ing
The working of the circuit, here we have used a 9V DC supply
(Arduino’s 9V) and connected a 10k ohm resistor and an LDR.
The voltage which can be taken across the resistor or the LDR
and fed into the analog pin of the Arduino, pin A3 in this case.

With the help of the code mentioned above, the board will be
able to detect the analog input provided to it. This value read is
in accordance with the intensity of the light which is detected
by the LDR.

While we can check the coming value on the serial monitor to


calibrate the circuit according to the intensity of the light.
Hence we can change the condition in the conditional
statement provided in the code to turn the lamp “ON” & “OFF” at
a desired intensity of light, hence making it dynamic.

Now when the conditional statement is satisfied i.e. the light


intensity falls down below the value provided by you (in ADC
equivalent form) the board will generate a” HIGH” output at the
pin 12 By “HIGH” it is meant that it produces 9V output as pin
12.

In this case a sufficient voltage is developed at the base of the


transistor and the transistor starts conducting. As a result, the
current starts flowing in the coils of the relay and it switches on
which means the NO terminal is switched to an active state to
which the lamp circuit has been connected to and upon the
completion of the circuit the lamp turns “ON”.

The lamp turns “OFF” when the else condition in the code
becomes true i.e. the intensity of light increases from the
threshold value provided given by us. Hence, output at pin 12
becomes “LOW” and subsequently relay is turned OFF which
turn the Lamp OFF.

You might also like