Download as pdf or txt
Download as pdf or txt
You are on page 1of 65

ISO-9001-2015 NIRF92RANK (CPE) Re-Accredited by NAAC ―A‖GRADE

KAKARAPARTHI BHAVANARAYANA COLLEGE


(AUTONOMOUS)
[An Autonomous college in jurisdiction of Krishna University, Machilipatanam-521001]

KOTHAPETA, VIJAYAWADA-520001

A PROJECT REPORT ON

“CURRENCY & COLOR SENSOR DETECTOR”


Submitted in partial fulfillment of the requirement for the award of

BACHELOR OF SCIENCE

IN

ELECTRONICS AND COMPUTER SCIENCE


BY

G.NEERAJ (183409)

P.MAHESH BABU (183425)

R.BHARATH KUMAR (183435)

S.NAGA SAI (183437)

Under the Guidance of

Sri. R.UDAY KUMAR, MSc, MSc(TECH)


LECTURER IN ELECTRONICS

1
ISO-9001-2015 NIRF92RANK (CPE) Re-Accredited by NAAC ―A‖ GRADE

KAKARAPARTHI BHAVANARAYANA COLLEGE


(AUTONOMOUS)
[An Autonomous college in jurisdiction of Krishna University, Machilipatanam-521001]

KOTHAPETA, VIJAYAWADA-520001

CERTIFICATE
This is to certify that the project entitled is

The bonafide report of the work done


“CURRENCY & COLOR SENSOR DETECTOR”
BY

P MAHESH BABU

(K1800325)
In partial fulfillment of the requirement for the award of degree of Bachelor of
Science
in Electronics and Computer Science by Krishna University, Machilipatnam
during the year2019-2020.

INTERNALGUIDE HEAD OF THEDEPARTMENT

EXTERNALEXAMINER PRINCIPAL
2
Acknowledgement
First and foremost, we sincerely salute our esteemed institution KBN
COLLEGE for giving us this opportunity of fulfilling our dream of
becoming engineers.

We would like to express my sincere thanks to the Principal E.VARA


PRASAD, for his inspiration, intensive help and valuable support in every
step of our project.

We articulate my gratitude from the depths of my hearts to


Dr.P.B.SANDHYA SRI, head of the department who is a source of
simulation and continuous encouragement. I indeed ever indebted to her for
her able supervision and indispensable help.

I have immense pleasure in expressing my thanks and deep sense of


gratitude to my guide Sri .R.UDAY KUMAR, In-charge of the department
of electronics for his guidance and encouragement.

I have immense pleasure in expressing my thanks and deep sense of


gratitude to my guide Sri. P.VISHNU VARDHAN lecturer in electronics
for his guidance and encouragement.

I have immense pleasure in expressing my thanks and deep sense of


gratitude to my technical support Sri. D.SRINIVASA REDDY lecturer
guide for his guidance and encouragement.

I am also expressing my heartfelt gratitude to all the members of faculty and


non- teaching staff who have definitely contributed their might in the
successful completion of the project.

I owe a deep respect of gratitude to my family members and friends for their
loving encouragement, timely suggestions and constant support in finishing
this project within the stipulated time.

3
1. ABSTRACT

In this project we are going to work on an innovative arduino project


idea, where we can count the paper currency notes and calculate their
amount, by sensing the paper currency using Color Sensor and
Arduino.

Our purpose of the project is about cash detecting by using Color


sensor TCS230. By using this sensor (TCS230) we can make
decrease cash by keeping the currency notes under the color sensor
(TCS230).

Keywords: Arduino Nano, Color sensor TCS230, Breadboard,


Connecting wires and LCD Display

4
INDEX
S.NO CHAPTER NAME PAGE NO

1) Abstract 4

2) Introduction 6

3) Literature review 7
2.1) COUNTERFEITING TECHNIQUES
2.2) Estimated Expenditure 12
2.3) RBI Guidelines concerning to fake note 14
detection

4) 3) Materials and Methodology 17


3.1) Methodology
3.2) Components/Parts used 18

5) Codes 54
6) Discussion of Results 58
7) Conclusion 60
8) Applications 64
9) Appendix 65

5
1. INTRODUCTION
The currency counting machine or CCM is one of the miracle of the science. The CCM
works on the principle on the breadth of the bundle of currency and there in an roller which
has rods in an continuous pattern and the roller moves these rods with a particular speed.
The speed remains constant as like in the ATM machine counting machine and these rollers
moves on the bundle of the currency and just move out the single currency one by one at a
constant and high speed and there is an transducers which detect that how many single
currency has passed out in front of it.

FIG- 1 500 rupees note with its various real identification mark.

Different range of counting machines like Basic Note counter, Intelligent Counting cum
counterfeit detection machines and Hi Speed Heavy duty cash counting machine are available
to suit different type of customers. Highly dependable and ideal for Banks, Big & small
business houses, Traders, retailers, jewellers and almost all types of business establishment
can use them according to their suitability.
The machine meant for detection of fake notes as prime function invariably should be capable
of not allowing any fake note to pass as genuine. It is possible only with the detectors
specially developed considering the large number of intricacies concerning to Indian notes
The kind of machines Indian Banks at cash counters needed are the machine which can verify
not only the images but also can check the chemical and physical properties of papers, inks,
resins and other materials used in production of note. The machine should be capable of not
allowing any fake note to pass as genuine. It is possible only with the detectors specially
developed considering the large number of intricacies concerning to Indian note.

6
2. LITERATURE REVIEW

Currency Counter provides a fast, efficient and accurate way to count stacks of currency.
Some models detect counterfeit bills either magnetically and/or using ultraviolet light. Ultra
Violet Light Detector is used in Currency counters. Currency created by a color copier or
printer produces an image that rests on the surface of paper that can easily be seen when UV
light is placed over it.

FIG- 2 A 500 rupees note under UV rays.

Tiny particles of toner outside the image can also be easily seen with a UV light. Bill
counters and counterfeit detectors have a UV light built into the machine. If a counterfeit bill
is run through the machine, an alarm or light will alert you that the banknote is counterfeit.
Magnetic sensors: Magnetic sensors run over each bill and are designed to search for certain
components of banknotes that cannot be seen by the naked eye. Machines automatically
detect and match the piece against the already-programmed components of legitimate bills.
When a suspicious note is found, the operator is notified immediately.

7
FIG- 3 Noting the discrepancy.

Different range of counting machines like Basic Note counter, Intelligent Counting cum
counterfeit detection machines and Hi Speed Heavy duty cash counting machine
Highly dependable and ideal for Banks, Big & small business houses, Traders, retailers,
jewellers and almost all types of business establishment…

2.1 COUNTERFEITING TECHNIQUES

Counterfeiting, of whatever kind, has been occurring ever since humans grasped the concept
of valuable items, and there has been an ongoing race between certifier (banks, for example)
and counterfeiter ever since.

First-Line Inspection Methods


 Varied-Density Watermarks
 Ultraviolet Fluorescence
 Intaglio Printing

8
 Microtext
 Holograms and Kinegrams (DOVIDs/ISIS)

Second-Line Inspection Methods


 Isocheck/Isogram
 Fibre-Based Certificates of Authenticity
 Colour and Feature Analysis

 First-Line Inspection Methods

First-line inspection methods are used on-the-spot by vendors and retailers to determine, at
best guess, the authenticity of currency being exchanged. The disadvantages of these methods
are that they are generally easier to counterfeit than second-line inspection characteristics,
since they‘re just as visible to the counterfeiter as to the verifier, and the methods used to
apply them are usually inexpensive. However, the visibility of these features means that the
general population is aware of the security measures and can spot many fraudulent notes
quickly.
 Varied-Density Watermarks

By varying the density of the paper a banknote is printed on in a controlled manner, thin
watermarks can be applied. These are visible when a bright light shines onto the rear of
banknote, and the varied paper density causes varying intensities of light to pass through,
causing the watermarked image to appear on the other side of the note.
 Ultraviolet Fluorescence

Embedding fluorescent fibers into the paper, or printing ultra-violet ink onto the paper,
creates a form of optical verification easily used at counters, checkouts, etc. By exposing the
note to ultra-violet light, the ink or fibers fluoresce, revealing a coloured pattern not visible
under natural light.
 Intaglio Printing

This gives a more complex and reliable first-line inspection method, since it is the printing
process itself that serves to vouch for the authenticity of the document. The note is subjected
to a high-pressure printing process that strengthens and slightly raises the paper‘s surface
structure. Using different alignments of lines printed in this manner, a latent image can be
produced which changes appearance depending on the angle at which the note is viewed.

9
This method can also be used with optically-variable ink to produce interference which
shows different spectral colours when viewed from different angles.
 Micro text

It is very common for banknotes to have incredibly small text printed at much higher
resolutions than most commercial copiers, scanners or printers are capable of. When a
copying or scanning attempt is made, the insufficient resolution causes the text to become
illegibly blurred, announcing the illegitimacy of the note. This method requires specialised
printing equipment but ultimately adds very little cost to the manufacture of the currency.
 Holograms and Kin grams (DOVIDs/ISIS)

These techniques are becoming more and more regularly used in modern anti-counterfeiting
measures, once used mostly on credit/debit cards but now increasingly on new bank notes
and cheques. In producing diffractive optically-variable image devices (DOVIDs), iridescent
foils are added to the printed currency usually after printing. Kin grams and holograms used
in DOVIDs are produced by embossing micro profiles with thermoplastic films.
The hologram itself is applied using the interference of light from different sources in a
specific pattern, and kin grams are produced with achromatic and polarisation effects. The
result is a seemingly 3D full-colour image when illuminated from different angles. ISIS uses
stacked quantities of thin films to create a similar effect, with each layer having different
refractive properties. The refraction of light when viewed is such that a spectral pattern has
been extracted and a full-colour image is produced which varies under different viewing
angles.
 Second-Line Inspection Methods

A second-line inspection method is one that cannot be verified by the naked eye alone, and
requires an extra device to perform a verification function. These are more secure and harder
to counterfeit than visual methods, but the extra security adds extra cost at both the
manufacturing and verification ends.
 Isocheck/Isogram

Related to intaglio printing (described above), these methods rely on a specific pattern of dots
and/or lines to cause a moiré pattern when printed or scanned. Hidden watermarks can also be
applied in these patterns such that when a special filter is placed between the viewer and the
note, the hidden verification is revealed and verifies the note as genuine.

10
 Fibre-Based Certificates of Authenticity

Based on the characteristics of fibre-optic light transmission, this method makes use of
unique configurations of fibres embedded in the paper. Using a scanner to illuminate one end
of an embedded fibre, the other corresponding of that fibre will become illuminated. By using
the position of both illuminated ends (the one deliberately illuminated, and the one
illuminated as a result), the certifier has a ―fibre signature‖.
This string can then be converted into a bit string and combined with any extra data that is
required (e.g. value, serial number, source, etc.). This is in turn combined with a
cryptographic hash of itself and is signed using a private key, with the corresponding public
key made available. The final result of these steps can then be encoded onto the banknote
(this method is suitable for certifying a wide range of other documents too) in the form of a
barcode or verification number of some kind.
Verifying the authenticity merely involves inverting the above process. The control number is
verified using the public key corresponding to the private key initially used. The hash
function is inverted and the original data string extracted. The note is then scanned using the
same fibre illumination method described above, and if the extracted data matches the
scanning observations, the document is genuine. This technique can add a large cost to the
manufacturing process of banknotes, but is highly secure and very difficult to illegitimately
replicate. It may be excessive for smaller-value currencies, but for large-value notes, cheques
or money orders this method provides a guarantee of the authenticity of the claim.
 Colour and Feature Analysis

