You are on page 1of 14

AUTOMATED NIGHT LAMPSHADE

A Research Paper

Presented to the Engineering Faculty of

Camiguin Polytechnic State College

Balbagon, Mambajao, Camiguin

In Partial Fulfillment

To the course

Digital Electronics 1:

Logic Circuits and Switching Theory

By

Abian, Reychille A.

Bonggot, Jiessel O.

Domoloan John Peniel D.

Macahilos, Rinalyn M.

Repolidon, Loui Jay B.

January 2023
ABSTRACT

An automatic night lampshade is a simple but powerful concept that uses a transistor as a

switch. This system eliminates 100% manual work. The lights turn on automatically when the

sunlight falls below the visible area of our eyes. This is done by a sensor called Light

Dependent Resistor (LDR) which detects light just like our eyes. Automatically turn off lights

when visible sunlight enters your eyes. With this system, the current passive lampshade do

not turn off at sunrise and are turned on earlier before sunset, also reducing energy

consumption. Manual operations such as setting ON and OFF times are not required in this

project. It is also a big help during an expected electricity interruptions in our place,

automatic night lampshade is very useful. LDRs and transistors are the main components of

the design. The resistance of a light dependent resistor (LDR) depends on the amount of light

falling on it. This LDR is connected as a resistor in series with the transistor. Depending on

the light incident on the LDR, the transistor operates in the saturation and cutoff regions.
INTRODUCTION

I. Literature review

Automatic night lampshade eliminates the need to turn on and off manually. The

system also reduces energy consumption, as currently manually operated lights do not

properly turn off at sunrise. With many benefits, from convenience and time savings to

personal security, home automation is practically a necessity today. The light control module

can control home lighting and other small devices. Other lights can also be automated with

sensors, dimmers and timers.

In this project, we will build an automated lamp shade using a NAND gate chip. An

automatic lampshade is a circuit in which a light will turn on when the environment becomes

dark. It is a popular commercial product that is used in many places such as for backyard

lights for when it gets dark for automatic illumination. The circuit is very basic. The

component that will allow us to detect light is a photoresistor. We will use a photoresistor's

light-sensing ability to detect whether the circuit is exposed to darkness or bright light. How

this works is that a photoresistor's resistance changes in proportion to the amount of light it is

exposed to. In darkness, it has very high resistance. In bright light, its resistance drops

dramatically. If placed in a voltage divider circuit with a fixed resistor, we can exploit this

resistance-altering behavior so that when connected to a NAND gate, we can produce a

HIGH output when the photoresistor is exposed to bright light and a LOW output when the

photoresistor is exposed to darkness. All of this will be explained in detail below how exactly

this works. But realize that a photoresistor’s resistance-changing ability allows us to distinctly

know whether it is exposed to darkness or bright light. Knowing this, we can effectively build

an automatic lampshade
II. Hardware Design aspects

An automatic night lampshade is an electronic circuit consisting of LDR, transistor and

resistors as connected in the main circuit, as shown below

Components Needed:

● 4011 NAND GATE - The CD4011 is a CMOS chip with four NAND gates.

Because each gate has two inputs and it has 4 gates inside, it's usually called a Quad

2-Input NAND Gate. A NAND gate combines the functionality of AND and NOT

gates. It gives a LOW output only when all inputs are HIGH;

otherwise, the output is LOW.


● 33K ohm resistor and 330-ohm resistor -A resistor is a passive

two-terminal electrical component that implements electrical resistance as a circuit

element. In electronic circuits, resistors are used to reduce current flow, adjust signal

levels, to divide voltages, bias active elements, and

terminate transmission lines, among other uses.

● LED lights - A light-emitting diode is a semiconductor device that emits light when

current flows through it. Electrons in the semiconductor recombine with electron

holes, releasing energy in the form of photons. The color of the light is determined by

the energy required for electrons to cross the band gap of the semiconductor

● LDR - Photoresistors, also known as light dependent resistors (LDR), are light

sensitive devices most often used to indicate the presence or absence of


light, or to measure the light intensity.

● Jumping wires - A jump wire is an electrical wire, or group of them in a cable, with a

connector or pin at each end, which is normally used to interconnect the components

of a breadboard or other prototype or test

circuit, internally or with other equipment or components, without soldering.

● 9V battery - The nine-volt battery, or 9-volt battery, is an electric battery that

supplies a nominal voltage of 9 volts. Actual voltage measures 7.2 to 9.6 volts,

depending on battery chemistry. Batteries of various sizes and capacities are

manufactured; a very common size is known as PP3,

introduced for early transistor radios

● Breadboard - A breadboard, solderless breadboard, or protoboard is a construction

base used to build semi-permanent prototypes of electronic circuits. Unlike a

perfboard or stripboard, breadboards do not require

soldering or destruction of tracks and are hence reusable

The 4011 NAND GATE can be obtained very cheaply from a number of online retailers for

just a few cents. One place it can be obtained from is at CDO Electronics at the following

link. However, it is a very popular chip and many electronics parts suppliers have them.

The 4011 is a quad NAND gate chip. It is a chip that is made up of 4 independent NAND

gates. The pinout of the 4011 quad NAND gate chip is shown below, so that you can see how

to connect it in the circuit.


Each NAND gate has input pins and 1 output pin. The following chart shows NAND gate

logic, which shows what output a NAND gate chip will produce for a

set of given inputs.


This means that if one of the inputs are a 0, the NAND gate will output a logic HIGH at its

