You are on page 1of 133

SOLAR POWERED SMART

IRRIGATION SYSTEM

A PROJECT REPORT

Submitted by

NAVEENA. U (1303103)

SUJA.D (1303136)

TAMILSELVI. S (1303139)

in partial fulfillment for the award of the degree

of

BACHELOR OF ENGINEERING

IN

ELECTRICAL AND ELECTRONICS ENGINEERING

SRI RAMAKRISHNA ENGINEERING COLLEGE


(AUTONOMOUS INSTITUTION)
COIMBATORE - 641 022

ANNA UNIVERSITY::CHENNAI 600 025


APRIL 2017
ANNA UNIVERSITY:CHENNAI 600 025
BONAFIDE CERTIFICATE

Certified that this project report “SOLAR POWERED SMART IRRIGATION


SYSTEM” is the bonafide work of “NAVEENA. U, SUJA. D and
TAMILSELVI. S” who carried out the project work under my supervision.

SIGNATURE SIGNATURE

Dr. S.U.PRABHA Mr. P.SEBASTIAN VINDRO JUDE

HEAD OF THE DEPARTMENT SUPERVISOR

Professor, Assistant Professor (Senior Grade),


Electrical and Electronics Engineering, Electrical and Electronics Engineering,
Sri Ramakrishna Engineering College, Sri Ramakrishna Engineering College,
Vattamalaipalayam, Vattamalaipalayam,
Coimbatore-641022. Coimbatore-641022.

Submitted for the Project Viva-Voce Examination held on ________________

INTERNAL EXAMINER EXTERNAL EXAMINER


ii
ACKNOWLEDGEMENT

We express our sincere and deepest gratitude to our respected Managing


Trustee, Sri.R.VIJAYAKUMHAR and Joint Managing Trustee,
Sri.D.LAKSHMINARAYANASAMY for providing the necessary facilities for
carrying out our project work in the institution.

We have great pleasure in thanking Dr. A. EBENEZER JEYAKUMAR


Director (Academics), SNR Sons Charitable Trust. We would like to thank our
beloved Principal, Dr.N.R.ALAMELU for her continuous motivation towards
the development of the students.

We are very grateful to Dr.S.U.PRABHA, Professor and Head,


Department of Electrical and Electronics Engineering, who has encouraged and
gave us valuable suggestions for the completion of this project.

We also take this opportunity to thank our Project Coordinators,


Dr.S.U.PRABHA, Professor & Head and Mr.C.PRAVEENKUMAR, Assistant
Professor, Department of Electrical and Electronics Engineering for their positive
criticism and support to complete this project.

We express our sincere thanks to our Internal Supervisor,


Mr.P.SEBASTIAN VINDRO JUDE, Assistant Professor(Sr.G),Department of
Electrical and Electronics Engineering for his valuable guidance for the
implementation of this project.

We have great pleasure in thanking Mr. S. GOVINDHARAJAN, POH,


SE Electricals, Coimbatore, for providing us very good opportunity to do the
project in the industry.

Our sincere thanks to our External Supervisor, Mr. R. DURAIRAJ, Head


Engineer, SE Electricals, Coimbatore for his support, valuable guidance and
encouragement towards the completion of the project.
iii
We are very thankful to Mr. T. GANESAN, HR Manager, SE Electricals,
Coimbatore, for providing us very good opportunity to do the project in the
industry.

We express our sincere thanks to Mr. MUTHU KUMAR, HR Executive,


SE Electricals, Coimbatore, for his timely help and valuable support in the
completion of the project.

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

The main motivation behind this system is to conserve the wastage of

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

to provide automatic irrigation to agriculture field which uses sensor technology

with microcontroller to make a smart switching device. The 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 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

power and conserves water by reducing water losses.

v
ஆய்வுச் சுருக்கம்

விவசாயம் மற்றும் நீர்ப்பாசன அமமப்பு நம் வாழ்வில் மிகவும்

முக்கியமானது. உணர்வி மற்றும் நுண்கட்டுபடுத்தி தைாழில்நுட்பத்மை

பயன்படுத்தி ைானியங்கு முமையில் விவசாய நிலத்திற்கு நீர்ப்பாசனம்

வழங்குவதுைான் இந்ை திட்டத்தின் முக்கிய நநாக்கமாகும். மண்ணின் ஈரப்பைத்மை

கண்டறியும் உணர்விமய பயன்படுத்தி மண்ணின் ஈரப்பைத்மை கண்டறிந்து அைற்கு

ஏற்ைவாறு நீர்ப்பாசனம் வழங்கப்படுகிைது. பிைகு பல்நவறு பயிர்களுக்கு

நைமவயான ஈரப்பைம் ஒரு கட்டுப்பாட்டு முமையில் வழங்கப்படுகிைது.

எப்தபாழுது மண்ணின் ஈரப்பைத்தின் நிமல ஒரு குறிப்பிட்ட மட்டத்திற்கு கீநழ

குமைகிைநைா அப்நபாது உணர்வியால் கண்டறியப்பட்ட மதிப்பு ஒரு

சமிக்மையாக நுண்கட்டுபடுத்திக்கு அனுப்பப்படுகிைது. பின்பு, உணர்வியின்

மூலம் கண்டறியப்பட்ட மதிப்பின்படி, ஈரப்பைத்மை பராமரிக்கும் தபாருட்டு

பயிர்களுக்குத் நைமவயான அளவு ைண்ணீர் ைானியங்கு முமையில்

வழங்கப்படுகிைது. இந்ை ஒட்டுதமாத்ை அமமப்பும் புை இமடமுகம்

கட்டுப்படுத்தி என்னும் நுண்கட்டுபடுத்தியால் கட்டுப்படுத்ைப்படுகிைது. இந்ை

அமமப்பு நான்காவது தபாருட்டு மாற்றியம், மாற்றி பயன்பாட்மடக் தகாண்டு

திைமமயான முமையில் இயங்குகிைது. தசடிகள் மற்றும் பயிர்களுக்கு நீர்ப்பாசனம்

வழங்குவதில் மனிை ைமலயீட்மடக் குமைக்க நவண்டும் என்பநை இந்ைத்

திட்டத்தின் முக்கிய நநாக்கமாகும். நமலும், இத்திட்டத்தில் சூரிய ஆற்ைல்

விவசாய நீர்ப்பாசனத்திற்காகப் பயன்படுத்ைப்படுகிைது. சூரிய ஆற்ைல் ஒரு

புதுப்பிக்கத்ைக்க ஆற்ைலாகும். எனநவ மின்சாரத்மை நசமிப்பைற்கான திட்டமாக

இத்திட்டம் விளங்குகிைது. நமலும் இந்ை திட்டம் ைானியங்கு கட்டுப்பாட்டு

முமையின் மூலம் ைண்ணீர் விரயத்மை குமைக்க உைவுகிைது

vi
TABLE OF CONTENTS

CHAPTER TITLE PAGE


NO. NO.
ACKNOWLEDGEMENT iii
ABSTRACT- ENGLISH v
ABSTRACT- TAMIL vi
LIST OF TABLES xi
LIST OF FIGURES xii
LIST OF ABBREVIATIONS xiii

1 INTRODUCTION 1

1.1 COMPANY PROFILE 2


1.2 OBJECTIVE OF THE PROJECT 2
1.3 NECESSITY OF THE PROJECT 2
1.4 LITERATURE SURVEY 3
1.5 ORGANIZATION OF THE REPORT 3

2 EXISTING SYSTEM 5

2.1 BLOCK DIAGRAM OF THE EXISTING SYSTEM 5


2.2 BLOCK DIAGRAM DESCRIPTION 5
2.2.1 Power Supply 5
2.2.2 Motor Pump Setup 5
2.2.3 Storage Tank 6
2.2.4 Valve Control Unit 6
2.2.5 Sprinkler System 6
2.3 WORKING OF THE EXISTING SYSTEM 6

3 PROPOSED SYSTEM 8

vii
3.1 BLOCK DIAGRAM OF THE PROPOSED SYSTEM 8

3.2 BLOCK DIAGRAM DESCRIPTION 9

3.2.1 Solar Panel 9

3.2.2 Tracking System 9


3.2.3 Zeta Converter 10
3.2.4 Battery 10
3.2.5 Control Unit 10
3.2.6 Power Supply to the Control Unit 11
3.2.7 DC Motor 11
3.2.8 Relay 11
3.2.9 Driver Circuit 12
3.2.10 Soil Moisture Sensor 12
3.3 WORKING OF THE PROPOSED SYSTEM 12

4 HARDWARE DESCRIPTION 14

4.1 PHOTOVOLTAIC SYSTEM 14


4.1.1 Working of Solar Panel 14
4.2 TRACKING SYSTEM 15
4.2.1 Arduino 15
4.2.2 Servomotor 15
4.2.3 Light Dependent Resistor 16
4.3 ZETA CONVERTER 16
4.3.1 Importance of DC-DC Conversion 16
4.3.2 Basics of DC-DC Converters 17
4.3.3 Comparative Study and Analysis of Converters 18
4.3.4 Working of Zeta Converter 18
4.3.5 Design of Zeta Converter 20

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

5.1 MPLAB IDE 48


5.2 BUILT-IN COMPONENTS 48
5.3 OPTIONAL COMPONENTS 50

6 SIMULATION OF ZETA CONVERTER 52

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 CONCLUSION AND FUTURE SCOPE 58

7.1 CONCLUSION 58
7.2 FUTURE SCOPE 58

APPENDICES

APPENDIX 1 SOLAR TRACKING CODING


APPENDIX 2 MICROCONTROLLER CODING
APPENDIX 3 DATASHEETS
APPENDIX 4 PUBLICATION DETAILS

REFERENCES

x
LIST OF TABLES

TABLE PAGE
TITLE
NO NO

4.1 Key Features of PIC16F877A 31


4.2 Port A Functions 33
4.3 Summary of Registers Associated with Port A 33
4.4 Port B Functions 34
4.5 Summary of Registers Associated with Port B 35
4.6 Port C Functions 35
4.7 Summary of Registers Associated with Port C 36
4.8 Port D Functions 36
4.9 Summary of Registers Associated with Port D 37
4.10 Port E Functions 38
4.11 Summary of Registers Associated with Port E 38

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

4.1 Equivalent Circuit of PV Cell 14


4.2 Zeta Converter 19
4.3 Snapshot of the Zeta Converter 20
4.4 MOSFET Driver Circuit 22
4.5 Pin Diagram of Opto-Coupler TLP250 24
4.6 PIC16F877A Program Memory Map and Stack 30
4.7 Pin Configuration of PIC16F877A 32
4.8 Capture Mode Block Diagram 40
4.9 Compare Mode Block Diagram 41
4.10 PWM Mode Block Diagram 42
4.11 Circuit Symbol of a Relay 44
4.12 Drive Circuit and Protection Diodes for Relay 46
6.1 Output Voltage Vs Time Plot 56
6.2 Snapshot of the Hardware 57

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

MPPT Maximum Power Point Tracking


NC Normally Closed
NO Normally Open
PC Protocol Control
PIC Peripheral Interface Controller

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

TTL Transistor Transistor Logic

xiv
CHAPTER 1
INTRODUCTION
CHAPTER 1
INTRODUCTION

In India, agriculture plays a very important role to development of


country as our economy mainly based on it. India ranks second worldwide in
farm output. The most important factor for the agriculture is timely and ample
supply of water. But due to uncertain rainfall and water scarcity in land
reservoirs, we are not able to make proper use of agricultural resources. Also
unplanned use of water results in to wasting of water on large proportion. With
the increase in agricultural activity and competitive demand from different
sectors, it has become important to economize on the use of water. We can
optimize use of water by adopting sensor base irrigation system.

Nowadays we use different irrigation system to reduce dependency of


rain. Due to the lack of electricity and mismanagement, in the manual control
irrigation system many times crops are dry or flooded with water. So to avoid
this problem sensor base irrigation system is used. In manual system, farmers
usually control the electric motors observing the soil, crop and weather
conditions by visiting the sites.

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

SE Electricals Limited was founded in 2008. It manufactures all Electric