Several image-processing software packages now include a secret detection algorithm to


prevent banknotes from being manipulated in their applications. Possibly by searching for a
specific geometric pattern—five 1mm-large circles arranged like a four-pronged star is the
primary candidate, visible in Euro notes, pounds sterling notes and older now-obsolete
European currency—they classify images of banknotes and refuse any further processing.

Touch & Feel Inspection & Visual Inspection


In spite of such high complications involved with the notes whether genuine or fake it has
been largely observed that validity of notes has been checked by the cashiers simultaneously
while manual counting.
However the human aptitudes of visual & touch feel verification with or without handy tools
is having large numbers of natural limitations, not enough to serve the purpose of detection at

11
cash counters, as there have been many invisible, high end & ―difficult to forge‖ security
features on the valid notes which invariably are supposed to be examined accurately while
verifying validity on the notes seems to have remain unchecked, requiring highly
sophisticated machine to examine the intricacies of security features of the valid notes.

2.2 ESTIMATED EXPENDITURE


Although estimating the total expenditure for a project of this nature is a mean task in itself,
we try to present the facts in as comprehensive a manner as possible.
Following is a list of the hardware and processes used in the project along with their costs.

S.No. Name of device Quantity Cost per unit Total cost


1 Arduino UNO 1 40 40
2 LCD 1 250 250
3 TCS230 Colour sensor 1 400 400
5 Capacitor 6 2 12
6 Resistor 6 1 6
9 12 V Battery 1 800 800
11 IR sensor 7 35 105
12 7805 1 10 15

Security Features of Indian Banknotes

 Watermark

 Security Thread

 Latent Image

 Microlettering

 Intaglio

 Identification Mark

 Fluorescence

12
 Optically Variable Ink

 See through Register

 Watermark
The Mahatma Gandhi Series of banknotes contain the Mahatma Gandhi watermark with a
light and shade effect and multi-directional lines in the watermark windowThere is also the
watermark of the price of currency it‘s visible in presence of light & glow in uv.

 Security Thread
Rs.1000 notes introduced in October 2000 contain a readable, windowed security thread
alternately visible on the obverse with the inscriptions ‗Bharat‘ (in Hindi), ‗1000‘ and ‗RBI‘,
but totally embedded on the reverse. The Rs.500 and Rs.100 notes have a security thread with
similar visible features and inscription ‗Bharat‘ (in Hindi), and ‗RBI‘.

When held against the light, the security thread on Rs.1000, Rs.500 and Rs.100 can be seen
as one continuous line. The Rs.5, Rs.10, Rs.20 and Rs.50 notes contain a readable, fully
embedded windowed security thread with the inscription ‗Bharat‘ (in Hindi), and ‗RBI‘. The
security thread appears to the left of the Mahatma's portrait. Notes issued prior to the
introduction of the Mahatma Gandhi Series have a plain, non-readable fully embedded
security thread.

 Latent image
On the obverse side of Rs.1000, Rs.500, Rs.100, Rs.50 and Rs.20 notes, a vertical band on
the right side of the Mahatma Gandhi‘s portrait contains a latent image showing the
respective denominational value in numeral. The latent image is visible only when the note is
held horizontally at eye level.

 Microlettering
This feature appears between the vertical band and Mahatma Gandhi portrait. It contains the
word ‗RBI‘ in Rs.5 and Rs.10. The notes of Rs.20 and above also contain the denominational
value of the notes in microletters. This feature can be seen better under a magnifying glass

 Intaglio Printing
The portrait of Mahatma Gandhi, the Reserve Bank seal, guarantee and promise clause,

13
Ashoka Pillar Emblem on the left, RBI, Governor's signature are printed in intaglio i.e. in
raised prints, which can be felt by touch, in Rs.20, Rs.50, Rs.100, Rs.500 and Rs.1000 notes.

 Identification Mark
A special feature in intaglio has been introduced on the left of the watermark window on all
notes except Rs.10/- note. This feature is in different shapes for various denominations (Rs.
20-Vertical Rectangle, Rs.50-Square, Rs.100-Triangle, Rs.500-Circle, Rs.1000-Diamond)
and helps the visually impaired to identify the denomination.

 Fluorescence
Number panels of the notes are printed in fluorescent ink. The notes also have optical fibers.
Both can be seen when the notes are exposed to ultra-violet lamp. When there is fake note it‘s
letter and mainly the numeric values all are irregular in shape..For a genuine currency note,
the number will be regular and when scrutinized against ultra violet rays, the letter printed
with fluorescent ink shine ,for fake note number will be comparatively smaller as compared
the original one..

 Optically Variable Ink


This is a new security feature incorporated in the Rs.1000 and Rs.500 notes with
revised color scheme introduced in November 2000. The numeral 1000 and 500 on the
obverse of Rs.1000 and Rs.500 notes respectively is printed in optically variable ink viz., a
colour-shifting ink. The colour of the numeral 1000/500 appears green when the note is held
flat but would change to blue when the note is held at an angle.

 See through Register


The small floral design printed both on the front (hollow) and back (filled up) of the note in
the middle of the vertical band next to the Watermark has an accurate back to back
registration. The design will appear as one floral design when seen against the light.

2.3 RBI GUIDELINES CONCERNING TO FAKE NOTE DETECTION


It has necessitated for the Banks to deploy such authenticators which can support Banks to
comply RBI guidelines concerning to fake notes detection. The machine should be 100%
accurate in detection of Fake Notes. No fake note should pass as genuine in all case, have
been the bottom lines for any machine which functions as authenticator unless the note is of

14
extremely bad quality.

The extremely bad quality of note should be rejected by the authenticators with error codes
―No judgment‖ since the TRUE validity of such notes due to bad quality can not be judged
except at forensic lab. Such bad quality of notes generally reflects overlapping of features of
genuine & fake note creating, uncertainty of accurate validation even though best
authenticators for not permitting deep scanning of such notes. No sorter or Currency
Verification Systems (CVS) possesses any separate pocket to separate fake notes except
pockets for separating notes of opposite criterion. Sorters just separate the notes which are
not matching with the sorting criterion set in the machine. Fit & unfit, oriented and non
oriented, face up & face down.

There are pockets for collecting opposite criterion notes but no separate pocket have been
there for collection of fake notes; although it has been claimed that sorters are best suited for
fake note detection. It is wrongly presumed that the opposite criterion pocket collect the fake
notes. There is every chance that fake notes matching the various set criterion as may be set
in the sorter will pass under such set criterion for many technical reasons.
The functions of AUTHENTICATION & SORTING are two mutually exclusive functions
carrying wide difference in their respective weight ages and money values involved in the
respective operations. Imperfect quality sorting of notes does not attracts loss of value while
as passing fake notes as genuine attracts direct loss of value and criminal procedures under I
PC and other provisions. Authentication function needs detailed analyses of chemical &
physical properties of Bank Note Paper, varied inks, resins, security threads, chemical used in
the printing process.

It includes checking of all security features on the face of the notes images, emblems,
portraits, logos, colours, designs, texts, covert and overt features etc Most accurate
authenticity check only is possible if the notes are checked length wise. Authenticators must
have capacity to scan the notes length wise back to back, to match with the large number of
length wise prints, texts, emblems, portraits, horizontal lines; patterns etc for checking the
continuity of such security features while as sorters are checking the notes width wise loosing
the continuity of scanning various lengthwise security features.

Most of the security features in any currency types are designed length wise and hence

15
without lengthwise scanning of the notes scientifically difficult to obtained 100% accuracy
during the detection of fake notes. Most of the note counting /sorting machines in the
international market have failed to offer 100% authentication accuracy for not having facility
to check notes length wise and scanning the notes width wise, as also have been dependent on
light & image based technology scanning the notes width wise, which have been
scientifically unfeasible. It is scientifically impossible to check highly complicated, inter
related security aspects in the notes with inter related large numbers of permutations and
combinations of each and every elements that constitutes a Genuine notes at the high speeds
of sorters which sorts the notes with Image & light sensor based technology.

Speed kills the authentication accuracy by note getting scientific time to pip into the minute
differences between genuine and fabricated security features. At the most can detect very
poorly fabricated notes but not skilfully fabricated fake notes being pumped in our country by
other state supports that have been having total infrastructures and notes printing technology
Authentication can only be carried out with high end light cum Image cum digital
technology. The fastest fake note detector that is available in the international market takes
minimum 3 seconds for thorough checking of notes. Such machines mostly have facility for
single note manual feedings.

16
3. MATERIALS AND METHODOLOGY

3.1 METHODOLOGY
The whole system is controlled by the microcontroller (AT89c51). The currency counting
machine or CCM .The CCM works on the principle on the breadth of the bundle of currency
and there in an roller which has rods in an continuous pattern and the roller moves these rods
with a particular speed
and these rollers moves on the bundle of the currency and just move out the single currency
one by one at a constant and high speed and there is an transducers which detect that how
many single currency has passed out in front of it.

FIG- 4-Complete circuit diagram.

17
3.2 COMPONENTS/PARTS USED:

 Arduino UNO LCD


 LCD
 TCS230 Colour sensor
 IR sensor
 7805
 Diodes
 Resistors
 Capacitors
 12 V Battery

A brief description of these components follows.

Arduino Uno

18
Pin Description
Pin
Pin Name Details
Category

Vin: Input voltage to Arduino when using an


external power source.

5V: Regulated power supply used to power


microcontroller and other components on the
Power Vin, 3.3V, 5V, GND board.

3.3V: 3.3V supply generated by on-board voltage


regulator. Maximum current draw is 50mA.

GND: ground pins.


Reset Reset Resets the microcontroller.
Analog Pins A0 – A5 Used to provide analog input in the range of 0-5V

Input/Output
Digital Pins 0 - 13 Can be used as input or output pins.
Pins

Serial 0(Rx), 1(Tx) Used to receive and transmit TTL serial data.

External
2, 3 To trigger an interrupt.
Interrupts

PWM 3, 5, 6, 9, 11 Provides 8-bit PWM output.

10 (SS), 11 (MOSI), 12
SPI Used for SPI communication.
(MISO) and 13 (SCK)

Inbuilt LED 13 To turn on the inbuilt LED.


TWI A4 (SDA), A5 (SCA) Used for TWI communication.
AREF AREF To provide reference voltage for input voltage.

Arduino Uno Technical Specifications

Microcontroller ATmega328P – 8 bit AVR family microcontroller


Operating Voltage 5V

Recommended Input Voltage 7-12V


Input Voltage Limits 6-20V
Analog Input Pins 6 (A0 – A5)
Digital I/O Pins 14 (Out of which 6 provide PWM output)

19
DC Current on I/O Pins 40 mA
DC Current on 3.3V Pin 50 mA
Flash Memory 32 KB (0.5 KB is used for Bootloader)
SRAM 2 KB
EEPROM 1 KB
Frequency (Clock Speed) 16 MHz