output, which means the output will be drawn up to VCC and the load will be powered. If

both inputs feeding into the NAND gate are a 1, only then will the NAND gate output a logic

LOW at its output, which means the output will be

drawn down to GND, and the load will not be powered.

In our circuit, we will use both of these cases. The other components we need are the LED

and the 330Ω resistor in series to limit current to the LED so that it

doesn't burn out.

Night Light Circuit Using a NAND Gate

The schematic diagram of the night light circuit using a 4011 NAND gate chip is shown

below.
Project Theory of Operation

I. Introduction

Design and building an automatic night lampshade require knowledge about functions

of all the components used in the project taking into account the proper position of

each of it especially the LDR (Light Dependent Resistor) which is very sensitive to

brightness and darkness. This chapter dives into the system designs and how they

were integrated into the final system design.

II. Light Sensing

The component that allows us to detect light is a photoresistor. We set up a voltage

divider circuit composed of a photoresistor and a 33KΩ fixed resistor. In a voltage

divider circuit, voltage is distributed across the components in direct proportion to the

amount of resistance each component offers. The more resistance a component offers

in relation to the other, the more voltage that will fall across that component.

III. Circuit Operation

First, we must give power to the 4011 NAND gate chip. We will feed it 9V

of power, so we give +5V to pin 14 and we connect pin 7 to GND. This establishes

power to the chip. The circuit is very basic. We set up a voltage divider circuit

composed of a photoresistor and a 33KΩ fixed resistor. In a voltage divider circuit,

voltage is distributed across the components in direct proportion to the amount of

resistance each component offers. The more resistance a component offers in relation

to the other, the more voltage that will fall across that component. This is shown in the
ohm's law formula, V= IR. The greater the resistance a component offers, the more

voltage that falls across it. Conversely, the less resistance a component offers, the less

voltage that falls across it.

When a photoresistor is exposed to either room lighting or bright, it offers

very low resistance. With this lighting condition, the resistance it offers will be lower

than the 33KΩ of resistance that the fixed resistor offers. Therefore, most of the

voltage in the voltage divider circuit will fall across the fixed resistor rather than the

photoresistor. With more than half of the supply voltage falling across the fixed

resistor and this junction being connected to the inputs of the NAND gate, a logic

level of HIGH (or 1) will be interpreted by the NAND gate. Since the inputs are tied

together, they will be both be logic 1s, so the output will be LOW (or 0). Therefore,

with bright lighting, the LED will not be powered on.

However, when the photoresistor is exposed to darkness, it has very high

resistance, in the order of a few mega ohms (MΩ). With resistance this high, most of

the voltage from the power supply falls across the photoresistor, with very little

voltage falling across the 33KΩ fixed resistor. Thus, when connected to the inputs of

NAND gate, with voltage so low, the NAND gate will essentially interpret the voltage

divider as if it were LOW (or 0). When the voltage feeding the inputs of a NAND gate

is less than half of the power supply voltage, it will interpret it as a LOW value. Since

we will tie both inputs together, the NAND gate will interpret this as two zeros, so it

will output a logic value of 1 (or HIGH), which means the output will be drawn up to

VCC and the load, the LED, will be powered on. Remember, NAND gate logic, two

1s gives a 0. This is the only time we get an output value of 0 in NAND gate logic. If

a 0 is present anywhere in the inputs, including twice, the NAND gate will output a 1.
So you can see how this voltage divider circuit allows us to get 2 different logic levels

produced by the NAND gate chip in different lighting conditions.

METHODOLOGY

I. Introduction

This chapter will go over the steps that went into creating the Automated

Night Lampshade. The project’s development flow is drawn below.


Implementation

The entire circuit of this 9-volt day/night switch can be built on top of a small bread

board. Only the LDR needs to be fixed at the top of the box so that it can detect the

ambient light. The LDR must be installed so that it is not illuminated by other lights

or lights powered by the LDR. Otherwise, irregular switching and vibration may

occur. The best situation is to mount the unit well above the lights it controls. This

automatic night lampshade can be used to control entrance lighting, neon signs, large

advertising displays, gallery lighting and can also be used as home decorative

lighting. So this simple and affordable plan not only saves you the headache of having

to replace that bulb on time, it also leads to a much more economical way of using

your bulbs.

Conclusion

We all know the importance of saving electricity. Interestingly, we can sometimes see

the lights on during the day. This shows how sometimes forgetful people can be. So

instead of relying on individuals, why not find a solution that does the job

automatically with the help of an electronic device? The simple automatic night light

circuit described in this article can very precisely turn on a load (such as a street light)

at dusk and turn it off at dawn.


DOCUMENTATION

References

Vivint (2016). Vivint Blog: The Benefits of Automated lightning Feature. Retrieved from the
website: https://www.vivint.com/resources/article/benefits-of-automated-lighting-fixtures

Maji, M. (ND). Engineers Garage: Automatic night light control system. Retrieved from the
website: https://www.engineersgarage.com/automatic-night-light-control/
Israel J. (2013). Automatic Night Lamp With Morning Alarm. Retrieved from the website:
https://www.scribd.com/document/523860276/Nanopdf-com-Automatic-Night-Lamp-With-
Morning-Alarm

Reddy S. (ND). Light Detector Using Nand Gate. Retrieved from the website:
https://www.scribd.com/document/459636470/LIGHT-DETECTOR-USING-NAND-GATE

You might also like