I. NIGHTLIGHT ANALOG AND
DIGITAL CIRCUIT
Fig.1 Nightlight analog circuit Fig.2 Nightlight digital circuit
By Wagner Nunes
A. Light Depended Resistor (LDR)
Fig. 3 Example of LDR component
Fig. 4 Example of the LDR function
in the exponential decay graphic
Fig. 7 Example of an LDR when resistance
increases
Fig. 6 Example of an LDR when resistance
decreases
Fig.5 Example of the electrons in
the valence band jumping to the
conduction band
• The LDR is made of a semiconductor
material that is layered on an
insulating material such as ceramic.
B. The Comparator
• 1) The Logic:
– If (V-) > (V+) => Vout ≈ GND or “0” low (-saturation)
– If (V+) < (V-) => Vout ≈ +Vcc or “1” high (+saturation)
Fig. 8 Example of a comparator output “0” Fig. 9 Example of a comparator output “1”
C. Function of the NPN Bipolar Junction
Transistor (BJT) as a Switch
• NPN (N stands for negative charge and P
stands for positive charge or hole)
• BJT(bipolar junction transistor ) is because it
involves both of these types of charger.
Fig. 11 Example of a transistor tuning the LED onFig. 10 the three regions of a NPN transistor
1) Cut - Off Region Conditions :
• Input base current IB= 0
• VBE < 0.7v
• Output collector current IC= 0
• Base – Collector junction BC is reversed biased
• Base – Emitter junction BE is reversed biased
• Maximum collector VCE= VCC
Fig. 12 Example of cut - off region conditions
1) Saturation Region Conditions
• Input base current (IB) connected to VCC
• VBE > 0.7v
• Max collector current IC= VCC/RC
• Base – Collector junction BC is forward biased
• Base – Emitter junction BE is forward biased
• VCE= 0 (ideal saturation)
Fig. 13 Example of saturation region conditions
Calculation for the collector resistor ( ) , base
current ( ) , and base resistor( )
IC = 20mA(datasheet)
VCE (Sat ) = 0.2V(datasheet)
bDC (direct current gain) = 60(datasheet)
IC = bDc ´ IB
-VCC + IC RC +VLED +VCE(Sat) = 0
-6V + 20mA ´ RC + 3.4V + 0.2V = 0
-2.4V + 20mA ´ RC = 0
RC =
2.4V
20mA
=120W
IB =
IC
bDC
= 333mA
RB =
6V - 0.7V
333mA
=16KW
IB
RB
RC
D. LED (light emitting diode)
Fig. 12 Example of the barrier potential
Fig. 14 Example of current in forward direction
on a diode
Fig. 15 Energy released by the
electron of a single photon.
Fig.13 An LED will begin to emit light when the
on-voltage is exceeded.
Fig. 11 Example of a blue 5mm LED
Calculation for energy released by the
electron of a single photon.
h (Plank 's constant) = 6.626 ´10-34
J / s
C(Coulomb) = 6. 25´1018
e-
c (Speed of light) = 3´108
m / s
l (called lambda or wavelength)
u ( frequency)
eV (electron volts)
lu = c
u =
c
l
=
3´108
m / s
470 ´10-9
m
= 640 ´1012
s-1
E( photon) = hu = (6. 626 ´10-34
J / s)´ (640 ´1012
s-1
) = 423´110-21
J
E(eV ) = E( photon) ´1Coulomb = (423´10-21
J)´ (6.25´1018
e-
) = 2. 6eV
Analog Circuit Schematic
II. NIGHTLIGHT DIGITAL CIRCUIT VERSION –
BASIC OPERATION
• Arduino Function:
– There is no analog output on Arduino. Instead it is a
digital output (on or off).
– If the output is half of the time on and half of the time
off, it is said to be 50% duty cycle.
– Duty cycle is the percentage of time that the output is
on. The output can be 30%, 20%, 10% duty cycle, or
any percentage from 0 – 100%.
– The Arduino has a technic called pulse width
modulation (PMW) that makes its output work as
analog.
Arduino Function:
• In the nightlight device, it allows the LED to fade
in and out going from 0 to 255 (8 bits = as a
default resolution) value repeating in a loop.
• 0 correspond to 0 volts and 255 to 5 volts and any
value in between are proportional to those
voltages.
• Then theses values are sent to the PWM pin
(PWM Pins 3, 5, 6, 9, 10, 11) thus fading the LED
in and out.
28
Arduino
Function – Pulse Width Modulation
Fig.18 Example of pulse width modulation
1) Formula for Duty Cycle:
DutyCycle=
TH
T
´100%
Voltage per step
(analogWrite( )) :
x=0 ® 255
xsteps
how many volts
xsteps
= x steps
5V
255 steps
=19.6mV per step
how many volts= x
5V
255
æ
è
ç
ö
ø
÷ =
E. Arduino
Function:
• This “function call” passes the read value
(argument) from the inputs (A0 to A5) to the
function in the library and its return an
integer, which is from 0 to 1023 (10 bits = )
as a default resolution).
• 0 corresponds to 0V and 1023 to 5V.
210
formula to calculate the voltages per
step on the input read
x = 0 ®1023
xsteps
how many volts
xsteps
= x steps
5V
1024 steps
= 4.88mV per step
how many volts= x
5V
1024
æ
è
ç
ö
ø
÷ =
Appendix C
Flowchart for the Digital Circuit
III. NIGHTLIGHT ANALOG CIRCUIT VERSION VS.
NIGHTLIGHT DIGITAL CIRCUIT VERSION
NIGHTLIGHT ANALOG CIRCUIT VERSION NIGHTLIGHT DIGITAL CIRCUIT VERSION
I spent more time with the digital circuit
than the analog one because of my
familiarity with it.
I improved my lack of skills with Arduino
the analog circuit required more space on
the board than the digital one due to
more parts used.
V. COST TO BUILD AND OPERATE
NIGHTLIGHT ANALOG CIRCUIT NIGHTLIGHT DIGITAL CIRCUIT
costs about $5.70 costs about $26.38, approximately five
times more (because of the Arduino )
+ Arduino can be used for other
applications because it is programmable.
Running on 6V (Maui Electric Company), 8
hours per day, the cost is $1.20 per
month.
Running on 6V battery, 8 hours per day,
the cost is $11 per month.
Conclusion
• As a result, this project spiked my interest
even more in electronics hardware, software,
and more about technology in general.
Consequently, after my associate degree in
the ECET, my next academic goal is to earn a
bachelor’s degree, become an electronic
computer engineer, and perhaps to earn a
master degree so I can teach electronics at a
university.
ETRO_296_Final_Presentation