components of a Wind Turbine. It started working with an aim to become a self-
sustained organization and to share the expertise with other industries. It made
the business model more complete in terms of Design Capabilities, Cost
competitiveness, Service capabilities. It has plants across India and China. It is a
vertically integrated organization having all the manufacturing facilities in-
house, which gives the assured commitment of company’s capacities and
priorities.

SE Electricals units in SEZ brings the advantage of Special Economic


Zones like duty-free & hassle-free imports, useful for exports out of India and
projects within India which are exempted from Customs duty. SE Electricals
manufactures Control Panels, Generators and Transformers.It has global
customers in 25 countries across 5 continents. It is an ISO 9001:2008, ISO
14001:2004, OHSAS 18001:2007, UL, CSA, IEC, GL standards certified with
ETL, CSA, CE marking.

1.2 OBJECTIVE OF THE PROJECT

The objective of this project is to provide auto irrigation to agriculture


field which uses sensor technology with microcontroller to make a smart
switching device.

1.3 NECESSITY OF THE PROJECT

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.

1.4 LITERATURE SURVEY

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 authors, Hemant Ingale and N.N.Kasat, have published an article


inInternational Journal of Advanced Research in Computer Science and
Software Engineering journal about the automated solar based agriculture
pumping [1].

The application of wireless sensor network in the irrigation system has


been imbibed from an international paper published by Sunil Nalamala and A.
Raghu Ram, in the year 2014 [5].

1.5 ORGANIZATION OF THE REPORT

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 existing system in the company is grid powered sprinkler irrigation


system.

2.1 BLOCK DIAGRAM OF THE EXISTING SYSTEM

The block diagram for the existing system is shown in the Fig.2.1.

Fig.2.1 Block Diagram of the Existing System

2.2 BLOCK DIAGRAM DESCRIPTION

2.2.1 Power Supply

The existing system is the human operated sprinkler irrigation system. In


this system, the components like motor and water pump are being supplied by
the conventional AC supply taken from the grid.

2.2.2 Motor Pump Setup

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.

2.2.4 Valve Control Unit

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.

2.2.5 Sprinkler System

Sprinkler irrigation is a method of applying irrigation water which is


similar to natural rainfall. Water is distributed through a system of pipes usually
by pumping. It is then sprayed into the air through sprinklers so that it breaks up
into small water drops which fall on the ground. The valves controlling the
sprinkler nozzle is being operated manually.

2.3 WORKING OF THE EXISTING SYSTEM

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

The proposed system is to implement a solar power smart irrigation


system to decrease the human intervention and wastage of water.

3.1 BLOCK DIAGRAM OF THE PROPOSED SYSTEM

Block diagram of the proposed system is shown in the Fig.3.1.

Fig.3.1 Block Diagram of the Proposed System

8
3.2 BLOCK DIAGRAM DESCRIPTION

3.2.1 Solar Panel

A photovoltaic (in short PV) module is a packaged, connected assembly of


typically 6×10 solar cells. Solar modules use light energy (photons) from the sun to
generate electricity through the photovoltaic effect. Electrical connections are made
in series to achieve a desired output voltage and/or in parallel to provide a desired
current capability. The conducting wires that take the current off the modules may
contain silver, copper or other non-magnetic conductive [transition metals]. The
cells must be connected electrically to one another and to the rest of the system. A
single solar module can produce only a limited amount of power; most installations
contain multiple modules.

3.2.2 Tracking System