Overview
Arduino Uno is a microcontroller board based on 8-bit ATmega328P microcontroller.
Along with ATmega328P, it consists other components such as crystal oscillator, serial
communication, voltage regulator, etc. to support the microcontroller. Arduino Uno has
14 digital input/output pins (out of which 6 can be used as PWM outputs), 6 analog
input pins, a USB connection, A Power barrel jack, an ICSP header and a reset button.

How to use Arduino Board

The 14 digital input/output pins can be used as input or output pins by using pinMode(),
digitalRead() and digitalWrite() functions in arduino programming. Each pin operate at 5V
and can provide or receive a maximum of 40mA current, and has an internal pull-up resistor
of 20-50 KOhms which are disconnected by default. Out of these 14 pins, some pins have
specific functions as listed below:

 Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and transmit TTL
serial data. They are connected with the corresponding ATmega328P USB to TTL
serial chip.
 External Interrupt Pins 2 and 3: These pins can be configured to trigger an interrupt
on a low value, a rising or falling edge, or a change in value.
 PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by using
analogWrite() function.
 SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These pins are used for SPI
communication.
 In-built LED Pin 13: This pin is connected with an built-in LED, when pin 13 is
HIGH – LED is on and when pin 13 is LOW, its off.

Along with 14 Digital pins, there are 6 analog input pins, each of which provide 10 bits of
resolution, i.e. 1024 different values. They measure from 0 to 5 volts but this limit can be
increased by using AREF pin with analog Reference() function.

 Analog pin 4 (SDA) and pin 5 (SCA) also used for TWI communication using Wire
library.

Arduino Uno has a couple of other pins as explained below:

 AREF: Used to provide reference voltage for analog inputs with analogReference()
function.
 Reset Pin: Making this pin LOW, resets the microcontroller.

20
Communication
Arduino can be used to communicate with a computer, another Arduino board or other
microcontrollers. The ATmega328P microcontroller provides UART TTL (5V) serial
communication which can be done using digital pin 0 (Rx) and digital pin 1 (Tx). An
ATmega16U2 on the board channels this serial communication over USB and appears as a
virtual com port to software on the computer. The ATmega16U2 firmware uses the standard
USB COM drivers, and no external driver is needed. However, on Windows, a .inf file is
required. The Arduino software includes a serial monitor which allows simple textual data to
be sent to and from the Arduino board. There are two RX and TX LEDs on the arduino board
which will flash when data is being transmitted via the USB-to-serial chip and USB
connection to the computer (not for serial communication on pins 0 and 1). A SoftwareSerial
library allows for serial communication on any of the Uno's digital pins. The ATmega328P
also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire
library to simplify use of the I2C bus.

Arduino Uno to ATmega328 Pin Mapping

When ATmega328 chip is used in place of Arduino Uno, or vice versa, the image below
shows the pin mapping between the two

Programming Arduino

Once arduino IDE is installed on the computer, connect the board with computer using USB
cable. Now open the arduino IDE and choose the correct board by selecting
Tools>Boards>Arduino/Genuino Uno, and choose the correct Port by selecting Tools>Port.
Arduino Uno is programmed using Arduino programming language based on Wiring. To get

21
it started with Arduino Uno board and blink the built-in LED, load the example code by
selecting Files>Examples>Basics>Blink. Once the example code (also shown below) is
loaded into your IDE, click on the ‗upload‘ button given on the top bar. Once the upload is
finished, you should see the Arduino‘s built-in LED blinking. Below is the example code for
blinking:

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever


void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay
Applications

 Prototyping of Electronics Products and Systems


 Multiple DIY Projects.
 Easy to use for beginner level DIYers and makers.
 Projects requiring Multiple I/O interfaces and communications.

TCS3200 Color Sensor Working

The TCS3200 color sensor is used to sense a wide range of colors. We previously interfaced
TCS3200 color sensor with Arduino and Raspberry pi, and also built some useful projects
like Color sorting machine.

TCS230 sensor has inbuilt infrared LEDs that are used to light up the object whose colour is
to be detected. This ensures that there will no impacts of external surrounding light on the
object. This sensor reads a photodiode of 8*8 array, which comprises of 16 photodiodes with
red filters, 16 with blue filters, 16 with green filters and 16 photodiodes without any
filter. Each of the sensor arrays in these three arrays is selected separately depending on the
requirement. Hence it is known as a programmable sensor. The module can be featured to
sense the particular color and to leave the others. It contains filters for that selection purpose.
There is a fourth mode called ‗no filter mode’ in which the sensor detects white light.

The output signal of the TCS230 colour sensor is a square wave with a 50% duty cycle and
its frequency is proportional to the light intensity of the selected filter.

22
Pinout of TCS3200 Color Sensor:

VDD- Voltage supply pin of Sensor. It is supplied with 5V DC.

GND- Ground reference pin of a colour sensor

S0, S1- Output frequency scaling selection inputs

S2, S3- Photo-diode type selection inputs

OUT- Output pin of a colour sensor

OE- Enable pin for output frequency

Crystal Oscillators
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

23
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 used
for consumer devices such as wristwatches, clocks, radios, computers, and cell phones.
Quartz crystals are also found inside test and measurement equipment, such as counters,
signal generators, and oscilloscopes.

Crystal oscillators are oscillators where the primary frequency determining element is a
quartz crystal. Because of the inherent characteristics of the quartz crystal the crystal
oscillator may be held to extreme accuracy of frequency stability. Temperature compensation
may be applied to crystal oscillators to improve thermal stability of the crystal oscillator.
Crystal oscillators are usually, fixed frequency oscillators where stability and accuracy are
the primary considerations. For example it is almost impossible to design a stable and
accurate LC oscillator for the upper HF and higher frequencies without resorting to some sort
of crystal control.

Operation

A crystal is a solid in which the constituent atoms, molecules, or ions are packed in a
regularly ordered, repeating pattern extending in all three spatial dimensions.
Almost any object made of an elastic material could be used like a crystal, with appropriate
transducers, since all objects have natural resonant frequencies of vibration. For example,
steel is very elastic and has a high speed of sound. It was often used in mechanical filters
before quartz. The resonant frequency depends on size, shape, elasticity, and the speed of
sound in the material. High-frequency crystals are typically cut in the shape of a simple,
rectangular plate. Low-frequency crystals, such as those used in digital watches, are typically
cut in the shape of a tuning fork.

For applications not needing very precise timing, a low-cost ceramic resonator is often used
in place of a quartz crystal.When a crystal of quartz is properly cut and mounted, it can be
made to distort in an electric field by applying a voltage to an electrode near or on the crystal.
This property is known as piezoelectricity. When the field is removed, the quartz will
generate an electric field as it returns to its previous shape, and this can generate a voltage.
The result is that a quartz crystal behaves like a circuit composed of an inductor, capacitor
and resistor, with a precise resonant frequency.

24
Quartz has the further advantage that its elastic constants and its size change in such a way
that the frequency dependence on temperature can be very low. The specific characteristics
will depend on the mode of vibration and the angle at which the quartz is cut (relative to its
crystallographic axes). Therefore, the resonant frequency of the plate, which depends on its
size, will not change much, either.
This means that a quartz clock, filter or oscillator will remain accurate. For critical
applications the quartz oscillator is mounted in a temperature-controlled container, called a
crystal oven, and can also be mounted on shock absorbers to prevent perturbation by external
mechanical vibrations.

Crystal structures and materials

The most common material for oscillator crystals is quartz. At the beginning of the
technology, natural quartz crystals were used; now synthetic crystalline quartz grown by
hydrothermal synthesis is predominant due to higher purity, lower cost, and more convenient
handling. One of the few remaining uses of natural crystals is for pressure transducers in deep
wells. During World War II and for some time afterwards, natural quartz was considered a
strategic material by the USA. Large crystals were imported from Brazil. Raw "lascas", the
source material quartz for hydrothermal synthesis, are imported to USA or mined locally by
Coleman Quartz. The average value of as-grown synthetic quartz in 1994 was USD60/kg.

Two types of quartz crystals exist: left-handed and right-handed, differing in the optical
rotation but identical in other physical properties. Both left and right-handed crystals can be
used for oscillators, if the cut angle is correct. In manufacture, right-handed quartz is
generally used. The SiO4 tetrahedrons form parallel helixes; the direction of twist of the helix
determines the left- or right-hand orientation. The helixes are aligned along the z-axis and
merged together, sharing atoms. The mass of the helixes forms a mesh of small and large
channels parallel to the z-axis; the large ones are large enough to allow some mobility of
smaller ions and molecules through the crystal.

Quartz exists in several phases. At 573 °C at 1 atmosphere (and at higher temperatures and
higher pressures) the α-quartz undergoes quartz inversion, transforms reversibly to β-quartz.
The reverse process however is not entirely homogeneous and crystal twinning occurs. Care
has to be taken during manufacture and processing to avoid the phase transformation. Other

25
phases, e.g. the higher-temperature phases tridymite and cristobalite, are not significant for
oscillators. All quartz oscillator crystals are the α-quartz type.

Infrared spectrophotometry is used as one of the methods for measuring the quality of the
grown crystals. The wavenumbers 3585, 3500 and 3410 cm−1 are commonly used. The
measured value is based on the absorption bands of the OH radical and the infrared Q value is
calculated. The electronic grade crystals, grade C, have Q of 1.8 million or above; the
premium grade B crystals have Q of 2.2 million, and special premium grade A crystals have
Q of 3.0 million. The Q value is calculated only for the z region; crystals containing other
regions can be adversely affected. Another quality indicator is the etch channel density; when
the crystal is etched, tubular channels are created along linear defects. For processing
involving etching, e.g. the wristwatch tuning fork crystals, low etch channel density is
desirable. The etch channel density for swept quartz is about 10–100 and significantly more
for unswept quartz. Presence of etch channels and etch pits degrades the resonator's Q and
introduces nonlinearities. Quartz crystals can be grown for specific purposes.

Crystals for AT-cut are the most common in mass production of oscillator materials; the
shape and dimensions are optimized for high yield of the required wafers. High-purity quartz
crystals are grown with especially low content of aluminium, alkali metal and other
impurities and minimal defects; the low amount of alkali metals provides increased resistance
to ionizing radiation. Crystals for wrist watches, for cutting the tuning fork 32768 Hz
crystals, are grown with very low etch channel density. Crystals for SAW devices are grown
as flat; with large X-size seed with low etch channel density.

Special high-Q crystals, for use in highly stable oscillators, are grown at constant slow speed
and have constant low infrared absorption along the entire Z axis. Crystals can be grown as
Y-bar, with a seed crystal in bar shape and elongated along the Y axis, or as Z-plate, grown
from a plate seed with Y-axis direction length and X-axis width. The region around the seed
crystal contains a large number of crystal defects and should not be used for the
wafers.Crystals grow anisotropically; the growth along the Z axis is up to 3 times faster than
along the X axis. The growth direction and rate also influences the rate of uptake of
impurities. Y-bar crystals, or Z-plate crystals with long Y axis, have four growth regions
usually called +X, -X, Z, and S. The distribution of impurities during growth is uneven;
different growth areas contain different level of contaminants. The z regions are the purest,

26
the small occasionally present s regions are less pure, the +x region is yet less pure, and the -
x region has the highest level of impurities.

