Beruflich Dokumente
Kultur Dokumente
Abstract:
The project is intended to detect the location of fault in underground cable lines from the base
station to exact location in kilometers using an Arduino micro controller kit. In the urban areas,
the electrical cable runs in undergrounds instead of overhead lines. Whenever the fault occurs in
underground cable it is difficult to detect the exact location of the fault for process of repairing
that particular cable. The proposed system finds the exact location of the fault. This system uses
an Arduino micro controller kit and a rectified power supply. Here the current sensing circuits
made with a combination of resistors are interfaced to Arduino micro controller kit to help of the
internal ADC device for providing digital data to the microcontroller representing the cable
length in kilometers. The fault creation is made by the set of switches. The relays are controlled
by the relay driver. A 16x2 LCD display connected to the microcontroller to display the
information. In case of short circuit the voltage across series resistors changes accordingly,
which is then fed to an ADC to develop precise digital data to a programmed Arduino micro
controller kit that further displays exact fault location from base station in kilometers. The
project future can be implemented by using capacitor in an AC circuit to measure the impedance
which can even locate the open circuited cable.Whenever a fault occurs in a cable the buzzer
produce the alarm to alert and to take an immediate action by field workers
Block diagram:
HC-05
What is Arduino?
Arduino can sense the environment by receiving input from a variety of sensors and can affect
its surroundings by controlling lights, motors, and other actuators. The microcontroller on the
board is programmed using the Arduino programming language (based on Wiring) and the
Arduino development environment (based on Processing). Arduino projects can be stand-alone
or they can communicate with software on running on a computer (e.g. Flash, Processing,
MaxMSP).
Arduino received an Honory Mention in the Digital Communities section of the 2006 Ars
Electronica Prix. Credits
Arduino Nano overview:
Arduino Nano is a surface mount breadboard embedded version with integrated USB. It is a
smallest, complete, and breadboard friendly. It has everything that Diecimila/Duemilanove has
(electrically) with more analog input pins and onboard +5V AREF jumper. Physically, it is
missing power jack. The Nano is automatically sense and switch to the higher potential source
of power, there is no need for the power select jumper.
Nano’s got the breadboard-ability of the Boarduino and the Mini+USB with smaller footprint
than either, so users have more breadboard space. It’s got a pin layout that works well with the
Mini or the Basic Stamp (TX, RX, ATN, GND on one top, power and ground on the other). This
new version 3.0 comes with ATMEGA328 which offer more programming and data memory
space. It is two layers. That make it easier to hack and more affordable.
You end up paying less with Nano than Mini and USB combined!
Specifications:
Features:
The Arduino Nano can be powered via the mini-B USB connection, 6-20V unregulated external
power supply (pin 30), or 5V regulated external power supply (pin 27). The power source is
automatically selected to the highest voltage source.
POWER SUPPLY:
Block diagram:
Circuitdiagram:
Description:
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
electromotive force (EMF) or "voltage" in the secondary winding. This effect is called mutual
induction.
(or)
Transformer is a device that converts the one form energy to another form of energy like a
transducer.
Figure: Transformer
Basic Principle :
A transformer makes use of Faraday's law and the ferromagnetic properties of an iron core to
efficiently raise or lower AC voltages. It of course cannot increase power so that if the voltage is
raised, the current is proportionally lowered and vice versa.
Transformer Working:
A transformer consists of two coils (often called 'windings') linked by an iron core, as shown in
figure below. There is no electrical connection between the coils, instead they are linked by a
magnetic field created in the core.
Figure: Basic Transformer
Transformers are used to convert electricity from one voltage to another with minimal loss of
power. They only work with AC (alternating current) because they require a changing magnetic
field to be created in their core. Transformers can increase voltage (step-up) as well as reduce
voltage (step-down).
Alternating current flowing in the primary (input) coil creates a continually changing magnetic
field in the iron core. This field also passes through the secondary (output) coil and the changing
strength of the magnetic field induces an alternating voltage in the secondary coil. If the
secondary coil is connected to a load the induced voltage will make an induced current flow.
The correct term for the induced voltage is 'induced electromotive force' which is usually
abbreviated to induced e.m.f.
The iron core is laminated to prevent 'eddy currents' flowing in the core. These are currents
produced by the alternating magnetic field inducing a small voltage in the core, just like that
induced in the secondary coil. Eddy currents waste power by needlessly heating up the core but
they are reduced to a negligible amount by laminating the iron because this increases the
electrical resistance of the core without affecting its magnetic properties.
Transformers have two great advantages over other methods of changing voltage:
1. They provide total electrical isolation between the input and output, so they can be safely
used to reduce the high voltage of the mains supply.
2. Almost no power is wasted in a transformer. They have a high efficiency (power out /
power in) of 95% or more.
Classification of Transformer:
Step-Up Transformer
Step-Down Transformer
Step-Down Transformer:
Step down transformers are designed to reduce electrical voltage. Their primary voltage is
greater than their secondary voltage. This kind of transformer "steps down" the voltage applied
to it. For instance, a step down transformer is needed to use a 110v product in a country with a
220v supply.
Step down transformers convert electrical voltage from one level or phase configuration usually
down to a lower level. They can include features for electrical isolation, power distribution, and
control and instrumentation applications. Step down transformers typically rely on the principle
of magnetic induction between coils to convert voltage and/or current levels.
Step down transformers are made from two or more coils of insulated wire wound around a core
made of iron. When voltage is applied to one coil (frequently called the primary or input) it
magnetizes the iron core, which induces a voltage in the other coil, (frequently called the
secondary or output). The turn’s ratio of the two sets of windings determines the amount of
voltage transformation.
An example of this would be: 100 turns on the primary and 50 turns on the secondary, a ratio of
2 to 1.
Step down transformers can be considered nothing more than a voltage ratio device.
With step down transformers the voltage ratio between primary and secondary will mirror the
"turn’s ratio" (except for single phase smaller than 1 kva which have compensated secondary). A
practical application of this 2 to 1 turn’s ratio would be a 480 to 240 voltage step down. Note
that if the input were 440 volts then the output would be 220 volts. The ratio between input and
output voltage will stay constant. Transformers should not be operated at voltages higher than
the nameplate rating, but may be operated at lower voltages than rated. Because of this it is
possible to do some non-standard applications using standard transformers.
Single phase step down transformers 1 kva and larger may also be reverse connected to step-
down or step-up voltages. (Note: single phase step up or step down transformers sized less than
1 KVA should not be reverse connected because the secondary windings have additional turns to
overcome a voltage drop when the load is applied. If reverse connected, the output voltage will
be less than desired.)
Step-Up Transformer:
A step up transformer has more turns of wire on the secondary coil, which makes a larger
induced voltage in the secondary coil. It is called a step up transformer because the voltage
output is larger than the voltage input.
Step-up transformer 110v 220v design is one whose secondary voltage is greater than its
primary voltage. This kind of transformer "steps up" the voltage applied to it. For instance, a
step up transformer is needed to use a 220v product in a country with a 110v supply.
A step up transformer 110v 220v converts alternating current (AC) from one voltage to another
voltage. It has no moving parts and works on a magnetic induction principle; it can be designed
to "step-up" or "step-down" voltage. So a step up transformer increases the voltage and a step
down transformer decreases the voltage.
The primary components for voltage transformation are the step up transformer core and coil.
The insulation is placed between the turns of wire to prevent shorting to one another or to
ground. This is typically comprised of Mylar, nomex, Kraft paper, varnish, or other materials.
As a transformer has no moving parts, it will typically have a life expectancy between 20 and 25
years.
Figure: Step-Up Transformer
Applications
The ratio of the number of turns on the primary and secondary coils determines the ratio of the
voltages...
...where Vp is the primary (input) voltage, Vs is the secondary (output) voltage, Np is the number
of turns on the primary coil, and Ns is the number of turns on the secondary coil.
Diodes:
Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol shows
the direction in which the current can flow. Diodes are the electrical version of a valve and
early diodes were actually called valves.
Rectifier
The half-wave rectifier is the simplest type of rectifier since it only uses one diode, as shown in
figure .
Figure 2 shows the AC input waveform to this circuit and the resulting output. As you can see,
when the AC input is positive, the diode is forward-biased and lets the current through. When
the AC input is negative, the diode is reverse-biased and the diode does not let any current
through, meaning the output is 0V. Because there is a 0.7V voltage loss across the diode, the
peak output voltage will be 0.7V less than Vs.
Figure: Half-Wave Rectification
While the output of the half-wave rectifier is DC (it is all positive), it would not be suitable as a
power supply for a circuit. Firstly, the output voltage continually varies between 0V and Vs-
0.7V, and secondly, for half the time there is no output at all.
The circuit in figure 3 addresses the second of these problems since at no time is the output
voltage 0V. This time four diodes are arranged so that both the positive and negative parts of
the AC waveform are converted to DC. The resulting waveform is shown in figure 4.
When the AC input is positive, diodes A and B are forward-biased, while diodes C and D are
reverse-biased. When the AC input is negative, the opposite is true - diodes C and D are
forward-biased, while diodes A and B are reverse-biased.
While the full-wave rectifier is an improvement on the half-wave rectifier, its output still isn't
suitable as a power supply for most circuits since the output voltage still varies between 0V and
Vs-1.4V. So, if you put 12V AC in, you will 10.6V DC out.
Capacitor Filter
The capacitor-input filter, also called "Pi" filter due to its shape that looks like the Greek letter
pi, is a type of electronic filter. Filter circuits are used to remove unwanted or undesired
frequencies from a signal.
1. The capacitor C1 offers low reactance to the AC component of the rectifier output while
it offers infinite reactance to the DC component. As a result the capacitor shunts an
appreciable amount of the AC component while the DC component continues its journey
to the inductor L
2. The inductor L offers high reactance to the AC component but it offers almost zero
reactance to the DC component. As a result the DC component flows through the
inductor while the AC component is blocked.
3. The capacitor C2 bypasses the AC component which the inductor had failed to block. As
a result only the DC component appears across the load RL.
Voltage Regulator:
78xx:’78’ indicate the positive series and ‘xx’indicates the voltage rating. Suppose 7805
produces the maximum 5V.’05’indicates the regulator output is 5V.
79xx:’78’ indicate the negative series and ‘xx’indicates the voltage rating. Suppose 7905
produces the maximum -5V.’05’indicates the regulator output is -5V.
Pin3: It is used for output pin. Through this pin we get the output.
Figure: Regulator
Relays
A relay is used to isolate one electrical circuit from another. It allows a low current
control circuit to make or break an electrically isolated high current circuit path.
The basic relay consists of a coil and a set of contacts. The most common relay
coil is a length of magnet wire wrapped around a metal core. When voltage is
applied to the coil, current passes through the wire and creates a magnetic field.
This magnetic field pulls the contacts together and holds them there until the
current flow in the coil has stopped. The diagram below shows the parts of a
simple relay.
Figure: 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 is switched
off, the armature is usually returned by a spring to its resting position shown in
figure 6.6(b). Latching relays exist that require operation of a second coil to reset
the contact position.
Since relays are switches the terminology applied to switches is also applied to
relays. A relay will switch one or more poles, each of whose contacts can be
thrown by energizing the coil in one of three ways:
Normally-open (NO) contacts connect the circuit when the relay is
activated; the circuit is disconnected when the relay is inactive. It is also
called a Form A contact or "make" contact.
Normally-closed (NC) contacts disconnect the circuit when the relay is
activated; the circuit is connected when the relay is inactive. It is also called
a Form B contact or "break" contact.
Change-over (CO), or double-throw (DT), contacts control two circuits: one
normally-open contact and one normally-closed contact with a common
terminal. It is also called a Form C contact or "transfer" contact ("break
before make"). If this type of contact utilizes a "make before break"
functionality, then it is called a Form D contact.
SPST
SPST relay stands for Single Pole Single Throw relay. Current will only flow
through the contacts when the relay coil is energized.
SPDT Relay
SPDT Relay stands for Single Pole Double Throw relay. Current will flow
between the movable contact and one fixed contact when the coil is De-energized
and between the movable contact and the alternate fixed contact when the relay
coil is energized. The most commonly used relay in car audio, the Bosch relay, is a
SPDT relay.
Figure: SPDT Relay
DPST Relay
DPST relay stands for Double Pole Single Throw relay. When the relay coil is
energized, two separate and electrically isolated sets of contacts are pulled down to
make contact with their stationary counterparts. There is no complete circuit path
when the relay is De-energized.
DPDT Relay
DPDT relay stands for Double Pole Double Throw relay. It operates like the SPDT
relay but has twice as many contacts. There are two completely isolated sets of
contacts.
Figure: DPDT Relay
This is a 4 Pole Double Throw relay. It operates like the SPDT relay but it has 4
sets of isolated contacts.
Types of relay:
1. Latching Relay
2. Reed Relay
3. Mercury Wetted Relay
4. Machine Tool Relay
5. Solid State Relay (SSR)
Latching relay
Latching relay, dust cover removed, showing pawl and ratchet mechanism. The
ratchet operates a cam, which raises and lowers the moving contact arm, seen
edge-on just below it. The moving and fixed contacts are visible at the left side of
the image.
A latching relay has two relaxed states (bi-stable). These are also called
"impulse", "keep", or "stay" relays. When the current is switched off, the relay
remains in its last state. This is achieved with a solenoid operating a ratchet and
cam mechanism, or by having two opposing coils with an over-center spring or
permanent magnet to hold the armature and contacts in position while the coil is
relaxed, or with a remanent core. In the ratchet and cam example, the first pulse to
the coil turns the relay on and the second pulse turns it off. In the two coil
example, a pulse to one coil turns the relay on and a pulse to the opposite coil
turns the relay off. This type of relay has the advantage that it consumes power
only for an instant, while it is being switched, and it retains its last setting across a
power outage. A remanent core latching relay requires a current pulse of opposite
polarity to make it change state.
Reed relay
A reed relay has a set of contacts inside a vacuum or inert gas filled glass tube,
which protects the contacts against atmospheric corrosion. The contacts are closed
by a magnetic field generated when current passes through a coil around the glass
tube. Reed relays are capable of faster switching speeds than larger types of relays,
but have low switch current and voltage ratings.
Mercury-wetted relay
A mercury-wetted reed relay is a form of reed relay in which the contacts are
wetted with mercury. Such relays are used to switch low-voltage signals (one volt
or less) because of their low contact resistance, or for high-speed counting and
timing applications where the mercury eliminates contact bounce. Mercury wetted
relays are position-sensitive and must be mounted vertically to work properly.
Because of the toxicity and expense of liquid mercury, these relays are rarely
specified for new equipment. See also mercury switch.
A solid state relay (SSR) is a solid state electronic component that provides a
similar function to an electromechanical relay but does not have any moving
components, increasing long-term reliability. With early SSR's, the tradeoff came
from the fact that every transistor has a small voltage drop across it. This voltage
drop limited the amount of current a given SSR could handle. As transistors
improved, higher current SSR's, able to handle 100 to 1,200 Amperes, have
become commercially available. Compared to electromagnetic relays, they may be
falsely triggered by transients.
Specification
Applications:
BLUETOOTH:
This module enables you to wireless transmit & receive serial data. It is a drop in
replacement for wired serial connections allowing transparent two way data communication.
You can simply use it for serial port replacement to establish connection between MCU or
embedded project and PC for data transfer. Bluetooth Core V2.0 compliant module with SPP.
The module is designed to be embedded in a host system which requires cable replacement
function. Typically the module could interface with a host through the UART port.
• Industrial devices
• Point-of-Sale systems
• PCs
• Computer Accessories
• Access Points
• Automotive Diagnostics Units
We supply module with 9600 baud rate in ready to use with PC. You will need a USB
Bluetooth Adapter at PC side or Bluetooth Enabled Laptop to connect to our Bluetooth module.
Module supplied by us with this setting: 9600 baud rate, Pair Code: 0000
The Bluetooth module works on 3.3V level only. High voltage like 5V will permanently
damage the module, so please take care in using it.
If you wish to connect this module to PC’s Serial port which is at RS232 level, then you
need to add MAX232 circuit as shown above. Status LED flashes at different rates to indicate
different status like searching, config, connected.
Keypad (matrix)
INTRODUCTION
A keypad is a set of buttons arranged in a block or "pad" which usually bear digits and other
symbols and usually a complete set of alphabetical letters. If it mostly contains numbers then it can also
be called a numeric keypad.
Keypads are found on many alphanumeric keyboards and on other devices such as calculators,
push-button telephones, combination locks, and digital door locks, which require mainly numeric input.
In keypad we have keys arrays in which keys can be arranged in different combinations and the matrix
keypad in which keys are arrange in a particular rows and columns.
Figure: matrix keypad on PCB board.
So keeping this outline we can construct a keypad using simple SPST Switches as shown below:
Now our keypad is ready, all we have to do is connect the rows and columns to a port of
microcontroller and program the controller to read the input.
In order to detect which key is pressed from the matrix, we make row lines low one by
one and read the columns. Let’s say we first make Row1 low, and then read the columns. If any
of the key in row1 is pressed will make the corresponding column as low i.e. if second key is
pressed in Row1, then column2 will give low. So we come to know that key 2 of Row1 is
pressed. This is how scanning is done.
So to scan the keypad completely, we need to make rows low one by one and read the
columns. If any of the button is pressed in a row, it will take the corresponding column to a low
state which tells us that a key is pressed in that row. If button 1 of a row is pressed then Column
1 will become low, if button 2 then column2 and so on...
SCHEMATIC
Matrix keypad of 4*4 (four rows and four columns) for that one columns ground
terminals are connected commonly and that is given to the one port pin. Input terminal of the
keys according to the one row all are connected commonly and that is given to the one port pins.
Like for 4*4 matrix keypad one port of micro controller totally used. Four pins for the
ground purpose and four pins for the input purpose.
APPLICATION
Key pad is used for the telephones, mobile phones
Key pads are used at the bank locker system.
There used the companies to enter the id numbers of the particular employee.
USES
The keypad of a calculator contains the digits 0 through 9, from bottom upwards, together with
the four arithmetic operations.
Keypads are also a feature of some combination locks. This type of lock is often used on doors,
such as that found at the main entrance to some offices.
Many laptop computers have special function keys which turn part of the alphabetical keyboard
into a numerical keypad as there is insufficient space to allow a separate keypad to be built into
the laptop's chassis. Separate external plug-in keypads can be purchased.
A liquid crystal display (LCD) is a thin, flat display device made up of any number
of color or monochrome pixels arrayed in front of a light source or reflector. Each
pixel consists of a column of liquid crystal molecules suspended between two
transparent electrodes, and two polarizing filters, the axes of polarity of which are
perpendicular to each other. Without the liquid crystals between them, light
passing through one would be blocked by the other. The liquid crystal twists the
polarization of light entering one filter to allow it to pass through the other.
A program must interact with the outside world using input and output devices
that communicate directly with a human being. One of the most common devices
attached to an controller is an LCD display. Some of the most common LCDs
connected to the contollers are 16X1, 16x2 and 20x2 displays. This means 16
characters per line by 1 line 16 characters per line by 2 lines and 20 characters per
line by 2 lines, respectively.
Shapes and S
inexpensive, easy to use, and it is even possible to produce a readout using the
5X7 dots plus cursor of the display. They have a standard ASCII set of characters
and mathematical symbols. For an 8-bit data bus, the display requires a +5V
supply plus 10 I/O lines (RS RW D7 D6 D5 D4 D3 D2 D1 D0). For a 4-bit data bus it
only requires the supply lines plus 6 extra lines(RS RW D7 D6 D5 D4). When the
LCD display is not enabled, data lines are tri-state and they do not interfere with
the operation of the microcontroller.
Features:
Description Of 16x2:
This is the first interfacing example for the Parallel Port. We will start with
something simple. This example doesn't use the Bi-directional feature found on
newer ports, thus it should work with most, if no all Parallel Ports. It however
doesn't show the use of the Status Port as an input. So what are we interfacing? A
16 Character x 2 Line LCD Module to the Parallel Port. These LCD Modules are
very common these days, and are quite simple to work with, as all the logic
required to run them is on board.
Schematic Diagram:
o Above is the quite simple schematic. The LCD
panel's Enable and Register Select is connected to the Control Port.
The Control Port is an open collector / open drain output. While most
Parallel Ports have internal pull-up resistors, there are a few which
don't. Therefore by incorporating the two 10K external pull up
resistors, the circuit is more portable for a wider range of computers,
some of which may have no internal pull up resistors.
o We make no effort to place the Data bus into reverse direction.
Therefore we hard wire the R/W line of the LCD panel, into write
mode. This will cause no bus conflicts on the data lines. As a result
we cannot read back the LCD's internal Busy Flag which tells us if the
LCD has accepted and finished processing the last instruction. This
problem is overcome by inserting known delays into our program.
o The 10k Potentiometer controls the contrast of the LCD panel.
Nothing fancy here. As with all the examples, I've left the power
supply out. You can use a bench power supply set to 5v or use a
onboard +5 regulator. Remember a few de-coupling capacitors,
especially if you have trouble with the circuit working properly.
2 VDD - Power, 5V
6 E H,H->L Enable
15 NC - NOT CONNECTED
16 NC - NOT CONNECTED
FEATURES:
Data can be placed at any location on the LCD. For 16×1 LCD, the address
locations are:
Even limited to character based modules, there is still a wide variety of shapes
and sizes available. Line lengths of 8,16,20,24,32 and 40 characters are all
standard, in one, two and four line versions.
PIN DESCRIPTION:
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins
(two pins are extra in both for back-light LED connections).
Fig 19: pin diagram of 1x16 lines LCD
CONTROL LINES:
EN: Line is called "Enable." This control line is used to tell the LCD that you are
sending it data. To send data to the LCD, your program should make sure this line
is low (0) and then set the other two control lines and/or put data on the data bus.
When the other lines are completely ready, bring EN high (1) and wait for the
minimum amount of time required by the LCD datasheet (this varies from LCD to
LCD), and end by bringing it low (0) again.
RS:
Line is the "Register Select" line. When RS is low (0), the data is to be
treated as a command or special instruction (such as clear screen, position cursor,
etc.). When RS is high (1), the data being sent is text data which sould be displayed
on the screen. For example, to display the letter "T" on the screen you would set
RS high.
RW:
Line is the "Read/Write" control line. When RW is low (0), the information
on the data bus is being written to the LCD. When RW is high (1), the program is
effectively querying (or reading) the LCD. Only one instruction ("Get LCD
status") is a read command. All others are write commands, so RW will almost
always be low.
• RS - 0 Instructions
- 1 Character
Writing data to the LCD:
First, a little tip: it is manually a lot easier to enter characters and commands in
hexadecimal rather than binary (although, of course, you will need to translate
commands from binary couple of sub-miniature hexadecimal rotary switches is a
simple matter, although a little bit into hex so that you know which bits you are
setting). Replacing the d.i.l. switch pack with a of re-wiring is necessary.
SWITCHES:
The switches must be the type where On = 0, so that when they are turned to the
zero position, all four outputs are shorted to the common pin, and in position “F”,
all four outputs are open circuit.
All the available characters that are built into the module are shown in Table 3.
Studying the table, you will see that codes associated with the characters are
quoted in binary and hexadecimal, most significant bits (“left-hand” four bits)
across the top, and least significant bits (“right-hand” four bits) down the left.
Most of the characters conform to the ASCII standard, although the Japanese and
Greek characters (and a few other things) are obvious exceptions. Since these
intelligent modules were designed in the “Land of the Rising Sun,” it seems only
fair that their Katakana phonetic symbols should also be incorporated. The more
extensive Kanji character set, which the Japanese share with the Chinese,
consisting of several thousand different characters, is not included!
Using the switches, of whatever type, and referring to Table 3, enter a few
characters onto the display, both letters and numbers. The RS switch (S10) must
be “up” (logic 1) when sending the characters, and switch E (S9) must be pressed
for each of them. Thus the operational order is: set RS high, enter character,
trigger E, leave RS high, enter another character, trigger E, and so on.
The first 16 codes in Table 3, 00000000 to 00001111, ($00 to $0F) refer to the
CGRAM. This is the Character Generator RAM (random access memory), which can
be used to hold user-defined graphics characters. This is where these modules
really start to show their potential,
Codes 00010000 to 00011111 ($10 to $1F) are not used and just display blank
characters. ASCII codes “proper” start at 00100000 ($20) and end with 01111111
($7F). Codes 10000000 to 10011111 ($80 to $9F) are not used, and 10100000 to
11011111 ($A0 to $DF) are the Japanese characters.
Fig 20: character details in LCD
Initialization by Instructions:
Fig 21: flow chart of lcd
If the power conditions for the normal operation of the internal reset circuit are
not satisfied, then executing a series of instructions must initialize LCD unit. The
procedure for this initialization process is as above show.
FLOWCHART:
Wait
Yes
Is LCD Free
No
Set RS Bit
Enable LCD
Send Data
Disable LCD
Is Data
Count Zero
No
STOP
1
Wait
Yes
Is LCD Free
No
Set RS Bit
Enable LCD
Send Data
Disable LCD
Is Data
Count Zero
No
STOP
Code:
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
LiquidCrystal_I2C lcd(0x27,16,2);
SoftwareSerial ser(2,3);
int buzzer=7;
//*********************************************************
return 6;
return 4;
return 2;
else return 0 ;
//*********************************************************
void setup() {
pinMode(buzzer,OUTPUT);
ser.begin(9600);
lcd.begin();
lcd.backlight();
digitalWrite(buzzer,LOW);
void loop()
digitalWrite(phase[0], HIGH);
delay(1000);
if (dist1 == 0) {
digitalWrite(buzzer,LOW);
lcd.setCursor(0, 0);
lcd.print("R: ");
lcd.setCursor(3, 0);
lcd.print("NF ");
else {
digitalWrite(buzzer,HIGH);
lcd.setCursor(0, 0);
lcd.print("R: ");
lcd.setCursor(3, 0);
lcd.print(dist1);
lcd.setCursor(4, 0);
lcd.print(" KM");
ser.print("R :");
ser.print(dist1);
ser.println("KM");
digitalWrite(phase[0], LOW);
//================================================
digitalWrite(phase[1], HIGH);
delay(500);
if (dist2 == 0) {
digitalWrite(buzzer,LOW);
lcd.setCursor(8, 0);
lcd.print("Y: ");
lcd.setCursor(11, 0);
lcd.print("NF ");
else {
digitalWrite(buzzer,HIGH);
lcd.setCursor(8, 0);
lcd.print("Y: ");
lcd.setCursor(11, 0);
lcd.print(dist2);
lcd.setCursor(12, 0);
lcd.print(" KM");
ser.print("Y :");
ser.print(dist2);
ser.println("KM");
digitalWrite(phase[1], LOW);
//==================================================
digitalWrite(phase[2], HIGH);
delay(500);
if (dist3 == 0) {
digitalWrite(buzzer,LOW);
lcd.setCursor(0, 1);
lcd.print("B: ");
lcd.setCursor(3, 1);
lcd.print("NF ");
else {
digitalWrite(buzzer,HIGH);
lcd.setCursor(0, 1);
lcd.print("B: ");
lcd.setCursor(3, 1);
lcd.print(dist3);
lcd.setCursor(4, 1);
lcd.print(" KM");
ser.print("B :");
ser.print(dist3);
ser.println("KM");
digitalWrite(phase[2], LOW);
ser.println();
CONCLUSION:
APPLICATIONS:
LIMITATIONS:
FUTURE SCOPE:
BIBLOGRAPHY:
www.national.com
www.atmel.com
www.microsoftsearch.com
www.geocities.com