Professional Documents
Culture Documents
IRRIGATION SYSTEM
A PROJECT REPORT
Submitted by
NAVEENA. U (1303103)
SUJA.D (1303136)
TAMILSELVI. S (1303139)
of
BACHELOR OF ENGINEERING
IN
SIGNATURE SIGNATURE
We would like to express our gratitude to the Almighty for providing us the
courage and wellness in completing the project successfully. We offer a special
thanks to our beloved parents and friends for their great support and
encouragement.
Finally, we thank all the teaching and non-teaching staffs of the Department
of Electrical and Electronics Engineering for their cooperation in completing the
project.
iv
ABSTRACT
water and to effectively manage the amount of watering of the plants. It also
aims at reducing human labor, effort and errors due to human negligence. Solar
Powered Smart Irrigation System mainly focuses on the effective usage of the
water source without human intervention. The main objective of this project is
done by soil moisture sensor which detects the moisture level and also provides
moisture level to various crops in a controlled manner. When the moisture level
of the soil is decreased below a certain level, the sensor sends the detected value
to the microcontroller. According to the value that is sensed by the sensor, the
maintain the moisture content in the soil. This overall system is controlled by
PIC microcontroller. The main theme of this project is to use solar energy which
is one of the renewable sources for irrigation purpose. This project also helps to
reduce the wastage of water by automatic control of the system. The system
operates in an efficient manner with the usage of fourth order converting device,
Zeta converter. It is the proposed solution for the present energy crisis for the
Indian farmers. This system conserves electricity by reducing the usage of grid
v
ஆய்வுச் சுருக்கம்
vi
TABLE OF CONTENTS
1 INTRODUCTION 1
2 EXISTING SYSTEM 5
3 PROPOSED SYSTEM 8
vii
3.1 BLOCK DIAGRAM OF THE PROPOSED SYSTEM 8
4 HARDWARE DESCRIPTION 14
viii
4.4 MOSFET DRIVER CIRCUIT 22
4.4.1 Working 22
4.4.2 Opto-Coupler 23
4.4.3 Gate Driver 24
4.4.4 Transistor 26
4.5 PIC16F877A MICROCONTROLLER 26
4.5.1 Introduction 26
4.5.2 Special Features 26
4.5.3 Peripheral Features 27
4.5.4 Analog to Digital Converter 28
4.5.5 Oscillator and Clock Circuit 28
4.5.6 Memory Organization 29
4.5.7 Key Features of PIC16F877A 31
4.5.8 Pin Diagram of PIC16F877A 32
4.5.9 I/O Ports 32
\ 4.5.9.1 Port A and TRISA Register 32
4.5.9.2 Port B and TRISB Register 34
4.5.9.3 Port C and TRISC Register 35
4.5.9.4 Port D and TRISD Register 36
4.5.9.5 Port E and TRISE Register 37
4.5.10 CCP Modules in PIC16F877A 39
4.5.11 Pulse Width Modulation Control 42
4.6 RELAY 43
4.6.1 Working 44
4.6.2 Drive circuit and Protection Diodes for Relay 45
4.6.3 Choosing a Relay 46
\
ix
4.7 SOIL MOISTURE SENSOR 47
5 SOFTWARE DESCRIPTION 48
6.1 SIMULATION 52
6.1.1 Need for Simulation 52
6.1.2 MATLAB SIM 52
6.2 SIMULINK 53
6.2.1 Features of Simulink 54
6.2.2 Starting Simulink 54
6.3 SIMULATION OF ZETA CONVERTER 55
6.4 SNAPSHOT OF THE HARDWARE 56
7.1 CONCLUSION 58
7.2 FUTURE SCOPE 58
APPENDICES
REFERENCES
x
LIST OF TABLES
TABLE PAGE
TITLE
NO NO
xi
LIST OF FIGURES
FIGURE TITLE PAGE
NO NO
2.1 Block Diagram of the Existing System 5
3.1 Block Diagram of the Proposed System 8
xii
LIST OF ABBREVIATIONS
AC Alternating Current
ADC Analog to Digital Converter
CCP Capture/Compare/Pulse width
CPU Central Processing Unit
DC Direct Current
DLL Dynamic Link Library
DPDT Double Pole Double Throw
DSC Dynamic Stability Control
GUI Graphical User Interface
IAR Initial Address Reject
IC Integrated Circuit
ICD In-Circuit Debugger
ICE In-Circuit Emulator
IDE Integrated Development Environment
LASER Light Amplification by Stimulated Emission of Radiation
LCD Liquid Crystal Display
LDR Light Dependent Resistor
MATLAB MATrix LABoratory
MOSFET Metal Oxide Semiconductor Field Effect Transistor
xiii
PV Photo Voltaic
PWM Pulse Width Modulation
RAM Random Access Memory
RISC Reduced Instruction Set Computer
SPDT Single Pole Double Throw
TRIS The Register I/O Setting
xiv
CHAPTER 1
INTRODUCTION
CHAPTER 1
INTRODUCTION
Soil moisture sensor base irrigation system ensures proper moisture level
in the soil for growing plants in all season. In this system, sensor is sensing the
moisture content of soil and accordingly switches the pump motor on or off.
Soil moisture sensor will find the soil condition whether the soil is wet or dry. If
soil is dry the pump motor will pump the water till the field is wet which is
continuously monitored by the microcontroller. The main advantage of soil
moisture sensor is to ensure accurate measurements and farmer doesn’t have to
visit his farm to operate the pump.
1
1.1 COMPANY PROFILE
S.E. Electricals uses a sprinkler irrigation system to irrigate the lawn area
of 12.83 acres (35.07%) which is operated by man power. The existing system
2
uses grid power to irrigate the field. This consumes more water and labor work.
We are assigned to design an irrigation system which operates by solar power
and without human intervention.
The main idea for the project has been taken from the paper aboutautomatic
drip irrigation unit using PIC controller by M. Lincy Luciana, B.Ramya and A.
Srimathi, in the year 2013 [2].
The organization of the report gives the overview of all the chapters
discussed in this report.
CHAPTER 1 is about the introduction of the project and gives the details about
the objective and necessity of the project.
CHAPTER 2 describes about the existing system used in the company for
watering the plants.
3
CHAPTER 3 specifies the overview of the proposed system, block diagram,
description and the operation of the proposed system.
CHAPTER 4 covers all the hardware used in the system with its pin
description.
CHAPTER 5 describes about the software used on this project.
CHAPTER 6 shows the simulation of zeta converter.
CHAPTER 7 mentions about the future scope of project along with conclusion.
CHAPTER 8 mentions about the reference paper.
4
CHAPTER 2
EXISTING SYSTEM
CHAPTER 2
EXISTING SYSTEM
The block diagram for the existing system is shown in the Fig.2.1.
The water from the underground is pumped to the storage tank with the
help of a motor pump setup. A 5 HP motor is coupled to the water pump to
pump the water to the storage tank. The setup is switched ON/OFF manually.
5
2.2.3 Storage Tank
The water stored in the storage tank is used for watering the plants in the
lawn. Water is taken to the irrigation field through a pipeline system.
The flow of water in the field is controlled by the valves erected in the
lawn area. The valves are used to control the water flow to the sprinkler nozzle.
The valves are opened and closed manually.
The water used for irrigation is stored in the storage tank from which the
water is taken for irrigation purpose with the help of water pump. The entire
setup is supplied by the grid power and is manually operated. Once the motor is
switched ON manually, the water pump sucks the water from the underground
to the storage tank. From the storage tank water is supplied to the field through
the pipeline system. Valves are connected for controlling the flow of water. The
entire lawn is divided into sections for irrigation purpose. The valve and
sprinkler nozzles are erected in each section. The valves are operated manually
6
to water the plants through the sprinkler. Once the field is irrigated, the valves
are closed manually. This system involves periodic inspection of water level by
human. This leads to over irrigation and under irrigation. Wastage of water in
this system is inevitable. The existing system involves the usage of more time,
water and man power.
7
CHAPTER 3
PROPOSED SYSTEM
CHAPTER 3
PROPOSED SYSTEM
8
3.2 BLOCK DIAGRAM DESCRIPTION
9
3.2.3 Zeta Converter
3.2.4 Battery
10
easily made by using PIC16F877A. This 40-pin chip has 33 input/output pins
including 8 analog-to-digital inputs.
The power supply to the control unit is given by the regulator circuit. The
regulator is designed to automatically maintain a constant voltage level. Voltage
regulators are available in two different output voltage levels which are 5V and
12V.In this regulator, IC 7805 is used to convert the 12v supply from battery to
5v supply to the microcontroller 16F877A. IC 7805 is a 5V Voltage Regulator
that restricts the voltage output to 5V. The maximum value for input to the
voltage regulator is 35V. It regulates a steady output of 5V, if the input voltage
is in range of 7.2V to 35V.The input voltage below 7.2V will cause heat loss in
the circuit. To avoid power loss, input is maintained to 7.2V and above.
3.2.7 DC Motor
3.2.8 Relay
11
between the microcontroller and the motor. Relay will act as a negative line to
the motor when it receives signal from the microcontroller.
When solar radiations fall on the solar panel, it converts the solar energy
into electrical energy. Here we are using 25 Watts solar panel. The maximum
power point tracking algorithm is included in the charge controllers to allow the
converter circuit to extract the maximum power available from a cell.
The variable output of 10 Volts from the solar panel is given to the zeta
12
converter which is used to convert the variable output into constant output. The
Zeta converter can act as a step up or step down converter. The gate pulse from
the driver circuit triggers the MOSFET switch in the zeta converter and initiates
its operation. As the gate pulse is received from the driver circuit, zeta converter
boosts up the voltage in the ratio of 1:3 from the solar panel and charges the
12Volts battery.
The moisture sensor in the field senses the moisture level of the soil
continuously and sends the signal to the microcontroller. The microcontroller
compares the moisture level with the preset threshold value. Initially relay is in
Normally Open (NO) condition. When the moisture level is below the threshold
value, the microcontroller sends the signal to the relay by which the current
flows through the coil. The resulting magnetic field attracts an armature that is
mechanically linked to a moving contact. Thus the relay will act as a negative
line to the motor when it receives signal from the microcontroller. As the motor
is switched on, the irrigation to the field starts automatically. When the moisture
level is above the threshold value, the microcontroller sends the signal to the
relay to bring the relay position from Normally Closed (NC) to Normally Open
(NO) condition to disconnect the supply to the motor. Thus the irrigation is
done automatically without water loss.
13
CHAPTER 4
HARDWARE DESCRIPTION
CHAPTER 4
HARDWARE DESCRIPTION
4.1PHOTOVOLTAIC SYSTEM
A Photo Voltaic (PV) system directly converts solar energy into electrical
energy. The basic device of a PV system is the PV cell. Cells may be grouped to
form arrays. The voltage and current available at the terminals of a PV device may
directly feed small loads such as lighting systems and DC motors or connect to a
grid by using proper energy conversion devices. This photovoltaic system consists
of main parts such as PV module, charger, battery, inverter and load or grid.
14
4.2 TRACKING SYSTEM
The solar tracking system is used to keep the solar panel oriented directly
towards the sun, the whole day. The dual axis solar tracking system included in
this system uses Arduino UNO board, Servomotor, Light Dependent Resistors
(LDR) and resistors to rotate the solar panel towards the Sun.
4.2.1 Arduino
4.2.2 Servomotor
15
4.2.3 Light Dependent Resistor
Any device that is sensitive to the intensity of light can be used as solar
tracking sensors. Two of those similar devices can be placed at an angle at two
sides of the solar panel.
When the sun is on the left, the sensor on the left receives more light than
the one on the right. The output voltage of the sensor is proportional to the light
intensity. If the left sensor produces, more voltage than the one on the right, we
can know that the sun is on the left. When the two sensors are outputting the
same value, we know that the sun must be at the top, perpendicular to the sensor
unit.
A major reason why AC electricity was accepted as the form of choice for
the modern electric power system is the magnetic transformer. The inability to
conveniently change the voltage levels was one of the major drawbacks in DC
system concept.
DC –DC converters are electronic devices which can be used to change the
DC electrical power efficiently from one voltage level to another. They are needed
because unlike AC, DC cannot simply be stepped up or down using a transformer.
In many ways DC-DC converter is the DC equivalent of a transformer. It is
necessary to change the DC energy from one voltage level to another, while
wasting as little as possible in the process. In other words, the conversion
performance will be of the highest possible efficiency. Therefore the basic power
in a converter is governed by the equation,
Where,
17
using the latest components and circuit techniques. Most others achieve at least
80-85%.
Considering the zeta converter, it has its own unique features such as
follows, in discontinuous current mode, driven by a standard PWM integrated
circuit, the zeta converter drawn a line current proportional to the input voltage
in a manner like the fly back converter, with no harmonic current neither phase
displacement.
The power generated from the PV panel is given as the input supply to the
zeta converter. The DC supply from the solar panel has some ripples which are
18
being eliminated by the low pass filter C1 in Zeta converter. The MOSFET
(IRF840) acts as a switch here, the gate signals for the MOSFET are given from
the driver circuit using Pulse Width Modulation method. In Zeta converter,
three modes of operation take place based on the MOSFET switch. Circuit
diagram of Zeta Converter is shown in the Fig.4.2.
MODE I: In this stage, MOSFET switch is turned on and the input source
supply energy to the input inductor (L1). This energy is then subsequently
transferred to output inductor (L2) through the intermediate capacitor C2. The
current in the output inductor (iL2) and input inductor (iL1) increase linearly. The
intermediate capacitor voltage (Vc2) and the output DC-link capacitor voltage
(V3) are considered constant in this stage. They are equal to the DC voltage
(Vdc).
MODE II: In the second stage, MOSFET switch is turned off and diode starts
conducting. The stored energy from output inductance (L2) and the input
inductance (L1) are transferred to the intermediate capacitor (C2) and the DC
link capacitor filter (C3), respectively. This stage continues until iL1 becomes
equal to the negative of iL2. In this stage of Zeta converter operation, the
MOSFET switch is in off stage and diode is in on stage.
19
MODE III: This freewheeling stage lasts until the start of a new switching
period. In this stage of operation neither output diode nor switch conducts. The
voltage applied across inductances L2 and L1 is zero and their currents are
constant until the new switching cycle starts. The currents iL2 and iL1 become
equal and opposite at toff time. Therefore, in this stage the current through the
output diode is zero.
Inductance Value
L = (Vin * D) / (2 * ∆ IL * fsw) (2.4)
Switching Frequency (fsw)= 5KHz
= (18 * 0.63) / (2 * 0.34 * 5*10^3)
L = 0.1 mH
Capacitance Value
C = I / (2 * f * V) (2.5)
= 1.7 / (2 * 50 * 18)
≈ 300µF
C = 1000µF
21
4.4 MOSFET DRIVER CIRCUIT
The driver circuit for MOSFET is used to drive the MOSFET. The PWM
output of the microcontroller is low (5V) and it is not sufficient to drive the power
MOSFET. Therefore, this driver circuit is used to amplify the PWM output of the
microcontroller. MOSFET Driver Circuit is shown in Fig.4.4.
4.4.1 Working
22
The amplified electrical signals from transistors are fed to the respective
switches in VSI and in Zeta converter circuit as the gate signals.
The driver circuit is used to amplify the pulses. It consists of three main
components they are:
Opto-coupler
Gate driver
Transistor
4.4.2Opto-Coupler
Operation
23
photodiode, a phototransistor, a silicon-controlled rectifier. Pin Diagram of
Opto-Coupler TPL250 is shown in Fig.4.5.
Purpose
24
discharged each time when the MOSFET is switched on or off. As a transistor
requires a gate voltage to switch on, the gate capacitor must be charged to at
least the required gate voltage for the transistor to be switched on. Similarly, to
switch the transistor off, this charge must be dissipated, i.e. the gate capacitor
must be discharged.
25
To prevent this from happening, a gate driver is provided between the
microcontroller output signal and the power transistor.
4.4.4 Transistor
4.5.1 Introduction
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.
26
Only 35 single word instructions to program
All instructions are single cycle, except program branches (two cycles)
Operating speed: DC – 20 MHz clock input
DC – 200 ns instruction cycle
Up to 8K x 14 words of Flash Program Memory,
Up to 368 x 8 bytes of Data Memory (RAM)
Up to 256 x 8 bytes of EEPROM data memory
Pin out compatible to thePIC16C73/74/76/77
Eight level deep hardware stack
Direct, indirect, and relative addressing modes
Watchdog Timer (WDT) with its own on-chip RC Oscillator for
reliable operation
In-Circuit Debugging via two pins
Wide operating voltage range: 2.5V to5.5V
High Sink/Source Current: 25mA
27
(USART/SCI) with 9- bit address detection.
Brown-out detection circuitry for Brown-out Reset
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. The A/D module
has a unique feature of being able to operate while the device is in sleep mode.
XTAL1 and XTAL2 are the input and output respectively of an inverting
28
amplifier which is intended for use as a crystal oscillator in the pierce 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 flip flop there
are no requirements on the duty cycle of the external oscillator signal. However,
minimum high and low times must be observed.
There are three memory blocks in each of the PIC16F877 MUC’s. The
program memory and Data Memory have separate buses so that concurrent access
can occur. The PIC16F877 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 a 0004H.
The data memory is partitioned into multiple banks which contain the
General Purpose Registers and the special functions Registers. 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. Program Memory Map and Stack of PIC16F877A is
shown in Fig.4.6.
29
Fig.4.6 PIC16F877A Program Memory Map and Stack
30
4.5.7 Key Features of PIC16F877A
31
4.5.8 Pin Diagram of PIC16F877A
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.
ADDRES NAM Bit Bit Bit Bit Bit Bit Bit 1 Bit 0 Value Value
S E 7 6 5 4 3 2 on: on all
POR, other
BOR resets
05h PORT - - RA5 RA4 RA3 RA2 RA1 RA0 --0x --0u
A 0000 0000
85h TRIS - - PORTA Data Direction Register --11 --11
A 1111 11111
9Fh ADC - - AD - PCF PCF PCF PCF --0- --0-
ON1 FM G3 G2 G1 G0 0000 0000
Legend: x = unknown, u = unchanged, - = unimplemented locations read as '0'.
Shaded cells are not used by PORTA.
33
4.5.9.2 Port B and TRISB Register
34
Summary of Registers Associated with Port B is shown in the Table.4.5.
35
Summary of Registers Associated with Port C is shown in the Table.4.7.
Port D is an 8-bit port with Schmitt Trigger input buffers. Each pin is
individually configurable as an input or output. Port D 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. Port D
Function is shown in the Table.4.8.
Note 1: Input buffers are Schmitt Triggers when in I/O mode and TTL buffer
when in Parallel Slave Port Mode
36
Summary of Registers Associated with Port D is shown in the Table.4.9.
Legend: x= unknown, u= unchanged, - = unimplemented read as ‘0’. Shaded cells are not
used by Port D
The Port E 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.
Port E 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 used as analog inputs. The user must make sure to
keep the pins configured as inputs when using them as analog inputs. Port E
Function is shown in the Table.4.10.
37
Table.4.10 Port E Functions
Value Value
Addre Bit Bit on: on all
Name Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
ss 7 6 POR, other
BOR resets
PORT ---- - ---- -
09h - - - - - RE2 RE1 RE0
E xxx uuu
TRIS IBO PSPMO PORTE Data 0000 - 0000 -
89h IBF OBF -
E V DE Direction Bits 111 111
ADC ADF PCF PCF PCF PCF --0- --0-
9Fh - - -
ON1 M G3 G2 G1 G0 0000 0000
Legend: x= unknown, u= unchanged, - = unimplemented read as ‘0’. Shaded cells are not
used by PORTE
38
4.5.10 CCP Modules in PIC16F877A
The CCP1 and CCP2 modules are identical in its operation except in its
special event trigger operation. In each CCP modules, the capture, compare and
PWM modes using different timer resources. The table below shows the
different CCP modes and its timer resources. The detailed explanations and
functions of CCP module is given below.
CCP1 Module
CCP2 Module
39
register controls the operation of CCP2. The special event trigger is generated
by a compare match and will reset Timer1 and start an A/D conversion (if the
A/D module is enabled).
Capture Mode
40
Compare Mode
41
Fig.4.10 PWM Mode Block Diagram
The following steps should be taken when configuring the CCP module
for PWM operation:
1. Set the PWM period by writing to the PR2 register.
2. Set the PWM duty cycle by writing to the CCPR1L register and
CCP1CON<5:4> bits.
3. Make the CCP1 pin an output by clearing the TRISC<2> bit.
4. Set the TMR2 prescale value and enable Timer2 by writing to T2CON.
5. Configure the CCP1 module for PWM operation.
42
cycle describes the amount of time the signal is in high state (TON) as a percentage
of the total time.
The frequency determines how fast the PWM completes a cycle and
therefore how fast it switches between low and high states. The speed of a PMDC
Motor can be controlled using Pulse Width Modulation (PWM). By using PWM,
the average power delivered to the load can be controlled easily and by thus the
speed of the DC Motor can easily controlled.
However, the variable resistor in series with a DC Motor can also be used to
control its speed, yet resistor is not a good choice for controlling the speed of a
DC Motor. Because drop across a resistor with higher power rating is excess and
so it is not good for a battery powered device.
4.6 RELAY
43
Spring
Set of electrical contacts
4.6.1Working
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. Circuit symbol of a relay is shown in the Fig.4.11.
The relay's switch connections are usually labeled COM, NC and NO:
44
NOTE: Connect to COM and NO if you want the switched circuit to be on
when the relay coil is on. Connect to COM and NC if you want the switched
circuit to be on when the relay coil is off.
The coil of a relay passes a relatively large current, typically 30mA for a
12V relay, but it can be as much as 100mA for relays designed to operate from
lower voltages. Hence a CB amplifier is used to achieve the current rating of the
relay.
Transistors and ICs must be protected from the brief high voltage
produced when a relay coil is switched off. The diagram shows how a signal
diode (e.g. 1N4148) is connected 'backwards' across the relay coil to provide
this protection.
Current flowing through a relay coil creates a magnetic field which
collapses suddenly when the current is switched off. The sudden collapse of the
magnetic field induces a brief high voltage across the relay coil which is very
likely to damage transistors and ICs. The protection diode allows the induced
voltage to drive a brief current through the coil (and diode) so the magnetic field
dies away quickly rather than instantly. This prevents the induced voltage
becoming high enough to cause damage to transistors and ICs. Drive circuit and
protection diodes for relay is shown in the Fig.4.12.
45
Fig.4.12 Drive Circuit and Protection Diodes for Relay
Soil moisture sensors measure the volumetric water content in soil. Since
the direct gravimetric measurement of free soil moisture requires removing,
drying, and weighting of a sample, soil moisture sensors measure the volumetric
water content indirectly by using some other property of the soil, such as
electrical resistance, dielectric constant, or interaction with, neutrons as a proxy
for the moisture content. The relation between the measured property and soil
moisture must be calibrated and may vary depending on environmental factors
such as soil type, temperature or electric conductivity.
47
CHAPTER 5
SOFTWARE DESCRIPTION
CHAPTER 5
SOFTWARE DESCRIPTION
MPLAB 8.92 is the last version of the legacy MPLAB IDE technology,
custom built by Microchip Technology in Microsoft Visual C++. MPLAB
supports project management, editing, debugging and programming of
Microchip 8-bit, 16-bit and 32-bit PIC microcontrollers. MPLAB only works on
Microsoft Windows. MPLAB is still available from Microchip's archives, but is
not recommended for new projects.
Project Manager
48
Editor
Debugger
Execution Engines
There are software simulators in MPLAB IDE for all PIC micro and PIC
devices. These simulators use the PC to simulate the instructions and some
peripheral functions of the PIC micro and PIC devices. Optional in-circuit
emulators and in-circuit Debuggers are also available to test code as it runs in
the applications hardware.
49
5.3 OPTIONAL COMPONENTS
MPLAB C17, MPLAB C18 and MPLAB C30 from Microchip provide
fully integrated, optimized code. Along with compilers from HI-TECH, IAR,
micro Engineering Labs, CCS and Byte Craft, they are invoked by the MPLAB
IDE project manager to compile code that is automatically loaded into the target
debugger for instant testing and verification.
Programmers
PICSTART Plus, PRO MATE II, MPLAB PM3 as well as MPLAB ICD
2 can program code into target microcontrollers. MPLAB IDE offers full
control over programming both code and data.
In-Circuit Emulators
MPLAB ICE 2000 and MPLAB ICE 4000 are full-featured emulators for
the PIC micro and PIC devices. They connect to the PC via I/O ports and allow
full control over the operation of microcontroller in the target applications.
In-Circuit Debugger
50
target microcontroller Inserted in the application, set breakpoints, single step
and monitor registers and variables.
51
CHAPTER 6
SIMULATION OF ZETA CONVERTER
CHAPTER 6
SIMULATION OF ZETA CONVERTER
6.1 SIMULATION
MATLAB SIM is extremely fast since non-linear elements are only used
where we choose that they are important. Furthermore, the fact that MATLAB
SIM separates power and control has a major effect on reducing simulation
time. Another very useful feature is the ability to integrate DLL blocks into the
circuit with the code that we wrote. This is of great help to emulate a software
routine that would be used in a microcontroller used in our power supplies. We
52
also use those DLL to emulate all our control logic to reduce the simulation
time.
6.2 SIMULINK
53
Model analysis tools include linearization and trimming tools, which can
be accessed from the MATLAB command line. As MATLAB and Simulink are
integrated, you can simulate, analyze and revise the models in either
environment at any point.
To start Simulink, you must first start MATLAB. Consult your MATLAB
documentation for more information. You can then start Simulink in two ways:
54
The Library Browser displays a tree-structured view of the
Simulink block libraries installed on your system. You can build
models by copying blocks from the Library Browser into a model
window.
Step 1: Start MATLAB. See your MATLAB documentation if you are not sure
how to do this.
Step 2: Run the model by typing the file name in the MATLAB command
window. This command starts up Simulink and creates a model window that
contains this model.
Step 3: To start the simulation, pull down the Simulation menu and choose the
Start command (or, on Microsoft Windows, press the Start button on the
Simulink toolbar).
Step 4: To stop the simulation, choose the Stop command from the Simulation
menu (or press the Pause button on the toolbar), If you want to explore other
parts of the model.
Step 5: When you are finished running the simulation, close the model by
choosing Close from the File menu.
55
Fig.6.1 Output Voltage Vs Time Plot
56
10 9 8 7 6
0
0
0
1 2 3 4 5
57
CHAPTER 7
CONCLUSION AND FUTURE SCOPE
CHAPTER 7
CONCLUSION AND FUTURE SCOPE
7.1 CONCLUSION
In future this project can also be used to test the difference among
mineral and distilled water, the strength of acids and any material which
involves the ionization of it, hence allowing it to be a multipurpose tool for
measuring the levels of various substances.
58
APPENDICES
APPENDIX 1
SOLAR TRACKING CODING
APPENDIX 1
SOLAR TRACKING SYSTEM CODING
#include<pic.h>
#include<stdio.h>
#include"delay.c"
#define _XTAL_FREQ 10000000
__CONFIG(0x3f72);
float a;
void main()
{
TRISC=0x00;
PORTC=0;
// a=15;
while(1)
{
PORTC=0X01;
// delay_cust(a *5);
// Delayms(1);
__delay_us(20);
// __delay_us(5);
PORTC=0X00;
// delay_cust(a *10);
// Delayms(10);
__delay_us(80);
}
}
APPENDIX 3
DATASHEETS
1N4001 - 1N4007
1.0A RECTIFIER
Please click here to visit our online spice models database.
Features
• Diffused Junction
• High Current Capability and Low Forward Voltage Drop
• Surge Overload Rating to 30A Peak
• Low Reverse Leakage Current
• Lead Free Finish, RoHS Compliant (Note 3)
Mechanical Data
• Case: DO-41
• Case Material: Molded Plastic. UL Flammability Classification
DO-41 Plastic
Rating 94V-0 Dim
Min Max
• Moisture Sensitivity: Level 1 per J-STD-020D
A 25.40 ⎯
• Terminals: Finish - Bright Tin. Plated Leads Solderable per
B 4.06 5.21
MIL-STD-202, Method 208
C 0.71 0.864
• Polarity: Cathode Band
D 2.00 2.72
• Mounting Position: Any
All Dimensions in mm
• Ordering Information: See Page 2
• Marking: Type Number
• Weight: 0.30 grams (approximate)
Maximum Ratings and Electrical Characteristics @TA = 25°C unless otherwise specified
Single phase, half wave, 60Hz, resistive or inductive load.
For capacitive load, derate current by 20%.
Characteristic Symbol 1N4001 1N4002 1N4003 1N4004 1N4005 1N4006 1N4007 Unit
Peak Repetitive Reverse Voltage VRRM
Working Peak Reverse Voltage VRWM 50 100 200 400 600 800 1000 V
DC Blocking Voltage VR
RMS Reverse Voltage VR(RMS) 35 70 140 280 420 560 700 V
Average Rectified Output Current (Note 1) @ TA = 75°C IO 1.0 A
Non-Repetitive Peak Forward Surge Current 8.3ms
IFSM 30 A
single half sine-wave superimposed on rated load
Forward Voltage @ IF = 1.0A VFM 1.0 V
Peak Reverse Current @TA = 25°C 5.0
IRM μA
at Rated DC Blocking Voltage @ TA = 100°C 50
Typical Junction Capacitance (Note 2) Cj 15 8 pF
Typical Thermal Resistance Junction to Ambient RθJA 100 K/W
Maximum DC Blocking Voltage Temperature TA +150 °C
Operating and Storage Temperature Range TJ, TSTG -65 to +150 °C
Notes: 1. Leads maintained at ambient temperature at a distance of 9.5mm from the case.
2. Measured at 1.0 MHz and applied reverse voltage of 4.0V DC.
3. EU Directive 2002/95/EC (RoHS). All applicable RoHS exemptions applied, see EU Directive 2002/95/EC Annex Notes.
0.8
1.0
0.6
0.4
0.1
0.2
Tj, = 25oC
Pulse Width = 300 μs
2% Duty Cycle
0 0.01
40 60 80 100 120 140 160 180 0.6 0.8 1.0 1.2 1.4 1.6
f = 1MHz
40
Cj, CAPACITANCE (pF)
30
1N4001 - 1N4004
10
20
1N4005 - 1N4007
10
0 1.0
1.0 10 100 1.0 10 100
Operating and Storage Junction Temperature Range TJ, Tstg -65 to +200 °C
Value
Description Symbol Test Condition Unit
Minimum Maximum
Collector Emitter Breakdown Voltage BVCEO IC = 10mA, IB = 0 30 -
VCB = 50V, IE = 0
10 nA
Collector Leakage Current ICBO -
VCB = 50V, IE = 0
10 µA
Ta = 150°C
Dynamic Characteristics
IC = 20mA, VCE = 20V
Transition Frequency ft 250 - MHz
f = 100MHz
VCB = 10V, IE = 0
Output Capacitance Cob - 8
f = 100kHz
pF
VEB = 0.5V, IC = 0
Input Capacitance Cib - 30
f = 100kHz
Switching Characteristics
Delay Time td
IC = 150mA,IB1 = 15mA - 10
TO-18 2N2222
KA7805
Parameter Symbol Conditions Unit
Min. Typ. Max.
TJ =+25 oC 4.8 5.0 5.2
Output Voltage VO 5.0mA ≤ Io ≤ 1.0A, PO ≤ 15W
V
VI = 7V to 20V 4.75 5.0 5.25
VO = 7V to 25V - 4.0 100
Line Regulation (Note1) Regline TJ=+25 oC mV
VI = 8V to 12V - 1.6 50
IO = 5.0mA to1.5A - 9 100
Load Regulation (Note1) Regload TJ=+25 oC mV
IO =250mA to 750mA - 4 50
Quiescent Current IQ TJ =+25 oC - 5.0 8.0 mA
IO = 5mA to 1.0A - 0.03 0.5
Quiescent Current Change ∆IQ mA
VI= 7V to 25V - 0.3 1.3
Output Voltage Drift ∆VO/∆T IO= 5mA - -0.8 - mV/ oC
Output Noise Voltage VN f = 10Hz to 100KHz, TA=+25 oC - 42 - µV/VO
f = 120Hz
Ripple Rejection RR 62 73 - dB
VO = 8V to 18V
Dropout Voltage VDrop IO = 1A, TJ =+25 oC - 2 - V
Output Resistance rO f = 1KHz - 15 - mΩ
Short Circuit Current ISC VI = 35V, TA =+25 oC - 230 - mA
o
Peak Current IPK TJ =+25 C - 2.2 - A
Note:
1. Load and line regulation are specified at constant junction temperature. Changes in Vo due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
Note:
1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
11
Contact:94894 27827 Mail: pelstech@gmail.com, web: www.peprojects.tk
PELS TECH -Sathy
KA78XX/KA78XXA
Typical Applications
Input Output
Figure 5. DC Parameters
Input Output
Input Output
Input Output
21
Contact:94894 27827 Mail: pelstech@gmail.com, web: www.peprojects.tk
IRF840
Packaging
JEDEC TO-220AB
TOP VIEW
SOURCE
DRAIN
GATE
DRAIN
(FLANGE)
CAUTION: Stresses above those listed in “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress only rating and operation of the
device at these or any other conditions above those indicated in the operational sections of this specification is not implied.
NOTE:
1. TJ = 25oC to 125oC.
Thermal Resistance Junction to Ambient RθJA Free Air Operation - - 62.5 oC/W
IRF840 Rev. B
IRF840
Source to Drain Diode Voltage (Note 2) VSD TJ = 25oC, ISD = 8.0A, VGS = 100A/µs (Figure 13) - - 2.0 V
Reverse Recovery Time trr TJ = 25oC, ISD = 8.0A, dISD/dt = 100A/µs 210 475 970 ns
Reverse Recovered Charge QRR TJ = 25oC, ISD = 8.0A, dISD/dt = 100A/µs 2.0 4.6 8.2 µC
NOTES:
2. Pulse Test: Pulse width ≤ 300µs, duty cycle ≤ 2%.
3. Repetitive Rating: Pulse width limited by Max junction temperature. See Transient Thermal Impedance curve (Figure 3).
4. VDD = 50V, starting TJ = 25oC, L = 14mH, RG = 25Ω, peak IAS = 8A.
1.2 10
POWER DISSIPATION MULTIPLIER
1.0
8
ID , DRAIN CURRENT (A)
0.8
6
0.6
4
0.4
2
0.2
0 0
0 50 100 150 25 50 75 100 125 150
TC , CASE TEMPERATURE (oC) TC , CASE TEMPERATURE (oC)
FIGURE 1. NORMALIZED POWER DISSIPATION vs CASE FIGURE 2. MAXIMUM CONTINUOUS DRAIN CURRENT vs
TEMPERATURE CASE TEMPERATURE
1
ZθJC , NORMALIZED TRANSIENT
0.5
THERMAL IMPEDANCE
0.2
0.1 0.1
0.05
0.02 PDM
0.01
SINGLE PULSE
10-2 t1
t2 t2
NOTES:
DUTY FACTOR: D = t1/t2
PEAK TJ = PDM x ZθJC x RθJC + TC
10-3 -5
10 10-4 10-3 10-2 0.1 1 10
t1 , RECTANGULAR PULSE DURATION (s)
102 15
VGS = 10V PULSE DURATION = 80µs
DUTY CYCLE = 0.5% MAX
10µs
12 VGS = 6.0V
ID, DRAIN CURRENT (A)
1ms
VGS = 5.5V
6
OPERATION IN THIS
1 REGION IS LIMITED 10ms
BY rDS(ON)
3 VGS = 5.0V
TC = 25oC DC
TJ = MAX RATED VGS = 4.5V VGS = 4.0V
SINGLE PULSE
0.1 0
1 10 102 103 0 50 100 150 200 250
VDS , DRAIN TO SOURCE VOLTAGE (V) VDS , DRAIN TO SOURCE VOLTAGE (V)
15 100
PULSE DURATION = 80µs VGS = 10V PULSE DURATION = 80µs
DUTY CYCLE = 0.5% MAX DUTY CYCLE = 0.5% MAX
ISD(ON), DRAIN TO SOURCE VDS ≥ 50V
12
ID , DRAIN CURRENT (A)
CURRENT (A) 10
VGS = 6.0V
9
1
VGS = 5.5V
6 TJ = 150oC TJ = 25oC
10 3.0
PULSE DURATION = 80µs PULSE DURATION = 80µs
DUTY CYCLE = 0.5% MAX DUTY CYCLE = 0.5% MAX
NORMALIZED DRAIN TO SOURCE
2.4
ON RESISTANCE VOLTAGE
8
ON RESISTANCE (Ω)
6 1.8
VGS = 10V
4 1.2
2 0.6
VGS = 20V
0 0
0 8 16 24 32 40 -60 -40 -20 0 20 40 60 80 100 120 140 160
TC , CASE TEMPERATURE (oC) TJ , JUNCTION TEMPERATURE (oC)
IRF840 Rev. B
IRF840
1.25 3000
ID = 250µA VGS = 0V, f = 1MHz
NORMALIZED DRAIN TO SOURCE
C, CAPACITANCE (pF)
1.05 1800
CISS
0.95 1200
COSS
0.75 0
-60 -40 -20 0 20 40 60 80 100 120 140 160 1 2 5 10 2 5 102
TJ , JUNCTION TEMPERATURE (oC) VDS , DRAIN TO SOURCE VOLTAGE (V)
FIGURE 10. NORMALIZED DRAIN TO SOURCE BREAKDOWN FIGURE 11. CAPACITANCE vs DRAIN TO SOURCE VOLTAGE
VOLTAGE vs JUNCTION TEMPERATURE
15 100
PULSE DURATION = 80µs
10
9 TJ = 25oC
TJ = 150oC
TJ = 150oC
6 TJ = 25oC
1.0
0 0.1
0 3 6 9 12 15 0 0.3 0.6 0.9 1.2 1.5
ID , DRAIN CURRENT (A) VSD , SOURCE TO DRAIN VOLTAGE (V)
FIGURE 12. TRANSCONDUCTANCE vs DRAIN CURRENT FIGURE 13. SOURCE TO DRAIN DIODE VOLTAGE
20
ID = 8A
VGS , GATE TO SOURCE VOLTAGE (V)
16
VDS = 100V
12
VDS = 250V
VDS = 400V
8
0
0 12 24 36 48 60
Qg, GATE CHARGE (nC)
1N4728A - 1N4764A
Zeners
2 www.fairchildsemi.com
1N4728A - 1N4764A Rev. G2
1N4728A - 1N4764A Zeners
Top Mark Information
Device Line 1 Line 2 Line 3 Line 4 Line 5
1N4728A LOGO 47 28 A XY
1N4729A LOGO 47 29 A XY
1N4730A LOGO 47 30 A XY
1N4731A LOGO 47 31 A XY
1N4732A LOGO 47 32 A XY
1N4733A LOGO 47 33 A XY
1N4734A LOGO 47 34 A XY
1N4735A LOGO 47 35 A XY
1N4736A LOGO 47 36 A XY
1N4737A LOGO 47 37 A XY
1N4738A LOGO 47 38 A XY
1N4739A LOGO 47 39 A XY
1N4740A LOGO 47 40 A XY
1N4741A LOGO 47 41 A XY
1N4742A LOGO 47 42 A XY
1N4743A LOGO 47 43 A XY
1N4744A LOGO 47 44 A XY
1N4745A LOGO 47 45 A XY
1N4746A LOGO 47 46 A XY
1N4747A LOGO 47 47 A XY
1N4748A LOGO 47 48 A XY
1N4749A LOGO 47 49 A XY
1N4750A LOGO 47 50 A XY
1N4751A LOGO 47 51 A XY
1N4752A LOGO 47 52 A XY
1N4753A LOGO 47 53 A XY
1N4754A LOGO 47 54 A XY
1N4755A LOGO 47 55 A XY
1N4756A LOGO 47 56 A XY
1N4757A LOGO 47 57 A XY
1N4758A LOGO 47 58 A XY
1N4759A LOGO 47 59 A XY
1N4760A LOGO 47 60 A XY
1N4761A LOGO 47 61 A XY
1N4762A LOGO 47 62 A XY
1N4763A LOGO 47 63 A XY
1N4764A LOGO 47 64 A XY
3 www.fairchildsemi.com
1N4728A - 1N4764A Rev. G2
1N4728A - 1N4764A Zeners
Top Mark Information (Continued)
36 3rd line: Device Name - 5th to 6th characters of device name for 1Nxx series
or Voltage rating for BZXyy series
A
4th line: Device Name - 7th to 8th characters of device name for 1Nxx series
or Large Die identification only for BZXyy series
XY 5th line: Date Code - Two Digit - Six Weeks Date Code
F
General Requirements:
1.0 Cathod Band
2.0 First Line: F - Fairchild Logo
3.0 Second Line: Device name - For 1Nxx series: 3rd to 4th characters of the device name.
For BZxx series: 4th to 6th characters of the device name.
4.0 Third Line: Device name - For 1Nxx series: 5th to 6th characters of the device name.
For BZXyy series: Voltage rating
5.0 Third Line: Device name - For 1Nxx series: 7th to 8th characters of the device name.
(the 8th character is the large die identification)
For BZXyy series: Large Die Identification character
6.0 Fourth Line: Date Code - Two Digit - Six Weeks Date Code
Where: X represents the last digit of the calendar year
Y represents the Six weeks numeric code
7.0 Devices shall be marked as required in the device specification (PID or FSC Test Spec).
8.0 Maximum no. of marking lines: 5
9.0 Maximum no. of digits per line: 3
10.0 FSC logo must be 20 % taller than the alphanumeric marking and should occupy the 2 characters of the specified line.
11.0 Marking Font: Arial (Except FSC Logo)
12.0 First character of each marking line must be aligned vertically
4 www.fairchildsemi.com
1N4728A - 1N4764A Rev. G2
1N4728A - 1N4764A Zeners
TRADEMARKS
The following are registered and unregistered trademarks Fairchild Semiconductor owns or is authorized to use and is not intended to
be an exhaustive list of all such trademarks.
ACEx™ FAST® IntelliMAX™ POP™ SPM™
ActiveArray™ FASTr™ ISOPLANAR™ Power247™ Stealth™
Bottomless™ FPS™ LittleFET™ PowerEdge™ SuperFET™
CoolFET™ FRFET™ MICROCOUPLER™ PowerSaver™ SuperSOT™-3
CROSSVOLT™ GlobalOptoisolator™ MicroFET™ PowerTrench® SuperSOT™-6
DOME™ GTO™ MicroPak™ QFET® SuperSOT™-8
EcoSPARK™ HiSeC™ MICROWIRE™ QS™ SyncFET™
E2CMOS™ I2C™ MSX™ QT Optoelectronics™ TinyLogic®
EnSigna™ i-Lo™ MSXPro™ Quiet Series™ TINYOPTO™
FACT™ ImpliedDisconnect™ OCX™ RapidConfigure™ TruTranslation™
FACT Quiet Series™ OCXPro™ RapidConnect™ UHC™
OPTOLOGIC® µSerDes™ UltraFET®
Across the board. Around the world.™
OPTOPLANAR™ SILENT SWITCHER® UniFET™
The Power Franchise®
PACMAN™ SMART START™ VCX™
Programmable Active Droop™
DISCLAIMER
FAIRCHILD SEMICONDUCTOR RESERVES THE RIGHT TO MAKE CHANGES WITHOUT FURTHER NOTICE TO ANY
PRODUCTS HEREIN TO IMPROVE RELIABILITY, FUNCTION OR DESIGN. FAIRCHILD DOES NOT ASSUME ANY LIABILITY
ARISING OUT OF THE APPLICATION OR USE OF ANY PRODUCT OR CIRCUIT DESCRIBED HEREIN; NEITHER DOES IT
CONVEY ANY LICENSE UNDER ITS PATENT RIGHTS, NOR THE RIGHTS OF OTHERS.
FAIRCHILD’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR
SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF FAIRCHILD SEMICONDUCTOR CORPORATION.
As used herein:
1. Life support devices or systems are devices or systems which, 2. A critical component is any component of a life support device
(a) are intended for surgical implant into the body, or (b) support or system whose failure to perform can be reasonably expected
or sustain life, or (c) whose failure to perform when properly used to cause the failure of the life support device or system, or to
in accordance with instructions for use provided in the labeling, affect its safety or effectiveness.
can be reasonably expected to result in significant injury to the
user.
Advance Information Formative or In This datasheet contains the design specifications for
Design product development. Specifications may change in
any manner without notice.
No Identification Needed Full Production This datasheet contains final specifications. Fairchild
Semiconductor reserves the right to make changes at
any time without notice in order to improve design.
Rev. I15
5 www.fairchildsemi.com
1N4728A - 1N4764A Rev. G2
PIC16F87XA
28/40/44-Pin Enhanced Flash Microcontrollers
Devices Included in this Data Sheet: Analog Features:
• PIC16F873A • PIC16F876A • 10-bit, up to 8-channel Analog-to-Digital
• PIC16F874A • PIC16F877A Converter (A/D)
• Brown-out Reset (BOR)
High-Performance RISC CPU: • Analog Comparator module with:
- Two analog comparators
• Only 35 single-word instructions to learn
- Programmable on-chip voltage reference
• All single-cycle instructions except for program (VREF) module
branches, which are two-cycle
- Programmable input multiplexing from device
• Operating speed: DC – 20 MHz clock input inputs and internal voltage reference
DC – 200 ns instruction cycle
- Comparator outputs are externally accessible
• Up to 8K x 14 words of Flash Program Memory,
Up to 368 x 8 bytes of Data Memory (RAM),
Special Microcontroller Features:
Up to 256 x 8 bytes of EEPROM Data Memory
• Pinout compatible to other 28-pin or 40/44-pin • 100,000 erase/write cycle Enhanced Flash
PIC16CXXX and PIC16FXXX microcontrollers program memory typical
• 1,000,000 erase/write cycle Data EEPROM
Peripheral Features: memory typical
• Data EEPROM Retention > 40 years
• Timer0: 8-bit timer/counter with 8-bit prescaler
• Self-reprogrammable under software control
• Timer1: 16-bit timer/counter with prescaler,
can be incremented during Sleep via external • In-Circuit Serial Programming™ (ICSP™)
crystal/clock via two pins
• Timer2: 8-bit timer/counter with 8-bit period • Single-supply 5V In-Circuit Serial Programming
register, prescaler and postscaler • Watchdog Timer (WDT) with its own on-chip RC
• Two Capture, Compare, PWM modules oscillator for reliable operation
- Capture is 16-bit, max. resolution is 12.5 ns • Programmable code protection
- Compare is 16-bit, max. resolution is 200 ns • Power saving Sleep mode
- PWM max. resolution is 10-bit • Selectable oscillator options
• Synchronous Serial Port (SSP) with SPI™ • In-Circuit Debug (ICD) via two pins
(Master mode) and I2C™ (Master/Slave)
• Universal Synchronous Asynchronous Receiver CMOS Technology:
Transmitter (USART/SCI) with 9-bit address • Low-power, high-speed Flash/EEPROM
detection technology
• Parallel Slave Port (PSP) – 8 bits wide with • Fully static design
external RD, WR and CS controls (40/44-pin only)
• Wide operating voltage range (2.0V to 5.5V)
• Brown-out detection circuitry for
• Commercial and Industrial temperature ranges
Brown-out Reset (BOR)
• Low-power consumption
40-Pin PDIP
MCLR/VPP 1 40 RB7/PGD
RA0/AN0 2 39 RB6/PGC
RA1/AN1 3 38 RB5
RA2/AN2/VREF-/CVREF 4 37 RB4
RA3/AN3/VREF+ 5 36 RB3/PGM
RA4/T0CKI/C1OUT 6 35 RB2
PIC16F874A/877A
RA5/AN4/SS/C2OUT 7 34 RB1
RE0/RD/AN5 8 33 RB0/INT
RE1/WR/AN6 9 32 VDD
RE2/CS/AN7 10 31 VSS
VDD 11 30 RD7/PSP7
VSS 12 29 RD6/PSP6
OSC1/CLKI 13 28 RD5/PSP5
RA2/AN2/VREF-/CVREF
OSC2/CLKO 14 27 RD4/PSP4
RC0/T1OSO/T1CKI 15 26 RC7/RX/DT
RA3/AN3/VREF+
RC1/T1OSI/CCP2 16 25 RC6/TX/CK
RC2/CCP1 17 24 RC5/SDO
MCLR/VPP
RB7/PGD
RB6/PGC
RC3/SCK/SCL 18 23 RC4/SDI/SDA
RA1/AN1
RA0/AN0
RD0/PSP0 19 22 RD3/PSP3
RB5
RB4
RD1/PSP1 20 21 RD2/PSP2
NC
NC
44-Pin PLCC
6
5
4
3
2
1
44
43
42
41
40
RA4/T0CKI/C1OUT 39 RB3/PGM
7
RA5/AN4/SS/C2OUT 8 38 RB2
RE0/RD/AN5 9 37 RB1
RE1/WR/AN6 10 36 RB0/INT
RE2/CS/AN7 11 PIC16F874A 35 VDD
VDD 12 34 VSS
VSS 13
PIC16F877A 33 RD7/PSP7
OSC1/CLKI 14 32 RD6/PSP6
OSC2/CLKO 15 31 RD5/PSP5
RC0/T1OSO/T1CK1 16 30 RD4/PSP4
NC 17 9 RC7/RX/DT
18
19
20
21
22
23
24
25
26
27
282
RC1/T1OSI/CCP2
RC3/SCK/SCL
RC4/SDI/SDA
RC6/TX/CK
RC2/CCP1
RD3/PSP3
RD2/PSP2
RD1/PSP1
RD0/PSP0
RC5/SDO
RC1/T1OSI/CCP2
RC2/CCP1
RC3/SCK/SCL
RD0/PSP0
RD1/PSP1
RD2/PSP2
RD3/PSP3
RC5/SDO
NC
RC4/SDI/SDA
RC6/TX/CK
NC
44-Pin TQFP
44
43
42
41
40
39
38
37
36
35
34
RC7/RX/DT 1 33 NC
RD4/PSP4 2 32 RC0/T1OSO/T1CKI
RD5/PSP5 3 31 OSC2/CLKO
RD6/PSP6 4 30 OSC1/CLKI
RD7/PSP7 5 PIC16F874A 29 VSS
VSS 6 28 VDD
VDD 7
PIC16F877A 27 RE2/CS/AN7
RB0/INT 8 26 RE1/WR/AN6
RB1 9 25 RE0/RD/AN5
RB2 10 24 RA5/AN4/SS/C2OUT
RB3/PGM 11 23 RA4/T0CKI/C1OUT
12
13
14
15
16
17
18
19
20
21
22
RB4
RB5
RA0/AN0
RA1/AN1
RA2/AN2/VREF-/CVREF
NC
NC
RB6/PGC
RB7/PGD
RA3/AN3/VREF+
MCLR/VPP
TLP250
Transistor Inverter
Inverter For Air Conditionor
Unit in mm
IGBT Gate Drive
Power MOS FET Gate Drive
GND
1 : N.C.
5
A 0.1µF bypass capcitor must be 2 : Anode
connected between pin 8 and 5 (See Note 5). 3 : Cathode
4 : N.C.
5 : GND
6 : VO (Output)
7 : VO
8 : VCC
Truth Table
Tr1 Tr2
Input On On Off
LED Off Off On
1 2004-06-25
TLP250
Absolute Maximum Ratings (Ta = 25°C)
Forward current IF 20 mA
Reverse voltage VR 5 V
(Ta ≤ 70°C) 35
Supply voltage VCC V
(Ta = 85°C) 24
Output voltage derating (Ta ≥ 70°C) ∆VO / ∆Ta −0.73 V / °C
Supply voltage derating (Ta ≥ 70°C) ∆VCC / ∆Ta −0.73 V / °C
Junction temperature Tj 125 °C
Operating frequency (Note 3) f 25 kHz
Operating temperature range Topr −20~85 °C
Storage temperature range Tstg −55~125 °C
Lead soldering temperature (10 s) (Note 4) Tsol 260 °C
Isolation voltage (AC, 1 min., R.H.≤ 60%) (Note 5) BVS 2500 Vrms
Note 6: A ceramic capacitor(0.1µF) should be connected from pin 8 to pin 5 to stabilize the operation of the high
gain linear amplifier. Failure to provide the bypassing may impair the switching proparty. The total lead
length between capacitor and coupler should not exceed 1cm.
Note 7: Input signal rise time (fall time) < 0.5 µs.
2 2004-06-25
TLP250
Electrical Characteristics (Ta = −20~70°C, unless otherwise specified)
Test
Characteristic Symbol Cir− Test Condition Min. Typ.* Max. Unit
cuit
Input forward voltage VF ― IF = 10 mA , Ta = 25°C 1.6 1.8 V
Temperature coefficient of
∆VF / ∆Ta ― IF = 10 mA ― −2.0 ― mV / °C
forward voltage
Input reverse current IR ― VR = 5V, Ta = 25°C ― 10 µA
Input capacitance CT ― V = 0 , f = 1MHz , Ta = 25°C ― 45 250 pF
IF = 10 mA
“H” level IOPH 3 −0.5 −1.5 ―
VCC = 30V V8−6 = 4V
Output current A
(*1) IF = 0
“L” level IOPL 2 0.5 2 ―
V6−5 = 2.5V
VCC1 = +15V, VEE1 = −15V
“H” level VOH 4 11 12.8 ―
RL = 200Ω, IF = 5mA
Output voltage V
VCC1 = +15V, VEE1 = −15V
“L” level VOL 5 ― −14.2 −12.5
RL = 200Ω, VF = 0.8V
VCC = 30V, IF = 10mA
― 7 ―
“H” level ICCH ― Ta = 25°C
VCC = 30V, IF = 10mA ― ― 11
Supply current mA
VCC = 30V, IF = 0mA
7.5
“L” level ICCL ― Ta = 25°C
VCC = 30V, IF = 0mA ― ― 11
Threshold input “Output IFLH VCC1 = +15V, VEE1 = −15V
― ― 1.2 5 mA
current L→H” RL = 200Ω, VO > 0V
Threshold input “Output IFHL VCC1 = +15V, VEE1 = −15V
― 0.8 ― ― V
voltage H→L” RL = 200Ω, VO < 0V
Supply voltage VCC ― 10 ― 35 V
Capacitance CS VS = 0 , f = 1MHz
― ― 1.0 2.0 pF
(input−output) Ta = 25℃
VS = 500V , Ta = 25°C 12 14
Resistance(input−output) RS ― 1×10 10 ― Ω
R.H.≤ 60%
3 2004-06-25
TLP250
Switching Characteristics (Ta = −20~70°C , unless otherwise specified)
Test
Characteristic Symbol Cir− Test Condition Min. Typ.* Max. Unit
cuit
Propagation L→H tpLH ― 0.15 0.5
delay time IF = 8mA (Note 7)
H→L tpHL ― 0.15 0.5
6 VCC1 = +15V, VEE1 = −15V µs
Output rise time tr RL = 200Ω ― ― ―
Output fall time tf ― ― ―
Common mode transient
VCM = 600V, IF = 8mA
immunity at high level CMH 7 −5000 ― ― V / µs
VCC = 30V, Ta = 25°C
output
Common mode transient
VCM = 600V, IF = 0mA
immunity at low level CML 7 5000 ― ― V / µs
VCC = 30V, Ta = 25°C
output
Note 7: Input signal rise time (fall time) < 0.5 µs.
4 2004-06-25
TLP250
IF – VF ΔVF / ΔTa – IF
100 -2.6
Ta = 25 °C
50
30
10
5 -2.2
Forward current IF
1 -2.0
0.5
0.3
-1.8
0.1
0.05 -1.6
0.03
0.01 -1.4
1.0 1.2 1.4 1.6 1.8 2.0 0.1 0.3 0.5 1 3 5 10 30
IF – Ta VCC – Ta
40 40
(V)
Allowable forward current
30 30
Allowable supply voltage VCC
IF (mA)
20 20
10 10
0 0
0 20 40 60 80 100 0 20 40 60 80 100
IOPH, IOPL – Ta
2
Allowable peak output current
IOPH, IOPL (A)
0
0 20 40 60 80 100
7 2004-06-25
APPENDIX 4
PUBLICATION DETAILS
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
SOLAR POWERED SMART
IRRIGATION SYSTEM
P.Sebastian Vindro Jude 1, U.Naveena 2, D.Suja 3, S.Tamilselvi 4
1,2,3,4
Department of Electrical and Electronics Engineering, Sri Ramakrishna Engineering College,
Coimbatore, India.
ABSTRACT:
The main objective of this paper is to provide automatic irrigation to agriculture field which uses sensor
technology with microcontroller to make a smart switching device. And this level of sensing is done by soil
moisture sensor which detects the moisture level and also provides moisture level to various crops in a
controlled manner. When the moisture level of the soil is decreased below a certain level, the sensor sends
the detected value to the microcontroller. According to the value that is sensed by the sensor, the water is
supplied to the crops automatically to the desired level in order to maintain the moisture content in the
soil. This overall system is controlled by PIC microcontroller. The theme of this paper is to reduce the
human intervention (farmers) and use solar energy which is one of the renewable sources for irrigation
purpose. This project also helps to reduce the wastage of water by automatic control of the system. The
system operates in an efficient manner with the usage of fourth order converting device, Zeta converter.
Keywords: Moisture level, PIC Microcontroller, Sensor, Smart irrigation system, Solar energy, Zeta converter.
as a buck converter. In this system we use zeta IC7805 is used to regulate the 12V DC to 5V DC
converter as a boost converter because if solar with the help 100μF and 10μF with current limiting
panel receives less amount of light then boost resistor. 5V from regulator is used to operate the
converter gives higher voltage compared with input PIC microcontroller, microcontroller act as a
voltage. Filters are used to reduce output voltage control circuit to control the overall process. It has
ripple. When the switch is closed then the current 40 pin IC, each pin is connected for respective
flows in clockwise direction through the inductor operation. Soil moisture sensor is dipped in the soil
and it stores some energy by generating a magnetic to sense the humidity value. Programming for crop
field. The automatic irrigation system consist of selection and respective humidity value are
solar panel, zeta converter, regulator, motor, soil programmed in the PIC16F877A microcontroller.
moisture sensor, microcontroller, relay. Soil Signal from microcontroller to 12V relay is used to
moisture sensor is inserted into the soil for level of on/off the motor. Water flow from the pump
moisture detection and also it indicates different depends upon the signal from PIC microcontroller.
moisture level for different crops. The next The system is controlled by the PIC
important part of the system is solar panel which microcontroller. When the soil moisture sensor
acts as a source of power for the entire system. The sense the low level of the soil moisture then a
solar panel converts sunlight into electricity. This signal is send to the microcontroller then the
converted electricity is send to zeta converter and controller check for the condition given in
to the battery. Regulator is used to regulate the program. Program stored in the microcontroller is
power from the convertor. Here the microcontroller different for different crops. The humidity level
needs 5V power supply. So the IC7805 is used in needed to grow the crop is varies from one crop to
the system. To ON/OFF the motor relay 12v is another. According to the growth of crop water is
connected to the motor. supplied. The irrigation is automated with Soil
3. PROPOSED SYSTEM moisture sensor and the relay unit. When soil
The proposed system uses Solar power panel to moisture level is low then a signal send to the relay
energies the system and soil moisture sensor to to switch ON the motor and when the soil is wet
sense the water level for crops. Solar power is the then motor is in OFF condition. Relay gives the
only source of power to control the overall system. ON/OFF condition to the motor. The entire system
The supply from the solar panel 10V is given to is powered by solar panel.
zeta converter circuit. The zeta converter circuit 4. HARDWARE AND SIMULATION
has IN4007 Diode which acts as voltage controlled RESULTS
device. It consists of input capacitor C1 and output This System consists of a Solar panel, which is the
capacitor C3. Through the PIC microcontroller, main source of energy and is given to the charge
PWM pulse is given to the MOSFET switch of the controller for extracting regulated power from
Zeta converter. Constant voltage from zeta Solar panel at different irradiation and also to
converter is stored to 12V Battery. Regulator maintain correct charging voltage and current in
order to charge the battery and increase its life. Relay
Water conservation in farm land is controlled using A relay is an electrically operated switch. When the
microcontroller with soil moisture sensor. The current flows through the coil, the resulting
simulation of this system consists of PIC magnetic field attracts an armature that is
microcontroller, relay and power supply from solar mechanically linked to a moving contact. The coil
panel. The simulation model is shown. The results current can be on or off so relays have two switch
are viewed in LabVIEW. positions and they are double throw (changeover)
Zeta converter switches. The movement either makes or breaks a
This is a fourth order DC-DC converter. It operates connection with a fixed contact. The relay is
either in step-up or in step-down mode. It produces connected in between the microcontroller and the
high output voltage when compared to buck-boost motor. Relay will act as a negative line to the motor
converter. The zeta converter charge controller when it receives signal from the microcontroller.
keeps the solar panel current and voltage at the Driver circuit
regulated power point while charging the battery. In electronics, a driver circuit is an electrical
Zeta converter helps to maintain the constant circuit or other electronic component used to
output from solar panel to battery. The zeta control another circuit or component, such as a
converter and its simulation result are shown below high power transistor, liquid crystal display (LCD)
in figures 4.1 and 4.2. and numerous others. They are usually used to
regulate current flowing through a circuit or is used
to control the other factors in the circuit.The driver
circuit is also used to amplify the pulses. It consists
of three main components. They are opto-coupler,
buffer IC, transistor. The driver circuit is connected
between microcontroller and zeta converter, to
provide gate pulse to the MOSFET switch of the
zeta converter.
Moisture sensor
The soil moisture sensor uses capacitance to
measure dielectric permittivity of the surrounding
medium. In soil, dielectric permittivity is a function
of the water content. The sensor creates a voltage
proportional to the dielectric permittivity, and
therefore the water content of the soil.
Tracking System
Figure 4.1 Zeta Converter A maximum power point tracker (or MPPT) is a
high efficiency DC to DC converter that presents
an optimal electrical load to a solar panel or array
and produces a voltage suitable for the load. PV
cells have a single operating point where the values
of the current (I) and Voltage (V) of the cell result
in a maximum power output. These values
correspond to a particular load resistance, which is
equal to V/I as specified by Ohm's Law. The power
P is given by P=V*I. A PV cell has an exponential
relationship between current and voltage, and the
maximum power point (MPP) occurs at the knee of
the curve where dP/dV=0. At this point the
Figure 4.2 Simulation result of Zeta Converter characteristic resistance equals that of the load
resistance. Maximum power point trackers utilize
Regulator some type of control circuit or logic to search for
In this regulator, IC 7805 are used to convert the this point and thus to allow the converter circuit to
12v supply from battery to 5v supply to the extract the maximum power available from a cell.
microcontroller 16F877A. IC 7805 is a 5V Voltage The MPPT in a grid tied PV system will always
Regulator that restricts the voltage output to 5V. operate the array at its peak power point unless the
The maximum value for input to the voltage grid fails when the batteries are full and there are
regulator is 35V. It regulates a steady output of 5V, insufficient local loads.
if the input voltage is in range of 7.2V to 35V.The PIC Microcontroller
input voltage below 7.2V will cause heat loss in the We are using PIC 16F877A for producing
circuit. To avoid power loss, input is maintained to switching pulses to the zeta converter. The
7.2 and above. microcontroller is driven via the driver circuit so as
to boost the voltage triggering signal to 5V. To The energy needed to the water pump and
avoid any damage to micro controller due to direct controlling system is given by solar panel. This
passing of 230V supply to it we provide an isolator system helps in optimal usage of the water during
in the form of optocoupler in the same driver drought period. The Zeta converter produces output
circuit.PIC 16F877 is one of the most advanced with reduced ripples which will increase the
microcontroller from Microchip. This controller is lifetime of the motor. The system requires minimal
widely used for experimental and modern maintenance and attention because they are self-
applications because of its low price, wide range of starting. For further enhancing the daily pumping
applications, high quality, and ease of availability. rates tracking arrays are implemented. The scope of
It is ideal for applications such as machine control this project can be enhanced further by including
applications, measurement devices, study purpose, fuzzy logic algorithm for detection of moisture
and so on. The PIC 16F877 features all the level of different crops and automatic checking and
components which modern microcontrollers utilizing the overvoltage of the zeta converter
normally have. The figure of a PIC16F877 chip is included in this system. This system demonstrates
shown below. the feasibility and application of using solar PV to
provide energy for the pumping requirements for
sprinkler irrigation. Photovoltaic power is more
cost-competitive when used to power a micro
irrigation system as compared to an overhead
sprinkler system. If the total system design and
utilization timing is carefully considered, it is
possible to use the solar energy efficiently. In the
future, when the prices of fossil fuels rise, this
system utilizing the solar energy will remain as an
effective choice.
REFERENCES
Figure 4.3 PIC 16F877A
1. Hemant Ingale and N.N.Kasat, November
2012. “Automated Solar Based
Pin configuration of PIC16F877A
Agriculture Pumping”, International
Journal of Advanced Research in
Computer Science and Software
Engineering, ISSN: 2277 128X, Volume
2, Issue 11.
2. Sunil Nalamala and A.Raghu Ram,
October 2014 .“Design and
Implementation of Real Time Irrigation
System using a Wireless Sensor Network”,
International Journal of Research, Volume
3, Issue 3.
3. N.Sowmya Smitha Raj and B.Urmila, Jul-
Aug 2013. “PV fed Zeta Converter”,
International Journal of Engineering
Research and Applications (IJERA) ISSN:
2248-9622, Volume. 3, Issue 4.
4. M. Lincy Luciana, B.Ramya and A.
Srimathi, May 2013. “Automatic Drip
Irrigation Unit Using PIC Controller”,
International Journal of Latest Trends in
Engineering and Technology (IJLTET),
Volume 2, Issue 3.
5. CONCLUSION 5. Loredana Cristaldi, Marco Faifer, Marco
The proposed system is beneficial to the farmers Rossi, Sergio Toscani, January 2014, “An
when this system is implemented. And also useful Improved Model-Based Maximum Power
to the government with solar panel energy, solution Point Tracker for Photovoltaic Panels”,
IEEE Transactions On Instrumentation
for energy crisis is problem. When the soil needs
water, it is indicated by the sensor by this And Measurement, Volume 63, No. 1.
automatic irrigation system. This smart irrigation
system is used to optimize the usage of water by
reducing wastage and reduces the human work.
REFERENCES