The impurities have negative impact on radiation hardness, susceptibility to twinning, filter
loss, and long and short term stability of the crystals. Different-cut seeds in different
orientations may provide other kinds of growth regions. The growth speed of the -x direction
is slowest due to the effect of adsorption of water molecules on the crystal surface;
aluminium impurities suppress growth in two other directions. The content of aluminium is
lowest in z region, higher in +x, yet higher in -x, and highest in s; the size of s regions also
grows with increased amount of aluminium present.

The content of hydrogen is lowest in z region, higher in +x region, yet higher in s region, and
highest in -x. Aluminium inclusions transform to colour centres with a gamma ray irradiation,
causing darkening of the crystal proportional to the dose and level of impurities; presence of
regions with different darkness reveals the different growth regions. The dominant type of
defect of concern in quartz crystals is the substitution of Al(III) for Si(IV) atom in the crystal
lattice. The aluminium ion has an associated interstitial charge compensator present nearby,
which can be a H+ ion (attached to the nearby oxygen and forming a hydroxyl group, called
Al-OH defect), Li+ ion, Na+ ion, K+ ion (less common), or an electron hole trapped in a
nearby oxygen atom orbital. The composition of the growth solution, whether it is based on
lithium or sodium alkali compounds, determines the charge compensating ions for the
aluminium defects. The ion impurities are of concern as they are not firmly bound and can
migrate through the crystal, altering the local lattice elasticity and the resonant frequency of
the crystal. Other common impurities of concern are e.g. iron(III) (interstitial), fluorine,
boron(III), phosphorus(V) (substitution), titanium(IV) (substitution, universally present in
magmatic quartz, less common in hydrothermal quartz), and germanium(IV) (substitution).

Sodium and iron ions can cause inclusions of aconite and elemeusite crystals. Inclusions of
water may be present in fast-grown crystals; interstitial water molecules are abundant near
the crystal seed. Another defect of importance is the hydrogen containing growth defect,
when instead of a Si-O-Si structure a pair of Si-OH HO-Si groups is formed; essentially a
hydrolyzed bond. Fast-grown crystals contain more hydrogen defects than slow-grown ones.
These growth defects source as supply of hydrogen ions for radiation-induced processes and
forming Al-OH defects. Germanium impurities tend to trap electrons created during
irradiation; the alkali metal cations then migrate towards the negatively charged center and

27
form a stabilizing complex. Matrix defects can be also present; oxygen vacancies, silicon
vacancies (usually compensated by 4 hydrogens or 3 hydrogens and a hole), peroxy groups,
etc. Some of the defects produce localized levels in the forbidden band, serving as charge
traps; Al(III) and B(III) typically serve as hole traps while electron vacancies, titanium,
germanium, and phosphorus atoms serve as electron traps. The trapped charge carriers can be
released by heating; their recombination is the cause of thermoluminescence.

The mobility of interstitial ions depends strongly on temperature. Hydrogen ions are mobile
down to 10 K, but alkali metal ions become mobile only at temperatures around and above
200 K. The hydroxyl defects can be measured by near-infrared spectroscopy. The trapped
holes can be measured by electron spin resonance. The Al-Na+ defects show as an acoustic
loss peak due to their stress-induced motion; the Al-Li+ defects do not form a potential well
so are not detectable this way. Some of the radiation induced defects during their thermal
annealing produce thermo luminescence; defects related to aluminium, titanium, and
germanium can be distinguished.

Swept crystals are crystals that have undergone a solid-state electro diffusion purification
process. Sweeping involves heating the crystal above 500 °C in a hydrogen-free atmosphere,
and the voltage gradient of at least 1 kilovolt/cm, for several (usually over 12) hours. The
migration of impurities and the gradual replacement of alkali metal ions with hydrogen (when
swept in air) or electron holes (when swept in vacuum) causes a weak electric current through
the crystal; decay of this current to a constant value signals end of the process. The crystal is
then left to cool, while the electric field is maintained. The impurities are concentrated at the
cathode region of the crystal, which is cut off afterwards and discarded. Swept crystals have
increased resistance to radiation, as the dose effects are dependent on the level of alkali metal
impurities; they are suitable for use in devices exposed to ionizing radiation, e.g. for nuclear
and space technology. Sweeping under vacuum at higher temperatures and higher field
strengths yields yet more radiation-hard crystals. The level and character of impurities can be
measured by infrared spectroscopy. Quartz can be swept in both α and β phase; sweeping in β
phase is faster, but the phase transition may induce twinning. Twinning can be mitigated by
subjecting the crystal to compression stress in the X direction, or an AC or DC electric field
along the X axis while the crystal cools through the phase transformation temperature region.

Sweeping can be also used to introduce one kind of an impurity into the crystal. Lithium,
sodium, and hydrogen swept crystals are used for e.g. studying quartz behavior.Very small

28
crystals for high fundamental mode frequencies can be manufactured by photolithography.
Crystals can be adjusted to exact frequency by laser trimming. A technique used in the world
of amateur radio for slight decrease of the crystal frequency may be achieved by exposing
crystals with silver electrodes to vapours of iodine, which causes a slight mass increase on the
surface by forming a thin layer of silver iodide; such crystals however had problematic long-
term stability. Another method commonly used is electrochemical increase or decrease of
silver electrode thickness by submerging resonator in lapis solved in water, citric acid in
water, or water with salt, and using resonator as one electrode, and small silver electrode as
another.

By choosing direction of current, one can either increase or decrease mass of electrodes.
Details were published in "Radio" magazine (3/1978) by UB5LEV.Raising frequency by
scratching off parts of the electrodes is advised against, as this may damage the crystal and
lower its Q factor. Capacitor trimmers can be also used for frequency adjustment of the
oscillator circuit.

Some other piezoelectric materials than quartz can be employed; e.g. single crystals of
lithium tantalite, lithium niobate, lithium borate, berlinite, gallium arsenide, lithium
tetraborate, aluminium phosphate, bismuth germanium oxide, polycrystalline zirconium
titanate ceramics, high-alumina ceramics, silicon-zinc oxide composite, or dipotassium
tartrate; some materials may be more suitable for specific applications. An oscillator crystal
can be also manufactured by depositing the resonator material on the silicon chip surface.
Crystals of gallium phosphate, langasite, langanite and langanate are about 10 times more
pullable than the corresponding quartz crystals, and are used in some VCXO oscillators.

Resistors

Resistors (R), are the most commonly used of all electronic components, to the point where
they are almost taken for granted. There are many different resistor types available with their
principal job being to "resist" the flow of current through an electrical circuit, or to act as
voltage droppers or voltage dividers. They are "Passive Devices", that is they contain no
source of power or amplification but only attenuate or reduce the voltage signal passing
through them. When used in DC circuits the voltage drop produced is measured across their
terminals as the circuit current flows through them while in AC circuits the voltage and
current are both in-phase producing 0o phase shift.

29
Resistors produce a voltage drop across themselves when an electrical current flows through
them because they obey Ohm's Law, and different values of resistance produces different
values of current or voltage. This can be very useful in Electronic circuits by controlling or
reducing either the current flow or voltage produced across them. There are many
different Resistor Types and they are produced in a variety of forms because their particular
characteristics and accuracy suit certain areas of application, such as High Stability, High
Voltage, High Current etc., or are used as general purpose resistors where their characteristics
are less of a problem. Some of the common characteristics associated with the humble
resistor are; Temperature Coefficient, Voltage Coefficient, Noise, Frequency Response,
Power as well as Temperature Rating, Physical Size and Reliability.

In all Electrical and Electronic circuit diagrams and schematics, the most commonly used
resistor symbol is that of a "zigzag" type line with the value of its resistance given in
Ohms, Ω.

Capacitor

Just like the Resistor, the Capacitor or sometimes referred to as a Condenser is a passive
device, and one which stores energy in the form of an electrostatic field which produces a
potential (Static Voltage) across its plates. In its basic form a capacitor consists of two
parallel conductive plates that are not connected but are electrically separated either by air or
by an insulating material called the Dielectric. When a voltage is applied to these plates, a
current flows charging up the plates with electrons giving one plate a positive charge and the
other plate an equal and opposite negative charge. This flow of electrons to the plates is
known as the Charging Current and continues to flow until the voltage across the plates (and
hence the capacitor) is equal to the applied voltage Vc. At this point the capacitor is said to be
fully charged and this is illustrated below.

30
Capacitor Construction

FIG- 8 :Capacitor construction

The parallel plate capacitor is the simplest form of capacitor and its capacitance value is fixed
by the equal area of the plates and the distance or separation between them. Altering any two
of these values alters the the value of its capacitance and this forms the basis of operation of
the variable capacitors. Also, because capacitors store the energy of the electrons in the form
of an electrical charge on the plates the larger the plates and/or smaller their separation the
greater will be the charge that the capacitor holds for any given voltage across its plates.

Liquid Crystal Display


A liquid crystal display (LCD) is a flat panel display, electronic visual display, or video
display that uses the light modulating properties of liquid crystals (LCs). LCs do not emit
light directly.

FIG- 9 A general purpose alphanumeric LCD, with two lines of 16 characters.

31
LCDs are used in a wide range of applications, including computer monitors, television,
instrument panels, aircraft cockpit displays, signage, etc. They are common in consumer
devices such as video players, gaming devices, clocks, watches, calculators, and telephones.
LCDs have replaced cathode ray tube (CRT) displays in most applications. They are available
in a wider range of screen sizes than CRT and plasma displays, and since they do not use
phosphors, they cannot suffer image burn-in. LCDs are, however, susceptible to image
persistence.
LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical power
consumption enables it to be used in battery-powered electronic equipment. It is an
electronically modulated optical device made up of any number of segments filled with liquid
crystals and arrayed in front of a light source (backlight) or reflector to produce images in
color or monochrome. The most flexible ones use an array of small pixels. The earliest
discovery leading to the development of LCD technology, the discovery of liquid crystals,
dates from 1888. By 2008, worldwide sales of televisions with LCD screens had surpassed
the sale of CRT units.
Overview
Each pixel of an LCD typically consists of a layer of molecules aligned between two
transparent electrodes, and two polarizing filters, the axes of transmission of which are (in
most of the cases) perpendicular to each other. With no actual liquid crystal between the
polarizing filters, light passing through the first filter would be blocked by the second
(crossed) polarizer.
The surface of the electrodes that are in contact with the liquid crystal material are treated so
as to align the liquid crystal molecules in a particular direction. This treatment typically
consists of a thin polymer layer that is unidirectionally rubbed using, for example, a cloth.
The direction of the liquid crystal alignment is then defined by the direction of rubbing.
Electrodes are made of the transparent conductor Indium Tin Oxide (ITO). The Liquid
Crystal Display is intrinsically a ―passive‖ device, it is a simple light valve. The managing
and control of the data to be displayed is performed by one or more circuits commonly
denoted as LCD drivers.
Before applying an electric field, the orientation of the liquid crystal molecules is determined
by the alignment at the surfaces of electrodes. In a twisted nematic device (still the most
common liquid crystal device), the surface alignment directions at the two electrodes are
perpendicular to each other, and so the molecules arrange themselves in a helical structure, or

