Professional Documents
Culture Documents
DIGITAL ELECTRONICS - Paper
DIGITAL ELECTRONICS - Paper
A Research Paper
In Partial Fulfillment
To the course
Digital Electronics 1:
By
Abian, Reychille A.
Bonggot, Jiessel O.
Macahilos, Rinalyn M.
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 street lights 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,
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. Am
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
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
to darkness or bright light. Knowing this, we can effectively build an automatic lampshade
II. Hardware Design aspects
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.
element. In electronic circuits, resistors are used to reduce current flow, adjust signal
● 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
connector or pin at each end, which is normally used to interconnect the components of
● 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
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
which shows what output a NAND gate chip will produce for a
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
In our circuit, we will use both of these cases. The other components we need are the LED and
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 requires knowledge about functions
of all the components used in the project taking into account the proper position of each
brightness and darkness. This chapter dives into the system designs and how they were
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.
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
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
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
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
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