Beruflich Dokumente
Kultur Dokumente
One of the major problems in the most populated and developing countries like India, is
Energy or Power crisis. Hence, there is a pressing need to conserve power. There are many
simple ways to save electricity, like using the electric and electronic gadgets whenever and
wherever needed and switching them off, while not in use. But in places such as large
auditoriums and meeting halls, there will be a fan or an Air-conditioner keeps running in
unmanned area too, even before the people arrive. This contributes to a considerable amount of
electricity wastage. There are many ways to prevent this wastage, like, installing IR sensors to
detect people etc. These methods are quite costlier and complex for larger areas. Hence, here we
propose a new method of controlling the power supply of auditoriums using, Image Processing.
Here first we take a reference image of an empty auditorium and any change in that reference
image is detected and then according to that change respective equipment alone are turned on.
Thus power wastage is controlled. This is dual usage system in which a camera is used for
detecting people as well as surveillance purposes. This is very simple, efficient and cheaper
technique to save energy. Another big advantage is, we can extend this up to applications like
home automation etc.
Often, we may have come across a scenario that in places such as large auditoriums or
halls, electric equipment like, fans, lights or air conditioners are running, even if there is no
people. They are operated manually. Moreover, in some cases, some areas may be unfilled. But
even in those areas those electric equipment are running meaninglessly. This is because, every
time manually turning on and off a fan in accordance with the arrival of people, is an
uncomfortable task. To avoid this, they are turned on prior to the arrival of people, as a
precaution. This causes considerable wastage of power. Hence an efficient system that
automatically controls the power supply of this kind of places is in a demand. Current automatic
controlling techniques use Infrared sensors to detect people. For simple setup, the operation
depends on the count. But we cannot find the places which are unoccupied. Large array of IR
sensors are needed to be installed in places with larger area. Hence installation cost as well as the
circuit complexity increases. As everyone knows, IR is harmful for human beings. Hence, here
we propose a new method to meet this demand, using a famous technique called, Image
Processing.
Using this technique we monitor the changes in the auditorium through sequence of
images and according to that the power supply is controlled. Image processing is a form of signal
processing for which the input is an image, and the output may be either an image or, a set of
characteristics or parameters related to the image. Most image-processing techniques involve
treating the image as a two-dimensional signal and applying standard signal-processing
techniques to it. The implementation of power supply control using image processing is
relatively very simple. The empty image of the auditorium is taken as a reference image, using a
digital camera in an elevated view. The image is converted to gray and enhanced using image
enhancement techniques. Now edge detection is done. Similarly the captured real time image is
enhanced and edge detected. These two images are compared and using the comparison results,
respective control signals are generated using a hardware prototype. The reference and real time
images undergo the following processes starting from their acquisition, Gray conversion,
Partitioning, Edge detection, Comparison and finally generating the control signals.
OBJECTIVES:
In this paper, we propose the idea of smart saver classroom remote in order to guarantee and
increase the efficiency of power saving abilities using image processing and Arduino
microcontroller This type of classroom mainly use sensors to observe the environment and
automatically take decisions about its behavior or pass this information to microcontroller who
control the vehicle through programming. Existing systems do not include the environmental
assessment, temperature variation assessment, and the implementation with most advanced
hardware and related software algorithm. The objective of this project is to develop and
implement a smart classroom utilizing embedded micro-controllers.
SYSTEM DEVELOPMENT
Block Diagram
Relay-1 LAMP1
Power
Supply
Relay-2 LAMP2
Relay-4 LAMP4
Transistor-1 FAN1
Transistor-2 FAN2
Transistor-3 FAN3
Transistor-4 FAN4
The above block diagram shows the architecture of the system. In this system Arduino
microcontroller is used to control the complete circuit of the system. Arduino is the brain of the
system. In this system we have connected 4 lamp and 4 fans for the 4 different sections in the
auditorium. These electronic devices are interfaced with the system by means of relays and
transistors as shown in the architecture of the system.
In this system the first stage is the image acquisition. After that any processing
techniques can be applied to it. Image acquisition means creating digital images from a physical
scene. After acquiring the images from the camera, it is fed to the controller unit. Controller unit
then compares various section (4 in this case) to detect in which section person available. Also
the real image is compared with the reference image. After obtaining the data that people are
present in any section the controller generates control signal and fed to the relay and transistor to
turn ON the lamp and fan of that section. If there is no one is present in the auditoriums section
the controller turns OFF the devices by sending control signals to the relay and transistor.
Image acquisition is the first stage of image processing. After the image has been
obtained, various methodologies like, compressing, storing, printing, displaying are applied to an
image. The image processing is most common method in digital photography but, other method
like image sensing etc can also be used. In this paper we used digital camera. Camera will be
installed at proper place so that it will be cover whole classroom.
Video Streaming:
Streaming videos is extracting crucial frame from video so that we can apply further
processing. In this paper we have used video streaming to capture images within 10 second and
can apply further processing to those images.
Due to the compatibility issue capture real time images are converted into gray scale
images. Gray scale images is digital image in which value of each pixel is considered as single
sample. These type of images are also known as black and white image. Gray scale images
contain image components having 256 intensity levels varies from 0 to 255.
In the image processing, edge detection was a technique of finding boundaries of a given
objects. The edge is detected by any small changes in intensity of an image. The purpose of the
detecting sharps changed in image is to capture significant event and change in properties of an
image. There is lots of edge detectors like sobel, canny, prewitt etc. Here is canny edge detector.
In this steps two images are the compared and its intensity value is subtracted. Image was
compared by subtracting real time image from reference images. Now we have applied this to
find out any person in an image and its boundary could be detected.
Now all the analysis on an image has been done. So, now control signal has been
generated according to output given to the system. When empty class is detected then 1 output
signals (control) had been generated and when there is any person sitting then 0 control signal
was generated. Controlling is done through a circuitry interfaced microcontroller then controller
will be send output to relay circuit.
After all the software base processing carried out the result output is provided to the
microcontroller in the hardware of the system. According to the received data the microcontroller
compares it with the set data and turns the light and fan on or off as per the requirement of the
area in which the person is present. In this system we have considered 4 areas of the auditorium.
In each area we have we have used a lamp and a fan for the demo purpose. These lamps and fans
are interfaced with the microcontroller as shown in the architecture of the system. The lamps are
interfaced with the microcontroller through relays as shown in the diagram whereas the fans are
interfaced with the microcontroller through transistors. These lights and fans will be operated
through microcontroller by controlling the relay for light and transistor for fan.
Circuit Diagram
1 2 3 4 5 6
230V A/C
D P N D
1N4007 LM7805
0-12VOLT/1AMP 1 3
Vin Vout
230V AC
2
3MM LED K 2
1N4007 NO
1000uF/35V V-
1000uF/10V
1N4007 Q1 LAMP-2
R3 RLY2
BC547 V+ NC
1
COM
K 2
NO
V-
+5V
LAMP-3
RLY3
V+ NC
1
Q2 COM
R4 K 2
BC547 NO
IC2 C5 S1 V-
1 2 10K
C1+ Y+
LAMP-4
RLY3
C7 V+ NC
C 1 C
3 6 COM
C1- Y- K 2
4 IC2 NO
C2+ V-
C6 1 28 Q3
PC6/(RESET) PC5/(ADC5/SCL) R5
C8 2 27 BC547
PD0/(RXD) PC4/(ADC4/SDA)
5 3 26
C2- PD1/(TXD) PC3/(ADC3)
4 25
PD2/(INT0) PC2/(ADC2)
11 14 5 24
IT1 OT1 PD3/(INT1) PC1/(ADC1)
12 13 6 23
OR1 IR1 PD4/(XCT/T0) PC0/(ADC0)
RX 10 7
IT2 OT2
TX 9 8 19
OR2 IR2 PB5/(SCK)
11 18 Q4
PD5/(T1) PB4/(MISO) R6
MAX232 12 17 BC547 +12Volt
PD6/(AIN0) PB3/(MOSI/OC2)
13 16
VCC PD7/(AIN1) PB2/(SS/OC1B)
15
PB1/(OC1A)
14 M-1
PB0/(ICP1)
Error : Laptop.jpg file not found. 7
VCC
DC
21 FAN
AREF
9 20 Q5
PB6/(X1,TOSC1) AVCC R3
BC547
8
GND
10 22
PB7/(X2,TOSC2) GND
16MHz M-2
ATMEGA88PA
B B
DC
33PF 33PF FAN
Error : CAM.jpg file not found. Q6
R4 BC547
M-3
DC
FAN
Q7
R5
BC547
M-4
DC
FAN
Q8
R6
BC547
A A
Title
CIRCUIT DESCRIPTION
The above diagram represents the circuit implementation of the Automatic Real Time
Auditorium Power Control system. In this system all the circuit components require regulated
power for their working functionality. To fulfill this requirement of the circuit we have designed
a power supply unit to provide regulated power supply to the circuit components. The supply is
provided through mains i.e., 230v. The supply is stepped down to 12v from 230v through
transformer. Hence at the secondary terminal of the transformer we get 12v AC. This ac output
of the transformer is converted into DC with the help of the full bridge rectifier. The output of
the rectifier is 12v DC. This 12v is provided to the regulator IC. This regulator IC used is
LM7805. The input to the regulator is provided at pin no 1 of the regulator and the output is
taken out at pin no 3 of the regulator IC. The ground is provided at pin no 2 of the regulator. The
5v from one IC is provided to the controller. An LED is connected in between the regulator and
the controller to indicate whether the power is on or off. The capacitor at the input and the output
of the regulator is used to remove the ripples in the signal i.e., this are filter capacitor.
Circuit implemented of the system consists of a microcontroller to control the complete
circuit action of the hardware of the system. To complete all these functions we have used an
ATMEGA88PA microcontroller in this work. This microcontroller requires regulated 5V power
supply for its operation. This power supply is provided by the power supply unit in the system.
Generally controller works on a stable frequency to produce machine cycles to execute the
firmware stored in the memory. To obtain this frequency an external oscillator is connected to
the pin number 9 and 10 i.e. OSC1 and OSC2 of the controller IC as shown in the circuit
diagram of the system. This is a crystal oscillator designed using a 16MHz crystal with two
parallel capacitors as shown in the circuit diagram. A crystal oscillator is an electronic oscillator
circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create
an electrical signal with a very precise frequency. This frequency is commonly used to keep
track of time, to provide a stable clock signal for digital integrated circuits, and to stabilize
frequencies. A reset switch is connected to the reset pin i.e. pin number 1 of the controller IC.
This switch is used to reset the microcontroller during the fluctuation in the power supply or due
to any malpractice during its operation. A reset input is used to reset a microcontroller. Resetting
puts the microcontroller into a known state such that the program execution starts from address 0
of the program memory.
The hardware of the system gets the input from the software design for the detection of
the person in the particular area of the auditorium. The output of the software part of the system
is provided to the hardware i.e. microcontroller through a MAX 232 device interfaced with the
microcontroller and PC as shown in the circuit diagram of the system. This MAX 232 is
connected to the pin number 2 and 3 of the microcontroller IC as shown in the circuit diagram.
The microcontroller receives the data from this device and processes it and compares it with the
stored reference data and take action accordingly. The hardware of the system consists of 4
lamps and 4 fans interfaced with the microcontroller as shown in the circuit diagram of the
system. These lights and fans will be turned On and Off as the presence of the human is detected
by the image processing technique used in this system. These lights are connected to the pin
number 25 to 28 as shown in the circuit diagram of the system. These lights are connected in
each area of the auditorium. Also each area consists of a Fan operated by the microcontroller.
These fans are connected to the pin number 18, 19, 23 and 24 of the controller IC as shown in the
circuit diagram. These lights and fans are interfaced with the microcontroller through transistors.
FLOW CHART:
WORKING
The first stage is the image acquisition. After that any processing techniques can be
applied to it. Image acquisition means creating digital images from a physical scene. It includes
processing, compressing, storing, printing and displaying the images. The camera should be
installed in a perfect place so that it covers the entire auditorium or Hall. The camera is
interfaced with a computer or a micro-controller. First image of the auditorium is captured, when
there are no people. This empty auditorium’s image is saved as reference image at a particular
location specified in the program. Note that, reference image is taken only once, whereas the real
time images are captured in certain intervals of time. Here we take the real time images in the
interval of 10 seconds. The captured images are fed as inputs to the main program through
certain algorithms. The real time image captured is a color image (RGB image). But grayscale
images are comfortable for processing. A Gray scale image contains each pixel as a single
sample. In other words it carries only intensity information. These images are also known as
black-and-white images, and that are composed exclusively of shades of gray, varying from
black at the weakest intensity to white at the strongest. The gray scale image contains image
components with 256 intensity levels ranging from 0 to 255. RGB to Gray conversion is done for
both the reference and captured images. The purpose of this image intensity conversion is the
analysis of the image which is easy for processing in gray scale mode than in the RGB mode.
An image is understood as a collection of regions that totally covers it. Regions are
homogeneous in the selected feature space and connected in the image space. Such an image
representation enables region-based user interaction. In it, the user can interact with the
underlying partitions that represent the image. After partitioning the features are the regions can
be parallel processed. Now in our case, auditorium is installed with many fans and lights. Each
fan or a light has its own coverage area. According to the coverage area we split the image into
many cells, with each cell is simply the area covered by a fan. This is because; during the image
comparison we have to know the place where the humans exist. So initially the cells are split and
given a unique name or label. In this system we have considered a hall which has 4 fans, we will
divide the image into four regions. Each region is the coverage area of each fan. Using these
regions further processing is carried out. These four regions are going to be occupied by
humans. Hence those four regions are alone considered. The resolutions for these cells are set.
These are the cells that are going to be processed. Note that both the reference and real time
images are partitioned in a same manner. These areas are carefully specified in the main
program.
The edge is detected by any abrupt change in intensity levels of an image. Using this
technique the amount of data to be analyzed is reduced and hence the response time will be
reduced. The main objective of edge detection is to find out the variations in the real time
captured image from the reference image. There are many detectors for edge detection like sobel,
prewitt, canny etc. Here we go with the canny edge detector. First, it smoothens the image and
detects the image gradient to highlight regions with high spatial derivatives. It then tracks along
these regions to suppress any pixel that is not at the maximum. Finally, through hysteresis, it
uses two thresholds and if the magnitude is below the first threshold, it is set to zero. If the
magnitude is above the high threshold, it is made an edge and if the magnitude is between the
two thresholds, it is set to zero unless there is a path from this pixel to a pixel with a gradient
above the second threshold. That is to say that the two thresholds are used to detect strong and
weak edges, and include the weak edges in the output only if they are connected to strong edges.
Here, we find edge detected images for each and every cell. When the images are directly taken
for any processing, the analysis time and the process data will be very high. But, here after the
edge detection, only the edges appear in the images. So the calculation time will be reduced. In
the next step, the two edge detected images are compared by merely subtracting and the intensity
values for the entire new image is calculated. Image subtraction is a type of Image segmentation.
We need to extract the human shape from the background. Hence, the real time images are
subtracted from the reference image. This subtraction results in indication of the places which
are modified. In other words we can say that, the regions which are occupied by humans are
indicated. The summation of all values in the resultant matrix is then obtained. Now all the
changes are identified. The cells which are occupied by humans will be detected in the above
step. The modified values are summed for each cell separately. If this sum of a particular cell
exceeds the threshold value then the fan or light corresponding to that cell is turned ON. The
threshold value determination is the important process here. These fans and lights are switched
by the signal provided by the microcontroller according to the process carried out in above steps.
HARDWARE COMPONENT
4. I/O Ports
5. Interrupt pins
6. Timers
7. Counters
1.1 Power
The Arduino Uno can be powered via the USB connection or with an external power supply.
The power source is selected automatically. External (non-USB) power can come either from an
AC-to-DC adapter (wall-wart) battery. The adapter can be connected by plugging a 2.1mm
center-positive plug into the board's power jack. Leads from a battery can be inserted in the GND
and Vin pin headers of the POWER connector. The board can operate on an external supply of 6
to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts
and the board may be unstable. If using more than 12V, the voltage regulator may overheat and
damage the board. The recommended range is 7 to 12 volts.
1.2 Physical Characteristics
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the
USB connector and power jack extending beyond the former dimension. Four screw holes allow
the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8
is 160 mil(0.16"), not an even multiple of the 100 mil spacing of the other pins.
Pin Diagram of The Arduino:
Features:
1. Microcontroller- ATmega328
2. Operating Voltage- 5V
3. Input Voltage (recommended) -7-12V
4. Input Voltage (limits)- 6-20V
5. Digital I/O Pins- 14 (of which 6 provide PWM output)
6. Analog Input Pins- 6
7. DC Current per I/O Pin- 40 mA
8. DC Current for 3.3V Pin- 50 mA
9. Flash Memory -32 KB (ATmega328) of which 0.5 KB used by bootloader
10. SRAM -2 KB (ATmega328)
11. EEPROM -1 KB (ATmega328)
12. Clock Speed -16 MHz
ATMEGA88PA Microcontroller:
Features:
̶ 256/512/512/1KBytes EEPROM
̶ Up to 64 sense channels
Peripheral Features
Temperature Measurement
Temperature Measurement
̶ Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby, and
Extended Standby
Operating Voltage:
̶ 1.8 - 5.5V
Temperature Range:
̶ -40 C to 85 C
Speed Grade:
Pin Configurations:
Pin Descriptions:
1.1.1 VCC
1.1.2 GND
Ground.
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port B output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port B pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port B pins are tristated when a reset condition becomes
active, even if the clock is not running. Depending on the clock selection fuse settings, PB6 can
be used as input to the inverting Oscillator amplifier and input to the internal clock operating
circuit. Depending on the clock selection fuse settings, PB7 can be used as output from the
inverting Oscillator amplifier. If the Internal Calibrated RC Oscillator is used as chip clock
source, PB7...6 is used as TOSC2...1 input for the Asynchronous Timer/Counter2 if the AS2 bit
in ASSR is set.
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The PC5...0 output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port C pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
1.1.5 PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical
characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL Fuse is un-
programmed, PC6 is used as a Reset input. A low level on this pin for longer than the minimum
pulse length will generate a Reset, even if the clock is not running. Shorter pulses are not
guaranteed to generate a Reset.
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port D output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port D pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
1.1.7 AVCC
AVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7:6. It should be
externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be
connected to VCC through a low-pass filter. Note that PC6...4 use digital supply voltage, VCC.
1.1.8 AREF
In the TQFP and QFN/MLF package, ADC7:6 serve as analog inputs to the A/D
converter. These pins are powered from the analog supply and serve as 10-bit ADC channels.
CRYSTAL OSCILLATOR:-
FIG.CRYSTAL
DESCRIPTION:-
A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a
vibrating crystal of piezoelectric material to create an electrical signal with a very precise
frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to
provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio
transmitters and receivers. The most common type of piezoelectric resonator used is the quartz
crystal, so oscillator circuits designed around them became known as "crystal oscillators."
Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of
megahertz. More than two billion (2×109) crystals are manufactured annually. Most are small
devices for consumer devices such as wristwatches, clocks, radios, computers, and cellphones.
Quartz crystals are also found inside test and measurement equipment, such as counters, signal
generators,and oscilloscopes.
Pierce Oscillator:-
A simplified schematic of the oscillator circuit used in Figure 1. Note that the typical 2-pin
crystal has been replaced by its equivalent circuit model.
• Co is the pin-to-pin capacitance. Its value is associated with the crystal electrode design and the
crystal holder.
• Cs is the motion capacitance and Ls is the motion inductance, which are not specified, and are
functions of the crystal frequency.
• C1 and C2 are total capacitance-to-ground at the input and output nodes of the amplifier,
respectively. If external capacitance is not added, the values of the internal capacitance C1 and
C2, including pin parasitic capacitance, are each approximately 15pF to 20pF.
Series and Parallel Resonance:-
There is no such thing as a “series cut” crystal as opposed to a “parallel cut” crystal. The same
crystal can be made to oscillate in series resonance mode or parallel resonance mode. The
frequency of osillation of a crystal is usually specified by the manufacturer as either the series
resonance frequency or the parallel resonance frequency. A crystal can oscillate in series
resonance, meaning that Ls is resonating with Cs, and the resonance frequency is then simply
Some oscillator circuits are designed for series resonance and the oscillation frequency shall
equal the specified series resonance value. These series mode oscillators, however, are more
sensitive to temperature and component variations. In fact, most crystals oscillators in today's
ICs are of the parallel resonance type. The oscillation frequency of a parallel mode oscillator is
always higher than fseries. The actual oscilation frequency of a parallel mode oscillator is
dependent on the equivalent capacitance seen by the crystal.
Where
At parallel resonance, the crystal behaves inductively and resonates with capacitance shunting
the crystal terminals. Depending on the application, especially in microprocessors where Pierce
oscillators are used predominantly, a crystal manufacturer may specify parallel resonance
frequency instead of series resonance frequency. Since f parallel is a function of the load
capacitance Ceq, it should also be specified along with f parallel.
For PC CPU clock and VGA clock applications, the frequency accuracy required is usually not
very stringent and can easily be satisfied with a 14.318 MHz crystal that has been specified for
operation in either series or parallel resonance modes.
This is one of the more important specifications for a crystal. In operation, if the power
dissipated in the crystal exceeds the specified drive level, the crystal may have long term
reliability problems. The oscillation frequency may shift from the desired value, and in extreme
cases the crystal may crack and stop oscillating altogether. For the circuit in Figure 1, crystal
dissipation is given by
Using typical values for Rs, Ceq and V equals 5V, P equals approximately 876 W.
Since increasing the value of C1 and C2 would result in increased power dissipation in the
crystal, it is not recommended that extra capacitance be added to pins XTAL1 and XTAL2 of the
clock chip unless it is absolutely necessary to tune the frequency to a desired value. In the case
that additional capacitances are added, a crystal with a higher drive level should be chosen
according to the above equation.
MAX232
Max232 is used to convert a RS232 logic level to TTL logic level and vice-versa, during
serial communication of microcontroller and GSM modem because GSM modem work at RS232
voltage levels logic 1 varies from -3 to -15 volts and logic 0 varies from +3 to +15 volts where
the controller which works on TTL logic levels logic 1 is +5 volts and logic 0 is 0 volts.
2. Operates From a Single 5-V Power Supply With 1.0-μF Charge-Pump Capacitors
8. Upgrade With Improved ESD (15-kV HBM) and 0.1-μF Charge-Pump Capacitors is
Available With the MAX202 Device
3.2.3 (B) Pin Configuration
The representation of relays and contactors in the electrical circuit diagram is identical, as
their operating principle.
b) Types of Relays: Relays are usuallly SPDT (Single Pole Double Throw) or DPDT (Double
Pole Double Throw) but they can have many more sets of switch contacts. Poles : the number of
sets of contacts Throw : The number of positions or combinations (open or close) the contacts
have.
The relay's switch connections are usually labeled as COM, NC and NO:
COM = Common, always connect to this, it is the moving part of the switch.
NC = Normally Closed, COM is connected to this when the relay coil is off.
NO = Normally Open, COM is connected to this when the relay coil is on.
Connect to COM and NO if you want the switched circuit to be on when the relay coil is on.
Connect to COM and NC if you want the switched circuit to be on when the relay coil is off.
HOW RELAY WORKS?
1. When switch is ON/press, the current will flow through the coil.
2. It will energize the electromagnet.
3. Then the coil (electromagnet) will attract the lever.
4. After the lever touch each other, the electricity will flow to the load.
• Relay can be used for various regulating, control and monitoring functions.
• As interfaces between control circuits and load circuits
• For signal multiplication\
• For separation of direct current and alternating current circuits
• For delaying, generating and converting signals and
• For linking information
TRANSISTOR:
The transistor is the fundamental building block of modern electronic devices, and is
ubiquitous in modern electronic systems. Following its development in 1947 by
American physicists John Bardeen, Walter Brattain, and William Shockley, the transistor
revolutionized the field of electronics, and paved the way for smaller and
cheaper radios, calculators, and computers, among other things. The transistor is on the list of
IEEE milestones in electronics, and the inventors were jointly awarded the 1956 Nobel Prize in
Physics for their achievement.
The transistor is the key active component in practically all modern electronics. Many
consider it to be one of the greatest inventions of the 20th century. Its importance in today's
society rests on its ability to be mass-produced using a highly automated process (semiconductor
device fabrication) that achieves astonishingly low per-transistor costs. The invention of the first
transistor at Bell Labs was named an IEEE Milestone in 2009.
Although several companies each produce over a billion individually packaged (known
as discrete) transistors every year, the vast majority of transistors are now produced in integrated
circuits (often shortened to IC, microchips or simply chips), along with diodes,
resistors, capacitors and other electronic components, to produce complete electronic circuits.
A logic gate consists of up to about twenty transistors whereas an advanced microprocessor, as
of 2009, can use as many as 3 billion transistors (MOSFETs). "About 60 million transistors were
built in 2002 ... for [each] man, woman, and child on Earth."
The transistor's low cost, flexibility, and reliability have made it a ubiquitous device.
Transistorized mechatronic circuits have replaced electromechanical devices in controlling
appliances and machinery. It is often easier and cheaper to use a standard microcontroller and
write a computer program to carry out a control function than to design an equivalent mechanical
control function.
The essential usefulness of a transistor comes from its ability to use a small signal applied
between one pair of its terminals to control a much larger signal at another pair of terminals. This
property is called gain. It can produce a stronger output signal, a voltage or current, that is
proportional to a weaker input signal; that is, it can act as an amplifier. Alternatively, the
transistor can be used to turn current on or off in a circuit as an electrically controlled switch,
where the amount of current is determined by other circuit elements.
There are two types of transistors, which have slight differences in how they are used in a
circuit. A bipolar transistor has terminals labeled base, collector, and emitter. A small current at
the base terminal (that is, flowing between the base and the emitter) can control or switch a much
larger current between the collector and emitter terminals. For a field-effect transistor, the
terminals are labeled gate, source, and drain, and a voltage at the gate can control a current
between source and drain.
The image to the right represents a typical bipolar transistor in a circuit. Charge will flow
between emitter and collector terminals depending on the current in the base. Because internally
the base and emitter connections behave like a semiconductor diode, a voltage drop develops
between base and emitter while the base current exists. The amount of this voltage depends on
the material the transistor is made from, and is referred to as VBE
DESIGN ASPECTS OF POWER SUPPLY
Power supply is the first and the most important part of our project. For our project we
require +5V regulated power supply with maximum current rating 1A.
Following basic building blocks are required to generate regulated power supply.
TRANSFORMER:
Transformers convert AC electricity from one voltage to another with a little loss of power. Step-
up transformers increase voltage, step-down transformers reduce voltage. Most power supplies
use a step-down transformer to reduce the dangerously high voltage to a safer low voltage.
If the secondary coil is attached to a load that allows current to flow, electrical power is
transmitted from the primary circuit to the secondary circuit. Ideally, the transformer is perfectly
efficient; all the incoming energy is transformed from the primary circuit to the magnetic field
and into the secondary circuit. If this condition is met, the incoming electric power must equal
the outgoing power:
Giving the ideal transformer equation
If the voltage is increased, then the current is decreased by the same factor. The impedance in
one circuit is transformed by the square of the turns ratio. For example, if an impedance Zs is
attached across the terminals of the secondary coil, it appears to the primary circuit to have an
impedance of (Np/Ns)2Zs. This relationship is reciprocal, so that the impedance Zp of the primary
circuit appears to the secondary to be (Ns/Np)2Zp.
Description
The LM78XX/LM78XXA series of three-terminal positive regulators are available in the
TO-220/D-PAK package and with several fixed output voltages, making them useful in a Wide
range of applications. Each type employs internal current limiting, thermal shutdown and safe
operating area protection, making it essentially indestructible. If adequate heat sinking is
provided, they can deliver over 1A output Current. Although designed primarily as fixed voltage
regulators, these devices can be used with external components to obtain adjustable voltages and
currents.
Absolute Maximum Ratings:-
Polarity = +ve
Vm=vrms x sq. rt of 2
= 12x sq.rt of 2
= 16.97
C= (IxT)/V
T=1/2πf
= 1/2 x3.14×50 hz
= 955.41×10-6
=1000 µf
RECTIFIER:
Axial-lead resistors on tape. The tape is removed during assembly before the leads are formed
and the part is inserted into the board. In automated assembly the leads are cut and formed.
Resistors are common elements of electrical networks and electronic circuits and are ubiquitous
in electronic equipment. Practical resistors as discrete components can be composed of various
compounds and forms. Resistors are also implemented withinintegrated circuits.
The electrical function of a resistor is specified by its resistance: common commercial resistors
are manufactured over a range of more than nine orders of magnitude. The nominal value of the
resistance will fall within a manufacturing tolerance.
The behavior of an ideal resistor is dictated by the relationship specified by Ohm's law:
Ohm's law states that the voltage (V) across a resistor is proportional to the current (I), where
the constant of proportionality is the resistance (R). For example, if a 300 ohm resistor is
attached across the terminals of a 12 volt battery, then a current of 12 / 300 =
0.04 amperes flows through that resistor.
Practical resistors also have some inductance and capacitance which will also affect the
relation between voltage and current in alternating current circuits.
The ohm (symbol: Ω) is the SI unit of electrical resistance, named after Georg Simon Ohm.
An ohm is equivalent to a volt per ampere. Since resistors are specified and manufactured
over a very large range of values, the derived units of milliohm (1 mΩ = 10−3 Ω), kilohm (1
kΩ = 103 Ω), and megohm (1 MΩ = 106 Ω) are also in common usage
Resistor color-coding:-
One decade of the E12 series (there are twelve preferred values per decade of values) shown with
their electronic color codes on resistors
To distinguish left from right there is a gap between the C and D bands.
For example, a resistor with bands of yellow, violet, red, and gold will have first digit 4 (yellow
in table below), second digit 7 (violet), followed by 2 (red) zeros: 4,700 ohms. Gold signifies that
the tolerance is ±5%, so the real resistance could lie anywhere between 4,465 and 4,935 ohms.
Resistors manufactured for military use may also include a fifth band which indicates component
failure rate (reliability); refer to MIL-HDBK-199 for further details.
Tight tolerance resistors may have three bands for significant figures rather than two, or an
additional band indicating temperature coefficient, in units of ppm/K.
All coded components will have at least two value bands and a multiplier; other bands are
optional.
Temp.
Significant
Color Multiplier Tolerance Coefficient
figures
(ppm/K)
Orange 3 ×103 – 15 P
White 9 ×109 – –
None – – ±20% M –
Resistors use preferred numbers for their specific values, which are determined by
their tolerance. These values repeat for every decade of magnitude: 6.8, 68, 680, and so forth. In
the E24 series the values are related by the 24th root of 10, while E12 series are related by the
12th root of 10, and E6 series by the 6th root of 10. The tolerance of device values is arranged so
that every value corresponds to a preferred number, within the required tolerance.
Zero ohm resistors are made as lengths of wire wrapped in a resistor-shaped body which can be
substituted for another resistor value in automatic insertion equipment. They are marked with a
single black band.
The 'body-end-dot' or 'body-tip-spot' system was used for radial-lead (and other cylindrical)
composition resistors sometimes still found in very old equipment; the first band was given by
the body color, the second band by the color of the end of the resistor, and the multiplier by a dot
or band around the middle of the resistor. The other end of the resistor was colored gold or silver
to give the tolerance, otherwise it was 20%.
CAPACITOR:
When there is a potential difference across the conductors (e.g., when a capacitor is attached
across a battery), an electric field develops across the dielectric, causing positive charge +Q to
collect on one plate and negative charge −Q to collect on the other plate. If a battery has been
attached to a capacitor for a sufficient amount of time, no current can flow through the capacitor.
However, if a time-varying voltage is applied across the leads of the capacitor, a displacement
current can flow.
An ideal capacitor is characterized by a single constant value for its capacitance. Capacitance is
expressed as the ratio of the electric charge Q on each conductor to the potential
difference V between them. The SI unit of capacitance is the farad (F), which is equal to
one coulomb per volt (1 C/V). Typical capacitance values range from about 1 pF (10−12 F) to
about 1 mF (10−3 F).
The capacitance is greater when there is a narrower separation between conductors and when the
conductors have a larger surface area. In practice, the dielectric between the plates passes a small
amount of leakage current and also has an electric field strength limit, known as the breakdown
voltage. The conductors and leads introduce an undesired inductance and resistance.
Capacitors are widely used in electronic circuits for blocking direct current while
allowing alternating current to pass. In analog filter networks, they smooth the output of power
supplies. In resonant circuits they tune radios to particular frequencies. In electric power
transmission systems, they stabilize voltage and power flow.
Because the conductors (or plates) are close together, the opposite charges on the conductors
attract one another due to their electric fields, allowing the capacitor to store more charge for
a given voltage than if the conductors were separated, giving the capacitor a large
capacitance.
Sometimes charge build-up affects the capacitor mechanically, causing its capacitance to
vary. In this case, capacitance is defined in terms of incremental changes:
LED:
An LED is often small in area (less than 1 mm2) and integrated optical components may be used
to shape its radiation pattern.
Appearing as practical electronic components in 1962, the earliest LEDs emitted low-intensity
infrared light. Infrared LEDs are still frequently used as transmitting elements in remote-control
circuits, such as those in remote controls for a wide variety of consumer electronics. The first
visible-light LEDs were also of low intensity, and limited to red. Modern LEDs are available
across the visible, ultraviolet, and infrared wavelengths, with very high brightness.
Early LEDs were often used as indicator lamps for electronic devices, replacing small
incandescent bulbs. They were soon packaged into numeric readouts in the form of seven-
segment displays, and were commonly seen in digital clocks.
Recent developments in LEDs permit them to be used in environmental and task lighting. LEDs
have many advantages over incandescent light sources including lower energy consumption,
longer lifetime, improved physical robustness, smaller size, and faster switching. Light-emitting
diodes are now used in applications as diverse as aviation lighting, automotive headlamps,
advertising, general lighting, traffic signals, and camera flashes. However, LEDs powerful
enough for room lighting are still relatively expensive, and require more precise current and heat
management than compact fluorescent lamp sources of comparable output.
LEDs have allowed new text, video displays, and sensors to be developed, while their high
switching rates are also useful in advanced communications technology.
On October 7, 2014, the Nobel Prize in Physics was awarded to Isamu Akasaki, Hiroshi
Amano and Shuji Nakamura for "the invention of efficient blue light-emitting diodes which has
enabled bright and energy-saving white light sources" or, less formally, LED lamps.
Conventional LEDs are made from a variety of inorganic semiconductor materials.
The following table shows the available colors with wavelength range, voltage drop and
material:
Voltage
Color Wavelength [nm] Semiconductor material
drop [ΔV]
Pink Multiple types ΔV ~ 3.3[78] Blue with one or two phosphor layers:
yellow with red, orange or pink phosphor added
afterwards,
or white phosphors with pink pigment or dye
over top.[79]
When To Use
A tool is only good towards the application it was designed for. Using the etcher for something
other than what its good for will frustrate you and waste time.
In this step you will prepare your layout for etching. For this step you will need: a quality laser
printer, a sheet of transluscent paper.
The photoresist method we use in PCB etching is a positive process, which means that when UV
light hits the resist, it softens, and then is washed away. What remains is a positive of the PCB
design. What this boils down to is that you will want a positive printout of your PCB design
(black where there will be copper). Preferably mirrored. Most all PCB design tools let you print
out your layout mirrored. Or you can mirror your entire design in the software. Whichever. Also,
if possible, have it print white holes where you will drill, these will be your drill guides. Because
the drill holes will not be precise, make your annular rings (the copper around a drill hole) larger
than normal. Since you will lose as many as half of the design to exposure/development/etching
flaws, tile 2-3 times layouts as many as you want.
In Eagle: After your design is ready, go to the CAM Processor, and open the "layout2.cam" job.
As output select PS. Change the extention to ".ps" as well. Be sure that Mirror is selected but
that Fill Pads is not. Then open the ps with any free postscript viewer and print it. (Also you
could print it to "Gerber274x" and use a gerber viewer, or any other format you can print.)
After you have verified the above, print your design to a high quality (600dpi at least) laser
printer, in monochrome mode, onto a white piece of paper. Double check that it is as you want it,
in the correct orientation, enough tiling, mirrored, dark ink, slightly smaller than the PCB you
have, etc. Now print it onto translucent paper, there is a box of it in the cabinet underneath the
etcher, in a thin cardboard sleeve.
This photo has notes. Move your mouse over the photo to see them.
Left, plain paper test. Right, translucent paper. Both are mirrored.
In this picture, I have two layouts I want to etch. I tiled one three times and one twice. The one I
tiled three times has a very fine pitch IC (TSSOP-16) so it is less likely to come out. On the left
is opaque laser print. On the right, translucent paper. Note that the design (noticably the text) is
mirrored.
Exposing the Board
This step transfers your layout design to a positive-resist PCB by exposing UV light to the
sensitized PCB with the printout as a mask. For this step you will need: a presensitized positive
photoresist copper clad board, scissors, tape, a UV bulb and thin plate glass or exposure unit.
This step takes 5-10 minutes.
First cut out the layout leaving a few millimeters of space on the edges. If you are going to
perform the exposing and etching in the same session, go ahead and turn the etching machine on
now, since it takes 10 minutes to warm up.
Next, locate an unused PCB. There is a bag of them in the cabinet underneath the etcher. You
may need to cut a larger board down using a metal shear. Using a larger PCB than necessary is
wasteful, and exhausts the chemicals faster than a board that is well-fit. You can also purchase
your own stash of PCB material in many different substrates, thicknesses, etc. and, of course,
that is encouraged. (See "Where to Purchase Supplies, at bottom")
The best PCBs are those that have a plastic sticky sheet protecting them (some are just sold in a
plastic bag) so that they can be handled, drilled and sheared without excess UV exposure. The
plastic is easy to peel off:
Place your design on top of the exposed resist, ink-side down, so that it appears not-mirrored
when you look through the paper at the board. Placing the ink closest to the resist means less
light can leak around and cut into thin traces. Next, tape down the design on two edges, so that
the tape does not overlap any of the layout, but holds the paper flat.
Use any plain tape to tape down two opposite sides without overlapping the layout
now take it to be exposed under a UV lamp. As an arbitrary measure, a 15W Sylvania "350
Blacklight" UV 24" flourescent bulb, 3" above a FOTOBOARD2-brand board, with a 1/8" clear
glass plate (to keep the paper totally flat) over the board, 10 minutes will give good exposure.
[When a more permanent fixture is found, it will be calibrated.]
After it has been exposed, peel off one piece of tape and flip it open, to look at the photoresist.
Well exposed photoresist is a paler green, and you will be able to see the layout in the original,
yellower green, faintly. If you don't see anything, retape that side, and try a few more minutes
under the lamp.
The unexposed part is faintly visible, on the right side.
Once you think you're done exposing, lift off the design and put it away in case you want to
make another set of boards. You are ready to perform the chemical processing. If you need to do
this part later, or you have other boards to expose, place this board in an opaque container (like
in an envelope, face down, in a drawer or some such.)
In this step, the exposed photoresist is removed chemically using developer, leaving a positive of
your layout in photoresist on copper. For this step you will need: gloves, apron, sink, dev tray,
developer, small soft sponge. This step takes 3 minutes.
Take the board over to your processing area. Put on the apron and a pair of 'rubber gloves'. These
wet chemicals can splash, some stain, and they are not good to drink. Find the dev tray and the
bottle of developer, (both marked DEV) and make sure the tray is clean. There is one set of large
trays (for > 5x7") and one small set, use the ones that fits best. Place the board face up in the tray
and pour developer in until there is about 1/4" (or enough to cover) in the tray.
Carefully pour into a tray. The developer is green from use, it starts out clear
Almost immediately the board will start to 'leak' resist as it is attacked by developer. Agitate the
board with your hand, and swirl the developer around to make sure there is a flow around the
board. It should be developed in 1/2 to 1 minute. If you leave it in too long, some of the finer
traces wont come out. Leaving it in too little means that there will be a very thin, invisible, layer
of resist left that will stop the etching process and force you to repeat this step. Use a soft sponge
to wipe the photoresist away.
Before rinsing, rub down the board with a soft cloth or sponge soaked in developer
Rinse the board in cold water to clean off the developer (stop bath), the parts that are to be etched
should look like completely clean copper, no residue. If you feel a slimy/slippery coating, or see
a bluish coating, you need to develop more. If none of the resist came off, you'll need to realign
your paper and re-expose the board. Pour the developer back into the bottle, and rinse off the
tray. The board is now ready to etch.
A well developed board has solid green traces and a clean copper background
First Rinse
In this step, the board is spray rinsed to prepare it for etching. This step takes 2 minutes.
First check to see that the machine is on. If not, turn the machine on.
The Rota-Spray machine, the wash tank is on the left, the etching tank on the right.
The on button is in the top left corner.
Once on, the left LED display should display "oC" and then something like "23" which means
the etchant is at 23degC. Now load the board into the board holding apparatus, placing it near the
center, and securing the plastic nuts. Make sure the board won’t fall out and into the tank.
The board holder can hold many small boards, but make sure they cant fall out
Slide the board holder, with the copper facing right, into the wash tank. Attach the water hose
(black, with white plastic spring-end) to the sink faucent, and turn on the cold water.
The connector is a little difficult to use, requiring that you simultaneously push down on the ring
while pressing the brass fitting into the faucet head. Two handed might be easier at first.
Turn on the wash spray to clean off the board. You can move the holder up and down to make
sure the board is sprayed off.
Make sure the water drains cleanly into the sink. This is the older setup, in the current lab there
should be a PVC drainage pipe into the large sink so there shouldnt be any drain problems
In this step, the board is placed in an etcher, which is a machine that washes warm ferric chloride
(or another etchant) over the board, eating away any exposed copper. For this step you will need
to make sure the etchant is warm enough to use. This step takes 2minutes.
Move the holder into the etching tank, again facing to the right. Check that the temperature
monitor reports 42-45 degrees C, and that the fluid well feels warm. also make sure the top is
secured so that there is very little chance FeCl will spray out the top. By default the timer is set
for 1:30 minutes, which I've found satisfactory. You can also change the time if necessary (for
different weights of copper). Turn on the spray pump by pressing start. The entire tank will turn
reddish brown as the etchant removes the copper from your board. After the time is up, remove
the holder and quickly put it in the wash tank again. Be careful as there will be a lot of FeCl
dripping off the holder and you dont want it going anywhere but in the machine or the sink.
The board is very messy at this point, so do the move quickly and carefuly
Second Rinse
Turn on the wash spray again, moving the holder around so that the entire board and holder are
completely cleaned off. After the water runs clean, remove the board and examine it. There may
be parts that didn't etch, or overetched. Depending on your patience and yield, you may decide to
re-etch a subset of your boards.
There are some traces of unetched copper on the right. Since I only needed one PCB, I just threw
it away.
Examine all the boards carefully to determine which ones have shorts/opens/missing traces/etc,
and which ones are good for use. Shut off the water faucet, run the spray to clean out the hose,
turn off the machine and disconnect the hose from the faucet.
Strip
In this step, the remaining photoresist is stripped away, leaving only copper. For this step you
will need chemical stripper and/or a scrub pad. This step takes 2 minutes.
Place the board face up in the STRIP tray, and coat it with resist stripper. This may be in a bottle
or in a 'shoepolish' dispenser. Rub in the chemical first with the soft sponge, then with with a
plastic scrub pad. The green resist should come off, revealing copper underneath. Make sure -all-
of the resist is removed, as it smells very bad when it gets hot (when soldering.) If there is no
stripper, you can just scrub it off with a green scrub pad. If the stripper came from a bottle, pour
it back in. Rinse off the board and tray.
You can easily remove the resist with just a green scouring pad
Tinning
This step is optional but is very helpful for soldering to your board. For this step you will need:
tinning liquid mix. This step takes 2-10 minutes.
Find the bottle of tinning liquid, and the TIN tray. Place the board in the tray copper up, and pour
in enough tinning liquid to cover the board, the copper should immediately turn a silvery color. If
you intend to reflow solder, you may want to leave it for 15 minutes, otherwise, 3-5 is probably
fine. Use this time to clean up the area around the etcher, rinse off surfaces and clean and dry any
trays. When the board is done, remove and rinse it. Pour the tinning liquid back into the bottle
and clean the tray. Throw away the gloves, and put the apron back. Make sure the area looks
better than it did when you got there.
The exposed copper will turn silver almost immediately, tin will aid soldering and stop oxidation
Drilling
In this step, any holes or vias in the PCB are drilled out. For this step you will need: a drill press
that can run at 2000+ RPM, high-speed carbide wire-gauge drill bits. This step takes 3-10
minutes, depending on number of holes in pcb.
If your PCB is FR4 laminate, you may want to find a dust mask for this step, since fiberglass
dust is carcinogenic. Chances are, you're using paper phenolic which is much safer. There is a
box of HSS carbide drill bits in a box underneath the etcher, they are packaged in plastic boxes
of 10. Find the boxes of closest size to your board holes. In general, .020"/75ga is good for RF
vias, .028"/70ga is good for signal vias, .035"/65ga is good for DIP/LEDs/Resistors/Capacitors,
etc., .042"/58ga is good for TO-220/heavier diodes/etc., .060"/53ga for heavier wires and power
components, and .086"/44ga for mounting holes or anything else. Other drill sizes are available
for purchase, of course.
Left, these are inexpensive resharpened drill bits $7.50 a box. Right, 70 gauge is as small as
you'll need
Place the first drill bit in the chuck, and tighten it well. Find a piece of wood to place underneath
the board for support. While the drill is running, adjust the speed to 2000RPM or higher.
The drill press in the media lab shop is more than sufficient, adjust it only while running
Drill all holes of one size at a time. Try to position the drill bit right in the center of the hole, or
at least, try not to drill through any copper traces. The drill bits might break, especially if they
sub-35mil. Holding the board steady while drilling through it helps. The bits only cost 75 cents
so just throw them away when broken, but if you break more than 5, you should purchase a
replacement set.
You can drill a hole a second if you dont clamp down the board, but breakage is more likely
After all the drilling, replace the bits in their boxes, and put the box back underneath the etcher.
Shearing
In this step, the tiled layouts are seperated. For this step you will need a metal shear (this step
could also be done with a band saw.) This step takes 2 minutes.
Shear or cut the good boards out, leaving a few mm on each edge. The edges may be filed or
sanded.
A metal shear, such as the one outside the shop, is good for this. Go slowly and use the middle.
Advantages:
Disadvantages:
The main drawback with this system is that, it can be used only for the places whose
orientation or arrangement of seats never changes.
CONCLUSION
The study showed that image processing is a better technique to control the power supply
in the auditoriums. It shows that it can reduce the wastage of electricity and avoids the free
running of those electrical equipment. It is also more consistent in detecting presence of people
because it uses real time images. Overall, the system is good but it still needs improvement to
achieve a hundred percent accuracy. If achieved, then we can extend this application to many
places like theaters and even for home automation.
FUTURE WORK
The main drawback with this system is that, it can be used only for the places whose
orientation or arrangement of seats never changes. But we can overcome this by resetting the
reference images whenever the arrangement is altered. The main program needs not to be altered.
Another way of overcoming this limitation is using the face detection techniques. It is expected
to give much flexibility and simplicity to the overall system.
REFERNCES
[1] Sunil Kumar.Matangiand, Sateesh.Prathapani, “Design of Smart Power Controlling and
Saving System in Auditorium by using MCS 51 Microcontrollers ” , Advanced Engineering and
Applied Sciences: An International Journal 2013; 3(1): 5-9