Top Banner

Click here to load reader

CONTENTS 1. INTRODUCTION 2. INTRODUCTION TOMICROCONTROLLER ... · PDF file1. INTRODUCTION 2. INTRODUCTION TOMICROCONTROLLER 3. ... * ADC 0808 * APR 9600 * Amplifier for CT HTS 10P

Jun 04, 2018

ReportDownload

Documents

dinhduong

  • CONTENTS

    1. INTRODUCTION

    2. INTRODUCTION TOMICROCONTROLLER

    3. FUNCTIONAL BLOCK DIAGRAM

    4. FUNCTIONAL DESCRIPTION

    5. HARDWARE

    * Power supply * ADC 0808 * APR 9600 * Amplifier for CT HTS 10P * LCD * Serial EEPROM 24C04

    6. SOFTWARE

    * Flow Chart * Program

  • INTRODUCTION

    Smart card enhanced in use today for several applications like mobile communication, banking etc., so in this project an attempt is made to have an smart card for electric power consumption. Here also the user has to purchase the smart card of particular units/amount of power by paying the amount initially. Then in order to consume the power the user has to insert the card, once the amount of power consumed by the user crosses the unit/amount as stored initially in the Corel, then automatically the system will disconnect the power line from the loads.

  • FUNCTIONAL BLOCK DIAGRAM

    230 ac

    RELAY

    PROSSING UNIT

    LOADS

    CT SIGNALCONDITIONER Adc 0809 MC

    89C51

    CARD eeprom24c32

    MESSAGE PLAY BACK CKT

    LCD DISPLA

    CONSUMPTION LEVEL INDICATORS

    75% 90% 100%

  • FUNCTIONAL DESCRIPTION

  • Functional Descriptions of KPTCL

    Smart Card (serial EEPROM 24C04)The serial EEPROM 24C04 is used here as a smart card to store the number of units. Micro controller Communicates with serial EEPROM using I2C protocal.Once the system is switched ON, the micro controller first checks the content of serial EEPROM for units. If there is no EEPROM or there is no units. If there is no EEPROM or there is no units that is zero units in the EEPROM, controller will not proceed further.

    Relay Driver:This section is used to connect mains to the loads by driving the relay which is connected in series with the phase of the AC mains.

  • The micro controller drives the relay when there is some units in the inserted card. And releases the relay when the units are over.

    Current Processing section:

    Once the mains is connected the loads, then the loads start drawing current, this current taken by the loads is extracted with the help of current transducer HTS 10 P which is connected in series with the phase of the AC mains.The out of the transducer is a current signal of very low voltage (will be in terms of mile volts), which is amplified in two stages using lm 348 amplifier with the gain of 25.Then the amplified using diode OA79. and the rectified DC voltage of current signal is applied to the first channel of ADC 0809.

  • Analog to Digital Converter (ADC 0809)

    ADC 0809 is used to convert the current input signal, and then sends start of convert ion signal to the ADC, then ADC will convert the input analog voltage into 8-bit digital value, and then selects the other channel to get the voltage equivalent hex value.Once the micro controller gets the digital value of current and voltage, then it calculates the power that is P=VI.After one unit, the controller decrements the content of serial EEPROM and then compares with the 50% is matched it will give be continued, offer 75% is completed it will give another indication and playback circuit APR 9600.Once the unit become zero, the system informs by playing another message and another indication and disconnects the loads from the mains by releasing the Relay.Then after inserting the fresh card the above procedure will be continued.

    Features:

  • * continuous display of unit and other information on 2 line LCD.* If the card is removed in between, and after inserting again the meter reading starts from the previous balance.* Percentage indication to know the balance.* Voice message for the balance.

    INTRODUCTION TO MICROCONTROLLER

  • 8951/8051 MICROCONTROLLER:

    Computer in its simplest from needs at least three basic blocks: the central processing unit (CPU). Input-output (I/O) and memory (RAM/ROM). The integrated from of CPU is the microprocessor. As the use of microprocessors in control applications increased, development of microcontroller unit or MCU took shape, wherein CPU, I/O and some limited memory on a single, chip was fabricated. Intention was to reduce the chip count as much as possible. There are many types of microcontrollers currently in the market, out of which the 8031. Family from Intel, and second soured by many others, have gained immense popularity.INTRODUCTIONLooking back into the history of microcomputers, one would at first come across the development of microprocessor, I.e.., the processing element, and later on the peripheral devices. The three basic element the CPU, I/O devices and memory- have developed in distinct direction. While the CPU has been the proprietary item, the memory devices fall into general-purpose category and the I/O devices may be grouped somewhere in- between. The control applications of microprocessors have different requirements, both hardware-wise as well as software-wise. Whereas microprocessor has just sufficient number of on-chip devices to act as the CPU, a number of other auxiliary devices are needed to get a working microcontroller. integration of I/O and memory with the CPU on a single chip ushered in the era of development of a new class of devices, i.e..., the single chip microcontrollers. Now only one device was needed to run an independent control application. The 8048 from Intel, Z80 from Zilog, 6805 and 6811 from Motorola represent a few of the members of this large family. The

  • 8048 from Intel became popular due to its use in the keyboard of the IBM PC. The family of second generation microcontrollers from Intel, the 8051 and other related devices, has brought about a new revolution in this field. While the early microcontrollers had only limited memory and existent serial I/O capability, the 8051 provides for 4k PROM/ROM, 128 byte RAM and 32 I/O lines. It also includes a universal asynchronous receive-transmit (UART) device, two 16-bit timer/counter and elaborate Interrupt logic. Lack of multiply and divide instructions, has also been taken care of in the 8051. Thus the 8051 may be called nearly equivalent of the following devices on a single chip:8085 + 8255 + 8251 + 8253 + 2764 + 2764 + 6116(Microprocessor) (PPI) (USART) (TIMER) (EPROM) (RAM)In short, the 8051 has the following on-chip facilities: 4k ROM (EPROM on 8751) 128 byte RAM USRT 32 Input-output port lines TWO 16-bit timer/ count Six interrupt sources and On-chip clock oscillator and power on- reset circuitry. The other members of this family, such as 8053, have one extra timer/counter, 8k ROM/EPROM and 256 byte RAM, while 8031and 8032 are corresponding ROM-less versions of 8052,respectivily. All these are also available in CMOS versions. The 8051 family includes a large numbers of members from many manufacturers, some of which are listed below.8051 with 4k ROM and its8751 with 4k EPROM8031 ROM-less version.8052 with 8k ROM, one additional counter/timer and 256-bit RAM; its other version (8052h) comes with built-in BASIC interpreter.8032 & 8752 are ROM + I/O (80C31) Along with pulse width modulator. 80C592 With 8-channel A/D converter, by Philips.AT 89C51 CMOS device with EPROM (100 times programmable), by ATMEL.SALIENT FEATURESThe 8051 can be configured to bypass the internal 4k RAM and run solely with external program memory. For this its external access ( ) pin 31 has to be grounded, which makes it equivalent to 8031. The program store enable

  • (PSEN) signal acts as read pulse for program memory. The data memory is external only and a separate RD* signal is available for reading its contents.Use of external memory requires that three of its 8-bit ports (out of four) are configured to provide data/address multiplexed bus, Hi address bus and control signals related to external memory use. The RXD and TXD ports of UART also appear on pins 10 and 11 of 8051 and 8031, respectively. One 8-bit port, which is bit addressable and extremely useful for control applications, still remains free for use.The UART utilizes one of the internal timers for generation of baud rate. The crystal used for generation of CPU clock has therefore to be chosen carefully. The 3.579MHz crystal; available abundantly, can provide a baud rate of 1200.The 256-byte address space is utilized by the internal RAM and special function registers (SFRs)array which is separate from external RAM space of 64k. the 00-7f space is occupied by the RAM and the 80-FF space by the SFRs. The 128-byte internal RAM has been utilized in the following fashion: 00-1F: Used for four banks of eight registers of 8-bit each. The four banks may be selected by soft ware any time during the program.20-2F: The 16 bytes may be used as 128 bits oriented programs.30-7F This area is used for temporary storage, pointers and stack. On reset, the stack starts at 08 and gets incremented during use.The list of special function registers along with their hex addresses is given in table 1.HARDWARE DETAILSThe on-chip oscillator of 8031 can be used to generator system clock. Depending upon version of the device, crystals from 3.5 to 12 MHz may be used for this purpose. The system clock is internally divided by 6 and the resultant time period becomes one processor cycle. The instructions take mostly one or two processor cycles. The ALE (address latch enable) pulse rate is 1/6th of the system clock, except during access of internal program memory, and thus can be used for timing purposes.The two internal timers are wired to the system clock and persecuting factor is decided by the software apart from the count stored in the two bytes of the timer control registers. One of the counters, as mentioned earlier, is used for

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.