Irrigation Project Report
Irrigation Project Report
large-scale bridges, in order to secure structural and operational safety and issue early
warnings on damage or deterioration prior to costly repair or even catastrophic collapse, has
able to provide information for evaluating structural integrity, durability and reliability
throughout the bridge life cycle and ensuring optimal maintenance planning and safe bridge
This paper explores recent technology developments in the field of structural health
monitoring and their application to large-scale bridge projects. The need for technological
fusion from different disciplines, and for a structural health evaluation paradigm that is really
able to help prioritize bridge rehabilitation, maintenance and emergency repair, is highlighted.
1
ABSTRACT
The aim of this project is to build a Monitoring based application for Bridge to make
ensure the condition of that bridge. The status of Bridge can be viewed on LCD screen which
is interfaced with the PIC controller. The appropriate parameters which should be monitored
are first determined and the respective sensors are connected to the Bridge setup and
All these parameters have fixed threshold levels which are monitored. And the
parameters are transmitted to a LCD for continues monitoring purpose. The gate will open
with the help of a DC motor which is connected with the PIC controller. And when the
conditions go abnormal then we sense those values by Displaying in LCD and buzzer sound.
2
CHAPTER 1
BLOCK DIAGRAM…
3
1.1. BLOCK DIAGRAM:
2 X 16 LCD Display
PIC Microcontroller PIC 16F877A
Power Supply
Alert Buzzer
Load Cell
Water Level &
SOIL MOISTURE
4
1.2 BLOCK DIAGRAM DESCRIPTION:
Advancements in sensor technology have brought the automated real-time bridge health
monitoring system. Many long span bridges in our country have adopted this real-time health
monitoring system. However, current system uses complicated and high cost wired network
amongst sensors in the bridge and high cost optical cable between the bridge and the
management center, which increases the overall cost of installation and maintenance cost of
health monitoring system.
It has a technology called MBM (Monitoring Based Maintenance) that enables the
bridge Maintenance engineers monitor the condition of the bridge in Real time. The sensors
installed on main cables, hangers, Decks, towers, etc. Detect the environment datas. The
sensory inputs are process to represent the condition of the bridge against seismic loads .
Sensor technologies have made the monitoring process more Accurate and fast.
BRIEF METHODOLOGY:
When it finds a safety risk or a potential hazard, the system will alarm automatically
and grade structural damage. Depending on the assessment result, the system will give an
appropriate maintenance and management measure. The results contribute to improvement of
the bridge health monitoring system.
5
CHAPTER 2
CIRCUIT DIAGRAM…
6
2.1. CIRCUIT DIAGRAM:
7
2.2. CIRCUIT DIAGRAM DESCRIPTION:
40-Pin Enhanced Pic controller has 8 channels of 10bit built in ADC, 35 instruction set,
lowest cost. Low-power, high-speed flash/EEPROM Technology, fully static design, wide
operating voltage range (2.0V to 5.5v), commercial and industrial temperature ranges, low-
power consumption. Special Microcontroller Self-reprogrammable under software control, In-
circuit serial programming™ (ICSP™) Via two pins, Single-supply 5V in-circuit serial
programming, Watchdog timer (WDT) with its own on-chip RC Oscillator for reliable
operation, Programmable code protection, Power saving sleep mode, Selectable oscillator
options, In-circuit debug (ICD) via two pins.
This system includes PIC controller as heart of project with the load cell module to
measure the weight of the vehicle, DC motor module to open and close the gate and also uses
moisture sensors to sense the bridge wall strength and interface LCD (Liquid Crystal Display)
for displaying output of all load cell data and sensor data.
The moisture sensor can measure the moisture value of the bridge components. The
moisture sensor can be connected to any part of the bridge unit. There is a load cell which can
measure the weight the bridge is carrying at the time. We have used a load cell module for this
purpose. The load cell is connected at the starting point of the Bridge. When the load cell value
is exceed above preset limit DC motor activates and closes the gate, if limit is within preset
limit the DC motor activates and open the door. The sensors are interfaced to the
microcontroller through a signal conditioning circuit. The signal conditioning circuit is used to
make the outputs of sensors compatible with microcontroller. An alarm and a LCD are
connected to the microcontroller. The alarm is triggered when the values of the sensors
exceeds the threshold value.
8
CHAPTER 3
HARDWARE DESCRIPTION…
9
HARDWARE DESCRIPTION
PIC MICROCONTROLLER
DC MOTOR
LOAD CELL
SOFTWARE
10
3.1 PIC MICROCONTROLLER:
The microcontroller that has been used for this project is from PIC series. PIC
microcontroller is the first RISC based microcontroller fabricated in CMOS (complementary
metal oxide semiconductor) that uses separate bus for instruction and data allowing
simultaneous access of program and data memory.
CORE FEATURES:
• All single cycle instructions except for program branches which are two cycle
memory
12
• Power-on Reset (POR)
• Watchdog Timer (WDT) with its own on-chip RC Oscillator for reliable operation
• Programmable code-protection
PERIPHERAL FEATURES:
• Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler
• Synchronous Serial Port (SSP) with SPI. (Master Mode) and I2C. (Master/Slave)
The complete architecture of PIC 16F877A is shown in the fig 2.1. Table 2.1 gives
details about the specifications of PIC 16F877A. Fig 2.2 shows the complete pin diagram of
the IC PIC 16F877A.
TABLE SPECIFICATIONS:
15
PIN OUT DESCRIPTION:
16
Tab 3.2(b) Pin out Description
Note :
17
3. This buffer is a Schmitt Trigger input when configured as general purpose I/O and a TTL
input when used in the Parallel Slave Port mode (for interfacing to a microprocessor bus).
4. This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a
CMOS input otherwise.
I/O PORTS:
Some pins for these I/O ports are multiplexed with an alternate function for the
peripheral features on the device. In general, when a peripheral is enabled, that pin may not be
used as a general purpose I/O pin.
PORTA is a 6-bit wide bi-directional port. The corresponding data direction register is
PORTB AND TRISB REGISTER:
TRISA. Setting a TRISA bit (=1) will make the corresponding PORTA pin an input, i.e., put
PORTB is anoutput
the corresponding 8-bit driver
wide bi-directional port. The
in a Hi-impedance corresponding
mode. Clearing adata direction
TRISA register
bit (=0) will
is TRISB.
make Setting a TRISB
the corresponding bit (=1)
PORTA pinwill make the
an output, i.e.,corresponding PORTB
put the contents of thepin an input,
output latchi.e.,
on
put the corresponding
the selected pin. output driver in a hi-impedance mode. Clearing a TRISB bit (=0) will
make the corresponding PORTB pin an output, i.e., put the contents of the output latch on the
selected pin. Three pins of PORTB are multiplexed with the Low Voltage Programming
function; RB3/PGM, RB6/PGC and RB7/PGD. The alternate functions of these pins are
described in the Special Features Section. Each of the PORTB pins has a weak internal pull-
up. A single control bit can turn on all the pull-ups.
18
This is performed by clearing bit RBPU (OPTION_REG<7>). The weak pull-up is
automatically turned off when the port pin is configured as an output. The pull-ups are
disabled on a Power-on Reset.
PORTC is an 8-bit wide bi-directional port. The corresponding data direction register
is TRISC. Setting a TRISC bit (=1) will make the corresponding PORTC pin an input, i.e.,
put the corresponding output driver in a hi-impedance mode. Clearing a TRISC bit (=0) will
make the corresponding PORTC pin an output, i.e., put the contents of the output latch on the
selected pin. PORTC is multiplexed with several peripheral functions. PORTC pins have
Schmitt Trigger input buffers.
This section is not applicable to the 28-pin devices. PORTD is an 8-bit port with
Schmitt Trigger input buffers. Each pin is individually configurable as an input or output.
PORTD can be configured as an 8-bit wide microprocessor Port (parallel slave port) by setting
control bit PSPMODE (TRISE<4>). In this mode, the input buffers are TTL.
PORTE has three pins RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7, which are
individually configurable as inputs or outputs. These pins have Schmitt Trigger input buffers.
The PORTE pins become control inputs for the microprocessor port when bit
PSPMODE (TRISE<4>) is set. In this mode, the user must make sure that the TRISE<2:0>
bits are set (pins are configured as digital inputs). Ensure ADCON1 is configured for digital
I/O. In this mode the input buffers are TTL.
PORTE pins are multiplexed with analog inputs. When selected as an analog input, these
pins will read as '0's. TRISE controls the direction of the RE pins, even when they are being
19
analog inputs. The user must make sure to keep the pins configured as inputs when using them
as analog inputs.
MEMORY ORGANISATION:
There are three memory blocks in each of the PIC16F877A MUC’s. The program
memory and Data Memory have separate buses so that concurrent access can occur.
The PIC16f877A devices have a 13-bit program counter capable of addressing 8K *14
words of FLASH program memory. Accessing a location above the physically implemented
address will cause a wraparound. The RESET vector is at 0000h and the interrupt vector is at
0004h.
The data memory is partitioned into multiple banks which contain the General Purpose
Registers and the special functions Registers. Bits RP1 (STATUS<6) and RP0 (STATUS<5>)
are the bank selected bits.
RP1:RP0 Banks
00 0
01 1
10 2
11 3
20
Each bank extends up to 7Fh (1238 bytes). The lower locations of each bank are
reserved for the Special Function Registers. Above the Special Function Registers are General
Purpose Registers, implemented as static RAM. All implemented banks contain special
function registers. Some frequently used special function registers from one bank may be
mirrored in another bank for code reduction and quicker access.
EEPROM:
The data EEPROM and flash program memory are readable and writable during normal
operation over the entire VDD range. A bulk erase operation may not be issued from user
code (which includes removing code protection. The data memory is not directly mapped in
the register file space. Instead it is indirectly addressed through the special function registers
(SFR).
There are six SFRS used to read and write the program and data EEPROM memory.
21
These registers are:
EECON1
EECON2
EEDATA
EEDATH
EEADR
EEADRH
EEDATA holds the 8-bit data for read/write and EEADRR holds the address of the
EEPROM location being accessed. The 8-bit EEADR register can access up to 256 locations
of data EEPROM. The EEADR register can be thought of as the indirect addressing register of
the data EEPROM. EEcon1 contains the control bits, while eecon2 is the register used to
initiate the read/write. The EEPROM data memory allows bytes read and write. A byte write
automatically erases the location and writes the new data. The write time is controlled by
timer in-built.
TIMERS:
Timer 0
8- bit timer/counter
Readable writable
22
Interrupt on overflow
Timer 1
It is 16-bit register
Interrupt on overflow
The timer-1 module is a 16-bit timer/counter consisting two 8-bit register (TMR1H) and
TMR1L), which are readable and writable. The TMR1 register pair (TMR1H:TMR1L)
Increments from 0000h to FFFFH and rolls over to 0000h. The tmr1 interrupt, if enabled, is
generated on overflow, which is latched in interrupt flag bit tmr1IF. This interrupt can be
enabled/disabled by setting/clearing tmr1 interrupt enable bit tmr1IE.
Timer-2
Timer2 is an 8-bit timer with a prescaler and a postscaler. IT can be used as the PWM
Time-base for the PWM mode of the CCP module(s). The TMR2 register is readable and
writable, and is cleared on any device reset.
The input clock (Fosc/4) has a prescale option of 1:1, 1:4 OR 1:16, selected by control
bits.
The timer2 module has an 8-bit period register PR2. Timer2 increments from 00h until
it match PR2 and then resets to 00h on the next increment cycle. PR2 is a readable and
writable register. The PR2 register is initialized to FFh upon reset.
23
The match output of TMR2 goes through a 4-bit postscaler (which gives a 1:1 to 1:16
scaling inclusive) to generate a tmr2 interrupt
Timer 2 can be shut off by clearing control bit tmr2on to minimize power consumption.
The prescaler and postscaler counters are cleared when any of the following occurs:
There are two types of analog to digital converter is present in this IC. We use 10-bit
ADC. The ADC module can have up to eight analog inputs for a device. The analog input
charges a sample and hold capacitor. The output of sample and hold capacitor is the input into
the converter. The converter then generates a digital result of this analog level via successive
approximation. The A/D conversion of the analog input signal results in a
Corresponding10-bit digital number. The A/D module has high and low voltage
reference input that is software selectable to some combination of VDD, VSS, and RA2 Or
RA3.
Though some modules may generate multiple interrupts such as (USART) They have
14 sources. There is a minimum of one register used in the control and status of the interrupts.
INTCON:
Additionally if the device has peripheral interrupts, then it will have registers to enable
the peripheral interrupts and registers to hold the interrupt flag bits
PIE1
PIE2
PIR1
PIR2
25
ADDRESSING MODES:
DIRECT ADDRESSING:
In direct addressing, the operand specified by an 8-bit address field in the instruction.
Only internal data RAM and SFR’s can be directly addressed.
INDIRECT ADDRESSING:
In Indirect addressing, the instruction specifies a register that contains the address of the
operand. Both internal and external RAM can indirectly address.
The address register for 8-bit addresses can be either the Stack Pointer or R0 or R1 of
the selected register Bank. The address register for 16-bit addresses can be only the 16-bit data
pointer register, DPTR.
INDEXED ADDRESSING:
Program memory can only be accessed via indexed addressing this addressing mode is
intended for reading look-up tables in program memory. A 16 bit base register (Either DPTR
or the Program Counter) points to the base of the table, and the accumulator is set up with the
table entry number. Adding the Accumulator data to the base pointer forms the address of the
table entry in program memory.
Another type of indexed addressing is used in the“ case jump ” instructions. In this case
the destination address of a jump instruction is computed as the sum of the base pointer and
the Accumulator data.
REGISTER INSTRUCTION:
The register banks, which contains registers R0 through R7, can be accessed by
instructions whose opcodes carry a 3-bit register specification. Instructions that access the
registers this way make efficient use of code, since this mode eliminates an address byte.
26
When the instruction is executed, one of four banks is selected at execution time by the row
bank select bits in PSW.
Some Instructions are specific to a certain register. For example some instruction
always operates on the Accumulator, so no address byte is needed to point OT ir. In these
cases, the opcode itself points to the correct register. Instruction that register to Accumulator
as A assemble as Accumulator - specific Opcodes.
IMMEDIATE CONSTANTS:
The value of a constant can follow the opcode in program memory For example. MOV
A, #100 loads the Accumulator with the decimal number 100. The same number could be
specified in hex digit as 64h.
XTAL1 and XTAL2 are the input and output respectively of an inverting amplifier
which is intended for use as a crystal oscillator in the pioerce configuration, in the frequency
range of 1.2 Mhz to 12 Mhz. XTAL2 also the input to the internal clock generator.
To drive the chip with an internal oscillator, one would ground XTAL1 and XTAL2.
Since the input to the clock generator is divide by two filip flop there are no requirements on
the duty cycle of the external oscillator signal. However, minimum high and low times must be
observed.
The clock generator divides the oscillator frequency by 2 and provides a tow phase
clock signal to the chip. The phase 1 signal is active during the first half to each clock period
and the phase 2 signals are active during the second half of each clock period.
27
CPU TIMING:
A machine cycle consists of 6 states. Each stare is divided into a phase / half,
during which the phase 1 clock is active and phase 2 half. Arithmetic and Logical
operations take place during phase1 and internal register - to register transfer take place
during phase 2
The manner in which the use of micro controllers is shaping our lives is breathtaking.
Today, this versatile device can be found in a variety of control applications. CVTs, VCRs,
CD players, microwave ovens, and automotive engine systems are some of these.
A micro controller unit (MCU) uses the microprocessor as its central processing unit
(CPU) and incorporates memory, timing reference, I/O peripherals, etc on the same chip.
Limited computational capabilities and enhanced I/O are special features.
The micro controller is the most essential IC for continuous process- based applications
in industries like chemical, refinery, pharmaceutical automobile, steel, and electrical,
employing programmable logic systems (DCS). PLC and DCS thrive on the programmability
of an MCU.
There are many MCU manufacturers. To understand and apply general concepts, it is
necessary to study one type in detail. This specific knowledge can be used to understand
similar features of other MCUs.
Micro controller devices have many similarities. When you look at the differences, they
are not so great either. Most common and popular MCUs are considered to be mature and
well-established products, which have their individual adherents and devotees. There are a
number of variants within each family to satisfy most memory, I/O, data conversion, and
timing needs of enduser applications.
28
The MCU is designed to operate on application-oriented sensor data-for example,
temperature and pressure of a blast furnace in an industrial process that is fed through its
serial or operated on under the control of software and stored in ROM. Appropriate signals
are fed via output ports to control external devices and systems.
APPLICATIONS OF MICROCONTROLLER:
Microcontrollers are designed for use in sophisticated real time applications such as
1. Industrial Control
2. Instrumentation and
Motor
Robotics
In medical instrumentation
Oscilloscopes
Telecommunication
Automobiles
Driving an LCD
Period Measurements
29
3.4 DC MOTOR:
A DC motor is an AC synchronous electric motor that from a modeling perspective
looks very similar to a DC motor. Sometimes the difference is explained as an electronically-
controlled commutation system, instead of a mechanical commutation system, although this is
misleading, as physically the two motors are completely different. (The rest of this article
assumes the reader is familiar with the principles of electrical motors.)
This circuit is designed to control the speed of the 12v motor. Here the Variable resistor
is used to give the different voltage signal to amplifier circuit. The amplifier circuit is
constructed by the LM 741 operational amplifier. The variable voltage is given to non
inverting input terminal. Then the amplified signal is given to SL 100 power transistor. The
12v motor is connected in the transistor side. Depending on the amplified signal current
through the transistor is controlled due to that the motor speed is controlled.
30
Fig 3.2 Dc Motor Control Circuit
3.6 :
SOIL MOISTURE is the presence of water in air. The amount of water vapor in air can affect human com
SOIL MOISTURE measurement in industries is critical because it may affect the business cost of the pro
31
Fig 3.4 Soil Moisture Sensor
To mention moisture levels, variety of terminologies are used. The study of water
vapour concentration in air as a function of temperature and pressure falls under the area of
psychometrics. Psychometrics deals with the thermodynamic properties of moist gases while
the term “SOIL MOISTURE’ simply refers to the presence of water vapour in air or other
carrier gas.
32
SOIL MOISTURE measurement determines the amount of water vapor present in a gas
that can be a mixture, such as air, or a pure gas, such as nitrogen or argon. Various terms used
to indicate moisture levels are tabulated in the table below:
1MOISTURE
Absolute(RH),
SOIL Dew/Frost point (D/F
Ratio PT) and Parts
of mass(vapour) Per Million (PPM).grams/m
to volume. RH is3 a
function of temperature, and thus it is a relative measurement. Dew/Frost point is a function
MOISTURE
of the (Vapor
pressure of the gas but is independent of temperature and is therefore defined as
Concentration)
2absolute SOILRatio
Mixing MOISTURE
OR Mass measurement.
Ratio ofPPM is also antoabsolute
mass(vapour) mass(drymeasurement.
gas) grams/m3
Ratio
3 Relative SOIL MOISTURE Ratio of mass(vapour) to mass(saturated %
vapour) OR ratio of actual vapor pressure to
saturation vapor pressure.
4 Specific SOIL MOISTURE Ratio of mass(vapour) to total mass. %
5 Dew Point Temperature(above 0°C) at which the °C
water vapor in a gas condenses to liquid
water)
6 Frost Point Temperature(below 0°C) at which the
water vapor in a gas condenses to ice
7 Volume Ratio Ratio of partial pressure(vapour) to partial % by
pressure (dry gas) volume
8 PPM by Volume Ratio of volume(vapour) X 106 to
volume(dry gas) PPMV
9 PPM by Weight PPMV X PPMW
Tab 3.5 Relevant Moisture Terms
33
Dew points and frost points are often used when the dryness of the gas is important.
Dew point is also used as an indicator of water vapor in high temperature processes, such as
industrial drying.
Mixing ratios, volume percent, and specific SOIL MOISTURE are usually used when
water vapor is either an impurity or a defined component of a process gas mixture used in
manufacturing.
Correlation among RH, Dew/Frost point and PPMv is shown below
A load cell is a transducer which converts force into a measurable electrical output.
Although there are many varieties of load cells, strain gage based load cells are the most
commonly used type.
A load cell is a transducer that is used to convert a force into electrical signal.
34
configuration. Load cells of one strain gauge (quarter bridge) or two strain gauges (half
bridge) are also available.[1] The electrical signal output is typically in the order of a few
millivolts and requires amplification by an instrumentation amplifier before it can be used.
The output of the transducer can be scaled to calculate the force applied to the transducer.
Hydraulic Load Cell: the piston is placed in a thin elastic diaphragm. The piston
doesn't actually come in contact with the load cell. Mechanical stops are placed to prevent over
strain of the diaphragm when the loads exceed certain limit. The load cell is completely filled
with oil. When the load is applied on the piston, the movement of the piston and the diaphragm
arrangement result in an increase of oil pressure which in turn produces a change in the
pressure on a bourdon tube connected with the load cells
Pneumatic load cell : the load cell is designed to automatically regulate the balancing
pressure. Air pressure is applied to one end of the diaphragm and it escapes through the nozzle
placed at the bottom of the load cell. A pressure gauge is attached with the load cell to measure
the pressure inside the cell. The deflection of the diaphragm affects the airflow through the
nozzle as well as the pressure inside the chamber.
Although strain gauge load cells are the most common, there are other types of load
cells as well. In industrial applications, hydraulic (or hydrostatic) is probably the second most
common, and these are utilized to eliminate some problems with strain gauge load cell
devices. As an example, a hydraulic load cell is immune to transient voltages (lightning) so
might be a more effective device in outdoor environments.
35
Other types include piezoelectric load cells (useful for dynamic measurements of
force), and vibrating wire load cells, which are useful in geo mechanical applications due to
low amounts of drift, and capacitive load cells where the capacitance of a capacitor changes as
the load preses the two plates of a capacitor closer together.
Every crystal
Liquid load cell is subject
displays to have
(LCD’s) "ringing" whenwhich
materials, subjected to abrupt
combine load changes.
the properties of both
This stems
liquids from theRather
and crystals. spring-like behavior
than having of loadpoint,
a melting cells. they
In order
havetoa temperature
measure the range
loads,within
they
have to
which thedeform. As are
molecules such,almost
a loadas cell of finite
mobile stiffness
as they would must
be inhave spring-like
a liquid, but arebehavior,
grouped
exhibiting
together vibrations
in an ordered at its similar
form natural to
frequency.
a crystal.An oscillating data pattern can be the result of
ringing. Ringing can be suppressed in a limited fashion by passive means. Alternatively, a
controlAnsystem
LCD consists
can use of
antwo glass to
actuator panels, withdamp
actively the liquid crystal
out the material
ringing of a sand
load witched
cell. Thisin
between them. better
method offers The inner surface of
performance at athe glass
cost plates are increase
of significant coated with transparent Load
in complexity. electrodes
cells
which define
are used the character,
in several types ofsymbols or patterns
measuring to besuch
instruments displayed polymeric
as universal layers
testing are present in
machines.
between the electrodes and the liquid crystal, which makes the liquid crystal molecules to
3.8 LIQUID CRYSTAL DISPLAY (LCD):
maintain a defined orientation angle.
One each polarizes are pasted outside the two glass panels. These polarizes would
rotate the light rays passing through them to a definite angle, in a particular direction. When
the LCD is in the off state, light rays are rotated by the two polarizes and the liquid crystal,
36
such that the light rays come out of the LCD without any orientation, and hence the LCD
appears transparent.
When sufficient voltage is applied to the electrodes, the liquid crystal molecules would
be aligned in a specific direction. The light rays passing through the LCD would be rotated by
the polarizes, which would result in activating / highlighting the desired characters. The LCD’s
are lightweight with only a few millimeters thickness. Since the LCD’s consume less power,
they are compatible with low power electronic circuits, and can be powered for long durations
The LCD does not generate light and so light is needed to read the display. By using
backlighting, reading is possible in the dark. The LCD’s have long life and a wide operating
temperature range. Changing the display size or the layout size is relatively simple which
makes the LCD’s more customers friendly.
The LCDs used exclusively in watches, calculators and measuring instruments are the
simple seven-segment displays, having a limited amount of numeric data. The recent advances
in technology have resulted in better legibility, more information displaying capability and a
wider temperature range. These have resulted in the LCDs being extensively used in
telecommunications and entertainment electronics. The LCDs have even started replacing the
cathode ray tubes (CRTs) used for the display of text and graphics, and also in small TV
applications.
37
9,920-bit character generator ROM for a total of 240 character fonts. 208 character fonts
(5 x 8 dots) 32 character fonts (5 x 10 dots)
64 x 8 bit character generator RAM 8 character generator RAM 8 character fonts (5 x 8
dots) 4 characters fonts (5 x 10 dots)
Programmable duty cycles
1/8 – for one line of 5 x 8 dots with cursor
1/11 – for one line of 5 x 10 dots with cursor
1/16 – for one line of 5 x 8 dots with cursor
Wide range of instruction functions display clear, cursor home, display on/off, cursor
on/off, display character blink, cursor shift, display shift.
Automatic reset circuit, which initializes the controller / driver ICs after power on.
38
Fig 3.6 Alarm circuit
Often these units were anchored to a wall or ceiling and used the ceiling or wall as a
sounding board. Another implementation with some AC-connected devices was to implement
a circuit to make the AC current into a noise loud enough to drive a loudspeaker and hook this
circuit up to a cheap 8-ohm speaker. Nowadays, it is more popular to use a ceramic-based
piezoelectric sounder like a Sonalert which makes a high-pitched tone. Usually these were
hooked up to "driver" circuits which varied the pitch of the sound or pulsed the sound on and
off.
CIRCUIT DESCRIPTION:
The circuit is designed to control the buzzer. The buzzer ON and OFF is controlled by
the pair of switching transistors (BC 547). The buzzer is connected in the Q2 transistor
collector terminal.
39
When high pulse signal is given to base of the Q1 transistors, the transistor is conducting
and close the collector and emitter terminal so zero signals is given to base of the Q2
transistor. Hence Q2 transistor and buzzer is turned OFF state.
When low pulse is given to base of transistor Q1 transistor, the transistor is turned OFF.
Now 12v is given to base of Q2 transistor so the transistor is conducting and buzzer is
energized and produces the sound signal.
1 on off off
0 off on on
BLOCK DIAGRAM:
The ac voltage, typically 220V rms, is connected to a transformer, which steps that ac voltage down to th
40
A regulator circuit removes the ripples and also remains the same dc value even if the
input dc voltage varies, or the load connected to the output dc voltage changes. This voltage
regulation is usually obtained using one of the popular voltage regulator IC units.
Working principle
Transformer:
The transformer will step down the power supply voltage (0-230V) to (0-6V) level.
Then the secondary of the potential transformer will be connected to the precision rectifier,
which is constructed with the help of op–amp. The advantages of using precision rectifier are
it will give peak voltage output as DC; rest of the circuits will give only RMS output.
Bridge rectifier:
When four diodes are connected as shown in figure, the circuit is called as bridge
rectifier. The input to the circuit is applied to the diagonally opposite corners of the network,
and the output is taken from the remaining two corners.
Let us assume that the transformer is working properly and there is a positive potential,
at point A and a negative potential at point B. the positive potential at point A will forward
bias D3 and reverse bias D4.
The negative potential at point B will forward bias D1 and reverse D2. At this time D3
and D1 are forward biased and will allow current flow to pass through them; D4 and D2 are
reverse biased and will block current flow.
The path for current flow is from point B through D1, up through RL, through D3,
through the secondary of the transformer back to point B. this path is indicated by the solid
arrows. Waveforms can be observed across D1 and D3.
One-half cycle later the polarity across the secondary of the transformer reverse,
forward biasing D2 and D4 and reverse biasing D1 and D3. Current flow will now be from
point A through D4, up through RL, through D2, through the secondary of T1, and back to
41
point A. This path is indicated by the broken arrows. Waveforms (3) and (4) can be observed
across D2 and D4. The current flow through RL is always in the same direction. In flowing
through RL this current develops a voltage corresponding to that shown waveform . Since
current flows through the load (RL) during both half cycles of the applied voltage, this bridge
rectifier is a full-wave rectifier.
One advantage of a bridge rectifier over a conventional full-wave rectifier is that with a
given transformer the bridge rectifier produces a voltage output that is nearly twice that of the
conventional full-wave circuit.
This may be shown by assigning values to some of the components shown in views A
and B. assume that the same transformer is used in both circuits. The peak voltage developed
between points X and y is 1000 volts in both circuits. In the conventional full-wave circuit
shown—in view A, the peak voltage from the center tap to either X or Y is 500 volts. Since
only one diode can conduct at any instant, the maximum voltage that can be rectified at any
instant is 500 volts.
The maximum voltage that appears across the load resistor is nearly-but never
IC voltage regulators:
exceeds- 500 v0lts, as result of the small voltage drop across the diode. In the bridge rectifier
Voltage regulators comprise a class of widely used ICs. Regulator IC units contain the
shown in view B, the maximum voltage that can be rectified is the full secondary voltage,
circuitry for reference source, comparator amplifier, control device, and overload protection all
which is 1000 volts. Therefore, the peak output voltage across the load resistor is nearly 1000
in a single IC. IC units provide regulation of either a fixed positive voltage, a fixed negative
volts. With both circuits using the same transformer, the bridge rectifier circuit produces a
voltage, or an adjustably set voltage. The regulators can be selected for operation with load
higher output voltage than the conventional full-wave rectifier circuit.
42
currents from hundreds of milli amperes to tens of amperes, corresponding to power ratings
from milli watts to tens of watts.
The series 78 regulators provide fixed positive regulated voltages from 5 to 24 volts.
Similarly, the series 79 regulators provide fixed negative regulated voltages from 5 to 24 volts.
43
3.11 MPLAB:
Assemble, compile and link source code using various language tools. An assembler,
linker and librarian come with MPLAB IDE. C compilers are available from Microchip
and other third party vendors.
Debug the executable logic by watching program flow with a simulator, such as
MPLAB SIM, or in real time with an emulator, such as MPLAB ICE. Third party
emulators that work with MPLAB IDE are also available.
Program firmware into devices with programmers such as PICSTART Plus or PRO
MATE II.
Find quick answers to questions from the MPLAB IDE on-line Help.
MPLAB SIMULATOR:
MPLAB SIM is a discrete-event simulator for the PIC microcontroller (MCU) families.
It is integrated into MPLAB IDE integrated development environment. The MPLAB SIM
debugging tool is designed to model operation of Microchip Technology's PIC
microcontrollers to assist users in debugging software for these devices
44
IC PROGRAMMER:
The PRO MATE II is a Microchip microcontroller device programmer. Through
interchangeable programming socket modules, PRO MATE II enables you to quickly and
easily program the entire line of Microchip PIC micro microcontroller devices and many of the
Microchip memory parts.
PRO MATE II may be used with MPLAB IDE running under supported Windows OS's
(see Read me for PRO MATE II.txt for support list), with the command-line controller
PROCMD or as a stand-alone programmer.
A program written in the high level language called C; which will be converted into
PIC micro MCU machine code by a compiler. Machine code is suitable for use by a PIC micro
MCU or Microchip development system product like MPLAB IDE.
The PIC start plus development system from microchip technology provides the
product development engineer with a highly flexible low cost microcontroller design tool set
for all microchip PIC micro devices. The pic start plus development system includes PIC start
plus development programmer and MPLAB IDE.
The PIC start plus programmer gives the product developer ability to program user software
REASON TO USE MPLAB:
in to any of the supported microcontrollers. The PIC start plus software running under
MPLAB Theprovides
MPLABforXfull
is an IDE forcontrol
interactive Microchip
over PIC microcontrollers. It has a lot of added
the programmer.
features when compared to the older MPLAB IDE v8.xx. The MPLAB X is not a new version
45
of the current MPLAB IDE v8 framework but is instead based on Oracle‘s open-source Net
Beans platform.
Docked workstation
Ease of use
Auto completion
Dashboard Window
46
CHAPTER 4
PCB DESIGN…
47
PCB DESIGN
CONTROLLER DESIGN
48
POWER SUPPLY DESIGN
49
SOFTWARE TOOLS
Embedded C.
CCS C Complier.
HARDWARE REQUIRED
PIC Microcontroller
LCD Display.
50
CHAPTER 5
COMPONENTS LIST…
51
COMPONENTS LIST
52
CHAPTER – 6
54
CHAPTER – 7
PROGRAM CODING…
55
PROGRAM CODING
PROGRAM:
56
unsigned long int load=0;
void main()
{
long int x;
delay_ms(500);
output_bit(pin_b7,0); //Buzzer
output_bit(pin_b0,0);
output_bit(pin_b1,0);
setup_adc_ports(RA0_ANALOG);
setup_adc(ADC_CLOCK_INTERNAL);
while(1)
{
lcd_init();
delay_ms(200);
for(i=0;w1[i]!='#';i++)
{
comand(w1[i]);
delay_ms(250);
}
set_adc_channel(0);
delay_ms(20);
x = read_adc();
delay_ms(100);
printf("%ld \n ",x);
do
{
w=rx();// REC THROUGH SFT UART
57
putc(w);
}while(w!='*');
for(i=0;g1[i]!='#';i++)
{
comand(g1[i]);
delay_ms(100);
}
newline_lcd();
delay_ms(200);
for(i=0;h1[i]!='#';i++)
{
comand(h1[i]);
delay_ms(200);
}
output_bit(pin_b7,0);
output_bit(pin_b0,1);
output_bit(pin_b1,0);
delay_ms(1300);
output_bit(pin_b0,0);
output_bit(pin_b1,0);
delay_ms(1000);
output_bit(pin_b0,0);
output_bit(pin_b1,1);
delay_ms(1200);
output_bit(pin_b0,0);
output_bit(pin_b1,0);
delay_ms(2000);
58
}
else if(load>=2 && load<=10 && x<=650 )
{
for(i=0;a[i]!='#';i++)
{
comand(a[i]);
delay_ms(250);
}
newline_lcd(); for(i=0;a1[i]!
='#';i++)
{
comand(a1[i]);
delay_ms(100);
}
for(i=0;g[i]!='#';i++)
{
comand(g[i]);
delay_ms(100);
}
newline_lcd();
delay_ms(200);
for(i=0;h[i]!='#';i++)
{
comand(h[i]);
delay_ms(200);
}
}
59
else if(load>=11 && x<=650)
{
output_bit(pin_b7,1);
delay_ms(500);
output_bit(pin_b7,0);
clear_lcd();
delay_ms(200);
for(i=0;b[i]!='#';i++)
{
comand(b[i]);
delay_ms(100);
}
newline_lcd();
delay_ms(200);
for(i=0;b1[i]!='#';i++)
{
comand(b1[i]);
delay_ms(250);
}
t=o=p=0;
t=load/100;
comand(t+0x30);
load=load%100;
o=load/10;
comand(o+0x30);
p=load%10;
comand(p+0x30);
60
delay_ms(500);
clear_lcd();
delay_ms(200);
t=o=p=0;
t=load/100;
comand(t+0x30);
load=load%100;
o=load/10;
comand(o+0x30);
p=load%10;
comand(p+0x30);
delay_ms(500);
clear_lcd();
delay_ms(200);
for(i=0;g1[i]!='#';i++)
{
comand(g1[i]);
delay_ms(100);
}
newline_lcd();
delay_ms(200);
for(i=0;h1[i]!='#';i++)
{
comand(h1[i]);
delay_ms(200);
}
}
61
CHAPTER 8
COST ESTIMATION…
62
COST ESTIMATION
63
CHAPTER 9
CONCLUSION…
64
CONCLUSION
65
CHAPTER 10
BIBLIOGRAPHY…
66
BIBLIOGRAPHY:
A.S. Pabla. “Electric Power Distribution”, Tata McGraw Hill, 5th Edition 2005.
REFERRED WEBSITES:
http://data.conferenceworld.in/ICRIESHM/P104-116.pdf
http://troindia.in/journal/ijcesr/vol2iss5/75-80.pdf
67
CHAPTER 11
PHOTO COPY…
68
PHOTO COPY
69