32
twist. This induces the rotation of the polarization of the incident light, and the device
appears grey. If the applied voltage is large enough, the liquid crystal molecules in the center
of the layer are almost completely untwisted and the polarization of the incident light is not
rotated as it passes through the liquid crystal layer. This light will then be mainly polarized
perpendicular to the second filter, and thus be blocked and the pixel will appear black. By
controlling the voltage applied across the liquid crystal layer in each pixel, light can be
allowed to pass through in varying amounts thus constituting different levels of gray.
The optical effect of a twisted nematic device in the voltage-on state is far less dependent on
variations in the device thickness than that in the voltage-off state. Because of this, these
devices are usually operated between crossed polarizers such that they appear bright with no
voltage (the eye is much more sensitive to variations in the dark state than the bright state).
These devices can also be operated between parallel polarizers, in which case the bright and
dark states are reversed. The voltage-off dark state in this configuration appears blotchy,
however, because of small variations of thickness across the device.
Both the liquid crystal material and the alignment layer material contain ionic compounds. If
an electric field of one particular polarity is applied for a long period of time, this ionic
material is attracted to the surfaces and degrades the device performance. This is avoided
either by applying an alternating current or by reversing the polarity of the electric field as the
device is addressed (the response of the liquid crystal layer is identical, regardless of the
polarity of the applied field).
Displays for a small number of individual digits and/or fixed symbols (as in digital watches,
pocket calculators etc.) can be implemented with independent electrodes for each segment. In
contrast full alphanumeric and/or variable graphics displays are usually implemented with
pixels arranged as a matrix consisting of electrically connected rows on one side of the LC
layer and columns on the other side, which makes it possible to address each pixel at the
intersections. The general method of matrix addressing consists of sequentially addressing
one side of the matrix, for example by selecting the rows one-by-one and applying the picture
information on the other side at the columns row-by-row. For details on the various matrix
addressing schemes see Passive-matrix and active-matrix addressed LCDs.

Voltage Regulator

The 78xx (sometimes LM78xx) is a family of self-contained fixed linear voltage regulator
integrated circuits. The 78xx family is commonly used in electronic circuits requiring a

33
regulated power supply due to their ease-of-use and low cost. For ICs within the family, the
xx is replaced with two digits, indicating the output voltage (for example, the 7805 has a 5
volt output, while the 7812 produces 12 volts). The 78xx line are positive voltage regulators:
they produce a voltage that is positive relative to a common ground. There is a related line of
79xx devices which are complementary negative voltage regulators. 78xx and 79xx ICs can
be used in combination to provide positive and negative supply voltages in the same circuit.

FIG-10 Voltage regulator – LM 78xx

78xx ICs have three terminals and are commonly found in the TO220 form factor, although
smaller surface-mount and larger TO3 packages are available. These devices support an input
voltage anywhere from a couple of volts over the intended output voltage, up to a maximum
of 35 or 40 volts, and typically provide 1 or 1.5 amperes of current (though smaller or larger
packages may have a lower or higher current rating).

Advantages

78xx series ICs do not require additional components to provide a constant, regulated source
of power, making them easy to use, as well as economical and efficient uses of space. Other
voltage regulators may require additional components to set the output voltage level, or to
assist in the regulation process. Some other designs (such as a switched-mode power supply)
may need substantial engineering expertise to implement.

34
78xx series ICs have built-in protection against a circuit drawing too much power. They have
protection against overheating and short-circuits, making them quite robust in most
applications. In some cases, the current-limiting features of the 78xx devices can provide
protection not only for the 78xx itself, but also for other parts of the circuit.78xx ICs are easy
to use and handle but these cannot give a altering voltage required so Lm317 series of ICs are
available to obtain a voltage output from 1.25 volts to 37 volts.

Disadvantages

The input voltage must always be higher than the output voltage by some minimum amount
(typically 2 volts). This can make these devices unsuitable for powering some devices from
certain types of power sources (for example, powering a circuit that requires 5 volts using 6-
volt batteries will not work using a 7805).

As they are based on a linear regulator design, the input current required is always the same
as the output current. As the input voltage must always be higher than the output voltage, this
means that the total power (voltage multiplied by current) going into the 78xx will be more
than the output power provided. The extra input power is dissipated as heat. This means both
that for some applications an adequate heatsink must be provided, and also that a (often
substantial) portion of the input power is wasted during the process, rendering them less
efficient than some other types of power supplies.

When the input voltage is significantly higher than the regulated output voltage (for example,
powering a 7805 using a 24 volt power source), this inefficiency can be a significant
issue.Even in larger packages, 78xx integrated circuits cannot supply as much power as many
designs which use discrete components, and are generally inappropriate for applications
requiring more than a few amperes of current.

Transformer
A transformer is a device that transfers electrical energy from one circuit to another through
inductively coupled conductors—the transformer's coils. A varying current in the first or
primary winding creates a varying magnetic flux in the transformer's core and thus a varying
magnetic field through the secondary winding. This varying magnetic field induces a varying

35
electromotive force (EMF), or "voltage", in the secondary winding. This effect is called
inductive coupling.

FIG- 11. Transformer windings


If a load is connected to the secondary, current will flow in the secondary winding, and
electrical energy will be transferred from the primary circuit through the transformer to the
load. In an ideal transformer, the induced voltage in the secondary winding (Vs) is in
proportion to the primary voltage (Vp) and is given by the ratio of the number of turns in the
secondary (Ns) to the number of turns in the primary (Np) as follows:By appropriate
selection of the ratio of turns, a transformer thus enables an alternating current (AC) voltage
to be "stepped up" by making Ns greater than Np, or "stepped down" by making Ns less than
Np.In the vast majority of transformers, the windings are coils wound around a ferromagnetic
core, air-core transformers being a notable exception.
Transformers range in size from a thumbnail-sized coupling transformer hidden inside a stage
microphone to huge units weighing hundreds of tons used to interconnect portions of power
grids. All operate on the same basic principles, although the range of designs is wide. While
new technologies have eliminated the need for transformers in some electronic circuits,
transformers are still found in nearly all electronic devices designed for household ("mains")
voltage. Transformers are essential for high-voltage electric power transmission, which
makes long-distance transmission economically practical.
A transformer is an electrical device that transfers energy from one circuit to another by
magnetic coupling with no moving parts. A transformer comprises two or more coupled
windings, or a single tapped winding and, in most cases, a magnetic core to concentrate
magnetic flux. A changing current in one winding creates a time-varying magnetic flux in the
core, which induces a voltage in the other windings. Michael Faraday built the first

36
transformer, although he used it only to demonstrate the principle of electromagnetic
induction and did not foresee the use to which it would eventually be put.

FIG- 12 Transformer core


DC Motor
A DC motor is an electric motor that runs on direct current (DC) electricity. DC motors were
used to run machinery, often eliminating the need for a local steam engine or internal
combustion engine. DC motors can operate directly from rechargeable batteries, providing
the motive power for the first electric vehicles. Today DC motors are still found in
applications as small as toys and disk drives, or in large sizes to operate steel rolling mills and
paper machines. Modern DC motors are nearly always operated in conjunction with power
electronic devices.
Two important performance parameters of DC motors are the motor constants, Kv and Km.

37
FIG-13DC motor

DC motor
When a current passes through the coil wound around a soft iron core, the side of the positive
pole is acted upon by an upwards force, while the other side is acted upon by a downward
force. According to Fleming's left hand rule, the forces cause a turning effect on the coil,
making it rotate. To make the motor rotate in a constant direction, "direct current"
commutators make the current reverse in direction every half a cycle (in a two-pole motor)
thus causing the motor to continue to rotate in the same direction.
A problem with the motor shown above is that when the plane of the coil is parallel to the
magnetic field—i.e. when the rotor poles are 90 degrees from the stator poles—the torque is
zero. In the pictures above, this occurs when the core of the coil is horizontal—the position it
is just about to reach in the last picture on the right. The motor would not be able to start in
this position. However, once it was started, it would continue to rotate through this position
by momentum.
There is a second problem with this simple pole design. At the zero-torque position, both
commutator brushes are touching (bridging) both commutator plates, resulting in a short-
circuit. The power leads are shorted together through the commutator plates, and the coil is
also short-circuited through both brushes (the coil is shorted twice, once through each brush
independently). Note that this problem is independent of the non-starting problem above;
even if there were a high current in the coil at this position, there would still be zero torque.
The problem here is that this short uselessly consumes power without producing any motion

38
(nor even any coil current.) In a low-current battery-powered demonstration this short-
circuiting is generally not considered harmful. However, if a two-pole motor were designed
to do actual work with several hundred watts of power output, this shorting could result in
severe commutator overheating, brush damage, and potential welding of the brushes—if they
were metallic—to the commutator. Carbon brushes, which are often used, would not weld. In
any case, a short like this is very wasteful, drains batteries rapidly and, at a minimum,
requires power supply components to be designed to much higher standards than would be
needed just to run the motor without the shorting.
The inside of an electric DC motor.
One simple solution is to put a gap between the commutator plates which is wider than the
ends of the brushes. This increases the zero-torque range of angular positions but eliminates
the shorting problem; if the motor is started spinning by an outside force it will continue
spinning. With this modification, it can also be effectively turned off simply by stalling
(stopping) it in a position in the zero-torque (i.e. commutator non-contacting) angle range.
This design is sometimes seen in homebuilt hobby motors, e.g. for science fairs and such
designs can be found in some published science project books. A clear downside of this
simple solution is that the motor now coasts through a substantial arc of rotation twice per
revolution and the torque is pulsed. This may work for electric fans or to keep a flywheel
spinning but there are many applications, even where starting and stopping are not necessary,
for which it is completely inadequate, such as driving the capstan of a tape transport, or any
instance where to speed up and slow down often and quickly is a requirement. Another
disadvantage is that, since the coils have a measure of self inductance, current flowing in
them cannot suddenly stop. The current attempts to jump the opening gap between the
commutator segment and the brush, causing arcing.
Even for fans and flywheels, the clear weaknesses remaining in this design—especially that it
is not self-starting from all positions—make it impractical for working use, especially
considering the better alternatives that exist. Unlike the demonstration motor above, DC
motors are commonly designed with more than two poles, are able to start from any position,
and do not have any position where current can flow without producing electromotive power
by passing through some coil. Many common small brushed DC motors used in toys and
small consumer appliances, the simplest mass-produced DC motors to be found, have three-
pole armatures. The brushes can now bridge two adjacent commutator segments without
causing a short circuit. These three-pole armatures also have the advantage that current from

