Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Hardware Description: Theory

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 21

ELECTRONIC GARDENER

THEORY:-

This electronic gardener is used to maintain the soil moisture level, so the plants can grow healthy. The soil moisture value from the sensor is processed by microcontroller to activate the watering valve. If the soil moisture level is below from the expected value, then the watering valve will be active. But, if the soil moisture level is higher than the expected value, the watering valve will be off. We can control the expected soil moisture level by arranging the value of Pot VR1. The LCD (Liquid Crystal Display) will display the soil moisture level and the expected level. The main part of this electronic gardener is a microcontroller chip 8051. This chip is used as LCD driver, ADC driver and valve driver. Hardware Description I use the soil moisture sensor 200SS, which have an output range from 0 cb to 200 cb (centibar). This sensor must be operated with square wave signal, which generated by the timer circuit using LM555 and 7404. Basically, the sensor circuit is like an voltage divider circuit, so the resistance of the sensor is equal to the soil moisture value. Because the reading from the sensor is only valid when the bias signal from the timer circuit reach the peak amplitude, so I must use the sample and hold component LF398 to keep the value untill next reading cycle. To convert the analog signal to digital signal, I use MAX114 which have four inputs channel and 8 bits output. The soil moisture level goes to the first channel, while the expected value goes to the second channel. The other channels can be connected to other sensors in different areas, so we can control the soil moisture in many areas. But, of course the sensors must be placed far enough from the others.

The micrcontroller chip drive the ADC chip by sending low signal to CS and RD pin of the MAX114 and get the digital data from DB0-DB7 pins after the INT pin goes low. These digital signals will be converted to decimal format, then send to the LCD. Because the function of the LCD is only to display data, so the RW pin can be connected to ground. While the other control pins (i.e EN and RS pins) are controlled by the microcontroller. The microcontroller will compare the expected soil moisture value with the sensor reading and determine whether the watering valve is active or not. Software Description I use Assembly program to design the controller for the microcontroller 8051. There are four main procedures included on the design. 1. ADC Driver This procedure is used to drive the ADC chip MAX114. Here is the listing program. 2. Data Conversion This procedure is used to convert the soil moisture and expected level from ADC Driver procedure to the ASCII format, so they can be displayed on the LCD. 3. LCD Driver This procedure is used to control the LCD. First the LCD must be initialized using InitLCD procedure. Then, to write an instruction register we must use IR procedure, while to write an data register we must use DR procedure. The main procedure of the LCD driver is Display procedure. 4. Device Driver This procedure is used to control the watering valve. It will compare the expected level with soil moisture level, and decide whether the watering valve is active or not. 5. Main Program

Parts List:-

Sample-and-hold amplifier
DESCRIPTION

LF398

The LF198/LF298/LF398 are monolithic sample-and-hold circuits which utilize highvoltage ion-implant JFET technology to obtain ultra-high DC accuracy with fast acquisition of signal and low droop rate. Operating as a unity gain follower, DC gain accuracy is 0.002% typical and acquisition time is as low as 6 s to 0.01%. A bipolar input stage is used to achieve low offset voltage and wide bandwidth. Input offset adjust is accomplished with a single pin and does not degrade input offset drift. The wide bandwidth allows the LF198 to be included inside the feedback loop of 1MHz op amps without having stability problems. Input impedance of 1010 allows high source impedances to be used without degrading accuracy. P-channel junction FETs are combined with bipolar devices in the output amplifier to give droop rates as low as 5mV/min with a 1 F hold capacitor. The JFETs have much lower noise than MOS devices used in previous designs and do not exhibit high temperature instabilities. The overall design guarantees no feedthrough from input to output in the hold mode even for input signals equal to the supply voltages. Logic inputs are fully differential with low input current, allowing direct connection to TTL, PMOS, and CMOS; differential threshold is 1.4V. The LF198/LF298/LF398 will operate from 5V to 18V supplies. They are available in 8-pin plastic DIP, 8-pin Cerdip, and 14-pin plastic SO packages. FEATURES Operates from 5V to 18V supplies Less than 10 s acquisition time TTL, PMOS, CMOS compatible logic input 0.5mV typical hold step at CH=0.01 F Low input offset 0.002% gain accuracy Low output noise in hold mode Input characteristics do not change during hold mode High supply rejection ratio in sample or hold Wide bandwidth APPLICATION The LF198/LF298/LF398 are ideally suited for a wide variety of sample-and-hold applications, including data acquisition, analog-to-digital conversion, synchronous demodulation, and automatic test setup