A Maximum Power Point Tracker (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 occurs at the knee of the curve where dP/dV=0.
At this point the characteristic resistance equals that of the load resistance.
Maximum power point trackers utilize some type of control circuit or logic to
search for this point and thus to allow the converter circuit to extract the
maximum power available from a cell. The MPPT in a grid tied PV system will
always operate the array at its peak power point unless the grid fails when the
batteries are full and there are insufficient local loads.

9
3.2.3 Zeta Converter

Zeta converter is a fourth order DC-DC converter. It operates either in


step-up or in step-down mode. It produces high output voltage when compared
to buck-boost converter. The zeta converter charge controller keeps the solar
panel current and voltage at the regulated power point while charging the
battery. Zeta converter helps to maintain the constant output from solar panel to
battery.

Basically, the PWM Zeta converter is a non inverting-polarity type and it


can be design to achieve low-ripple output current either with coupled inductors
or with separate inductors. A PWM Zeta converter is currently used in power
factor correction and voltage regulation designs. The PWM Zeta converter
topology consisting of four reactive elements (two inductors and two capacitors)
exhibits many common features with the PWM Cuk and Sepic converters
whose analysis has surfaced in many forms over the years.

3.2.4 Battery

Battery is an electrical storage device that uses a reversible chemical


reaction to store energy. In this system we are using 12v battery which acts as a
source to the DC motor. The battery is charged by the solar panel through the
zeta converter.

3.2.5 Control Unit

PIC16F877A is one of the most advanced microcontroller from


Microchip. A Microchip PIC16F877A, 8-bit (14-bit Core), 20 MHz
microcontroller is the heart of the control unit. Measurement of current can be

10
easily made by using PIC16F877A. This 40-pin chip has 33 input/output pins
including 8 analog-to-digital inputs.

3.2.6 Power Supply to the Control Unit

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

A DC motor is any of a class of rotary electrical machines that converts


direct current electrical energy into mechanical energy. The common types rely
on the forces produced by magnetic fields. They have some internal mechanism
to periodically change the direction of current flow in part of the motor.

3.2.8 Relay

A relay is an electrically operated switch. When the current flows through


the coil, the resulting magnetic field attracts an armature that is mechanically
linked to a moving contact. The coil current can be on or off so relays have two
switch positions and they are double throw switches. The movement either
makes or breaks a connection with a fixed contact. The relay is connected in

11
between the microcontroller and the motor. Relay will act as a negative line to
the motor when it receives signal from the microcontroller.

3.2.9 Driver Circuit

In electronics, a driver circuit is an electrical circuit or other electronic


component used to control another circuit or component, such as a high power
transistor, Liquid Crystal Display (LCD) and numerous others. They are usually
used to regulate current flowing through a circuit or 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 and transistor. The
driver circuit is connected between microcontroller and zeta converter, to
provide gate pulse to the MOSFET switch of the zeta converter.

3.2.10 Soil 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.

3.3 WORKING OF THE PROPOSED SYSTEM

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.

Regulator circuit is connected between the microcontroller and the


battery to provide a constant input voltage of 5Volts to the microcontroller. DC
motor receives supply from the 12 Volts battery. The positive terminal of the
DC motor is connected to the battery and the negative terminal of the DC motor
is connected to the microcontroller through the relay.

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

4.1.1 Working of Solar Panel

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.

A Photovoltaic cell consists of two or more thin layers of semiconducting


material, most commonly silicon. When the silicon is exposed to light, electrical
charges are generated. A PV cell is usually represented by an electrical equivalent
one-diode model shown in Fig.4.1. This model contains a current source, one
diode, internal shunt resistance and a series resistance which represents the
resistance inside each cell.

Fig.4.1 Equivalent Circuit of PV Cell

14
4.2 TRACKING SYSTEM

A maximum power point tracker (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. The solar tracking system is included in
order to increase the efficiency of the solar panel.

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

Arduino has a 8 – bit PWM generator, so we can get up to 256 distinct


PWM signal. To drive a servomotor we need to get a PWM signal from the
board. This is usually accomplished using timer function of the microcontroller
but Arduino makes it very easy. Arduino provides a servo library in which we
have to assign the servo angle and the servomotor rotates by that angle.

4.2.2 Servomotor

The DC Servomotor is an assembly of four things: a normal DC motor, a


gear reduction unit, a position sensing unit and a control circuit. The function of
a servo is to receive a control signal that represents a desired output position of
the servo shaft, and apply power to its DC motor until its shaft turns to that
position. It uses the position – sensing device to determine the rotational
position of the shaft. The solar panel that is attached to the motor will be reacted
according to the direction of the motor.

15
4.2.3 Light Dependent Resistor

A Light Dependent Resistor (LDR) is also called a photo resistor or a


cadmium sulfide (CdS) cell. It is basically a photocell that works on the
principle of photoconductivity. The passive component is basically a resistor
whose resistance value decreases when the intensity of light decreases.

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.

4.3 ZETA CONVERTER

4.3.1 Importance of DC-DC Conversion

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.

The DC transformer like its AC counterpart provides lossless transfer of


energy between circuits at different voltage or current levels. The only reason is that
the DC transformer is unfamiliar, because the magnetic technology used in practical
AC transformers cannot handle direct current.
16
DC-DC conversion is very important in electronic circuit application and is
becoming important in a much wider applications. Many circuits use power at
different voltage levels. It is often more convenient to convert power from a single
source rather than trying to distribute many different supplies.

4.3.2 Basics of DC-DC Converters

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,

Input Power=Output Power + Power Loss

Where,

Input Power is the power fed into the converter


Output Power is the output power and
Power Loss is the power wasted inside the converter.

A perfect converter will behave in the same way as a perfect transformer.


There would be no losses, and Pout would be exactly the same as Pin. But there is
no such thing as a perfect DC-DC converter, just as there is no perfect transformer.
So the concept of efficiency is needed.

Efficiency =Output Power/Input Power

Nowadays some types of converter achieve an efficiency of over 90%,

17
using the latest components and circuit techniques. Most others achieve at least
80-85%.

4.3.3 Comparative Study and Analysis of Converters


Buck converter consists of features such as
(i) Pulsed input current, requires input filter,
(ii) Continuous output current results in lower output voltage ripple,
(iii) Output voltage is always less than input voltage.

Boost converter also consists of the following features like


(i) Continuous input current, eliminates input filter,
(ii) Pulsed output current increases output voltage ripple,
(iii) Output voltage is always greater than input voltage.

Buck-Boost converter has its own features such as,


(i) Pulsed input current, requires input filter,
(ii) Pulsed output current increases output voltage ripple,
(iii) Output voltage can be either greater or smaller than input voltage.

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.

4.3.4 Working of Zeta Converter

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.

Fig.4.2 Zeta Converter

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.

Thus, a non-pulsating and boosted DC output is derived from the


converter which is again filtered at the capacitor filter C3. The output DC supply
is fed to the motor through the battery.

4.3.5 Design of Zeta Converter


Snapshot of Zeta Converter is shown in the Fig.4.3.

Fig.4.3 Snapshot of the Zeta Converter


1-Capacitor C1 5- Inductor L2
2- Inductor L1 6- Capacitor C2
3- Diode D 7-MOSFET
4- Capacitor C3
20
Duty Cycle Calculation
Duty Cycle = Vout / (Vout+ Vin) (2.1)
= 30 / (30 + 18)
D = 0.63 or 63 %

Maximum Input Current


Iin (max) = Iout * (Duty cycle / (1- Duty cycle)) (2.2)
= 1 A * (0.63 / (1- 0.63)
= 1 A * 1.7
Iin (max) = 1.7 A

Desired Ripple Current


∆ IL = K * Iin (2.3)
= 0.2 * 1.7
∆ IL = 0.34 A

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.

Fig.4.4 MOSFET Driver Circuit

4.4.1 Working

From the step-down transformer of 230/12 V, 12 V ac supply is given


which is rectified using a half wave rectifier and converter to dc supply. The
supply is fed to the Opto-couplerTLP250 as input supply to the pins 8 and 5.
The signals from microcontroller are received at the pins 2 and 3. The received
signals is converted into electrical energy and fed to the base of the transistors
CK100 and 2N2222.

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

In electronics, an opto-isolator, also called an optocoupler, photocoupler


or optical isolator, is a component that transfers electrical signals between two
isolated circuits by using light. It prevents high voltages from affecting the
system which receives the signal.

A common type of opto-isolator consists of an LED and a phototransistor


in the same opaque package. Other types of source-sensor combinations include
LED-photodiode, LED-LASER, and lamp-photo resistor pairs. Usually opto-
isolators transfer digital (on-off) signals, but some techniques allow them to be
used with analog signals.

Operation

An opto-isolator contains a source (emitter) of light, almost always a near


infrared Light Emitting Diode (LED), that converts electrical input signal into
light, a closed optical channel, and a photo-sensor, which detects incoming light
and either generates electric energy directly, or modulates electric current
flowing from an external power supply. The sensor can be a photo-resistor, a

23
photodiode, a phototransistor, a silicon-controlled rectifier. Pin Diagram of
Opto-Coupler TPL250 is shown in Fig.4.5.

Fig.4.5 Pin Diagram of Opto-Coupler TLP250

In this opto-coupler TLP 250 IC,


 Pin 2 and 3 acts as the anode and cathode pins which receives the input
from the microcontroller.
 Pin 8 and 5 receives input supply from the 12V DC supply module.
 Pin 7 and 6 acts as the output pins which acts as the input pins to the
transistors.

4.4.3 Gate Driver

A gate driver is a power amplifier that accepts a low-power input from a


controller IC and produces a high-current drive input for the gate of power
MOSFET. Gate drivers can be provided either on-chip or as a discrete module.
A gate driver consists of a level shifter in combination with an amplifier.

Purpose

In contrast to bipolar transistors, MOSFETs do not require constant


power input, if they are not being switched on or off. The isolated gate-electrode
of the MOSFET forms a capacitor (gate capacitor), which must be charged or

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.

When a transistor is switched on or off, it does not immediately switch


from a non-conducting to a conducting state; and may transiently support both a
high voltage and conduct a high current. Consequently, when gate current is
applied to a transistor to cause it to switch, a certain amount of heat is generated
which can, in some cases, be enough to destroy the transistor. Therefore, it is
necessary to keep the switching time as short as possible.

To minimize switching loss, switching times are in the range of


microseconds. The switching time of a transistor is inversely proportional to the
amount of current used to charge the gate. Therefore, switching currents are
often required in the range of several hundred milliamperes, or even in the range
of amperes.

The switching signal for a transistor is usually generated by a logic circuit


or a microcontroller, which provides an output signal that typically is limited to
a few milliamperes of current. Consequently, a transistor which is directly
driven by such a signal would switch very slowly, with correspondingly high
power loss. During switching, the gate capacitor of the transistor may draw
current so quickly that it causes a current overdraw in the logic circuit or
microcontroller, causing overheating which leads to permanent damage or even
complete destruction of the chip.

25
To prevent this from happening, a gate driver is provided between the
microcontroller output signal and the power transistor.

4.4.4 Transistor

A transistor is a semiconductor device used to amplify or switch


electronic signals and electrical power. In this project, we have used two
transistors CK100 and 2N2222, where former is a PNP transistor and latter is a
NPN transistor respectively. They receive the base signal from the output pins
(pin 6 and 7) of the opto-coupler. The base signal is being amplified and fed to
the respective switches as the gate signal.

4.5 PIC16F877A MICROCONTROLLER

4.5.1 Introduction

A microcontroller is a complete microprocessor system built on a single


IC. Microcontrollers were developed to meet a need for microprocessors to be
put into low cost products. Building a complete microprocessor system on a
single chip substantially reduces the cost of building products.

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.

4.5.2 Special Features

 High-performance RISC CPU

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

4.5.3 Peripheral Features

 Timer0: 8-bit timer/counter with 8-bitprescaler


 Timer1: 16-bit timer/counter with prescaler, can be incremented during
sleep via external crystal/clock
 Timer2: 8-bit timer/counter with 8-bit period register, prescale rand
post scaler
 Two Capture, Compare, PWM modules
Capture is 16-bit, max resolution is 12.5 ns,
Compare is 16-bit, max resolution is 200 ns,
 PWM max. resolution is10-bit
 10-bit multi-channel Analog-to-Digital converter
 Universal Synchronous Asynchronous Receiver Transmitter

27
(USART/SCI) with 9- bit address detection.
 Brown-out detection circuitry for Brown-out Reset

4.5.4Analog to Digital Converter

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.

The A/D module has four registers. These registers are

 A/D RESULT HIGH REGISTER (ADRESH).


 A/D RESULT LOW REGISTER (ADRESL)
 A/D CONTROL REGISTER 0 (ADCON0)
 A/D CONTROL REGISTER 1 (ADCON1)

The ADCON0 register, shown in register controls the operation of the


A/D module. The ADCON1 register configures the functions of the port pins.
The port pins can be configured as analog inputs or as digital I/O.

4.5.5 Oscillator and Clock Circuit

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.

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.

4.5.6 Memory Organization

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

The PIC16F87XA devices have a 13-bit program counter capable of


addressing an 8K word x 14 bit program memory space. The PIC16F877A
devices have 8Kwords x 14bits of Flash program memory, while
PIC16F873A/874A devices have 4K words x 14 bits. 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.

30
4.5.7 Key Features of PIC16F877A

The purpose of choosing this PIC microcontroller in particular is for it’s


extremely easy at controlling. The key features of the PIC16F877A is shown in
Table.4.1.
Table.4.1 Key Features of PIC16F877A
KEY FEATURES PIC16F877A
Operating Frequency DC – 20Mhz
POR, BOR
Resets (and Delays)
(PWRT, OST)
Flash Program Memory
8K
(14-bitwords)
Data Memory (bytes) 368
EEPROM Data Memory(bytes) 256
Interrupts 15
I/O Ports Ports A, B, C, D, E
Timers 3
Capture/Compare/PWM modules 2
Serial Communications MSSP, USART
Parallel Communications PSP
10-bit Analog-to-Digital Module 8 input channels
Analog Comparators 2
Instruction Set 35 Instructions
Packages 40-pin PDIP
44-pin PLCC
44-pin TQFP
44-pin QFN

31
4.5.8 Pin Diagram of PIC16F877A

Pin diagram of PIC16F877A is shown in Fig.4.7.

Fig.4.7 Pin Configuration of PIC16F877A

4.5.9 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.

4.5.9.1 Port A and TRISA Register

Port A is a 6-bit wide bi-directional port. The corresponding data


direction register is TRISA. Setting a TRISA bit (=1) will make the
corresponding
32
Port A pin is an input, i.e., put the corresponding output driver in a Hi-
impedance mode. Clearing a TRISA bit (=0) will make the corresponding Port
A pin an output, i.e., put the contents of the output latch on the selected pin.
Port A Function is shown in the Table.4.2.

Table.4.2 Port A Functions

NAME BIT# BUFFER FUNCTION


RA0/AN0 Bit0 TTL Input/output or analog input
RA/AN1 Bit1 TTL Input/output or analog input
RA2/AN2 Bit2 TTL Input/output or analog input
RA3/AN3/VREF Bit3 TTL Input/output or analog input or VREF
RA4/T0CKI Bit4 ST Input/output or external clock input for
Timer0
Output is open drain type
RA5/SSAN4 Bit5 TTL Input/output or slave select input for
synchronous serial port or analog input
Legend: TTL = TTL input, ST = Schmitt Trigger input

Summary of Registers Associated with Port A is shown in the Table.4.3.

Table.4.3Summaryof Registers Associated with Port A

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

Port B is an 8-bit wide bi-directional port. The corresponding data


direction register is TRISB. Setting a TRISB bit (=1) will make the
corresponding Port B pin an input, i.e., put the corresponding output driver in a
hi-impedance mode. Clearing a TRISB bit (=0) will make the corresponding
Port B pin an output Three pins of Port B are multiplexed with the Low Voltage
Programming function; RB3/PGM, RB6/PGC and RB7/PGD.Port B Function is
shown in the Table.4.4.

Table.4.4 Port B Functions

Name Bit# Buffer Function


Input/Output pin or external interrupt input.
RB0/INT Bit0 TTL/ST(1)
Internal software programmable weak pull-up.
Input/Output pin. Internal software
RB1 Bit1 TTL
programmable weak pull-up.
Input/Output pin. Internal software
RB2 Bit2 TTL
programmable weak pull-up.
Input/Output pin or programmable pin in LVP
RB3/PGM Bit3 TTL mode. Internal software programmable weak
pull-up.
Input/Output pin (with interrupt on change).
RB4 Bit4 TTL
Internal software programmable weak pull-up.
Input/Output pin (with interrupt on change).
RB5 Bit5 TTL
Internal software programmable weak pull-up.
Input/Output pin (with interrupt on change) or
In-Circuit Debugger pin. Internal Software
RB6/PGC Bit6 TTL/ST(2)
programmable weak pull-up. Serial
programming data
Input/Output pin (with interrupt on change) or
In-Circuit Debugger pin. Internal Software
RB7/PGD Bit7 TTL/ST(2)
programmable weak pull-up. Serial
programming clock.

34
Summary of Registers Associated with Port B is shown in the Table.4.5.

Table.4.5 Summary of Registers Associated with Port B


Value on: Value on
ADDRESS NAME Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 POR, all other
BOR resets
06h, 106h PORTB RB7 RB6 RB5 RB4 RB3 RB2 RB1 RB0 xxxxxxxx uuuuuuuu
1111
86h, 186h TRISB 1111 1111
PORTB Data Direction Register 1111
OPTION RBP INTED 1111
81h, 181h T0CS T0SE PSA PS2 PS1 PS0 1111 1111
_REG U G 1111
Legend: x = unknown, u = unchanged, Shaded cells are not used by Port B

4.5.9.3 Port C and TRISC Register

Port C 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
Port C pin an output. Port C is multiplexed with several peripheral functions.
Port C pins have Schmitt Trigger input buffers. Port C Function is shown in the
Table.4.6.
Table.4.6 Port C Functions
Name Bit# Buffer Function
Input/Outputport pin or Timer1 oscillator output/ Timer
RB0/INT Bit0 ST
1 clock input.
Input/Outputport pinor Timer1 oscillator input or
RB1 Bit1 ST
Capture2 input/ Compare2 output/ PWM2 Output
Input/Outputport pinor Capture1 input / Compare1
RB2 Bit2 ST
output/ PWM1 Output
RC3 can also be the synchronous serial clock for both
RB3/PGM Bit3 ST
SPI and I2C modes.
RC4 can also be the SPI Data In (SPI mode) or data I/O
RB4 Bit4 ST
(I2C mode)
Input/Outputport pinor synchronous serial port data
RB5 Bit5 ST
output
Input/Outputport pinor USART Asynchronous Transmit
RB6/PGC Bit6 ST
or Synchronous Clock
Input/Outputport pinor USART Asynchronous Receive
RB7/PGD Bit7 ST
or Synchronous Data

35
Summary of Registers Associated with Port C is shown in the Table.4.7.

Table.4.7 Summary of Registers Associated with Port C


Value Value
ADDRE Bit Bit Bit Bit Bit Bit on: on all
NAME Bit 6 Bit 5
SS 7 4 3 2 1 0 POR, other
BOR resets
RC xxxxxx uuuuuu
07h PORTC RC7 RC6 RC5 RC4 RC3 RC2 RC1
0 xx uu
1111 1111
87h TRISC - - PORTC Data Direction Register
1111 1111
Legend: x = unknown, u = unchanged

4.5.9.4 Port D and TRISD Register

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.

Table.4.8 Port D Functions

Name Bit# Buffer Function


RD0/PSP0 Bit0 ST/TTL(1) Input/Outputport pin or parallel slave port bit0
RD1/PSP1 Bit1 ST/TTL(1) Input/Outputport pin or parallel slave port bit1
RD2/PSP2 Bit2 ST/TTL(1) Input/Outputport pin or parallel slave port bit2
RD3/PSP3 Bit3 ST/TTL(1) Input/Outputport pin or parallel slave port bit3
RD4/PSP4 Bit4 ST/TTL(1) Input/Outputport pin or parallel slave port bit4
RD5/PSP5 Bit5 ST/TTL(1) Input/Outputport pin or parallel slave port bit5
RD6/PSP6 Bit6 ST/TTL(1) Input/Outputport pin or parallel slave port bit6
RD7/PSP7 Bit7 ST/TTL(1) Input/Outputport pin or parallel slave port bit7
Legend : ST – Schmitt Trigger input TL=TTL input

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.

Table.4.9Summary of Registers Associated with Port D


Value Value
ADDRE NAM Bit Bit Bit Bit Bit Bit on: on all
Bit 5 Bit 4
SS E 7 6 3 2 1 0 POR, other
BOR resets
POR RD xxxxxx uuuuuu
06h RD7 RD6 RD5 RD4 RD3 RD2 RD1
TD 0 xx uu
TRIS 1111 1111
88h - - PORTD Data Direction Register
D 1111 1111
TRIS OB IBO PSPMO PORTE Data 0000 - 0000 -
89h IBF -
E F V DE Direction Bits 111 111

Legend: x= unknown, u= unchanged, - = unimplemented read as ‘0’. Shaded cells are not
used by Port D

4.5.9.5 Port E and TRISE Register

Port E 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 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

Name Bit# Buffer Function


Input/Outputport pin or read control input inparallel
slave port mode or analog input
RD
RE0/RD/AN5 Bit0 ST/TTL(1)
1 = Not a read operation
0 = Read operation. Reads PORTD register (if chip
selected)
Input/Outputport pin or write control input inparallel
slave port mode or analog input
WR
RE1/WR/AN6 Bit1 ST/TTL(1)
1 = Not a write operation
0 = Write operation. Writes PORTD register (if chip
selected)
Input/Outputport pin or chip select control input
inparallel slave port mode or analog input
RE2/CS/AN7 Bit2 ST/TTL(1) CS
1 = Device is not selected
0 = Device is selected

Summary of Registers Associated with Port E is shown in the Table.4.11.

Table.4.11 Summary of Registers Associated with Port E

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

Capture-Compare-Pulse-Width-Module (CCP) is a special module


designs for modulation and waveform generation applications. This module
basically works on three different modes (capture/compare and PWM odes).
The PIC16F877 chip contains two CCP ports (CCP1 and CCP2). Each of this
CCP module contains 16 bit registers which works as

• 16-bit Capture register


• 16-bit Compare register
• PWM Master/Slave Duty Cycle registers

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

Capture/Compare/PWM Register 1 (CCPR1) is a 16 bit register


comprised of two 8-bit registers: CCPR1L (low byte) and CCPR1H (high byte).
The CCP1CON register controls the operation of CCP1. The special event
trigger is generated by a compare match and will reset Timer1.

CCP2 Module

Capture/Compare/PWM Register 2 (CCPR2) is comprised of two 8-bit


registers: CCPR2L (low byte) and CCPR2H (high byte). The CCP2CON

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

In Capture mode, CCPR1H:CCPR1L captures the 16-bit value of the


TMR1 register when an event occurs on pin RC2/CCP1.
An event is defined as one of the following:
• Every falling edge
• Every rising edge
• Every 4th rising edge
• Every 16th rising edge

The type of event is configured by control bits, CCP1M3:CCP1M0


(CCPxCON<3:0>). When a capture is made, the interrupt request flag bit,
CCP1IF (PIR1<2>), is set. The interrupt flag must be cleared in software. If
another capture occurs before the value in register CCPR1 is read, the old
captured value is overwritten by the new value. The block diagram of capture
mode is shown is shown in the Fig.4.8.

Fig.4.8 Capture Mode Block Diagram

40
Compare Mode

In Compare mode, the 16-bit CCPR1 register value is constantly


compared against the TMR1 register pair value. When a match occurs, the
RC2/CCP1 pin is:
• Driven high
• Driven low
• Remains unchanged
The action on the pin is based on the value of control bits,
CCP1M3:CCP1M0 (CCP1CON<3:0>). At the same time, interrupt flag bit
CCP1IF is set. The compare mode block diagram is shown in the Fig.4.9.

Fig.4.9 Compare Mode Block Diagram

PWM Mode (PWM)

In Pulse Width Modulation mode, the CCPx pin produces up to a 10-bit


resolution PWM output. Since the CCP1 pin is multiplexed with the PORTC
data latch, the TRISC<2> bit must be cleared to make the CCP1 pin an output.
Fig.4.10 shows a simplified block diagram of the CCP module in PWM mode.

41
Fig.4.10 PWM Mode Block Diagram

Setup for PWM Operation

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.

4.5.11 Pulse Width Modulation Control

A Pulse Width Modulation (PWM) signal is a method for generating an


analog signal using a digital source. A PWM signal consists of two main
components that define its behaviour, a duty cycle and a frequency. The duty

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

A relay is an electrically operated switch. Current flowing through the


coil of the relay creates a magnetic field which attracts a lever and changes the
switch contacts. The coil current can be on or off so relays have two switch
positions and they are double throw (changeover) switches.

Relays allow one circuit to switch a second circuit which can be


completely separate from the first. For example a low voltage battery circuit can
use a relay to switch a 230V AC mains circuit. There is no electrical connection
inside the relay between the two circuit, the link is magnetic and mechanical.
Relays are very simple devices. There are four major parts in every relay. They
are
 Electromagnet
 Armature that can be attracted by the electromagnet

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.

Fig.4.11 Circuit symbol of a Relay

The relay's switch connections are usually labeled COM, NC and NO:

 COM = Common, always connected, it is the moving part of the switch.


 NC = Normally Closed, COM is connected to this when the relay coil is off.
 NO = Normally Open, COM is connected to this when the relay coil is on.

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.

4.6.2 Drive Circuit and Protection Diodes for Relay

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

4.6.3 Choosing a Relay

One needs to consider several features when choosing a relay:


1. Physical size and pin arrangement: If you are choosing a relay for an
existing PCB you will need to ensure that its dimensions and pin
arrangement are suitable. You should find this information in the
supplier's catalogue.
2. Coil voltage: The relay's coil voltage rating and resistance must suit the
circuit powering the relay coil. Many relays have a coil rated for a 12V
supply but 5V and 24V relays are also readily available. Some relays
operate perfectly well with a supply voltage which is a little lower than
their rated value.
3. Coil resistance: The circuit must be able to supply the current required
by the relay coil. You can use Ohm's law to calculate the current:
Relay coil current = supply voltage / coil resistance
46
For example: A 12V supply relay with a coil resistance of 400 passes a
current of 30mA. Most ICs will require a transistor to amplify the current.
4. Switch ratings (voltage and current): The relay's switch contacts must
be suitable for the circuit they are to control. You will need to check the
voltage and current ratings. Note that the voltage rating is usually higher
for AC, for example: "5A at 24V DC or 125V AC".
5. Switch contact arrangement (SPDT, DPDT etc.): Most relays are
SPDT or DPDT which are often described as single pole change over or
double pole changeover

4.7 SOIL MOISTURE SENSOR

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.

Reflected microwave radiation is affected by the soil moisture and is used


for remote sensing in hydrology and agriculture. Portable probe instruments can
be used by farmers or gardeners.

Soil moisture sensors typically refer to sensors that estimate volumetric


water content. Another class of sensors measure another property of moisture in
soils called water potential; these sensors are usually referred to as soil water
potential sensors and include gypsum blocks.

47
CHAPTER 5
SOFTWARE DESCRIPTION
CHAPTER 5
SOFTWARE DESCRIPTION

5.1 MPLAB IDE

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.

MPLAB supports the following compilers:

 MPLAB MPASM Assembler


 MPLAB ASM30 Assembler
 MPLAB C Compiler for PIC18
 MPLAB C Compiler for PIC24 and PIC DSCs
 MPLAB C Compiler for PIC32
 HI-TECH C

5.2 BUILT-IN COMPONENTS

Project Manager

The project manager provides integration and communication between


the IDE and the language tools.

48
Editor

The editor is a full-featured programmer's text editor that also serves as a


window into the debugger.

Assembler/Linker and Language Tools

The assembler can be used standalone to assemble a single file, or can be


used with the linker to build a project from separate source files, libraries and
recompiled objects. The linker is responsible for positioning the compiled code
into memory areas of the target microcontroller.

Debugger

The Microchip debugger allows breakpoints, single-stepping, watch


windows and all the features of a modern debugger for the MPLAB IDE. It
works in conjunction with the editor to reference information from the target
being debugged back to the source code.

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

Optional components can be purchased and added to the MPLAB IDE:

Compiler Language Tools

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

MPLAB ICD 2 provides an economic alternative to an emulator. By


using some of the on-chip resources, MPLAB ICD 2 can download code into a

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

6.1.1 Need for Simulation

Simulation is the discipline of designing a model of an actual or


theoretical physical system, executing the model on a digital computer, and
analyzing the execution output. There are many methods of modeling systems
which do not involve simulation but which involve the solution of a closed-form
system.

6.1.2 MATLAB SIM

MATLAB SIM is a simulation package specifically designed for power


electronics. With MATLAB SIM's interactive simulation capability, you can
change parameter values and view voltages/currents in the middle of a
simulation. It is like having a virtual test bench running on your computer. You
can design and simulate digital power supplies using MATLAB SIM's Digital
Control Module. The digital control can be implemented in either block diagram
or custom C code.

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.

Thus, with MATLAB SIM, we can improve our power supply


performance, increase reliability of the system and drastically reduce time.

6.2 SIMULINK

Simulink is a software package for modeling, simulating, and analyzing


dynamical systems. It supports linear and nonlinear systems, modeled in
continuous time, sampled time, or a hybrid of the two. Systems can also be
multi rate. For modeling, Simulink provides a graphical user interface (GUI) for
building models as block diagrams, using click-and-drag mouse operations.
With this interface, you can draw the models just as you would with pencil and
paper (or as most textbooks depict them). This is a far cry from previous
simulation packages that require you to formulate differential equations and
difference equations in a language or program. Simulink includes a
comprehensive block library of sinks, sources, linear and nonlinear components,
and connectors. You can also customize and create your own blocks. After you
define a model, you can simulate it, using a choice of integration methods,
either from the Simulink menus or by entering commands in MATLAB’s
command window. The menus are particularly convenient for interactive work,
while the command-line approach is very useful for running a batch of
simulations (for example, if you are doing Monte Carlo simulations or want to
sweep a parameter across a range of values). Using scopes and other display
blocks, you can see the simulation results while the simulation is running.

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.

6.2.1 Features of Simulink

1. Graphical editor for building and managing hierarchical block


diagrams.
2. Libraries of predefined blocks for modeling continuous-time and
discrete-time systems.
3. Simulation engine with fixed-step and variable-step ODE solvers.
4. Scopes and data displays for viewing simulation results.
5. Project and data management tools for managing model files and
data.
6. Model analysis tools for refining model architecture and increasing
simulation speed.
7. MATLAB Function block for importing MATLAB algorithms into
models.
8. Legacy Code Tool for importing C and C++ code into models.

6.2.2 Starting Simulink

To start Simulink, you must first start MATLAB. Consult your MATLAB
documentation for more information. You can then start Simulink in two ways:

 Click on the Simulink icon on the MATLAB toolbar.


 Enter the Simulink command at the MATLAB prompt.

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.

6.3 SIMULATION OF ZETA CONVERTER

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.

Output Voltage Vs Time Plot Of the zeta converter is shown in the


Fig.6.1.

55
Fig.6.1 Output Voltage Vs Time Plot

6.4 SNAPSHOT OF THE HARDWARE

The hardware of the solar powered smart irrigation system is as shown in


Fig.6.2. It consists of,
1. Tracking System
2. Battery
3. Driver Circuit
4. Regulator
5. Control unit and PIC Microcontroller
6. DC Motor
7. Moisture Sensor
8. Relay
9. Zeta Converter
10.Solar Panel

56
10 9 8 7 6
0
0
0

1 2 3 4 5

Fig.6.2 Snapshot of the Hardware

57
CHAPTER 7
CONCLUSION AND FUTURE SCOPE
CHAPTER 7
CONCLUSION AND FUTURE SCOPE

7.1 CONCLUSION

The present proposal is a model to modernize the agricultural industries


at a mass scale with optimum expenditure. Using this system, one can save
manpower and consumption of water to improve production and ultimately the
profit. The device is also easy-to-use and no complex training is required on
part of the farmers to use this device. As the system includes the usage of
renewable energy, there are huge economic benefits for the farmers alongside
the positive environmental impact this project would have.

7.2 FUTURE SCOPE

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 <LiquidCrystal.h> //include LCD Library


#include <Servo.h> // include Servo library
LiquidCrystal lcd (2, 3, 4, 5, 6, 7); //
Servo horizontal;
int servohStop = 95;
int servohLeft = 105; //move horizontal
int servohRight = 85;
Servo vertical; // vertical servo
int servovStop = 95;
int servovUp = 105 ;
int servovDown =87;// move vertical servo
// LDR pin connections
// name = analogpin;
int ldrLeftTop = 1; //LDR top left
int ldrRightTop = 0; //LDR top right
int ldrLeftBottom = 2; //LDR down left
int ldrRightBottom = 3; //ldr down right
int dtime = 25; //delay time in milliseconds
int tolerance = 100; //difference tolerance between ldr readings
int count = 0; //millis(); //start millisecond count
void setup()
{
lcd.begin(16, 2); //begin 16x2 LCD
Serial.begin(9600);
// servo connections
// name.attach(pin);
horizontal.attach(9);
vertical.attach(10);
}
void loop()
{
//int count = millis(); //start millisecond count
int leftTop = analogRead(ldrLeftTop); // top left
int rightTop = analogRead(ldrRightTop); // top right
int leftBottom = analogRead(ldrLeftBottom); // down left
int rightBottom = analogRead(ldrRightBottom); // down right
//print resistance values to serial monitor for debugging
Serial.println(leftTop );
Serial.println(rightTop );
Serial.println(leftBottom );
Serial.println(rightBottom );
Serial.println();
count++;
int avt = (leftTop + rightTop) / 2; // average value top
int avd = (leftBottom + rightBottom) / 2; // average value down
int avl = (leftTop + leftBottom) / 2; // average value left
int avr = (rightTop + rightBottom) / 2; // average value right
int avgTot = (rightTop+rightBottom+leftTop+leftBottom) / 4;
int dvert = avt - avd; // check the diffirence of up and down
int dhoriz = avl - avr;// check the diffirence og left and right
if (count%10 == 1) //mod the millis count so the lcd screen updates every 10
millis
{
lcd.clear(); //clear the screen and position cursor at top left
lcd.print("dvert: "); //difference in vertical resistances read from the LDRs
lcd.print(dvert);
lcd.setCursor(0,1); //set lcd cursor to bottom left
lcd.print("dhoriz: "); //difference in horizontal resistance read from the LDRs
lcd.print(dhoriz);
}
if (-1*tolerance > dvert || dvert > tolerance) // check if the difference is in the
tolerance else change vertical angle
{
if (avt > avd) //if average resistance on top is greater than on bottom
{
vertical.write(servovUp);
}
else //avg resistance on bottom is greater than on top
{
vertical.write(servovDown);
}
}
else if (-1*tolerance < dvert || dvert < tolerance) //if difference is smaller than
tolerance, stop vertical servo
{
vertical.write(servovStop);
}
if (-1*tolerance > dhoriz || dhoriz > tolerance) // check if the difference is in the
tolerance else change horizontal angle
{
if (avl > avr)
{
horizontal.write(servohLeft);
}
else
{
horizontal.write(servohRight);
}
}
else if (-1*tolerance < dhoriz || dhoriz < tolerance) //if difference in horizontal
{
horizontal.write(servohStop);
}
delay(dtime);
}
APPENDIX 2
MICROCONTROLLER CODING
APPENDIX 2
MICROCONTROLLER CODING

#include<pic.h>
#include<stdio.h>
#include"delay.c"
#define _XTAL_FREQ 10000000

__CONFIG(0x3f72);

void delay_cust( int);

void delay_cust( int val)


{
int i;
for(i =0; i< val;i++)
__delay_ms(0.1);

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.

DS28002 Rev. 8 - 2 1 of 3 1N4001-1N4007


© Diodes Incorporated
www.diodes.com
I(AV), AVERAGE FORWARD RECTIFIED CURRENT (A)

IF, INSTANTANEOUS FORWARD CURRENT (A)


1.0 10

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

TA, AMBIENT TEMPERATURE (ºC) VF, INSTANTANEOUS FORWARD VOLTAGE (V)


Fig. 1 Forward Current Derating Curve Fig. 2 Typical Forward Characteristics
50 100
Tj = 25ºC
IFSM, PEAK FORWARD SURGE CURRENT (A)

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

NUMBER OF CYCLES AT 60 Hz VR, REVERSE VOLTAGE (V)


Fig. 3 Max Non-Repetitive Peak Fwd Surge Current Fig. 4 Typical Junction Capacitance

Ordering Information (Note 4)


Device Packaging Shipping
1N4001-B DO-41 Plastic 1K/Bulk
1N4001-T DO-41 Plastic 5K/Tape & Reel, 13-inch
1N4002-B DO-41 Plastic 1K/Bulk
1N4002-T DO-41 Plastic 5K/Tape & Reel, 13-inch
1N4003-B DO-41 Plastic 1K/Bulk
1N4003-T DO-41 Plastic 5K/Tape & Reel, 13-inch
1N4004-B DO-41 Plastic 1K/Bulk
1N4004-T DO-41 Plastic 5K/Tape & Reel, 13-inch
1N4005-B DO-41 Plastic 1K/Bulk
1N4005-T DO-41 Plastic 5K/Tape & Reel, 13-inch
1N4006-B DO-41 Plastic 1K/Bulk
1N4006-T DO-41 Plastic 5K/Tape & Reel, 13-inch
1N4007-B DO-41 Plastic 1K/Bulk
1N4007-T DO-41 Plastic 5K/Tape & Reel, 13-inch
Notes: 4. For packaging details, visit our website at http://www.diodes.com/datasheets/ap02008.pdf.

DS28002 Rev. 8 - 2 2 of 3 1N4001-1N4007


© Diodes Incorporated
www.diodes.com
IMPORTANT NOTICE
Diodes Incorporated and its subsidiaries reserve the right to make modifications, enhancements, improvements, corrections or other changes
without further notice to any product herein. Diodes Incorporated does not assume any liability arising out of the application or use of any product
described herein; neither does it convey any license under its patent rights, nor the rights of others. The user of products in such applications shall
assume all risks of such use and will agree to hold Diodes Incorporated and all the companies whose products are represented on our website,
harmless against all damages.
LIFE SUPPORT
Diodes Incorporated products are not authorized for use as critical components in life support devices or systems without the expressed written
approval of the President of Diodes Incorporated.

DS28002 Rev. 8 - 2 3 of 3 1N4001-1N4007


© Diodes Incorporated
www.diodes.com
2N2222
Low Power Bipolar Transistors
Absolute Maximum Ratings (Ta = 25°C unless specified otherwise)

Description Symbol 2N2222 Unit

Collector Emitter Voltage VCEO 30

Collector Base Voltage VCBO 60 V

Emitter Base Voltage VEBO 5

Collector Current Continuous IC 800 mA

Power Dissipation at Ta = 25°C 500 mW


Derate above 25°C 2.28 mW/°C
PD
Power Dissipation at TC = 25°C 1.2 W
Derate above 25°C 6.85 mW/°C

Operating and Storage Junction Temperature Range TJ, Tstg -65 to +200 °C

Electrical Characteristics (Ta = 25°C unless specified otherwise)

Value
Description Symbol Test Condition Unit
Minimum Maximum
Collector Emitter Breakdown Voltage BVCEO IC = 10mA, IB = 0 30 -

Collector Base Breakdown Voltage BVCBO IC = 10µA, IE = 0 60 - V

Emitter Base Breakdown Voltage VEBOf IE = 10µA, IC = 0 5 -

VCB = 50V, IE = 0
10 nA
Collector Leakage Current ICBO -
VCB = 50V, IE = 0
10 µA
Ta = 150°C

IC = 150mA, IB = 15mA 0.4


Collector Emitter Saturation Voltage *VCE (Sat) -
IC = 500mA, IB = 50mA 1.6
V
IC = 150mA, IB = 15mA 1.3
Base Emitter Saturation Voltage *VBE (Sat) 0.6
IC = 500mA, IB = 50mA 2.6

Page 2 06/04/06 V1.0


2N2222
Low Power Bipolar Transistors
Electrical Characteristics (Ta = 25°C unless specified otherwise)
2N2222 Unit
Parameter Symbol Test Condition
Minimum Maximum

IC = 0.1mA, VCE = 10V* 35


IC = 1mA, VCE = 10V 50
IC = 10mA, VCE = 10V* 75
IC = 150mA, VCE = 1V* 50
DC Current Gain hFE -
IC = 150mA, VCE = 1V* 100 300
IC = 500mA, VCE = 10V* 30

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

Rise Time tr VCC = 30V, VBE (off) = 0.5V - 25


ns
Storage Time IC = 150mA, IB1 = 15mA -
ts 225

Fall Time tf IB2 = 15mA, VCC = 30V - 60

*Pulse Condition: Pulse Width ≤300µs, Duty Cycle ≤2%.

Part Number Table


Package Part Number

TO-18 2N2222

Page 3 06/04/06 V1.0


PELS TECH -Sathy
KA78XX/KA78XXA

Absolute Maximum Ratings


Parameter Symbol Value Unit
Input Voltage (for VO = 5V to 18V) VI 35 V
(for VO = 24V) VI 40 V
°
Thermal Resistance Junction-Cases (TO-220) RθJC 5 C/W
Thermal Resistance Junction-Air (TO-220) RθJA 65 °C/W
°
Operating Temperature Range (KA78XX/A/R) TOPR 0 ~ +125 C
°
Storage Temperature Range TSTG -65 ~ +150 C

Electrical Characteristics (KA7805/KA7805R)


(Refer to test circuit ,0°C < TJ < 125°C, IO = 500mA, VI =10V, CI= 0.33µF, CO=0.1µF, unless otherwise specified)

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.

Contact:94894 27827 Mail: pelstech@gmail.com, web: www.peprojects.tk


2
Contact:94894 27827 Mail: pelstech@gmail.com, web: www.peprojects.tk
PELS TECH -Sathy
KA78XX/KA78XXA

Electrical Characteristics (KA7805A)


(Refer to the test circuits. 0oC < TJ < +125 oC, Io =1A, V I = 10V, C I=0.33µF, C O=0.1µF, unless otherwise speci-
fied)

Parameter Symbol Conditions Min. Typ. Max. Unit


TJ =+25 oC 4.9 5 5.1
Output Voltage VO IO = 5mA to 1A, PO ≤ 15W V
4.8 5 5.2
VI = 7.5V to 20V
VI = 7.5V to 25V
- 5 50
IO = 500mA
Line Regulation (Note1) VI = 8V to 12V - 3 50
Regline mV
VI= 7.3V to 20V - 5 50
TJ =+25 oC
VI= 8V to 12V - 1.5 25
TJ =+25 oC
- 9 100
Load Regulation (Note1) IO = 5mA to 1.5A
Regload mV
IO = 5mA to 1A - 9 100
IO = 250mA to 750mA - 4 50
Quiescent Current IQ TJ =+25 oC - 5.0 6.0 mA
IO = 5mA to 1A - - 0.5
Quiescent Current
∆IQ VI = 8 V to 25V, IO = 500mA - - 0.8 mA
Change
VI = 7.5V to 20V, TJ =+25 oC - - 0.8
Output Voltage Drift ∆V/∆T Io = 5mA - -0.8 - mV/ oC
f = 10Hz to 100KHz
Output Noise Voltage VN - 10 - µV/Vo
TA =+25 oC
f = 120Hz, IO = 500mA
Ripple Rejection RR - 68 - dB
VI = 8V to 18V
Dropout Voltage VDrop IO = 1A, TJ =+25 oC - 2 - V
Output Resistance rO f = 1KHz - 17 - mΩ
Short Circuit Current ISC VI= 35V, TA =+25 oC - 250 - mA
o
Peak Current IPK TJ= +25 C - 2.2 - A

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

Figure 6. Load Regulation

Input Output

Figure 7. Ripple Rejection

Input Output

Figure 8. Fixed Output Regulator

21
Contact:94894 27827 Mail: pelstech@gmail.com, web: www.peprojects.tk
IRF840

Data Sheet January 2002

8A, 500V, 0.850 Ohm, N-Channel Power Features


MOSFET • 8A, 500V
This N-Channel enhancement mode silicon gate power field
• rDS(ON) = 0.850Ω
effect transistor is an advanced power MOSFET designed,
tested, and guaranteed to withstand a specified level of • Single Pulse Avalanche Energy Rated
energy in the breakdown avalanche mode of operation. All of • SOA is Power Dissipation Limited
these power MOSFETs are designed for applications such
as switching regulators, switching converters, motor drivers, • Nanosecond Switching Speeds
relay drivers, and drivers for high power bipolar switching • Linear Transfer Characteristics
transistors requiring high speed and low gate drive power.
• High Input Impedance
These types can be operated directly from integrated
circuits. • Related Literature
- TB334 “Guidelines for Soldering Surface Mount
Formerly developmental type TA17425.
Components to PC Boards”

Ordering Information Symbol


PART NUMBER PACKAGE BRAND D

IRF840 TO-220AB IRF840

NOTE: When ordering, include the entire part number. G

Packaging
JEDEC TO-220AB
TOP VIEW

SOURCE
DRAIN
GATE

DRAIN
(FLANGE)

©2002 Fairchild Semiconductor Corporation IRF840 Rev. B


IRF840

Absolute Maximum Ratings TC = 25oC, Unless Otherwise Specified


IRF840 UNITS
Drain to Source Voltage (Note 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .VDS 500 V
Drain to Gate Voltage (RGS = 20kΩ) (Note 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VDGR 500 V
Continuous Drain Current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ID 8.0 A
TC = 100oC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ID 5.1 A
Pulsed Drain Current (Note 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IDM 32 A
Gate to Source Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .VGS ±20 V
Maximum Power Dissipation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .PD 125 W
Linear Derating Factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.0 W/oC
Single Pulse Avalanche Energy Rating (Note 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . EAS 510 mJ
Operating and Storage Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TJ , TSTG -55 to 150 oC
Maximum Temperature for Soldering
Leads at 0.063in (1.6mm) from Case for 10s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TL 300 oC
Package Body for 10s, See Techbrief 334 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tpkg 260 oC

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.

Electrical Specifications TC = 25oC, Unless Otherwise Specified

PARAMETER SYMBOL TEST CONDITIONS MIN TYP MAX UNITS


Drain to Source Breakdown Voltage BVDSS VGS = 0V, ID = 250µA (Figure 10) 500 - - V
Gate to Threshold Voltage VGS(TH) VGS = VDS, ID = 250µA 2.0 - 4.0 V
Zero-Gate Voltage Drain Current IDSS VDS = Rated BVDSS , VGS = 0V - - 25 µA
VDS = 0.8 x Rated BVDSS , VGS = 0V, TJ = 125oC - - 250 µA
On-State Drain Current (Note 2) ID(ON) VDS > ID(ON) x rDS(ON)MAX , VGS = 10V 8.0 - - A
Gate to Source Leakage Current IGSS VGS = ±20V - - ±100 nA
Drain to Source On Resistance (Note 2) rDS(ON) VGS = 10V, ID = 4.4A (Figures 8, 9) - 0.8 0.85 Ω
Forward Transconductance (Note 2) gfs VDS ≥ 50V, ID = 4.4A (Figure 12) 4.9 7.4 - S
Turn-On Delay Time tD(ON) VDD = 250V, ID ≈ 8A, RG = 9.1Ω , RL = 30Ω - 15 21 ns
MOSFET Switching Times are Essentially
Rise Time tr - 21 35 ns
Independent of Operating Temperature.
Turn-Off Delay Time tD(OFF) - 50 74 ns
Fall Time tf - 20 30 ns
Total Gate Charge Qg(TOT) VGS = 10V, ID = 8A, VDS = 0.8 x Rated BVDSS - 42 63 nC
(Gate to Source + Gate to Drain) Ig(REF) = 1.5mA (Figure 14) Gate Charge is
Essentially Independent of Operating
Gate to Source Charge Qgs - 7.0 - nC
Temperature
Gate to Drain “Miller” Charge Qgd - 22 - nC
Input Capacitance CISS VGS = 0V, VDS = 25V, f = 1.0MHz (Figure 11) - 1225 - pF
Output Capacitance COSS - 200 - pF
Reverse-Transfer Capacitance CRSS - 85 - pF
Internal Drain Inductance LD Measured from the Modified MOSFET - 3.5 - nH
Contact Screw on Tab Symbol Showing the
to Center of Die Internal Devices
Measured from the Drain Inductances - 4.5 - nH
D
Lead, 6mm (0.25in) from
Package to Center of Die LD
Internal Source Inductance LS Measured from the - 7.5 - nH
Source Lead, 6mm G
(0.25in) from Header to LS
Source Bonding Pad
S

Thermal Resistance Junction to Case RθJC - - 1.0 oC/W

Thermal Resistance Junction to Ambient RθJA Free Air Operation - - 62.5 oC/W

IRF840 Rev. B
IRF840

Source to Drain Diode Specifications


PARAMETER SYMBOL TEST CONDITIONS MIN TYP MAX UNITS
Continuous Source to Drain Current ISD Modified MOSFET - - 8.0 A
D
Symbol Showing the
Pulse Source to Drain Current (Note 3) ISDM - - 32 A
Integral Reverse P-N
Junction Diode
G

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.

Typical Performance Curves Unless Otherwise Specified

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)

FIGURE 3. NORMALIZED MAXIMUM TRANSIENT THERMAL IMPEDANCE

©2002 Fairchild Semiconductor Corporation IRF840 Rev. B


IRF840

Typical Performance Curves Unless Otherwise Specified (Continued)

102 15
VGS = 10V PULSE DURATION = 80µs
DUTY CYCLE = 0.5% MAX
10µs
12 VGS = 6.0V
ID, DRAIN CURRENT (A)

ID , DRAIN CURRENT (A)


10 100µs
9

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)

FIGURE 4. FORWARD BIAS SAFE OPERATING AREA FIGURE 5. OUTPUT CHARACTERISTICS

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

VGS = 5.0V 0.1


3
VGS = 4.0V
VGS = 4.5V
0 0.01
0 3 6 9 12 15 0 2 4 6 8 10
VDS , DRAIN TO SOURCE VOLTAGE (V) VSD , GATE TO SOURCE VOLTAGE (V)

FIGURE 6. SATURATION CHARACTERISTICS FIGURE 7. TRANSFER CHARACTERISTICS

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

ID = 4.4A, VGS = 10V


rDS(ON) , 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)

FIGURE 8. DRAIN TO SOURCE ON RESISTANCE vs FIGURE 9. NORMALIZED DRAIN TO SOURCE ON


VOLTAGE AND DRAIN CURRENT RESISTANCE vs JUNCTION TEMPERATURE

IRF840 Rev. B
IRF840

Typical Performance Curves Unless Otherwise Specified (Continued)

1.25 3000
ID = 250µA VGS = 0V, f = 1MHz
NORMALIZED DRAIN TO SOURCE

CISS = CGS + CGD


1.15 2400 CRSS = CGD
COSS ≈ CDS + CGD
BREAKDOWN VOLTAGE

C, CAPACITANCE (pF)
1.05 1800
CISS

0.95 1200
COSS

0.85 600 CRSS

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

ISD, SOURCE TO DRAIN CURRENT (A)


DUTY CYCLE = 0.5% MAX
VDS ≥ 50V PULSE DURATION = 80µs
gfs, TRANSCONDUCTANCE (S)

12 DUTY CYCLE = 0.5% MAX

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)

FIGURE 14. GATE TO SOURCE VOLTAGE vs GATE CHARGE

©2002 Fairchild Semiconductor Corporation IRF840 Rev. B


1N4728A - 1N4764A Zeners
January 2005

1N4728A - 1N4764A
Zeners

DO-41 Glass case


COLOR BAND DENOTES CATHODE

Absolute Maximum Ratings * Ta = 25°C unless otherwise noted

Symbol Parameter Value Units


PD Power Dissipation 1.0 W
@ TL ≤ 50°C, Lead Length = 3/8”
Derate above 50°C 6.67 mW/°C
TJ, TSTG Operating and Storage Temperature Range -65 to +200 °C
* These ratings are limiting values above which the serviceability of the diode may be impaired.

Electrical Characteristics Ta = 25°C unless otherwise noted

VZ (V) @ IZ (Note 1) Max. Zener Impedance Leakage Current


Test Current
Device ZZ @ I Z ZZK @ IZK IR VR
Min. Typ. Max. IZ (mA)
(Ω) IZK (Ω) (mA) (µA) (V)
1N4728A 3.315 3.3 3.465 76 10 400 1 100 1
1N4729A 3.42 3.6 3.78 69 10 400 1 100 1
1N4730A 3.705 3.9 4.095 64 9 400 1 50 1
1N4731A 4.085 4.3 4.515 58 9 400 1 10 1
1N4732A 4.465 4.7 4.935 53 8 500 1 10 1
1N4733A 4.845 5.1 5.355 49 7 550 1 10 1
1N4734A 5.32 5.6 5.88 45 5 600 1 10 2
1N4735A 5.89 6.2 6.51 41 2 700 1 10 3
1N4736A 6.46 6.8 7.14 37 3.5 700 1 10 4
1N4737A 7.125 7.5 7.875 34 4 700 0.5 10 5
1N4738A 7.79 8.2 8.61 31 4.5 700 0.5 10 6
1N4739A 8.645 9.1 9.555 28 5 700 0.5 10 7
1N4740A 9.5 10 10.5 25 7 700 0.25 10 7.6
1N4741A 10.45 11 11.55 23 8 700 0.25 5 8.4
1N4742A 11.4 12 12.6 21 9 700 0.25 5 9.1
1N4743A 12.35 13 13.65 19 10 700 0.25 5 9.9
1N4744A 14.25 15 15.75 17 14 700 0.25 5 11.4
1N4745A 15.2 16 16.8 15.5 16 700 0.25 5 12.2
1N4746A 17.1 18 18.9 14 20 750 0.25 5 13.7
1N4747A 19 20 21 12.5 22 750 0.25 5 15.2

©2005 Fairchild Semiconductor Corporation 1 www.fairchildsemi.com


1N4728A - 1N4764A Rev. G2
1N4728A - 1N4764A Zeners
Electrical Characteristics TC = 25°C unless otherwise noted

VZ (V) @ IZ (Note 1) Max. Zener Impedance Leakage Current


Test Current
Device ZZ @ IZ ZZK @ IZK IR VR
Min. Typ. Max. IZ (mA)
(Ω) IZK (Ω) (mA) (µA) (V)
1N4748A 20.9 22 23.1 11.5 23 750 0.25 5 16.7
1N4749A 22.8 24 25.2 10.5 25 750 0.25 5 18.2
1N4750A 25.65 27 28.35 9.5 35 750 0.25 5 20.6
1N4751A 28.5 30 31.5 8.5 40 1000 0.25 5 22.8
1N4752A 31.35 33 34.65 7.5 45 1000 0.25 5 25.1
1N4753A 34.2 36 37.8 7 50 1000 0.25 5 27.4
1N4754A 37.05 39 40.95 6.5 60 1000 0.25 5 29.7
1N4755A 40.85 43 45.15 6 70 1500 0.25 5 32.7
1N4756A 44.65 47 49.35 5.5 80 1500 0.25 5 35.8
1N4757A 48.45 51 53.55 5 95 1500 0.25 5 38.8
1N4758A 53.2 56 58.8 4.5 110 2000 0.25 5 42.6
1N4759A 58.9 62 65.1 4 125 2000 0.25 5 47.1
1N4760A 64.6 68 71.4 3.7 150 2000 0.25 5 51.7
1N4761A 71.25 75 78.75 3.3 175 2000 0.25 5 56
1N4762A 77.9 82 86.1 3 200 3000 0.25 5 62.2
1N4763A 86.45 91 95.55 2.8 250 3000 0.25 5 69.2
1N4764A 95 100 105 2.5 350 3000 0.25 5 76
Notes:
1. Zener Voltage (VZ)
The zener voltage is measured with the device junction in the thermal equilibrium at the lead temperature (TL) at 30°C ± 1°C and 3/8” lead length.

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)

1st line: F - Fairchild Logo


F
47 2nd line: Device Name - 3rd to 4th characters of device name for 1Nxx series
or 4th to 6th characters for BZXyy series

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.

LIFE SUPPORT POLICY

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.

PRODUCT STATUS DEFINITIONS


Definition of Terms

Datasheet Identification Product Status Definition

Advance Information Formative or In This datasheet contains the design specifications for
Design product development. Specifications may change in
any manner without notice.

Preliminary First Production This datasheet contains preliminary data, and


supplementary data will be published at a later date.
Fairchild Semiconductor reserves the right to make
changes at any time without notice in order to improve
design.

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.

Obsolete Not In Production This datasheet contains specifications on a product


that has been discontinued by Fairchild semiconductor.
The datasheet is printed for reference information only.

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

Program Memory Data MSSP


EEPROM 10-bit CCP Timers
Device # Single Word SRAM I/O USART Comparators
Bytes (Bytes) A/D (ch) (PWM) SPI Master 8/16-bit
Instructions (Bytes) 2
I C
PIC16F873A 7.2K 4096 192 128 22 5 2 Yes Yes Yes 2/1 2
PIC16F874A 7.2K 4096 192 128 33 8 2 Yes Yes Yes 2/1 2
PIC16F876A 14.3K 8192 368 256 22 5 2 Yes Yes Yes 2/1 2
PIC16F877A 14.3K 8192 368 256 33 8 2 Yes Yes Yes 2/1 2

 2003 Microchip Technology Inc. DS39582B-page 1


PIC16F87XA
Pin Diagrams (Continued)

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

 2003 Microchip Technology Inc. DS39582B-page 3


PIC16F87XA
17.0 ELECTRICAL CHARACTERISTICS

Absolute Maximum Ratings †


Ambient temperature under bias................................................................................................................ .-55 to +125°C
Storage temperature .............................................................................................................................. -65°C to +150°C
Voltage on any pin with respect to VSS (except VDD, MCLR. and RA4) ......................................... -0.3V to (VDD + 0.3V)
Voltage on VDD with respect to VSS ............................................................................................................ -0.3 to +7.5V
Voltage on MCLR with respect to VSS (Note 2) .................................................................................................0 to +14V
Voltage on RA4 with respect to Vss ..................................................................................................................0 to +8.5V
Total power dissipation (Note 1) ...............................................................................................................................1.0W
Maximum current out of VSS pin ...........................................................................................................................300 mA
Maximum current into VDD pin ..............................................................................................................................250 mA
Input clamp current, IIK (VI < 0 or VI > VDD)..................................................................................................................... ± 20 mA
Output clamp current, IOK (VO < 0 or VO > VDD) ............................................................................................................. ± 20 mA
Maximum output current sunk by any I/O pin..........................................................................................................25 mA
Maximum output current sourced by any I/O pin ....................................................................................................25 mA
Maximum current sunk by PORTA, PORTB and PORTE (combined) (Note 3) ....................................................200 mA
Maximum current sourced by PORTA, PORTB and PORTE (combined) (Note 3)...............................................200 mA
Maximum current sunk by PORTC and PORTD (combined) (Note 3) .................................................................200 mA
Maximum current sourced by PORTC and PORTD (combined) (Note 3) ............................................................200 mA
Note 1: Power dissipation is calculated as follows: Pdis = VDD x {IDD - ∑ IOH} + ∑ {(VDD - VOH) x IOH} + ∑(VOl x IOL)
2: Voltage spikes below VSS at the MCLR pin, inducing currents greater than 80 mA, may cause latch-up.
Thus, a series resistor of 50-100Ω should be used when applying a “low” level to the MCLR pin rather than
pulling this pin directly to VSS.
3: PORTD and PORTE are not implemented on PIC16F873A/876A devices.
† NOTICE: Stresses above those listed under “Absolute Maximum Ratings” may cause permanent damage to the
device. This is a stress rating only and functional operation of the device at those or any other conditions above those
indicated in the operation listings of this specification is not implied. Exposure to maximum rating conditions for
extended periods may affect device reliability.

 2003 Microchip Technology Inc. DS39582B-page 173


PIC16F87XA
17.1 DC Characteristics: PIC16F873A/874A/876A/877A (Industrial, Extended)
PIC16LF873A/874A/876A/877A (Industrial)
PIC16LF873A/874A/876A/877A Standard Operating Conditions (unless otherwise stated)
(Industrial) Operating temperature -40°C ≤ TA ≤ +85°C for industrial
Standard Operating Conditions (unless otherwise stated)
PIC16F873A/874A/876A/877A
Operating temperature -40°C ≤ TA ≤ +85°C for industrial
(Industrial, Extended)
-40°C ≤ TA ≤ +125°C for extended
Param Characteristic/
Symbol Min Typ† Max Units Conditions
No. Device
VDD Supply Voltage
D001 16LF87XA 2.0 — 5.5 V All configurations
(DC to 10 MHz)
D001 16F87XA 4.0 — 5.5 V All configurations
D001A VBOR 5.5 V BOR enabled, FMAX = 14 MHz(7)
D002 VDR RAM Data Retention — 1.5 — V
Voltage(1)
D003 VPOR VDD Start Voltage to — VSS — V See Section 14.5 “Power-on
ensure internal Power-on Reset (POR)” for details
Reset signal
D004 SVDD VDD Rise Rate to ensure 0.05 — — V/ms See Section 14.5 “Power-on
internal Power-on Reset Reset (POR)” for details
signal
D005 VBOR Brown-out Reset 3.65 4.0 4.35 V BODEN bit in configuration word
Voltage enabled
Legend: Rows with standard voltage device data only are shaded for improved readability.
† Data in “Typ” column is at 5V, 25°C, unless otherwise stated. These parameters are for design guidance
only and are not tested.
Note 1: This is the limit to which VDD can be lowered without losing RAM data.
2: The supply current is mainly a function of the operating voltage and frequency. Other factors, such as I/O
pin loading, switching rate, oscillator type, internal code execution pattern and temperature, also have an
impact on the current consumption.
The test conditions for all IDD measurements in active operation mode are:
OSC1 = external square wave, from rail-to-rail; all I/O pins tri-stated, pulled to VDD;
MCLR = VDD; WDT enabled/disabled as specified.
3: The power-down current in Sleep mode does not depend on the oscillator type. Power-down current is
measured with the part in Sleep mode, with all I/O pins in high-impedance state and tied to VDD and VSS.
4: For RC osc configuration, current through REXT is not included. The current through the resistor can be
estimated by the formula Ir = VDD/2REXT (mA) with REXT in kΩ.
5: Timer1 oscillator (when enabled) adds approximately 20 µA to the specification. This value is from
characterization and is for design guidance only. This is not tested.
6: The ∆ current is the additional current consumed when this peripheral is enabled. This current should be
added to the base IDD or IPD measurement.
7: When BOR is enabled, the device will operate correctly until the VBOR voltage trip point is reached.

 2003 Microchip Technology Inc. DS39582B-page 175


PIC16F87XA
17.1 DC Characteristics: PIC16F873A/874A/876A/877A (Industrial, Extended)
PIC16LF873A/874A/876A/877A (Industrial) (Continued)
PIC16LF873A/874A/876A/877A Standard Operating Conditions (unless otherwise stated)
(Industrial) Operating temperature -40°C ≤ TA ≤ +85°C for industrial
Standard Operating Conditions (unless otherwise stated)
PIC16F873A/874A/876A/877A
Operating temperature -40°C ≤ TA ≤ +85°C for industrial
(Industrial, Extended)
-40°C ≤ TA ≤ +125°C for extended
Param Characteristic/
Symbol Min Typ† Max Units Conditions
No. Device

IDD Supply Current(2,5)


D010 16LF87XA — 0.6 2.0 mA XT, RC osc configurations,
FOSC = 4 MHz, VDD = 3.0V
D010 16F87XA — 1.6 4 mA XT, RC osc configurations,
FOSC = 4 MHz, VDD = 5.5V
D010A 16LF87XA — 20 35 µA LP osc configuration,
FOSC = 32 kHz, VDD = 3.0V,
WDT disabled
D013 16F87XA — 7 15 mA HS osc configuration,
FOSC = 20 MHz, VDD = 5.5V
D015 ∆IBOR Brown-out — 85 200 µA BOR enabled, VDD = 5.0V
Reset Current(6)
Legend: Rows with standard voltage device data only are shaded for improved readability.
† Data in “Typ” column is at 5V, 25°C, unless otherwise stated. These parameters are for design guidance
only and are not tested.
Note 1: This is the limit to which VDD can be lowered without losing RAM data.
2: The supply current is mainly a function of the operating voltage and frequency. Other factors, such as I/O
pin loading, switching rate, oscillator type, internal code execution pattern and temperature, also have an
impact on the current consumption.
The test conditions for all IDD measurements in active operation mode are:
OSC1 = external square wave, from rail-to-rail; all I/O pins tri-stated, pulled to VDD;
MCLR = VDD; WDT enabled/disabled as specified.
3: The power-down current in Sleep mode does not depend on the oscillator type. Power-down current is
measured with the part in Sleep mode, with all I/O pins in high-impedance state and tied to VDD and VSS.
4: For RC osc configuration, current through REXT is not included. The current through the resistor can be
estimated by the formula Ir = VDD/2REXT (mA) with REXT in kΩ.
5: Timer1 oscillator (when enabled) adds approximately 20 µA to the specification. This value is from
characterization and is for design guidance only. This is not tested.
6: The ∆ current is the additional current consumed when this peripheral is enabled. This current should be
added to the base IDD or IPD measurement.
7: When BOR is enabled, the device will operate correctly until the VBOR voltage trip point is reached.

DS39582B-page 176  2003 Microchip Technology Inc.


PIC16F87XA
17.1 DC Characteristics: PIC16F873A/874A/876A/877A (Industrial, Extended)
PIC16LF873A/874A/876A/877A (Industrial) (Continued)
PIC16LF873A/874A/876A/877A Standard Operating Conditions (unless otherwise stated)
(Industrial) Operating temperature -40°C ≤ TA ≤ +85°C for industrial
Standard Operating Conditions (unless otherwise stated)
PIC16F873A/874A/876A/877A
Operating temperature -40°C ≤ TA ≤ +85°C for industrial
(Industrial, Extended)
-40°C ≤ TA ≤ +125°C for extended
Param Characteristic/
Symbol Min Typ† Max Units Conditions
No. Device

IPD Power-down Current(3,5)


D020 16LF87XA — 7.5 30 µA VDD = 3.0V, WDT enabled,
-40°C to +85°C
D020 16F87XA — 10.5 42 µA VDD = 4.0V, WDT enabled,
-40°C to +85°C
60 µA VDD = 4.0V, WDT enabled,
-40°C to +125°C (extended)
D021 16LF87XA — 0.9 5 µA VDD = 3.0V, WDT disabled,
0°C to +70°C
D021 16F87XA — 1.5 16 µA VDD = 4.0V, WDT disabled,
-40°C to +85°C
20 µA VDD = 4.0V, WDT disabled,
-40°C to +125°C (extended)
D021A 16LF87XA 0.9 5 µA VDD = 3.0V, WDT disabled,
-40°C to +85°C
D021A 16F87XA 1.5 19 µA VDD = 4.0V, WDT disabled,
-40°C to +85°C
D023 ∆IBOR Brown-out — 85 200 µA BOR enabled, VDD = 5.0V
Reset Current(6)
Legend: Rows with standard voltage device data only are shaded for improved readability.
† Data in “Typ” column is at 5V, 25°C, unless otherwise stated. These parameters are for design guidance
only and are not tested.
Note 1: This is the limit to which VDD can be lowered without losing RAM data.
2: The supply current is mainly a function of the operating voltage and frequency. Other factors, such as I/O
pin loading, switching rate, oscillator type, internal code execution pattern and temperature, also have an
impact on the current consumption.
The test conditions for all IDD measurements in active operation mode are:
OSC1 = external square wave, from rail-to-rail; all I/O pins tri-stated, pulled to VDD;
MCLR = VDD; WDT enabled/disabled as specified.
3: The power-down current in Sleep mode does not depend on the oscillator type. Power-down current is
measured with the part in Sleep mode, with all I/O pins in high-impedance state and tied to VDD and VSS.
4: For RC osc configuration, current through REXT is not included. The current through the resistor can be
estimated by the formula Ir = VDD/2REXT (mA) with REXT in kΩ.
5: Timer1 oscillator (when enabled) adds approximately 20 µA to the specification. This value is from
characterization and is for design guidance only. This is not tested.
6: The ∆ current is the additional current consumed when this peripheral is enabled. This current should be
added to the base IDD or IPD measurement.
7: When BOR is enabled, the device will operate correctly until the VBOR voltage trip point is reached.

 2003 Microchip Technology Inc. DS39582B-page 177


PIC16F87XA
17.2 DC Characteristics: PIC16F873A/874A/876A/877A (Industrial, Extended)
PIC16LF873A/874A/876A/877A (Industrial)
Standard Operating Conditions (unless otherwise stated)
Operating temperature -40°C ≤ TA ≤ +85°C for industrial
DC CHARACTERISTICS -40°C ≤ TA ≤ +125°C for extended
Operating voltage VDD range as described in DC specification
(Section 17.1)
Param
Sym Characteristic Min Typ† Max Units Conditions
No.

VIL Input Low Voltage


I/O ports:
D030 with TTL buffer VSS — 0.15 VDD V For entire VDD range
D030A VSS — 0.8V V 4.5V ≤ VDD ≤ 5.5V
D031 with Schmitt Trigger buffer VSS — 0.2 VDD V
D032 MCLR, OSC1 (in RC mode) VSS — 0.2 VDD V
D033 OSC1 (in XT and LP modes) VSS — 0.3V V (Note 1)
OSC1 (in HS mode) VSS — 0.3 VDD V
Ports RC3 and RC4: —
D034 with Schmitt Trigger buffer VSS — 0.3 VDD V For entire VDD range
D034A with SMBus -0.5 — 0.6 V For VDD = 4.5 to 5.5V
VIH Input High Voltage
I/O ports: —
D040 with TTL buffer 2.0 — VDD V 4.5V ≤ VDD ≤ 5.5V
D040A 0.25 VDD — VDD V For entire VDD range
+ 0.8V
D041 with Schmitt Trigger buffer 0.8 VDD — VDD V For entire VDD range
D042 MCLR 0.8 VDD — VDD V
D042A OSC1 (in XT and LP modes) 1.6V — VDD V (Note 1)
OSC1 (in HS mode) 0.7 VDD — VDD V
D043 OSC1 (in RC mode) 0.9 VDD — VDD V
Ports RC3 and RC4:
D044 with Schmitt Trigger buffer 0.7 VDD — VDD V For entire VDD range
D044A with SMBus 1.4 — 5.5 V For VDD = 4.5 to 5.5V
D070 IPURB PORTB Weak Pull-up Current 50 250 400 µA VDD = 5V, VPIN = VSS,
-40°C TO +85°C
IIL Input Leakage Current(2, 3)
D060 I/O ports — — ±1 µA VSS ≤ VPIN ≤ VDD,
pin at high-impedance
D061 MCLR, RA4/T0CKI — — ±5 µA VSS ≤ VPIN ≤ VDD
D063 OSC1 — — ±5 µA VSS ≤ VPIN ≤ VDD, XT, HS
and LP osc configuration
* These parameters are characterized but not tested.
† Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance
only and are not tested.
Note 1: In RC oscillator configuration, the OSC1/CLKI pin is a Schmitt Trigger input. It is not recommended that the
PIC16F87XA be driven with external clock in RC mode.
2: The leakage current on the MCLR pin is strongly dependent on the applied voltage level. The specified levels
represent normal operating conditions. Higher leakage current may be measured at different input voltages.
3: Negative current is defined as current sourced by the pin.

DS39582B-page 178  2003 Microchip Technology Inc.


PIC16F87XA
17.2 DC Characteristics: PIC16F873A/874A/876A/877A (Industrial, Extended)
PIC16LF873A/874A/876A/877A (Industrial) (Continued)
Standard Operating Conditions (unless otherwise stated)
Operating temperature -40°C ≤ TA ≤ +85°C for industrial
DC CHARACTERISTICS -40°C ≤ TA ≤ +125°C for extended
Operating voltage VDD range as described in DC specification
(Section 17.1)
Param
Sym Characteristic Min Typ† Max Units Conditions
No.
VOL Output Low Voltage
D080 I/O ports — — 0.6 V IOL = 8.5 mA, VDD = 4.5V,
-40°C to +85°C
D083 OSC2/CLKO (RC osc config) — — 0.6 V IOL = 1.6 mA, VDD = 4.5V,
-40°C to +85°C
VOH Output High Voltage
D090 I/O ports(3) VDD – 0.7 — — V IOH = -3.0 mA, VDD = 4.5V,
-40°C to +85°C
D092 OSC2/CLKO (RC osc config) VDD – 0.7 — — V IOH = -1.3 mA, VDD = 4.5V,
-40°C to +85°C
D150* VOD Open-Drain High Voltage — — 8.5 V RA4 pin
Capacitive Loading Specs on
Output Pins
D100 COSC2 OSC2 pin — — 15 pF In XT, HS and LP modes when
external clock is used to drive
OSC1
D101 CIO All I/O pins and OSC2 (RC mode) — — 50 pF
D102 CB SCL, SDA (I2C mode) — — 400 pF
Data EEPROM Memory
D120 ED Endurance 100K 1M — E/W -40°C to +85°C
D121 VDRW VDD for read/write VMIN — 5.5 V Using EECON to read/write,
VMIN = min. operating voltage
D122 TDEW Erase/write cycle time — 4 8 ms
Program Flash Memory
D130 EP Endurance 10K 100K — E/W -40°C to +85°C
D131 VPR VDD for read VMIN — 5.5 V VMIN = min. operating voltage
D132A VDD for erase/write VMIN — 5.5 V Using EECON to read/write,
VMIN = min. operating voltage
D133 TPEW Erase/Write cycle time — 4 8 ms
* These parameters are characterized but not tested.
† Data in “Typ” column is at 5V, 25°C unless otherwise stated. These parameters are for design guidance
only and are not tested.
Note 1: In RC oscillator configuration, the OSC1/CLKI pin is a Schmitt Trigger input. It is not recommended that the
PIC16F87XA be driven with external clock in RC mode.
2: The leakage current on the MCLR pin is strongly dependent on the applied voltage level. The specified levels
represent normal operating conditions. Higher leakage current may be measured at different input voltages.
3: Negative current is defined as current sourced by the pin.

 2003 Microchip Technology Inc. DS39582B-page 179


TLP250
TOSHIBA Photocoupler GaAlAs Ired & Photo−IC

TLP250
Transistor Inverter
Inverter For Air Conditionor
Unit in mm
IGBT Gate Drive
Power MOS FET Gate Drive

The TOSHIBA TLP250 consists of a GaAlAs light emitting diode and a


integrated photodetector.
This unit is 8−lead DIP package.
TLP250 is suitable for gate driving circuit of IGBT or power MOS FET.

• Input threshold current: IF=5mA(max.)


• Supply current (ICC): 11mA(max.)
• Supply voltage (VCC): 10−35V
• Output current (IO): ±1.5A (max.)
• Switching time (tpLH/tpHL): 1.5µs(max.)
• Isolation voltage: 2500Vrms(min.)
• UL recognized: UL1577, file No.E67349
• Option (D4) type
VDE approved: DIN VDE0884/06.92,certificate No.76823 TOSHIBA 11−10C4
Maximum operating insulation voltage: 630VPK Weight: 0.54 g
Highest permissible over voltage: 4000VPK

(Note) When a VDE0884 approved type is needed,


please designate the "option (D4)"
• Creepage distance: 6.4mm(min.)
Clearance: 6.4mm(min.)

Schmatic Pin Configuration (top view)


ICC
VCC 1 8
8
IF (Tr 1)
2 7
2+ VO
7
VF 3 6
3- VO
IO 6
4 5
(Tr 2)

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)

Characteristic Symbol Rating Unit

Forward current IF 20 mA

Forward current derating (Ta ≥ 70°C) ∆IF / ∆Ta −0.36 mA / °C


LED

Peak transient forward curent (Note 1) IFPT 1 A

Reverse voltage VR 5 V

Junction temperature Tj 125 °C

“H”peak output current (PW ≤ 2.5µs,f ≤ 15kHz) (Note 2) IOPH −1.5 A


“L”peak output current (PW ≤ 2.5µs,f ≤ 15kHz) (Note 2) IOPL +1.5 A
(Ta ≤ 70°C) 35
Output voltage VO V
(Ta = 85°C) 24
Detector

(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 1: Pulse width PW ≤ 1µs, 300pps

Note 2: Exporenential wavefom

Note 3: Exporenential wavefom, IOPH ≤ −1.0A( ≤ 2.5µs), IOPL ≤ +1.0A( ≤ 2.5µs)

Note 4: It is 2 mm or more from a lead root.


Note 5: Device considerd a two terminal device: Pins 1, 2, 3 and 4 shorted together, and pins 5, 6, 7 and 8 shorted
together.

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.

Recommended Operating Conditions

Characteristic Symbol Min. Typ. Max. Unit

Input current, on (Note 7) IF(ON) 7 8 10 mA


Input voltage, off VF(OFF) 0 ― 0.8 V
Supply voltage VCC 15 ― 30 20 V
Peak output current IOPH/IOPL ― ― ±0.5 A

Operating temperature Topr −20 25 70 85 °C

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%

* All typical values are at Ta = 25°C (*1): Duration of IO time ≤ 50µs

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

* All typical values are at Ta = 25°C

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

coefficient ΔVF / ΔTa (mV / °C)


-2.4

Forward voltage temperature


(mA)

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

Forward voltage VF (V) Forward current IF (mA)

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

Ambient temperature Ta (°C) Ambient temperature Ta (°C)

IOPH, IOPL – Ta

PW ≦ 2.5 µs, f ≦ 15 KHz

2
Allowable peak output current
IOPH, IOPL (A)

0
0 20 40 60 80 100

Ambient Temperature Ta (°C)

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.

1. INTRODUCTION everyday usage. Most complicated system that


Agriculture in India is more ‘a way of life’. provide electricity for pumping water, powering
Agriculture is important to human beings as it communications equipment, lights to the homes
forms the basis of food security. A proper method and running our appliances. The PV cells which
is to be implemented for the irrigation system takes sunlight and convert it into electricity this is
because of lack of rain and scarcity of water in soil. kept as a small grid. Solar electric panels more
Agricultural field always needs and depends on the commonly referred to as photovoltaic or PV panel
water level of the soil. But continuous extraction of converts sunlight into electricity. The electricity is
water from soil reduces the moisture level of soil to used to run appliances and electrical devices or it
avoid this problem planned irrigation system can be stored in batteries for future use. Solar
should be followed. And improper use of water Thermal Panels are used in commercial purpose to
leads to wastage of significant amount of water. heat the water. Solar buildings technologies are
For this purpose, automatic plant irrigation system useful to the buildings which uses more power to
is designed using moisture sensor and solar energy. run man applications. Solar thermal collectors are
The proposed system derives power from sunlight the main component of active solar systems, and
through photo-voltaic cells. Hence, the system does are designed to meet the specific temperature
not depend on the conventional electricity. In this requirements and climate conditions for the
proposed model the system is powered by solar different endues. The proposed system uses the
energy. The circuit comprises of soil moisture solar energy to ON the water pump. If the required
sensor which is inserted in the soil to sense level of water is not provided, it will result in low
moisture content of the soil. A PIC microcontroller production. Hence the irrigation system is
is used to control the entire system. When the maintained through the soil moisture sensor for the
moisture level of the soil is below the desired level, continuous detection of the soil moisture content.
the sensor detects the soil condition and gives 2. SYSTEM DESIGN
signal to the relay unit connected to the motor. The This System consists of a Solar panel, which is the
signal from the PIC microcontroller will trigger the main source of energy and is given to the charge
relay connection to switch ON the motor in dry controller for extracting regulated power from
condition and switch OFF the motor when the soil Solar panel at different irradiation and also to
is in wet condition. The moisture level of the soil is maintain correct charging voltage and current in
sensed by the sensor inserted into the soil which order to charge the battery and increase its life.
gives signal to the microcontroller whether the land Water conservation in farm land is controlled using
needs water or not. Photovoltaic cell is a system microcontroller with soil moisture sensor. The
that converts light energy into electricity. irrigation system and proposed block diagram
Photovoltaic cell is otherwise known as “solar shown in figure 2.1. The fourth order converter,
cells”. This is used in simple and complicated zeta converter is used to convert DC to DC power
application. The simplest system of photo voltaic to improve the output power of the solar panel.
cells is small calculators and wrist watches in Zeta converter can act as a boost converter and also
Figure 2.1 Block Diagram – Solar powered smart irrigation system

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

You might also like