BY B.NIHARIKA(07241A0240) SAYARA SULTANA(07241A0248) B.PRASANNA (07241A0242) L.HARIKA (07241A0204) Under the guidance of Mr.K.SATISH KUMAR (Assistant Professor)
DEPARTMENT OF ELECTRICAL ENGINEERING GOKARAJU RANGARAJU INSTITUTEOF ENGINEERING& TECHNOLOGY
The main object of our project is to update the analog data to the server with period of each second, display and store the data with temperature ,time and day through serial communication. In this project we are doing simulation in PROTEUS 6.9 using AT89c51,Analog to Digital converter(ADC),Real time clock(RTC),Temperature sensor(LM35),RS232 and designing the PCB using EAGLE software. Here the temperature is obtained as analog value and later it is converted to digital value by analog-to-digital converter.By using Real time Clock,time and day are displayed.Temperature is displayed using LM35 sensor(100 o C). The whole data which is collected is displayed on the PC screen in the hyperterminal console using RS232.
BLOCK DIAGRAM: PC HYPERTERMINAL RS232 MAX232
TEMPERATURE SENSOR (LM35)
ADC RTC
8051 MICRO CONTROLLER 8051 MICROCONTROLLER: The 8051 micro controller generic part number actually includes a whole family of microcontrollers that have numbers ranging from 8031 to 8751 and are available in N-channel metal oxide silicon (NMOS) and complementary metal oxide silicon (CMOS) construction in variety of packages. The Intel 8051 is an 8-bit microcontroller which means that most available operations are limited to 8-bit. There are 3 basic sizes of the 8051:short, standard, and extended. The short and standard chips are often available in DIP(dual in-line package) form, but the Extended 8051 models often have a different form factor, and are not drop-in compatible. All these things are called 8051 because they can all be programmed using 8051 assembly language, and they all share certain features (although the different models all have their own special features). FEATURES OF 8051: 8-bit data bus 16-bit address bus 32 general purpose registers each 8 bits 16 bit timers(usually 2, but may have more, or less) 3 internal and 2 external interrupts. Bit as well as byte addressable RAM area of 16 bytes. Four 8-bit ports, (short models have two 8-bit ports). 16-bit program counter and data pointer. 8051 models may also have a number of special, model-specific features, such as UARTs, ADC, OpAmps ,etc.. TMOD is dedicated solely to the two timers and can be considered to be two duplicate 4- bit registers each of which controls the action of one of the timers. TCON has control bits and flags for the timers in the upper nibble and control bits and flags for the external interrupts in the lower nibble.
INPUT/OUTPUT PORTS: One major feature of a micro controller is the versatility built into the input/output circuits that connect the 8051 to the outside world. Given the pin flexibility, the 8051 may be simply applied as a single component with input/output only, or it may be expanded to include additional memory, parallel ports, and serial data communication by using the alternate pin assignments. Those locations weve just added are called ports. There are several types of ports: input, output or bi-directional ports. When working with ports, first of all it is necessary to choose which port we need to work with, and then to send data to, or take it from the port. When working with it the port acts like a memory location. Something is simply being written into or read from it, and it could be noticed on the pins of the micro-controller. There are 4 8-bit ports P0, P1, P2, P3. PORT P1(pins 1 to 8): the port P1 is general purpose input/output port which can be used for a variety of interfacing tasks. The ports P0, P2 and P3 have duel roles or additional functions associated with them based upon the context of their usage. PORT P3(pins 7 to 17): PORT P3 acts a normal IO port, but port P3 has additional functions such as, serial transmit and receive pins, 2 external interrupt pins, 2 external counter inputs, read and write pins for memory access. PORT P2(pins 21 to 28): PORT P2 can also be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P2 will act as an address bus in conjunction with PORT P0 to access external memory. PORT P2 acts as A8- A15. PORT0(pins 32 to 39): PORT P0 can be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P0 acts as a multiplexed address and data bus that can be used to access external memory is conjunction with PORT P2. P0 acts as AD0-AD7. RTC REAL TIME CLOCK: A real time clock is basically just like a watch - it runs on a battery and keeps time for you even when there is a power outage. Using an RTC, you can keep track of long timelines, even if you reprogram your microcontroller or disconnect it from USB or a power plug. A RTC is a computer clock that keeps the track of current time. RTCs are present in almost any electronic device which needs to keep accurate time. 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. Most RTCs use a crystal oscillator but some use the power line frequency. In many cases the oscillators frequency is 32.768 kHz. This is the same frequency used in quartz clocks and watches, and for the same reasons ,namely that frequency is exactly 2 15 cycles per second, which is convenient rate to use with simple binary counter circuits. RS232: In telecommunications, RS-232 (Recommended Standard 232) is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and pinout of connectors. The current version of the standard is TIA-232-F Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange, issued in 1997. In RS-232, user data is sent as a time-series of bits. Both synchronous and asynchronous transmissions are supported by the standard. In addition to the data circuits, the standard defines a number of control circuits used to manage the connection between the DTE and DCE. Each data or control circuit only operates in one direction, that is, signaling from a DTE to the attached DCE or the reverse. Since transmit data and receive data are separate circuits, the interface can operate in a full duplex manner, supporting concurrent data flow in both directions. The standard does not define character framing within the data stream, or character encoding. RS-232 devices may be classified as Data Terminal Equipment (DTE) or Data Communication Equipment (DCE); this defines at each device which wires will be sending and receiving each signal. In general and according to the standard, terminals and computers have male connectors with DTE pin functions, and modems have female connectors with DCE pin functions. Other devices may have any combination of connector gender and pin definitions. Many terminals were manufactured with female terminals but were sold with a cable with male connectors at each end; the terminal with its cable satisfied the recommendations in the standard. PIN DIAGRAM OF RS232
SERIAL COMMUNICATION: Serial communication is often used either to control or to receive data from an embedded microprocessor. Serial communication is a form of I/O in which the bits of a byte begin transferred appear one after the other in a timed sequence on a single wire. Serial communication has become the standard for intercomputer communication. In this project, we'll try to build a serial link between 8051 and PC using RS232. 8051 provides a transmit channel and a receive channel of serial communication. The transmit data pin (TXD) is specified at P3.1, and the receive data pin (RXD) is at P3.0. The serial signals provided on these pins are TTL signal levels.All modes are controlled through SCON, the Serial CONtrol register. The SCON bits are defined as SM0, SM1, SM2, REN, TB8, RB8, TI, RI from MSB to LSB. The timers are controlled using TMOD, the Timer MODe register, and TCON, the Timer CONtrol register.
TEMPERATURE SENSOR(LM35): The LM35 sensor series(shown in figure) are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature.
The LM35 sensor thus has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 sensor does not require any external calibration or trimming to provide typical accuracies of C at room temperature and C over a full -55 to +150C temperature range. The LM35's low output impedance, linear output, and precise inherent calibration make interfacing to readout or control circuitry especially easy. It can be used with single power supplies, or with plus and minus supplies. As it draws only 60 mA from its supply, it has very low self-heating, less than 0.1C in still air. The LM35 is rated to operate over a b55 to a150C temperature range, while the LM35C is rated for a b40 to a110Crange (b10 with improved accuracy).
ADC: ANALOG TO DIGITAL CONVERTER: Analog-to-Digital converters are among the most widely used devices for data acquisition. An analog-to-digital converter (abbreviated ADC, A/D or A to D) is a device that converts a continuous quantity to a discrete digital number. The reverse operation is performed by a digital-to-analog converter (DAC). Typically, an ADC is an electronic device that converts an input analog voltage (or current) to a digital number proportional to the magnitude of the voltage or current. However, some non-electronic or only partially electronic devices, such as rotary encoders, can also be considered ADCs.
The digital output may use different coding schemes. Typically the digital output will be a two's complement binary number that is proportional to the input, but there are other possibilities. An encoder, for example, might output a Gray code. An ADC might be used to make an isolated measurement. ADCs are also used to quantize time-varying signals by turning them into a sequence of digital samples. The result is quantized in both time and value.