PIN CONFIGURATIONS

NOTES: 1. The maximum junction temperature of the LF398 is 150C. When operating at elevated ambient temperature, the packages must be derated based on the thermal resistance specified. 2. Although the differential voltage may not exceed the limits given, the common-mode voltage on the logic pins must always be at least 2V below the positive supply and 3V above the negative supply.

DC ELECTRICAL CHARACTERISTICS Unless otherwise specified, the following conditions apply: unit is in sample mode; VS = 15V; TJ = 25C; -11.5V3 VIN 3 +11.5V; CH=0.01 F; and RL = 10k . Logic reference voltage = 0V and logic voltage = 2.5V.

LM324
The CA124, CA224, CA324, LM324, and LM2902 consist of four independent, high-gain operational amplifiers on a single monolithic substrate. An on-chip capacitor in each of the amplifiers provides frequency compensation for unity gain. These devices are designed specially to operate from either single or dual supplies, and the differential voltage range is equal to the power-supply voltage. Low power drain and an input common-mode voltage range from 0V to V+ -1.5V (single-supply operation) make these devices suitable for battery operation.

Pinout LM324

Absolute Maximum Ratings


Supply Voltage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32V or } 16V Differential Input Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32V Input Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -0.3V to 32V Input Current (VI < -0.3V, Note 1) . . . . . . . . . . . . . . . . . . . . . . 50mA Output Short Circuit Duration (V+ 15V, Note 2) . . . . . .Continuous

Operating Conditions
Temperature Range CA124 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -55oC to 125oC CA224, LM2902 . . . . . . . . . . . . . . . . . . . . . . . . . . . -40oC to 85oC CA324, LM324 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0oC to 70oC

Electrical Specifications

MAX6350 VOLTAGE REFERENCE

General Description
The MAX6350 is low-noise, precision voltage references with extremely low, 0.5ppm/C typical temperature coefficients and excellent, 0.02% initial accuracy. These devices feature buried-zener technology for lowest noise performance. Load-regulation specifications are guaranteed for source and sink currents up to 15mA. Excellent line and load regulation and low output impedance at high frequencies make

them ideal for high-resolution data-conversion systems up to 16 bits. The MAX6325 is set for a 2.5V output, the MAX6341 is set for a 4.096V output, and the MAX6350 is set for a 5V output. All three provide for the option of external trimming and noise reduction.

Applications
High-Resolution Analog-to-Digital and Digital-to-Analog Converters High-Accuracy Reference Standard High-Accuracy Industrial and Process Control Digital Voltmeters ATE Equipment Precision Current Sources

Pin Configuration

ELECTRICAL CHARACTERISTICSMAX6350 (VIN = +10V, IOUT = 0mA, TA = TMIN to TMAX, unless otherwise noted. Typical values are at TA = +25C.)

LF398 Sample-and-hold amplifier


DESCRIPTION