39
the brushes either flows through two coils in series or through just one coil. Starting with the
current in an individual coil at half its nominal value (as a result of flowing through two coils
in series), it rises to its nominal value and then falls to half this value. The sequence then
continues with current in the reverse direction. This results in a closer step-wise
approximation to the ideal sinusoidal coil current, producing a more even torque than the
two-pole motor where the current in each coil is closer to a square wave. Since current
changes are half those of a comparable two-pole motor, arcing at the brushes is consequently
less.
If the shaft of a DC motor is turned by an external force, the motor will act like a generator
and produce an Electromotive force (EMF). During normal operation, the spinning of the
motor produces a voltage, known as the counter-EMF (CEMF) or back EMF, because it
opposes the applied voltage on the motor. The back EMF is the reason that the motor when
free-running does not appear to have the same low electrical resistance as the wire contained
in its winding. This is the same EMF that is produced when the motor is used as a generator
(for example when an electrical load, such as a light bulb, is placed across the terminals of
the motor and the motor shaft is driven with an external torque). Therefore, the total voltage
drop across a motor consists of the CEMF voltage drop, and the parasitic voltage drop
resulting from the internal resistance of the armature's windings.
Speed control
Generally, the rotational speed of a DC motor is proportional to the voltage applied to it, and
the torque is proportional to the current. Speed control can be achieved by variable battery
tappings, variable supply voltage, resistors or electronic controls. The direction of a wound
field DC motor can be changed by reversing either the field or armature connections but not
both. This is commonly done with a special set of contactors (direction contactors).The
effective voltage can be varied by inserting a series resistor or by an electronically controlled
switching device made of thyristors, transistors, or, formerly, mercury arc rectifiers.
In a circuit known as a chopper, the average voltage applied to the motor is varied by
switching the supply voltage very rapidly. As the "on" to "off" ratio is varied to alter the
average applied voltage, the speed of the motor varies. The percentage "on" time multiplied
by the supply voltage gives the average voltage applied to the motor. Therefore, with a 100 V
supply and a 25% "on" time, the average voltage at the motor will be 25 V. During the "off"
time, the armature's inductance causes the current to continue through a diode called a
"flyback diode", in parallel with the motor. At this point in the cycle, the supply current will

40
be zero, and therefore the average motor current will always be higher than the supply current
unless the percentage "on" time is 100%. At 100% "on" time, the supply and motor current
are equal. The rapid switching wastes less energy than series resistors. This method is also
called pulse-width modulation (PWM) and is often controlled by a microprocessor. An output
filter is sometimes installed to smooth the average voltage applied to the motor and reduce
motor noise.
Since the series-wound DC motor develops its highest torque at low speed, it is often used in
traction applications such as electric locomotives, and trams. Another application is starter
motors for petrol and small diesel engines. Series motors must never be used in applications
where the drive can fail (such as belt drives). As the motor accelerates, the armature (and
hence field) current reduces. The reduction in field causes the motor to speed up until it
destroys itself. This can also be a problem with railway motors in the event of a loss of
adhesion since, unless quickly brought under control, the motors can reach speeds far higher
than they would do under normal circumstances. This can not only cause problems for the
motors themselves and the gears, but due to the differential speed between the rails and the
wheels it can also cause serious damage to the rails and wheel treads as they heat and cool
rapidly. Field weakening is used in some electronic controls to increase the top speed of an
electric vehicle.
The simplest form uses a contactor and field-weakening resistor; the electronic control
monitors the motor current and switches the field weakening resistor into circuit when the
motor current reduces below a preset value (this will be when the motor is at its full design
speed). Once the resistor is in circuit, the motor will increase speed above its normal speed at
its rated voltage. When motor current increases, the control will disconnect the resistor and
low speed torque is made available.
One interesting method of speed control of a DC motor is the Ward Leonard control. It is a
method of controlling a DC motor (usually a shunt or compound wound) and was developed
as a method of providing a speed-controlled motor from an AC supply, though it is not
without its advantages in DC schemes. The AC supply is used to drive an AC motor, usually
an induction motor that drives a DC generator or dynamo. The DC output from the armature
is directly connected to the armature of the DC motor (sometimes but not always of identical
construction). The shunt field windings of both DC machines are independently excited
through variable resistors. Extremely good speed control from standstill to full speed, and
consistent torque, can be obtained by varying the generator and/or motor field current. This
method of control was the de facto method from its development until it was superseded by

41
solid state thyristor systems.
It found service in almost any environment where good speed control was required, from
passenger lifts through to large mine pit head winding gear and even industrial process
machinery and electric cranes. Its principal disadvantage was that three machines were
required to implement a scheme (five in very large installations, as the DC machines were
often duplicated and controlled by a tandem variable resistor). In many applications, the
motor-generator set was often left permanently running, to avoid the delays that would
otherwise be caused by starting it up as required. Although electronic (thyristor) controllers
have replaced most small to medium Ward-Leonard systems, some very large ones
(thousands of horsepower) remain in service. The field currents are much lower than the
armature currents, allowing a moderate sized thyristor unit to control a much larger motor
than it could control directly. For example, in one installation, a 300 amp thyristor unit
controls the field of the generator. The generator output current is in excess of 15,000
amperes, which would be prohibitively expensive (and inefficient) to control directly with
thyristors.

42
INFRARED SENSOR
In this IR detector and transmitter circuit the IC 555 is working under astable mode. The pin
4 i.e. reset pin is when grounded via IR receiver the pin 3 output is low.

FIG-14 Infra red sensor with circuitry

As soon as the IR light beam transmitted is obstructed, a momentary pulse actuates the relay
output (or LED).The IR transmitter is simple series connected resistor network from battery.
The timing capacitor connected to pin 2 and ground can varied as per requirement

Switched-mode power supply

A switched-mode power supply (switching-mode power supply, SMPS, or switcher) is an


electronic power supply that incorporates a switching regulator to convert electrial power
efficiently. Like other power supplies, an SMPS transfers power from a source like the
electrical powergrid to a load (such as a personal computer) while

43
converting voltage and current characteristics. An SMPS is usually employed to efficiently
provide a regulated output voltage, typically at a level different from the input voltage.

Unlike a linear power supply, the pass transistor of a switching mode supply continually
switches between low-dissipation, full-on and full-off states, and spends very little time in the
high dissipation transitions (which minimizes wasted energy). Ideally, a switched-mode
power supply dissipates no power

FIG-15 Switched mode power supply circuitry

Unlike a linear power supply, the pass transistor of a switching mode supply continually
switches between low-dissipation, full-on and full-off states, and spends very little time in the
high dissipation transitions (which minimizes wasted energy). Ideally, a switched-mode
power supply dissipates no power. Voltage regulation is achieved by varying the ratio of on-
to-off time. In contrast, a linear power supply regulates the output voltage by continually
dissipating power in the pass transistor. This higher power conversion efficiency is an
important advantage of a switched-mode power supply. Switched-mode power supplies may
also be substantially smaller and lighter than a linear supply due to the smaller transformer
size and weight.

44
Switching regulators are used as replacements for the linear regulators when higher
efficiency, smaller size or lighter weight are required. They are, however, more complicated,
their switching currents can cause electrical noise problems if not carefully suppressed, and
simple designs may have a linear regulator provides the desired output voltage by dissipating
excess power in ohmic losses (e.g., in a resistor or in the collector–emitter region of a pass
transistor in its active mode). A linear regulator regulates either output voltage or current by
dissipating the excess electric power in the form of heat, and hence its maximum power
efficiency is voltage-out/voltage-in since the volt difference is wasted. In contrast, a
switched-mode power supply regulates either output voltage or current by switching ideal
storage elements, like inductors and capacitors, into and out of different electrical
configurations. Ideal switching elements (e.g., transistors operated outside of their active
mode) have no resistance when "closed" and carry no current when "open", and so the
converters can theoretically operate with 100% efficiency (i.e., all input power is delivered to
the load; no power is wasted as dissipated heat).

For example, if a DC source, an inductor, a switch, and the corresponding electrical


ground are placed in series and the switch is driven by a square wave, the peak-to-peak
voltage of the waveform measured across the switch can exceed the input voltage from the
DC source. This is because the inductor responds to changes in current by inducing its own
voltage to counter the change in current, and this voltage adds to the source voltage while the
switch is open.

If a diode-and-capacitor combination is placed in parallel to the switch, the peak voltage can
be stored in the capacitor, and the capacitor can be used as a DC source with an output
voltage greater than the DC voltage driving the circuit. This boost converter acts like a step-
up transformer for DC signals. A buck–boost converter works in a similar manner, but yields
an output voltage which is opposite in polarity to the input voltage.

Other buck circuits exist to boost the average output current with a reduction of voltage.

In an SMPS, the output current flow depends on the input power signal, the storage elements
and circuit topologies used, and also on the pattern used (e.g. pulse-width modulation with an
adjustable duty cycle) to drive the switching elements. Typically, the spectral density of these
switching waveforms has energy concentrated at relatively high frequencies. As such,
switching transients, like ripple, introduced onto the output waveforms can be filtered with
small LC filters.

45
Advantages and disadvantages

The main advantage of this method is greater efficiency because the switching transistor
dissipates little power when it is outside of its active region (i.e., when the transistor acts like
a switch and either has a negligible voltage drop across it or a negligible current through it).
Other advantages include smaller size and lighter weight (from the elimination of low
frequency transformers which have a high weight) and lower heat generation due to higher
efficiency.

Disadvantages include greater complexity, the generation of high-amplitude, high-frequency


energy that the low-pass filter must block to avoid electromagnetic interference (EMI),
a ripple voltage at the switching frequency and the harmonic frequencies thereof. Very low
cost SMPSs may couple electrical switching noise back onto the mains power line, causing
interference with A/V equipment connected to the same phase. Non-power-factor-corrected
SMPSs also cause harmonic distortion

Battery

An electrochemical battery - or, more precisely, a "cell" - is a device in which the reaction
between two substances can be made to occur in such a way that some of the chemical energy
is converted to useful electricity. When the cell can only be used once, it is called a "primary"
cell. When the chemical reaction can be reversed repeatedly by applying electrical
energy to the cell, it is called a "secondary" cell and can be used in an accumulator or
"storage" battery.

Certain cells are capable of only a few charge-discharge cycles and are, therefore, technically
"secondary" cells. Such is the case with certain silver oxide-zinc batteries. These batteries are
not capable of the repeated cycling required of a satellite battery system, and are, therefore,
considered to be "rechargeable primary" rather than storage batteries. To define a battery in
another way, it is an arrangement whereby an "electrochemical" reaction can be made to take
place so that the "electrical" part of the reaction proceeds via the metallic path of the external
circuit, while the "chemical" part of the reaction occurs via ionic conduction
through electrolyte.

46
The type of chemical reaction that can be used in an electrochemical cell is known as an
"oxidation-reduction" reaction - a reaction in which one chemical species gives electrons to
another. By separating the two species and controlling the flow of ions between them, battery
engineers make devices in which essentially all of these electrons can be made to flow
through an external circuit, thereby converting most of the chemical energy to electrical
energy during the discharge of the cell.

Some of the components common to all cells are:

1. The "cathode" or "positive" electrode, which consists of a mass of "electron-receptive"


chemical held in intimate contact with a metallic "plate" through which the electrons
arrive from the external circuit.
2. The "anode" or "negative" electrode, which consists of another chemical which readily
gives up electrons - an "electron donor" - similarly held in close contact with a metallic
member through which electrons can be conducted to the external circuit.
3. The "electrolyte," usually a liquid solution that permits the transfer of mass necessary to
the overall reaction. This movement takes place by "migration" of "ions" - positively or
negatively charged molecular fragments - from anode to cathode and from cathode

FIG- 16 Battery

A schematic diagram of these basic cell elements is shown above. The cell is shown
connected to a load - representing the discharge reaction. Charging is accomplished by
connecting an electrical source in place of the load, thereby reversing the entire process.

47
UV Detector

UV detectors function on the capacity of many compounds to absorb light in the wavelength
range 180 to 350 nm. The sensor cell usually consists of a cylindrical cavity about 1 mm I.D
and a few mm long, having a capacity that ranges from about two micro-liters to eight micro-
liters.

