Professional Documents
Culture Documents
Table Of Contents
CHAPTER
1
1.1 1.2 1.3 1.4
TITLE
Introduction of Project
Current Scenario Problem Statement Proposed Model Project Working
Page No.
1
1 1 2 2
2
2.1 2.2 2.3 2.4
4
4 5 5 6
3
3.1 3.2 3.3
Microcontroller Atmega16
Intoduction to ATMega 16 Features Architecture of ATMega 16
7
7 7 12
4
4.1 4.2 4.3 4.4 4.5
RTC DS 1307
Introduction Terminology Propose Power Supply Timing
14
14 14 15 16 17
5
5.1 5.2
ULN 2003A
Introduction Features
18
18 19
6
6.1 6.2
20
20 22
7
7.1 7.2 7.3 7.4
Relay
Introduction Use of Relay Relay Working Silent Features
24
24 25 26 27
8
8.1
Diptrace Software
Introdution
28
28
9
9.1
Proteus Software
Introduction
30
30
Table Of Contents
10 11 12 13 14
10.1
31 32 33 34 35
31
Table Of Figures
S. No.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 21 22
Fig. No.
1.1 2.1 2.2 2.3 3.1 3.2 3.3 3.4 4.1 4.2 4.3 5.1 5.2 6.1 6.2 7.1 7.2 8.1 8.2 9.1 10.1
Figure Title
Project Image 7805 IC 7805 Circuit 1 7805 Circuit 2 Atmega 16 Pin Diagram of Atmega 16 PCB Layout of Microcontroller Architecture of atmega 16 Real Time Clock Block Diagram Real Time Clock Image : PCB Layout of Microcontroller ULN2003A Logic diagram ULN2003A Circuit Description LCD LCD Layers Relay Relay Working Upper View of PCB in DIPTRACE Bottom View of PCB in DIPTRACE Schematic Diagram in Proteus Bascom
Pg. No.
3 4 5 6 7 8 11 12 14 15 16 18 19 20 21 24 26 28 29 30 31
List Of Table
S. No.
1
Table No.
3.1
Table TiTle
Pin Description
Page No.
9
2. Farmers need to wake up very early in morning to start the motor to irrigate the field. Is there any automated system which could start the motor according to the time adjusted in the system, farmers need not go early in the monitor to their fields.
2.3. 7805 Circuit 2 This is a simple LED monitor to tell the output voltage from 7805. If the input voltage is above 6.5 volts, LED shows full brightness. When the input voltage reduces below 6.5 volts, brightness of LED decreases
do not require additional components to provide a constant, r, making them easy to use, as well e as economical and efficient
uses of space. Other voltage regulators may require additional components to set the output voltage level, or to assist in the regulation process other designs substantial engineering expertise to implement.
may need
78xx series ICs have built-in protection against a circuit drawing too much power. They have protection ag inst overheating and short-circuits, making them quite robust in a most applications. In some cases, the current-limiting features of the 8xx devices can provide protection not only for the 78xx itself, but also for other parts of the circuit. 78xx ICs are easy to use and handle but these cannot give an altering voltage required so LM317 series of ICs are available to obtain a voltage output from 1.25 volts to 37 volts.
well as program. Advantages of this microcontroller are there are so many applications of this microcontroller in practical work
3 . 2 F e a t u r e s
Includes High Throughput Atmel ATMega16 Microcontroller with 8kb Internal Flash
e r n a l E E P R O M
8 C h a n n e l 1 0 b i t A / D C o n v e r t o r
P r o g r a m M e m o r y
RS232 with
Int
One 16-bit Timer with Two 8-bit Timers Power, Programming and Test LED Reset Button The ATmega16 microcontroller used in this lab is a 40-pin wide DIP (Dual In
Line) package chip. This chip was selected because it is robust, and the DIP package interfaces with prototyping supplies like solderless bread boards and solder-type perfboards. This same microcontroller is available in a surface mount package, about the size of a dime. Surface mount devices are more useful for circuit boards built for mass production. Figure below shows the pin-out diagram of the ATmega16. This diagram is very useful, because it tells you where power and ground should be connected, which pins tie to which functional hardware, etc.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
(INT1) PD3 (OC1B) PD4 (OC1A) PD5 (ICP) PD6 PD7 (OC2) PC0 (SCL) PC1 (SDA) PC2 (TCK) PC3 (TMS) PC4 (TDO) PC5 (TDI) PC6 (TOSC1) PC7 (TOSC2) AVcc GND AREF PA7 (ADC7) PA6 (ADC6) PA5 (ADC5) PA4 (ADC4) PA3 (ADC3)
I/O PORTD, Pin 3 I/O PORTD, Pin 4 I/O PORTD, Pin 5 I/O PORTD, Pin 6 I/O PORTD, Pin 7 I/O PORTC, Pin 0 I/O PORTC, I/O PORTC, Pin 2 I/O PORTC, Pin 3 I/O PORTC, Pin 4 I/O PORTC, Pin 5 I/O PORTC, Pin 6 I/O PORTC, Pin 7
External Interrupt INT1 PWM Channel Outputs Timer/Counter1 Input Capture Pin Timer/Counter2 Output Compare Match Output TWI Interface
JTAG Interface
Voltage Supply = Vcc for ADC GROUND Analog Reference Pin for ADC I/O PORTA, Pin 7 I/O PORTA, Pin 6 I/O PORTA, Pin 5 I/O PORTA, Pin 4 I/O PORTA, Pin 3 ADC Channel 7 ADC Channel 6 ADC Channel 5 ADC Channel 4 ADC Channel 3
10
38 39 40
Architecture of ATmega16 consist of several blocks in which some blocks are important such as, ALU (Arithmetic Logic Unit), EEPROM, General purpose register, Program counter, Flash Memory, Instruction Register and Decoder, Input Module, Interrupt Unit, Comparator, Status and Control.
d circuit) that keeps track of the current time. Although the term often refers to the devices in personal computers, servers and embedded systems, RTCs are present in almost any electronic device which needs to keep accurate time. The term avoid confusio n with ordinary hardwar e clocks which are only signals that govern
Fig4.1. - Real Time Clock Block Diagram
is
used to
digital electroni cs, do count time in human units. RTC should not d be with confuse realand not
4 . 2 T e r m i n o l o g y
time computing, which shares its three-letter acronym, but does not directly relate to time of day.
4.3 Purpose
Although keeping time can be done without an RTC, using one has benefits:
Low power consumption (important when running from alternate power) Frees the main system for time-critical tasks Sometimes more accurate than other methods
RTCs often have an alternate source of power, so they can continue to keep time while the primary source of power is off or unavailable. This alternate source of power is normally a lithium battery in older systems, but some newer systems use a supercapacitor,because they are rechargeable and can be soldered. The alternate power source can also supply power to battery backed RAM.
4.5 Timing
Most RTCs use a crystal oscillator, but some use the power line frequency. In many cases the oscillator's frequency is 32.768 kHz. This is the same frequency used in quartz clocks and watches, and for the same reasons, namely that the frequency is exactly 2 cycles per second, which is a convenient rate to use with simple binary counter circuits.
on pairs that feature high-voltage outputs with common-cathode clamp diodes for switching inductive loads. The collector-current rating of a single Darlington pair is 500 mA. The Darlington pairs can be paralleled for higher current capability. Applications include relay drivers, display drivers (LED and gas discharge), line drivers, andlogic buffers. hammer drivers, lamp drivers,
The ULN2001A is a general-purpose array and can be used with TTL and CMOS technologies. The ULN2002Ais designed specifically for use with 14-V to 25-V PMOS devices. Each input of this device has a Zener diodeand resistor in series to control the input current to a safe limit. The ULN2003A has a 2.7- k series base resistor for each
Darlington pair for operation directly with TTL or 5-V CMOS devices.
5.2 FEATURES:
TTL, DTL, PMOS, or CMOS-Compatible Inputs Output Current to 500 mA Output Voltage to 95 V Transient-Protected Outputs
Fig. 6.1 LCD. LCDs are available to display arbitrary images (as in a general-purpose computer display) or fixed images which can be displayed or hidden, such as preset words, digits, and 7-segment displays as in a digital clock. They use the same basic technology, except that arbitrary images are made up of a large number of small pixels, while other displays have larger elements. LCDs are used in a wide range of applications including computer monitors, televisions, instrument panels, aircraft cockpit displays, and signage. They are common in consumer devices such as video players, gaming devices, clocks, watches, calculators,
and telephones, and have replaced cathode ray tube (CRT) displays in most applications. They are available in a wider range of screen sizes than CRT and plasma displays, and since they do not use phosphors, they do not suffer image burn-in. LCDs are, however, susceptible to image persistence. The LCD is more energy efficient and can be disposed of more safely than a CRT. Its low electrical power consumption enables it to be used in battery-powered electronic equipment. It is an electronically modulated optical device made up of any number of segments filled with liquid crystals and arrayed in front of a light source (backlight) or reflector to produce images in color or monochrome. Liquid crystals were first developed in 1888. By 2008, worldwide sales of televisions with LCD screens sales of CRT units; the CRT became obsolete for most purposes. exceeded annual
Each pixel of an LCD typically consists of a layer of molecules aligned between two transparent electrodes, and two polarizing filters, the axes of transmission of which are (in most of the cases) perpendicular to each other. With actual liquid crystal between the polarizing filters, light passing through the first filter would be blocked by the second (crossed) polarizer.
A liquid crystal display (LCD) is a flat panel display, electronic visual display, orvideo display,that uses the light modulating properties of liquid crystals. Liquid crystals do not emit light directly.LCDs are available to display arbitrary images (as in a generalpurpose computer display) or fixed images which can be displayed or hidden, such as preset words, digits, and 7-segment displays as in a digital clock. They use the same basic technology, except that arbitrary images are made up of a large number of smallpixels, while other displays have larger elements.LCDs are used in a wide range of applications including computer monitors, televisions, instrument panels, aircraft cockpit displays, and signage. They are common in consumer devices such as video players, gaming devices, clocks, watches, calculators, and telephones, and have replaced cathode ray tube (CRT) displays in most applications.
No theoretical resolution limit. Can be made to large sizes (more than 24 inches) lightly and relatively inexpensively. Masking effect: the LCD grid can mask the effects of spatial and grayscale quantization, creating the illusion of higher image quality. As an inherently digital device, the LCD can natively display digital data from a DVI or HDMI connection without requiring conversion to analog, like a CRT would need. Many LCD monitors run on an external 12v power supply, which means that (with a proper cable) they can also be run directly on one of the computer's 12v power supply outputs, removing the overhead and quiescent power consumption of the monitor's own power supply. If the computer has a PFC power supply, this will increase the power efficiency as well, as the cheap switching power supplies included with LCD monitors rarely implement PFC.
F i g . 7 . 1 R E L A Y
A relay, quite simply, is a small machine consisting of an electromagnet (coil), a switch, and a spring. The spring holds the switch in one position, until a current is passed through the coil. The coil generates a magnetic field which moves the switch. It's that simple. You can use a very small amount of current to activate a relay,
A relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal. The first relays were used in long distance telegraph circuits, repeating the signal coming in from one circuit and retransmitting it to another. Relays were used extensively in telephone exchanges and early computers to perform logical operations. A type of relay that can handle the high power required to directly control an electric motor or other loads is called a contactor. Solid-state relays control power circuits with no moving parts, instead using a semiconductor device to perform switching. Relays with calibrated operating characteristics and sometimes multiple operating coils are used to protect electrical circuits from overload or faults; in modern electric power systems these functions are performed by digital instruments still called "protective relays".
Fig. 7.2 Relay Working In this figure, you can see that a relay consists of two separate and completely independent circuits. The first is at the bottom and drives the electromagnet. In this circuit, a switch is controlling power to the electromagnet. When the switch is on, the electromagnet is on, and it attracts the armature (blue). The armature is acting as a switch in the second circuit. When the electromagnet is energized, the armature completes the second circuit and the light is on. When the electromagnet is not energized, the spring pulls the armature away and the circuit is not complete. In that case, the light is dark.
When you purchase relays, you generally have control over several variables:
The voltage and current that is needed to activate the armature The maximum voltage and current that can run through the armature The number of armatures (generally one or two) The number of contacts for the armature (generally one or two -- the relay shown here has two, one of which is unused) Whether the contact (if only one contact is provided) is normally open (NO) or normally closed (NC)
Relays can switch AC and DC, transistors can only switch DC. Relays can switch higher voltages than standard transistors. Relays are often a better choice for switching large currents (> 5A). Relays can switch many contacts at once.
(currently English, Czech, Russian and Turkish).[2] In January of 2011, Parallax switched from Eagle to DipTrace for developing its printed circuit boards.
Fig.8.2 : Bottom View of PCB in DIPTRACE DipTrace is a complete PCB Design system. It includes four programs: 1. PCB Layout - PCB design with easy to use manual routing tools and autorouter. 2. Schematic - creates schematic and exports netlist to PCB. 3. Pattern Editor - allows to make package footprints (patterns). 4. Component Editor - allows to draw parts and attach patterns
plication that will allow you to: W r i t e p r o g r a m s i n B a s i c Translate these programs on the PC to machinecode (a format the AVR controller can execute) S i m u l a t e
t h e c o m p i l e d c o d e Use extern al progr ams to flash ('prog ram') the compi led code into an Atmel AVR m i c r o c o n t r
o l l e r . The nice thing about Bascom is that you can get started with a free Bascom version whose only limit is the 4k generated code size (this was 2k until 2005). The obvious choice of AVR microcontroller would then be one of the (2k flash) ATTiny models or the much-used (but now obsolete) AT90S2313 which will let you get acquainted with Bascom and AVR microcontrollers.
BASCOM
F i g . 1 0 . 1
Chapter 11 CONCLUSION
In India agriculture plays a vital role in helping millions to earn their livelihood. So it is necessary to improve and maintain crops to fulfill their needs. The main challenge in front of farmers is the variation in climatic conditions. Also the farmer needs to visit the farm daily this may not be possible for those who own many acres of land. Lack of proper irrigation and unscientific use of fertilizers led to destruction of crops. Our project MAXIMS I2C PROTOCAL BASED RTC CONTROLLED
MICROCONTROLLER
ATMEGA 16A can solve these problems. We place sensors on fields there by making monitoring easy. This system automatically turns the motors ON and OFF based on the level of the water present in the fields. Thereby decreases the effort of the farmer.
In our India 70% people doing farming. This project helps the farmer to overcome the drawbacks of traditional irrigation system. From this project we provide the new technology for farmer to improve the quality of their irrigation system. This project helps those farmers which do not have sufficient water for their farming. Also this project is very cheap it can be bought by poor farmers too.
Chapter 13 ADVANTAGES Saves water This project helps us to save water Improves growth Definate amount of water and fixed period irrigation improves growth of the farm. Saves time It saves precious time of farmer . Adaptable This device is easily adaptable for any type of motor. Save Electricity This project is Electrically Efficient and saves Electricity.
Chapter 14 DISADVANTAGES
S
Reliability
ometimes failures will occur often these failures are because of human error setting and maintaini ng A good insurance to collect any excess run off when failures occur. Weather T he electronic the reuse systems. system is in
system may affect badly extreme weather condition, like rainfall and thunderstor m etc. in
APPENDIX A
LM340/LM78XX Series 3-Terminal Positive Regulators
General Description
The LM140/LM340A/LM340/LM78XXC monolithic 3-terminal positive voltage regulators employ internal current-limiting, thermal shutdown and safe-area compensation, making them essentially indestructible. If adequate heat sinking is provided, they can deliver over 1.0A output current. They are intended as fixed voltage regulators in a wide range of applications including local (on-card) regulation for elimination of noise and distribution problems associated with single-point regulation. In addition to use as fixed voltage regulators, these devices can be used with external components to obtain adjustable output voltages and currents. Considerable effort was expended to make the entire series of regulators easy to use and minimize the number of external components. It is not necessary to bypass the output, The 5V, 12V, and 15V regulator options are available in the steel TO-3 power package. The LM340A/LM340/LM78XXC series is available in the TO-220 plastic power package, and the LM340-5.0 is available in the SOT-223 package, as well as the LM340-5.0 and LM340-12 in the surface-mount TO263 package.
Features
n Complete specifications load at 1A n Output voltage tolerances of 2% at Tj = 25C and 4% over the temperature range (LM340A) n Line regulation of 0.01% of VOUT/V of V IN at 1A load (LM340A) n Load regulation of 0.3% of VOUT/A (LM340A) n Internal thermal overload protection n Internal short-circuit current limit
although this does improve transient response. Input byn Output transistor safe area protection passing is needed only if the regulator is located far from the filter capacitor of the power supply. n P+ Product Enhancement tested
Typical Applications
Fixed Output Regulator Adjustable Output Regulator
00778101
00778102
*Required if the regulator is located far from the power supply filter. **Although no output capacitor is needed for stability, it does help transient response. (If needed, use 0.1 F, ceramic disc).
V
OUT
= 5V + (5V/R1 + I ) R2 5V/R1
Q
>3I ,
Q
Current Regulator
00778138
Scale 1:1
00778103
37
L M 3 4 0 / L M 7 8 X X S e ri e s 3 T e r m
Ordering Information
Package 3-Lead TO-3 Temperature Range C -55C to +125 Part Number LM140K-5.0 LM140K-12 LM140K-15 C C 0 to +125 LM340K-5.0 LM340K-12 LM340K-15 3-lead TO-220 C C 0 to +125 LM340AT-5.0 LM340T-5.0 LM340T-12 LM340T-15 LM7808CT 3-Lead TO-263 0C to +125C LM340S-5.0 LM340SX-5.0 LM340S-12 LM340SX-12 LM340AS-5.0 LM340ASX-5.0 4-Lead SOT-223 Unpackaged Die 0C to +125C C 55C to 125 LM340MP-5.0 LM340MPX-5.0 LM140KG-5 MD8 LM140KG-12 MD8 LM140KG-15 MD8 C C 0 to +125 LM340-5.0 MDA LM7808C MDC Packaging Marking LM140K 5.0P+ LM140K 12P+ LM140K 15P+ LM340K 5.0 7805P+ LM340K 12 7812P+ LM340K 15 7815P+ LM340AT 5.0 P+ LM340T5 7805 P+ LM340T12 7812 P+ LM340T15 7815 P+ LM7808CT LM340S-5.0 P+ LM340S-12 P+ LM340AS-5.0 P+ N00A Transport Media 50 Per Tray 50 Per Tray 50 Per Tray 50 Per Tray 50 Per Tray 50 Per Tray 45 Units/Rail 45 Units/Rail 45 Units/Rail 45 Units/Rail 45 Units/Rail 45 Units/Rail 500 Units Tape and Reel 45 Units/Rail 500 Units Tape and Reel 45 Units/Rail 500 Units Tape and Reel 1k Units Tape and Reel 2k Units Tape and Reel Waffle Pack or Gel Pack Waffle Pack or Gel Pack Waffle Pack or Gel Pack Waffle Pack or Gel Pack Waffle Pack or Gel Pack DL069089 DL059093 DL059093 DI074056 DI074056 MP04A TS3B T03B NSC Drawing K02A
L M 3 4 0 /
Connection Diagrams
TO-3 Metal Can Package (K) TO-220 Power Package (T)
00778111
Bottom View See Package Number K02A TO-263 Surface-Mount Package (S)
00778112
00778120
00778143
L M 3l.com www.nationa 4 0 /
38
1)
If Military/Aerospace specified devices are required, please contact the National Semiconductor Sales Office/
230C 2 kV 1)
35V
Internal Power Dissipation (Note 2) Internally Limited Maximum Junction Temperature 150C +125C Storage Temperature Range 65C to +150C +125C Lead Temperature (Soldering, 10 sec.) +125C TO-3 Package (K) 300C
55C to 0C to 0C to
5V 10V Min 4.9 4.8 Typ Max 5 5.1 5.2 10 (7.5 VIN 20) 3 10 4 12 (8 VIN 12) 10 25 15 25 6 6.5 0.5 0.8 (7.5 VIN 20) 0.8 (8 VIN 25) 40 68 68 (8 VIN 18) 2.0 8 2.1 80 61 61 (7.5 VIN 20) Min 11.75 11.5
12V 19V Typ Max 12 12.25 12.5 18 (14.8 VIN 27) 4 18 9 30 (16 VIN 22) 12 32 19 60 6 6.5 0.5 0.8 (14.8 VIN 27) 0.8 (15 VIN 30) 75 72 60 60 (14.5 VIN 27) Min 14.7 14.4
15V 23V Typ Max 15 15.3 15.6 22 (17.9 VIN 30) 4 22 10 30 (20 VIN 26) 12 35 21 75 6 6.5 0.5 0.8 (17.9 VIN 30) 0.8 (17.9 VIN 30) 90 70 (17.5 VIN 30) V V V mV V mV V mV mV V mV mV mV mA mA mA mA V mA V V dB dB V V m A Units
Conditions
IQ
5 mA IO 1A
V V
IN
V V
MAX
TA = 25C, 10 Hz f 100 kHz TJ = 25C, f = 120 Hz, IO = 1A or f = 120 Hz, IO = 500 mA, Over Temperature, V
M IN
IN
MAX
IN
MAX
RO
39
L Output Voltage M Input Voltage (unless otherwise noted) 3 Parameter Conditions 4 Peak Output T = 25C J 0 Current /
Average TC of VO Min, TJ = 0C, IO = 5 mA TJ = 25C Input Voltage Required to Maintain Line Regulation
IN
7.5
14.5
17.5
4) 5V 10V Min Typ 4.8 4.75 5 Max 5.2 5.25 Min 11.5 11.4 12V 19V Typ 12 12.5 14.4 12.6 4.25 30) 4 30) 15V 23V Max Min Typ 15 Max 15.6 15.75 V V V nits
IN
MAX
(8 VIN 20) 3 50
(18.5 VIN
I O = 500 mA
150 mV V
(7 VIN 25) 50 (8 VIN 20) 50 (7.5 VIN 20) 25 (8 VIN 12) 10 50 25 50 6 7 0.5 0.8 (8 VIN 20) 0.8 (8 VIN 25) 40
(14.5 VIN 30) 120 (15 VIN 27) 120 (14.6 VIN 27) 60 (16 VIN 22) 12 120 60 120 6 7 0.5 0.8 (15 VIN 27) 0.8 (15 VIN 30) 75
(17.5 VIN
I O 1A
VO
Load Regulation
TJ = 25C
150 mV
mA 55C TJ +150C, IQ IQ Quiescent Current Quiescent Current Change 5 mA IO 1A I O 1A TJ = 25C 55C TJ +150C 5 mA IO 1A TJ = 25C, IO 1A V
M IN
150 mV 6 7 0.5 0.8 (18.5 VIN 30) 0.8 (18.5 VIN 30) 90 mA V V mA mA mA mA V
IN
MAX
IN
MAX
40
Max
Min 68 68
Typ 80
Max Min 61 61
Typ
1A, T = 25C
dB
Voltage 5V V V Output V (8 VIN 18) (15 VIN 25) M IN IN MAX Input Voltage (unless otherwise noted) 10V TJ = 25C, IO = 1A f = 1 kHz TJ = 25C TJ = 25C 0C TJ +150C, IO = 5 mA TJ = 25C, IO 1A 7.5 2.0 8 2.1 2.4 0.6
VIN
14.6
17.7
Max Min 12
Typ Max 15
V V V mV
IN
MAX
Line Regulation
I
O
= 500 mA
T = 25C
J
81-3-5639-7560
IN
50
(14.5 VIN 30) 120 (15 VIN 27) (7.5 V 120 20)
IN
0C TJ +1 V IN I O 1A TJ = 25C
(8 VIN 20) 50 V
IN
0C TJ +125C VIN VO Load Regulation TJ = 25C 5 mA IO 1.5A 250 mA IO 750 mA 5 mA IO 1A, 0C TJ +125C IQ Quiescent Current I O 1A TJ = 25C
25 (8 VIN 12) 10 50 25 50 8
mV V mV mV mV mA
L M 3 4 0 /
8.5 1.0
mA mA Ma
www.national. com