More Related Content

PDF
RF Circuit Design - [Ch3-1] Microwave Network
PDF
Analog circuits
PDF
Lect2 up290 (100328)
PDF
Basic electronics Tutorial 3
PPT
041813 rs 120 rule and test taking strat
PDF
Basic electronics Tutorial 1
PPTX
Changes to 2014 NEC Interconnection Rule 705.12
RF Circuit Design - [Ch3-1] Microwave Network
Analog circuits
Lect2 up290 (100328)
Basic electronics Tutorial 3
041813 rs 120 rule and test taking strat
Basic electronics Tutorial 1
Changes to 2014 NEC Interconnection Rule 705.12

What's hot (20)

PDF
RF Circuit Design - [Ch3-2] Power Waves and Power-Gain Expressions
PDF
Temple, San Jose Interconnection App Stamped (1)
PPT
06 amplificadores de potência
PPT
Ch2 slides-1
PDF
Reflection and Transmission coefficients in transmission line
PDF
2 n3055h
PDF
questions on diode analysis: Assignment6
PPT
Ch1 slides-1
PPTX
Dancing L8
PDF
射頻電子 - [第三章] 史密斯圖與阻抗匹配
PDF
Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計
PPT
Lecture 12
PDF
14.5.7 Example 1 Part 4
PPT
Lecture 13
PPT
ECNG 3013 E
PDF
RF Module Design - [Chapter 1] From Basics to RF Transceivers
PDF
RF Module Design - [Chapter 7] Voltage-Controlled Oscillator
PDF
PPTX
PVCOM-PV Coding & Modelling.
PDF
Original NPN Transistor 2SD667A 667 2SD667 D667 TO-92 New
RF Circuit Design - [Ch3-2] Power Waves and Power-Gain Expressions
Temple, San Jose Interconnection App Stamped (1)
06 amplificadores de potência
Ch2 slides-1
Reflection and Transmission coefficients in transmission line
2 n3055h
questions on diode analysis: Assignment6
Ch1 slides-1
Dancing L8
射頻電子 - [第三章] 史密斯圖與阻抗匹配
Agilent ADS 模擬手冊 [實習1] 基本操作與射頻放大器設計
Lecture 12
14.5.7 Example 1 Part 4
Lecture 13
ECNG 3013 E
RF Module Design - [Chapter 1] From Basics to RF Transceivers
RF Module Design - [Chapter 7] Voltage-Controlled Oscillator
PVCOM-PV Coding & Modelling.
Original NPN Transistor 2SD667A 667 2SD667 D667 TO-92 New
Ad