FIG- 17 UV detector

Light from a UV light sources passes through the sensor onto a photoelectric cell, the out put
from which is electronically modified and presented on a potentiometric recorder, a computer
screen, or printer. By interposing a monochrometer between the light source and the cell,
light of a specific wavelength can be selected for detection and, thus, improve the detector
selectivity.

Alternatively a broad band light source can be used and the light after passing through the
cell can be optically dispersed by prism or grating and allowed to fall onto a diode array. By
monitoring a specific diode, the detector can be made specific for those substances that
absorb at that particular wavelength. If the output from all the diodes is scanned then a UV
absorption spectrum can be obtained to aid in solute identification. The fixed wavelength UV
detector has a sensitivity of about 1 x 10-8 g per ml at a signal to noise ratio of two are the
UV detector (fixed and variable wavelength) the electrical conductivity detector, the
fluorescence detector and the refractive index detector. These detectors are employed in over
95% of all LC analytical applications. These four detectors will be described and for those
readers requiring more information on detectors are referred to Liquid Chromatography
Detectors.

48
The UV Detector The UV detector is by far the most popular and useful LC detector that is
available to the analyst at this time. This is particularly true if multi-wavelength technology is
included in this class of detectors. Although the UV detector has some definite limitations
(particularly for the detection of non polar solutes that do not possess a UV chromaphores) it
has the best

CAUTIONS

(1) Cautions

1. The devices are UV light LEDs. The LED during operation radiates intense UV light,
which precautions must be taken to prevent looking directly at the UV light with unaided
eyes.
2. Do not look directly into the UV light or look through the optical system. When there is a
possibility to receive the reflection of light, protect by using the UV light protective
glasses so that light should not catch one‘s eye directly.
3. Put the caution label on the cardboard box.

(2) Lead Forming

1. When forming leads, the leads should be bent at a point at least 3mm from the base of the
lead.
2. Do not use the base of the lead frame as a fulcrum during lead forming.
3. Lead forming should be done before soldering.
4. Do not apply any bending stress to the base of the lead. The stress to the base may
damage the LED‘s characteristics or it may break the LEDs.
5. When mounting the LEDs onto a printed circuit board, the holes on the circuit board
should be exactly aligned with the leads of the LEDs. If the LEDs are mounted with stress
at the leads, it causes deterioration of the lead and this will degrade the LEDs.

49
(3) Storage

The LEDs should be stored at 30°C or less and 70%RH or less after being shipped from
Nichia and the storage life limits are 3 months. If the LEDs are stored for 3 months or more,
they can be stored for a year in a sealed container with a nitrogen atmosphere and moisture
absorbent material. Nichia LED leads are comprised of a gold plated Iron alloy. The gold
surface may be affected by environments which contain corrosive gases and so on. Please
avoid conditions which may cause the LED to corrode, tarnish or discolor. This corrosion or
discoloration may cause difficulty during soldering operations. It is recommended that the
LEDs be used as soon as possible. Please avoid rapid transitions in ambient temperature,
especially, in high humidity environments where condensation can occur.

(4) Static Electricity


Static electricity or surge voltage damages the LEDs. It is recommended that a wrist band or
an anti-electrostatic glove be used when handling the LEDs. All devices, equipment and
machinery must be properly grounded. It is recommended that measure be taken against
surge voltage to the equipment that mounts LEDs. When inspecting the final products in
which LEDs were assembled, it is recommended to check whether the assembled LEDs are
damaged by static electricity or not. It is easy to find static-damaged LEDs by a light-on test
or a VF test at a lower current (below 1mA is recommended). The LEDs should be used the
light detector etc. when testing the light-on. Do not stare into the LEDs when testing.
Damaged LEDs will show some unusual characteristics such as the forward voltage becomes
lower, or the LEDs do not light at the low current. Criteria : (VF > 2.0V at IF=0.5mA)

(6) Heat Generation

Thermal design of the end product is of paramount importance. Please consider the heat
generation of the LED when making the system design. The coefficient of temperature
increase per input electric power is affected by the thermal resistance of the circuit board and
density of LED placement on the board, as well as other components. It is necessary to avoid
intense heat generation and operate within the maximum ratings given in this specification.
The operating current should be decided after considering the ambient maximum temperature
of LEDs.

50
(7) Cleaning

It is recommended that isopropyl alcohol be used as a solvent for cleaning the LEDs. When
using other solvents, it should be confirmed beforehand whether the solvents will dissolve the
glass or not. Freon solvents should not be used to clean the LEDs because of worldwide
regulations. Do not clean the LEDs by the ultrasonic. When it is absolutely necessary, the
influence of ultrasonic cleaning on the LEDs depends on factors such as ultrasonic power and
the assembled condition. Before cleaning, a pre-test should be done to confirm whether any
damage to the LEDs will occur.

(8) Safety Guideline for Human Eyes

In 1993, the International Electric Committee (IEC) issued a standard concerning laser
product safety. Since then, this standard has been applied for diffused light sources (LEDs) as
well as lasers. In 1998 IEC 60825-1 Edition 1.1 evaluated the magnitude of the light source.
In 2001 IEC 60825-1 Amendment 2 converted the laser class into 7 classes for end products.
Components are excluded from this system. Products which contain visible LEDs are now
classified as class 1. Products containing UV LEDs are class 1M. Products containing LEDs
can be classified as class 2 in cases where viewing angles are narrow, optical manipulation
intensifies the light, and/or theenergy emitted is high. For these systems it is recommended to
avoid long term exposure. It is also recommended to follow the IEC regulations regarding
safety and labeling of products.

(9) Others

NSHU550B complies with RoHS Directive. This LED also emits visible light. Please take
notice of visible light spectrum, in case you use this LED as light source of sensors etc. The
LEDs described in this brochure are intended to be used for ordinary electronic equipment
(such as office equipment, communications equipment, measurement instruments and
household appliances).
Consult Nichia‘s sales staff in advance for information on the applications in which
exceptional quality and reliability are required, particularly when the failure or malfunction
of the LEDs may directly. Jeopardize life or health (such as for airplanes, aerospace,
submersible repeaters, nuclear reactor control systems, automobiles, traffic control

51
equipment, life support systems and safety devices).User shall not reverse engineer by
disassembling or analysis of the LEDs without having the prior written consent of Nichia.
When defective LEDs are found, User shall inform to Nichia directly before disassembling or
analysis.The formal specifications must be exchanged and signed by both parties before large
volume purchase begins. The appearance and specifications of the product may be modified
for improvement without

ULN2003

ULN2003 is a high voltage and high current Darlington array IC. It contains seven open
collector darlington pairs with common emitters. A darlington pair is an arrangement of two
bipolar transistors. ULN2003 belongs to the family of ULN200X series of ICs. Different
versions of this family interface to different logic families.ULN2003 are for 5V TTL, CMOS
logic devices. These ICs are used when driving a wide range of loads and are used as relay
drivers, display drivers, line drivers etc.

ULN2003 is also commonly used while driving Stepper Motors. The ULN2003 is a
monolithic high voltage and high current Darlington transistor arrays. It consists of seven
NPN darlington pairs that features high voltage outputs with common-cathode clamp diode
for switching inductive loads. The collector-current rating of a single darlington pair is
500mA. The darlington pairs may be paralleled for higher current capability. Applications
include relay drivers, hammer drivers, lamp drivers, display drivers(LED gas discharge),line
drivers, and logic buffers. The ULN2003 has a 2.7kΩ series base resistor for each darlington
pair for operation directly with TTL or 5V CMOS devices.

52
FIG-18 ULN2003 Darlington using high-power stepper motor ..

FEATURES

 500mA rated collector current(Single output)


 High-voltage outputs: 50V
 Inputs compatible with various types of logic.
 Relay driver application

53
4. CODES

int OutPut = 13;


unsigned int frequency = 0;
#include <LiquidCrystal.h>
LiquidCrystal lcd(4, 6, 7, 8, 9, 10);
int blue1;
int red1;
int green1;
int a = 0, b = 0;
int total = 1000;
void setup()
{
Serial.begin(9600);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print(" Smart Wallet ");
lcd.setCursor(0, 1);
lcd.print(" Circuit Digest ");
delay(2000);
lcd.clear();
pinMode(2, OUTPUT);//S0
pinMode(3, OUTPUT);//S1
pinMode(11, OUTPUT);//S2
pinMode(12, OUTPUT);//S3
pinMode(13, INPUT);//OUT
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
}

54
void loop()
{
int sensor = digitalRead(A0);
int red1 = red();
int blue1 = blue();
int green1 = green();
Serial.println(red1);
Serial.println(blue1);
Serial.println(green1);
Serial.println("-----------------------------");

if (red1>=20 && red1<=25 && blue1 >=30 && blue1 <=35 && green1 >=30 &&
green1 <=35 && a == 0 && sensor == HIGH)
{
a = 1;
}
else if (sensor == LOW && a == 1)
{
a = 0;
if(total>=10)
{
lcd.setCursor(0, 1);
lcd.print("10 Rupees!!!");
total=total-10;
delay(1500);
lcd.clear();
}
}
if (red1 >= 25 && red1 <= 30 && blue1 >= 30 && blue1 <= 33 && green1 >= 25 &&
green1 <=30 && b == 0 && sensor == HIGH)
{
b = 1;
}
else if (sensor == LOW && b == 1)

55
{
b = 0;
if(total>=50)
{
lcd.setCursor(0, 1);
lcd.print("50 Rupees!!!");
total=total-50;
delay(1500);
lcd.clear();
}
}
lcd.setCursor(0, 0);
lcd.print("Total Bal:");
lcd.setCursor(11, 0);
lcd.print(total);
delay(1000);
}
int red()
{
digitalWrite(11, LOW);
digitalWrite(12, LOW);
frequency = pulseIn(OutPut, LOW);
return frequency;
}
int blue()
{
digitalWrite(11, HIGH);
digitalWrite(12, HIGH);
frequency = pulseIn(OutPut, LOW);
return frequency;
}
int green()
{
digitalWrite(11, LOW);

56
digitalWrite(12, HIGH);
frequency = pulseIn(OutPut, LOW);
return frequency;
}

57
5. DISCUSSION OF RESULTS

The idea was to create an currency note counting machine with fake detection which would
circumvent the manual detection involved in detecting fake currency. Currency created by
colour copier or printer produces an image tht rest on the surface of paper that can easily be
seen when uv light is placed over it. Real notes notes are printed on optical fiber paper fake
ones on thick paper made of bamboo pulp. Money Counter & Counterfeit Note Detector
offers exclusive peace of mind. Provided with a top mounted numeric count display screen as
well as a detachable LCD display for customers, this helps keep your counts accurate and
quick. With built in UV and Thread detection, this unit prevents any fakes from being passed
on to you.

Detecting fake bills just by looking at it, is not exactly the most efficient or even reliable way
of knowing for sure if a bill is fake. Counterfeit notes are becoming more difficult to detect
with the naked eye, that's were advanced machines like this 2-in-1 multi-currency money
counter & detector comes in. This is a professional grade unit being offered exclusively to
our customers at a low factory-direct wholesale price, making this new money counter and
counterfeit detector a must-have-product for any small, medium or large business.