The LF398 is a monolithic sample-and-hold circuit which utilizes high-voltage ionimplant JFET technology to obtain ultra-high DC accuracy with fast acquisition of signal and low droop rate. Operating as a unity gain follower, DC gain accuracy is 0.002% typical and acquisition time is as low as 6 s to 0.01%. A bipolar input stage is used to achieve low offset voltage and wide bandwidth. Input offset adjust is accomplished with a single pin and does not degrade input offset drift. The wide bandwidth allows the LF398 to be included inside the feedback loop of 1 MHz op amps without having stability problems. Input impedance of 1010 allows high source impedances to be used without degrading accuracy. P-channel junction FETs are combined with bipolar devices in the output amplifier to give droop rates as low as 5 mV/min with a 1 F hold capacitor. The JFETs have much lower noise than MOS devices used in previous designs and do not exhibit high temperature instabilities. The overall design guarantees no feedthrough from input to output in the hold mode even for input signals equal to the supply voltages. Logic inputs are fully differential with low input current, allowing direct connection to TTL, PMOS, and CMOS; differential threshold is 1.4 V. The LF398 will operate from 5 V to 18 V supplies. It is available in 8-pin plastic DIP and 14-pin plastic SO packages.

PIN CONFIGURATIONS

FEATURES Operates from 5 V to 18 V supplies Less than 10 s acquisition time TTL, PMOS, CMOS compatible logic input 0.5 mV typical hold step at CH = 0.01 F Low input offset 0.002% gain accuracy Low output noise in hold mode Input characteristics do not change during hold mode High supply rejection ratio in sample or hold Wide bandwidth

DC ELECTRICAL CHARACTERISTICS

Liquid Crystal Display


FEATURES : Slim, light weight and low power consumption High contrast and wide viewing angle Built-in controller for easy interfacing LCD modules with built-in EL or LED backlight

LM555 Timer
General Description The LM555 is a highly stable device for generating accurate time delays or oscillation. Additional terminals are provided for triggering or resetting if desired. In the time delay mode of operation, the time is precisely controlled by one external resistor and capacitor. For astable operation as an oscillator, the free running frequency and duty cycle are accurately controlled with two external resistors and one capacitor. The circuit may be triggered and reset on falling waveforms, and the output circuit can source or sink up to 200 mA or drive TTL circuits. Features Direct replacement for SE555/NE555 Timing from microseconds through hours Operates in both astable and monostable modes Adjustable duty cycle Output can source or sink 200 mA Output and supply TTL compatible Temperature stability better than 0.005% per C Normally on and normally off output Applications Precision timing Pulse generation Sequential timing Time delay generation Pulse width modulation Pulse position modulation Linear ramp generator

Electrical Characteristics (TA e 25C, VCCe a5V to a15V, unless othewise specified

8051 MICROCONTROLER

Features of 8051
The main features of 8051 microcontroller are:
i.

RAM 128 Bytes (Data memory) ROM 4Kbytes (ROM signify the on chip program space) Serial Port Using UART makes it simpler to interface for serial communication. Two 16 bit Timer/ Counter Input/output Pins 4 Ports of 8 bits each on a single chip. 6 Interrupt Sources

ii.

iii.

iv.

v.

vi.

vii. viii.

8 bit ALU (Arithmetic Logic Unit) Harvard Memory Architecture It has 16 bit Address bus (each of RAM and

ROM) and 8 bit Data Bus.


ix.

8051 can execute 1 million one-cycle instructions per second with a clock

frequency of 12MHz. This microcontroller is also called as System on a chip because it has all the features on a single chip.

Memory Architecture
.

Internal RAM This memory is located from address 0 to 0xff. The memory

locations from 0x00 to 0x7F are accessed directly. The bytes from 0x20 to 0x2F are bitaddressable. Loading R0 and R1 the memory location from 0x80 to 0xFF can easily accessed.
ii.

Special Function Registers (SFR) Located from address 0x80 to 0xFF of the

memory location. The same instructions used for lower half of Internal RAM can be used to access SFRs. The SFRs are bit addressable too.
iii.

Program Memory This is read only memory which is located at address 0.

With the help of 16 bit Special Function Register DPTR, this memory can also save the tables of constants.
iv.

External Data Memory Located at address 0. The Instruction MOVX (Move

External) should be used to access the external data memory.

8051 allows you to manipulate one or all of the bits of a port, thus providing programmers with a unique and powerful feature. 8051 provides the programmer with the ability to read, write and modify each port to customize applications as much as possible.

NOT gate - 7404 Chip

You might also like