Viewers also liked (9)

PPTX
Automatic Street Light On/Off
PPTX
Automatic Light Control using LDR and PIR Sensor
PDF
Cyclotron (1)
PPTX
automatic street light
PPTX
OPTICAL FIBER COMMUNICATION PPT
PPT
optical fibre ppt for download visit http://nowcracktheworld.blogspot.in/
PPT
Automatic control of street light using LDR
PDF
Physics Investigatory Project Class 12
PPTX
Optical fiber communiction system
Automatic Street Light On/Off
Automatic Light Control using LDR and PIR Sensor
Cyclotron (1)
automatic street light
OPTICAL FIBER COMMUNICATION PPT
optical fibre ppt for download visit http://nowcracktheworld.blogspot.in/
Automatic control of street light using LDR
Physics Investigatory Project Class 12
Optical fiber communiction system
Ad

Similar to ETRO_296_Final_Presentation (20)

PDF
70 interesting circuits
PDF
Dark indicator
DOCX
Real Analog - Circuits 1Chapter 1 Lab WorksheetsReal Analog – .docx
PPTX
automatic light control at night ppt by Shubhan raj
PPTX
Arduino Workshop (3).pptx
PDF
Lec 8,9,10 (interfacing)
PDF
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
PDF
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
PPTX
Automatic street light using ldr and relay
PPTX
1396740 634706422070340000
PDF
Introduction to Electrickery
PDF
publish manual
PPTX
mini project ppt 5thsem.pptx
PDF
IRJET - Automatic Mechanism for LED Parameters Testing & Checking
PPTX
Design Engineering Gtu AEIOU gujarat technology university
DOC
Fading leds via pwm
DOCX
Automatic street light controller
PPT
Physical prototyping lab2-analog_digital
PPT
Physical prototyping lab2-analog_digital
PPTX
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
70 interesting circuits
Dark indicator
Real Analog - Circuits 1Chapter 1 Lab WorksheetsReal Analog – .docx
automatic light control at night ppt by Shubhan raj
Arduino Workshop (3).pptx
Lec 8,9,10 (interfacing)
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
Automatic street light using ldr and relay
1396740 634706422070340000
Introduction to Electrickery
publish manual
mini project ppt 5thsem.pptx
IRJET - Automatic Mechanism for LED Parameters Testing & Checking
Design Engineering Gtu AEIOU gujarat technology university
Fading leds via pwm
Automatic street light controller
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT

ETRO_296_Final_Presentation

  • 1. I. NIGHTLIGHT ANALOG AND DIGITAL CIRCUIT Fig.1 Nightlight analog circuit Fig.2 Nightlight digital circuit By Wagner Nunes
  • 2. A. Light Depended Resistor (LDR) Fig. 3 Example of LDR component Fig. 4 Example of the LDR function in the exponential decay graphic Fig. 7 Example of an LDR when resistance increases Fig. 6 Example of an LDR when resistance decreases Fig.5 Example of the electrons in the valence band jumping to the conduction band • The LDR is made of a semiconductor material that is layered on an insulating material such as ceramic.
  • 3. B. The Comparator • 1) The Logic: – If (V-) > (V+) => Vout ≈ GND or “0” low (-saturation) – If (V+) < (V-) => Vout ≈ +Vcc or “1” high (+saturation) Fig. 8 Example of a comparator output “0” Fig. 9 Example of a comparator output “1”
  • 4. C. Function of the NPN Bipolar Junction Transistor (BJT) as a Switch • NPN (N stands for negative charge and P stands for positive charge or hole) • BJT(bipolar junction transistor ) is because it involves both of these types of charger. Fig. 11 Example of a transistor tuning the LED onFig. 10 the three regions of a NPN transistor
  • 5. 1) Cut - Off Region Conditions : • Input base current IB= 0 • VBE < 0.7v • Output collector current IC= 0 • Base – Collector junction BC is reversed biased • Base – Emitter junction BE is reversed biased • Maximum collector VCE= VCC Fig. 12 Example of cut - off region conditions
  • 6. 1) Saturation Region Conditions • Input base current (IB) connected to VCC • VBE > 0.7v • Max collector current IC= VCC/RC • Base – Collector junction BC is forward biased • Base – Emitter junction BE is forward biased • VCE= 0 (ideal saturation) Fig. 13 Example of saturation region conditions
  • 7. Calculation for the collector resistor ( ) , base current ( ) , and base resistor( ) IC = 20mA(datasheet) VCE (Sat ) = 0.2V(datasheet) bDC (direct current gain) = 60(datasheet) IC = bDc ´ IB -VCC + IC RC +VLED +VCE(Sat) = 0 -6V + 20mA ´ RC + 3.4V + 0.2V = 0 -2.4V + 20mA ´ RC = 0 RC = 2.4V 20mA =120W IB = IC bDC = 333mA RB = 6V - 0.7V 333mA =16KW IB RB RC
  • 8. D. LED (light emitting diode) Fig. 12 Example of the barrier potential Fig. 14 Example of current in forward direction on a diode Fig. 15 Energy released by the electron of a single photon. Fig.13 An LED will begin to emit light when the on-voltage is exceeded. Fig. 11 Example of a blue 5mm LED
  • 9. Calculation for energy released by the electron of a single photon. h (Plank 's constant) = 6.626 ´10-34 J / s C(Coulomb) = 6. 25´1018 e- c (Speed of light) = 3´108 m / s l (called lambda or wavelength) u ( frequency) eV (electron volts) lu = c u = c l = 3´108 m / s 470 ´10-9 m = 640 ´1012 s-1 E( photon) = hu = (6. 626 ´10-34 J / s)´ (640 ´1012 s-1 ) = 423´110-21 J E(eV ) = E( photon) ´1Coulomb = (423´10-21 J)´ (6.25´1018 e- ) = 2. 6eV
  • 11. II. NIGHTLIGHT DIGITAL CIRCUIT VERSION – BASIC OPERATION • Arduino Function: – There is no analog output on Arduino. Instead it is a digital output (on or off). – If the output is half of the time on and half of the time off, it is said to be 50% duty cycle. – Duty cycle is the percentage of time that the output is on. The output can be 30%, 20%, 10% duty cycle, or any percentage from 0 – 100%. – The Arduino has a technic called pulse width modulation (PMW) that makes its output work as analog.
  • 12. Arduino Function: • In the nightlight device, it allows the LED to fade in and out going from 0 to 255 (8 bits = as a default resolution) value repeating in a loop. • 0 correspond to 0 volts and 255 to 5 volts and any value in between are proportional to those voltages. • Then theses values are sent to the PWM pin (PWM Pins 3, 5, 6, 9, 10, 11) thus fading the LED in and out. 28
  • 13. Arduino Function – Pulse Width Modulation Fig.18 Example of pulse width modulation
  • 14. 1) Formula for Duty Cycle: DutyCycle= TH T ´100% Voltage per step (analogWrite( )) : x=0 ® 255 xsteps how many volts xsteps = x steps 5V 255 steps =19.6mV per step how many volts= x 5V 255 æ è ç ö ø ÷ =
  • 15. E. Arduino Function: • This “function call” passes the read value (argument) from the inputs (A0 to A5) to the function in the library and its return an integer, which is from 0 to 1023 (10 bits = ) as a default resolution). • 0 corresponds to 0V and 1023 to 5V. 210
  • 16. formula to calculate the voltages per step on the input read x = 0 ®1023 xsteps how many volts xsteps = x steps 5V 1024 steps = 4.88mV per step how many volts= x 5V 1024 æ è ç ö ø ÷ =
  • 17. Appendix C Flowchart for the Digital Circuit
  • 18. III. NIGHTLIGHT ANALOG CIRCUIT VERSION VS. NIGHTLIGHT DIGITAL CIRCUIT VERSION NIGHTLIGHT ANALOG CIRCUIT VERSION NIGHTLIGHT DIGITAL CIRCUIT VERSION I spent more time with the digital circuit than the analog one because of my familiarity with it. I improved my lack of skills with Arduino the analog circuit required more space on the board than the digital one due to more parts used.
  • 19. V. COST TO BUILD AND OPERATE NIGHTLIGHT ANALOG CIRCUIT NIGHTLIGHT DIGITAL CIRCUIT costs about $5.70 costs about $26.38, approximately five times more (because of the Arduino ) + Arduino can be used for other applications because it is programmable. Running on 6V (Maui Electric Company), 8 hours per day, the cost is $1.20 per month. Running on 6V battery, 8 hours per day, the cost is $11 per month.
  • 20. Conclusion • As a result, this project spiked my interest even more in electronics hardware, software, and more about technology in general. Consequently, after my associate degree in the ECET, my next academic goal is to earn a bachelor’s degree, become an electronic computer engineer, and perhaps to earn a master degree so I can teach electronics at a university.