FICN (Fake Indian Currency Note) is a term used by officials and media to refer
fake Indian currency notes circulated in the Indian economy. The fake notes of latest Gandhi
series are so perfect that it is hard to identify if it is fake or not. Though fake currency is
being printed with precision, CID sleuths say that they can be detected with some effort.
Currency printed by local racketeers can be detected easily as they use photographic method,
hand engraved blocks, lithographic process and computer colour scanning.In counterfeit
notes the watermark is made by using opaque ink, painting with white solution, stamping
with a dye engraved with the picture of Mahatma Gandhi. Then the gangs apply oil, grease or
wax to give the picture a translucent feel. In genuine notes the security thread is incorporated
into the paper at the time of manufacture.

But in fake notes, the security thread is imitated by drawing a line with a pencil or by printing
a line with grey ink or by using aluminium thread while pasting two thin sheets of paper.
Forgers find it difficult to reproduce the same shape of individual numbers again and again

58
with accuracy. The alignment of figures is also difficult to maintain. Spreading of ink,
smaller or bigger number, inadequate gaps, and different alignments in numbers should be
regarded with suspicion. In counterfeit notes, the printed lines will be broken and there may
also be ink smudges. Basic banknote counters provide a total count of the notes in the supply
hopper.

More advanced counters can identify different bill denominations to provide a total currency
value of mixed banknotes, including those that are upside down. Some banknote counters can
also detect counterfeit bills either magnetically and/or using backlights. Black light (UV)
based detectors exploit the fact that in many countries, real banknotes have fluorescent
symbols on them that only show under a black light. Also, the paper used for printing money
does not contain any of the brightening agents which make commercially available papers
fluoresce under black light. Both features make counterfeit notes both easier to detect and
more difficult to successfully produce.

A stack of bills are placed in a compartment of the machine, and then one bill at a time is
mechanically pulled through the machine. By counting the number of times a beam of light is
interrupted, the machine can count the bills. By comparing an image of each bill to pattern
recognition criteria, the machine can figure out how much genuine money was placed in the
compartment.

59
6. CONCLUSION

Fake currency poses a grave threat to national security and could also result in economic
destabilization. According to intelligence agencies, anti-national elements and crime
syndicates open several accounts and use the ATMs to deposit the fake currencies. If they see
that the amount has been credited to their account, they continue to deposit fake money. If
the amount is not credited they know that their game is up and no longer operate that account.
In the past, it was easy to detect fake currencies as they were printed by people with limited
expertise, using crude facilities. But with the forgers attaining a high level of sophistication, it
is increasingly difficult to detect fake notes.
The situation is scary, particularly after the recent detection of Rs 400 million from the State
Bank of India chest at one of its branches in the northern Uttar Pradesh state. Not only the
counterfeit notes were of high quality, but they also had the same serial numbers as the
genuine notes kept at the bank. It is estimated that around 1,69,000 crores of fake rupees are
in circulation all over India. Both Banks and Government are in a denial mode, because
probably they do not know what to do.

India has become the victim of another kind of terrorism from its neighbour, Pakistan. It is
economic terrorism in printing and circulating counterfeit Indian notes. The Pakistani
intelligence agency, ISI‘s role in printing and circulation of fake Indian currency notes has
never been a secret.On its insistence, Pakistan Government has imported additional currency-
standard printing paper from companies located in London to pursue its nefarious designs in
India. Of late, Pakistan has been procuring currency-standard printing paper in huge
quantities from London-based companies much higher than normal requirement of the
country for printing its own currency. It is diverting it, to print fake Indian currency notes. It
is believed that Pakistan Government printing press in Quetta (Baluchistan) Karachi‘s
security press, and two other presses in Lahore and Peshawar, are being used to print out
counterfeit Indian currency.

The ISI has, been using Pakistan International Airlines (PIA) to transport counterfeit currency
to its conduits in Nepal, Bangladesh and Sri Lanka. The modus operandi of the ISI was
revealed by two Nepali counterfeit currency traffickers who were arrested by Thailand police
sometimes back. During interrogation, the accused disclosed that they were working for a

60
prominent Nepali businessman. The fact that Nepali territory is being used by Pakistanis to
smuggle counterfeit currency is well known. The first such expose was made when Pakistani
diplomats were caught distributing fake Indian currency notes. One Naushad Alam Khan,
arrested in Dhaka on April 24, 2008, with fake Indian currency notes worth Rs 50 lakh
admitted his direct link with HuJI (Bangladesh) chief Mufti Abdul Hannan. It was found that
both Khan and Hannan had fought for Taliban in Afghanistan.

Fake Indian currency notes racket is being carried out by using the network of underworld
kingpin Dawood Ibrahim, not only in India but also in Sri Lanka, Bangladesh and Nepal in
close association with different terror outfits, according to one intelligence report. With Sri
Lanka, Nepal and Bangladesh being active partners, with India in probing fake Indian
currency notes (FICN) related cases, it is safe to assume that so far as the fake currency in
India is concerned, its source is Pakistan.Delhi police claims, to have busted a major ISI
network, sometimes back, which was reportedly being used to pushing fake currency into our
country. Three arrested men, by name, Nayeem, Wasim and Mohammed Muslim, have
revealed that Thar Express, so called, friendship train, running between Munnabao in
Pakistan and Jodhpur in Rajasthan, was being used to smuggle fake currency into India .
Investigation, uncovered, that the fake currency was arranged in Dubai. Fake currency to the
extent of Rs 33 lakh was seized from them.

They have confirmed that the Indian currency is printed in Pakistan and illegally pushed in
India through Nepal, Bangladesh, Sri Lanka, Malaysia and Thailand. The menace of finely
printed currency has achieved new heights, that quite often; the customers do get fake
currencies through ATMs. The worst is that when they approach banks with the complain of
receiving a fake note, bank official impound the notes. As per the law of land, the bank
should lodge an FIR with police, which would investigate the source of the fake currency.
Banks obviously have not been to cope with the problem. According to one Government
committee estimate, counterfeit currency amounting to Rs 169,000 crore is floating around in
the Indian financial system. This has been denied by the Reserve Bank of India. From real
estate transactions to ordinary grocery shopping, paying to sources and terrorist‘s expenses,
these bogus notes are being used. Even if this figure is taken 20 to 25 per cent, as correct, it is
still a huge amount, and sufficient to damage India‘s economy. ―In 2008, the CBI registered
13 cases having international/ inter-State ramifications relating to the recovery/ seizure of
fake Indian currency notes,‖

61
According to the National Crime Record Bureau (NCRB), between January and August 2008,
1,170 cases had been registered across the country in connection with fake currency. Bogus
notes with a face value of Rs 3.63 crore had been seized. NCRB data shows 2,204 such cases
were reported in 2007.Investigations into the Mumbai 26/11 attacks have revealed that a large
part of the money to fund the terror operation were obtained through fake currency rackets
and hawala channels.It is also believed that Pakistan‘s Inter Services Intelligence raises Rs
1,800 crore (Rs 18 billion) annually to fund terror operations and that a major chunk of this
amount comes in through fake currency rackets.

Intelligence sources believe that Rs 30 lakh of the Rs 50 lakh spent, on the attack on the
Indian Institute of Science, Bengaluru, in December 2005 was obtained through the fake
currency racket. This is big menace, which should be tackled with no holds barred, even if it
means walking with the devil till we have decimated this problem. It is rightly said, that the
poor of the world, cannot be made richer by redistribution of wealth. But, there are some,
who seek a short cut, to riches through crime and use of counterfeit currency. Criminals
believe, that whatever is worth doing is worth doing for the money. Nevertheless, the truth is
that the wealth is the product of industry, ambition, character and untiring effort. The Special
Task Force, (STF) of Uttar Pradesh, last year claimed to have busted a major international
racket involved, in supply of fake currency notes.

It seized counterfeit Indian currency worth a face value of Rs 16 lakh. The gang leader,
arrested in Lucknow with three of his aides, has confessed to have pumped into circulation
over Rs 2 crore in counterfeit currency in India in about two months. The gang members
arrested have been identified as Suhail Singh alias Ram Shanker Singh of Sikahira locality
under Khodare police station of Gonda-the gang leader-along with Sharma Paswan, Vinod
Kumar Misra and Sanjay Kumar Patel, all natives of Champaran in Bihar.

The gang was using a set of six women couriers from Champaran in Bihar and another set of
four hailing from Nepal. The fake currency notes had a different serial number. It showed,
that they had not merely been printed from a scanned image of a genuine note by using
coloured scanners and printers. In case the miscreants scan a genuine note and print copies of
it, the serial number of such counterfeit currency notes remain the same. Putting a different
serial number on each note explains that the counterfeit currency was being printed at a very
large scale.During interrogation, the accused revealed that the counterfeit currency notes
travelled to Uttar Pradesh from Nepal from two different routes: From Nepal to UP via Bihar

62
and directly to UP particularly through Sidhartnagar and Maharajganj route. A Rs 1,000
denomination note was bought at the rate of Rs 500 to Rs 600 each while the Rs 500
denomination was bought for Rs 300 to Rs 400 each.

This whole ideology around economic terrorism? What is this guy serious or has India just
not had media attention for a while! And why would Pakistan want to effect the Indian
economy it does not make sense? The paper this stuff is printed on it worth too much to
allocate and even if they did print the notes it would take a shed load of an amount to
destabilise a economy. Take the example of England the amount of fake currency here is
ridiculous but it never has made news due to the amount it would take before and action
would be required. So take my advice and report something interesting such as India being
used by America and the uk to take control of all world matters and have total control of
individual states.

63
7. APPLICATIONS

 Bank & financial Institution


 Hospitals.
 Schools & colleges.
 Hotels & restaurants.
 Shopping malls.
 Indian railways.
 Airport authority.
 Other transport services.
 Retail outlets & showrooms
 Corporate
 Co-operatives

64
8. APPENDIX

In this section, we touch upon a few things which may prove to be beneficial to avid readers
and who wish to take this idea a step further.
Microcontroller Interfacing Techniques:
Micro-controllers are useful to the extent that they communicate with other devices, such as
sensors, motors, switches, keypads, displays, memory and even other micro-controllers.
Many interface methods have been developed over the years to solve the complex problem of
balancing circuit design criteria such as features, cost, size, weight, power consumption,
reliability, availability, manufacturability. Many microcontroller designs typically mix
multiple interfacing methods. In a very simplistic form, a micro-controller system can be
viewed as a system that reads from (monitors) inputs, performs processing and writes to
(controls) outputs.
Interfacing relay to microcontroller
A relay is an electrical switch that opens and closes under the control of another electrical
circuit. In the original form, the switch is operated by an electromagnet to open or close one
or many sets of contacts. Because a relay is able to control an output circuit of higher power
than the input circuit, it can be considered to be, in a broad sense, a form of an electrical
amplifier.
Relay Operation
When a current flows through the coil, the resulting magnetic field attracts an armature that is
mechanically linked to a moving contact. The movement either makes or breaks a connection
with a fixed contact. When the current to the coil is switched off, the armature is returned by
a force approximately half as strong as the magnetic force to its relaxed position. Usually this
is a spring, but gravity is also used commonly in industrial motor starters. Most relays are
manufactured to operate quickly. In a low voltage application, this is to reduce noise. In a
high voltage or high current application, this is to reduce arcing.

65

You might also like