Final Eb Meter

download Final Eb Meter

of 49

Transcript of Final Eb Meter

  • 7/29/2019 Final Eb Meter

    1/49

    DESIGNING OF AN AUTOMATED POWER METER READING

    WITH ZIGBEE COMMUNICATION

    ABSTRACT:

    This paper presents the design and implementation of Automatic Power Meter (APM),

    The APM is implemented using an AT89C51and Zigbee Based power meter Communication

    Module. The design presents a new methodology for avoiding the high construction and

    maintenance costs in the existing meter reading technology. Using an APM with network

    technologies has become a trend today. The designed system avoids the human intervention in

    Power Management. If the Consumer doesnt pay the bill in time, the power connection will be

    disconnected from the remote server automatically. It displays the corresponding billing

    information on LCD and sends data to the server through the Zigbee Module. The based

    AT89C51 hardware system consists of a processor core board and the peripheral board. The

    entire programming is based on Embedded C/ASM Language. This system provides efficient

    meter reading, avoiding the billing error and reduces the maintenance cost. This paper also

    addresses advantages of implementing the Zigbee communication module and design detail and

    discusses the advanced security of the data communications/transmission.

  • 7/29/2019 Final Eb Meter

    2/49

    EXISTING SYSTEM.

    Nowadays the eb meter readings are manually verified by the Respective eb person. Therespective person goes to each and every home and they inform to consumer about the

    notification of eb reading for the current month. If the consumer is not available at home means,

    the EB person has to come on another day or have to wait for some time for note down the

    reading. Consequently this will make some water of time and delay.

    PROPOSED SYSTEM

    The proposed system is fully automatic for reading the EB meter count. The Microcontroller

    based system continuously records the readings and the live meter reading can be sent to the

    Electricity department on request. This system makes use of a zigbee for remote monitoring and

    control of Energy Meter. This system enables the Electricity Department to read the meter

    readings regularly without the person visiting each house.

    This can be achieved by the use of microcontroller unit that continuously monitors and records

    the Energy Meter readings in its permanent (non-volatile) memory location.

    HARDWARE MODULES

    IR SENSOR

    EB METER

    ZIGBEE TRANSRECEIVER

  • 7/29/2019 Final Eb Meter

    3/49

    LCD

    LIMIT SWITCH

    AT89C51 MICROCONTROLLER

    MAX 232 (FOR SERIAL COMUNICATION)

    POWER SUPPLY

    PC

    TRANSMITTER MODULE:

    EB METER IR

    SENSOR

    AT89c51

    2X16 LCD DISPLAY

  • 7/29/2019 Final Eb Meter

    4/49

    Antenna

    RECEIVER MODULE:

    MAX 232

    IC

    ZIGBEE

    MODULE

    POWER SUPPLY

    UNIT

    ZIBEE

    MODULE

    RS 232

    INTERFAC

    E

    POWER

    SUPPLY

    PERSONA

    L

    COMPUTE

    R

  • 7/29/2019 Final Eb Meter

    5/49

    WORKING PRINCIPLE:

    A IR Sensor is fixed across the eb meter armature and it is connected at the port of the Arm

    controller . A small black trap is placed in the armature of the eb meter for counting the rotation

    of the meter. IR sensor is consist of IR led and phototransistor. IR led is a transmitter and

    phototransistor is a receiver. Normally the output of the ir sensor is in static high, whenever the

    black trap crosses the ir sensor, a static low signal is provided to the microcontroller and

    microcontroller assumes the pulse as a count or unit.

    Here LCD is connected at the port 1 and used to display the units of the meter and the date.

    Zigbee is connected at the serial communication pin of the microcontroller. The TX and RX pin

    of the zigbee connected to the controller. In between this connected a max 232 ic is used for

    establishing the serial communication between the controller and the modem. Here the program

    is written for counting the eb meter reading for 30 days and send the message to the consumer at

    the end of the month. In this project two switches are used to feed the eb count and date

  • 7/29/2019 Final Eb Meter

    6/49

    manually. When the microcontroller read the date as 30 th of the month, it will communicate with

    zigbee for sending details, the user name, amount of unit consumed and total bill amount. Here

    limit switch is used for security purpose. If the user open the EB box, the microcontroller will

    block the all operation and send the alert to the eb unit. The operation will resumes after the eb

    person inspects the total box and instead of password protection, reset button is used to switch on

    the operation

    At the receiver end pc is used to receive the data through zigbee. After the completion of one

    month, the microcontroller starts to reads the data from the eb meter for the consecutive months.

    BLOCK DIAGRAM DESCRIPTION

    ELECTRICITY METER:

    An electric meter orenergy meter is a device that measures the amount ofelectrical energy

    consumed by a residence,business, or an electrically powered device.

    Electric meters are typically calibrated in billing units, the most common one being the kilowatt

    hour. Periodic readings of electric meters establish billing cycles and energy used during a cycle.

    In settings when energy savings during certain periods are desired, meters may measure demand,

    the maximum use of power in some interval. In some areas, the electric rates are higher during

    certain times of day, to encourage reduction in use. Also, in some areas meters have relays to

    turn off nonessential equipment.

    Electromechanical meters

    This mechanical electricity meter has every other dial rotating counter-clockwise.

    http://en.wikipedia.org/wiki/Electricityhttp://en.wikipedia.org/wiki/Energyhttp://en.wikipedia.org/wiki/Househttp://en.wikipedia.org/wiki/Businesshttp://en.wikipedia.org/wiki/Kilowatt_hourhttp://en.wikipedia.org/wiki/Kilowatt_hourhttp://en.wikipedia.org/wiki/Clockwisehttp://en.wikipedia.org/wiki/Electricityhttp://en.wikipedia.org/wiki/Energyhttp://en.wikipedia.org/wiki/Househttp://en.wikipedia.org/wiki/Businesshttp://en.wikipedia.org/wiki/Kilowatt_hourhttp://en.wikipedia.org/wiki/Kilowatt_hourhttp://en.wikipedia.org/wiki/Clockwise
  • 7/29/2019 Final Eb Meter

    7/49

    The most common type of electricity meter is theelectromechanicalinduction watt-hour

    meter. [14][15]

    The electromechanical induction meter operates by counting the revolutions of

    analuminium disc which is made to rotate at a speed proportional to the power. The number of

    revolutions is thus proportional to the energy usage. It consumes a small amount of power,

    typically around 2 watts.

    The metallic disc is acted upon by two coils. One coil is connected in such a way that it produces

    amagnetic flux in proportion to the voltage and the other produces a magnetic flux in proportion

    to thecurrent. The field of the voltage coil is delayed by 90 degrees using a lag coil. This

    produces eddy currents in the disc and the effect is such that a force is exerted on the disc in

    proportion to the product of the instantaneous current and voltage. Apermanent magnet exerts an

    opposing force proportional to thespeed of rotationof the disc. The equilibrium between these

    two opposing forces results in the disc rotating at a speedproportional to the power being used.

    The disc drives a register mechanism whichintegrates the speed of the disc over time by

    counting revolutions, much like the odometerin a car, in order to render a measurement of the

    total energy used over a period of time.

    The type of meter described above is used on asingle-phaseACsupply. Differentphase

    configurationsuse additional voltage and current coils.

    http://en.wikipedia.org/wiki/Electromechanicalhttp://en.wikipedia.org/wiki/Electromagnetic_inductionhttp://en.wikipedia.org/wiki/Electricity_meter#cite_note-13http://en.wikipedia.org/wiki/Electricity_meter#cite_note-14http://en.wikipedia.org/wiki/Electromagnetic_inductionhttp://en.wikipedia.org/wiki/Aluminiumhttp://en.wikipedia.org/wiki/Aluminiumhttp://en.wikipedia.org/wiki/Induction_coilhttp://en.wikipedia.org/wiki/Magnetic_fluxhttp://en.wikipedia.org/wiki/Magnetic_fluxhttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Eddy_currenthttp://en.wikipedia.org/wiki/Forcehttp://en.wikipedia.org/wiki/Permanent_magnethttp://en.wikipedia.org/wiki/Angular_velocityhttp://en.wikipedia.org/wiki/Angular_velocityhttp://en.wikipedia.org/wiki/Angular_velocityhttp://en.wikipedia.org/wiki/Proportionality_(mathematics)http://en.wikipedia.org/wiki/Integralhttp://en.wikipedia.org/wiki/Integralhttp://en.wikipedia.org/wiki/Odometerhttp://en.wikipedia.org/wiki/Single-phase_electric_powerhttp://en.wikipedia.org/wiki/Single-phase_electric_powerhttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Polyphase_systemhttp://en.wikipedia.org/wiki/Polyphase_systemhttp://en.wikipedia.org/wiki/Polyphase_systemhttp://en.wikipedia.org/wiki/Electromechanicalhttp://en.wikipedia.org/wiki/Electromagnetic_inductionhttp://en.wikipedia.org/wiki/Electricity_meter#cite_note-13http://en.wikipedia.org/wiki/Electricity_meter#cite_note-14http://en.wikipedia.org/wiki/Electromagnetic_inductionhttp://en.wikipedia.org/wiki/Aluminiumhttp://en.wikipedia.org/wiki/Induction_coilhttp://en.wikipedia.org/wiki/Magnetic_fluxhttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Eddy_currenthttp://en.wikipedia.org/wiki/Forcehttp://en.wikipedia.org/wiki/Permanent_magnethttp://en.wikipedia.org/wiki/Angular_velocityhttp://en.wikipedia.org/wiki/Proportionality_(mathematics)http://en.wikipedia.org/wiki/Integralhttp://en.wikipedia.org/wiki/Odometerhttp://en.wikipedia.org/wiki/Single-phase_electric_powerhttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Polyphase_systemhttp://en.wikipedia.org/wiki/Polyphase_system
  • 7/29/2019 Final Eb Meter

    8/49

    The aluminum disc is supported by a spindle which has aworm gearwhich drives the register.

    The register is a series of dials which record the amount of energy used. The dials may be of the

    cyclometer type, an odometer-like display that is easy to read where for each dial a single digit is

    shown through a window in the face of the meter, or of the pointer type where a pointer indicates

    each digit. With the dial pointer type, adjacent pointers generally rotate in opposite directions

    due to the gearing mechanism.

    Most domestic electricity meters must be read manually, whether by a representative of

    thepower company or by the customer. Where the customer reads the meter, the reading may be

    supplied to the power company by telephone,post or over the internet. The electricity company

    will normally require a visit by a company representative at least annually in order to verify

    customer-supplied readings and to make a basic safety check of the meter.

    In an induction type meter, creep is a phenomenon that can adversely affect accuracy, that occurs

    when the meter disc rotates continuously with potential applied and the load terminals open

    circuited. A test for error due to creep is called a creep test.

    http://en.wikipedia.org/wiki/Gear#Wormhttp://en.wikipedia.org/wiki/Gear#Wormhttp://en.wikipedia.org/wiki/Gear#Wormhttp://en.wikipedia.org/wiki/Numerical_digithttp://en.wikipedia.org/wiki/Electricity_retailinghttp://en.wikipedia.org/wiki/Telephonehttp://en.wikipedia.org/wiki/Mailhttp://en.wikipedia.org/wiki/Internethttp://en.wikipedia.org/wiki/File:ThreePhaseElectricityMeter.jpghttp://en.wikipedia.org/wiki/Gear#Wormhttp://en.wikipedia.org/wiki/Numerical_digithttp://en.wikipedia.org/wiki/Electricity_retailinghttp://en.wikipedia.org/wiki/Telephonehttp://en.wikipedia.org/wiki/Mailhttp://en.wikipedia.org/wiki/Internet
  • 7/29/2019 Final Eb Meter

    9/49

    EMBEDDED SYSTEM:

    An embedded system is a special-purpose system in which the computer is completely

    encapsulated by or dedicated to the device or system it controls. Unlike a general-purpose

    computer, such as a personal computer, an embedded system performs one or a few predefined

    tasks, usually with very specific requirements. Since the system is dedicated to specific tasks,

    design engineers can optimize it, reducing the size and cost of the product. Embedded systems

    are often mass-produced, benefiting from economies of scale.

    Personal digital assistants (PDAs) or handheld computers are generally considered

    embedded devices because of the nature of their hardware design, even though they are more

    expandable in software terms. This line of definition continues to blur as devices expand. With

    the introduction of the OQO Model 2 with the Windows XP operating system and ports such as a

    USB port both features usually belong to "general purpose computers", the line of

    nomenclature blurs even more.

    Physically, embedded systems ranges from portable devices such as digital watches and

    MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems

    controlling nuclear power plants.

    In terms of complexity embedded systems can range from very simple with a single

    microcontroller chip, to very complex with multiple units, peripherals and networks mounted

    inside a large chassis or enclosure.

  • 7/29/2019 Final Eb Meter

    10/49

    Examples of Embedded Systems:

    Avionics, such as inertial guidance systems, flight control hardware/software and other

    integrated systems in aircraft and missiles

    Cellular telephones and telephone switches

    Engine controllers and antilock brake controllers for automobiles Home automation products, such as thermostats, air conditioners, sprinklers, and security

    monitoring systems

    Handheld calculators

    Handheld computers

    Household appliances, including microwave ovens, washing machines, television sets,

    DVD players and recorders

    Medical equipment Personal digital assistant

    Videogame consoles

    Computer peripherals such as routers and printers.

    Industrial controllers for remote machine operation.

  • 7/29/2019 Final Eb Meter

    11/49

    Block Diagram Explanation:

    This Project mainly consists of Power Supply section, Microcontroller section, Motor Driver section

    and a sensor.

    Power Supply Section: This section is meant for supplying Power to all the sections mentioned

    above.It basically consists of a 12V DC battery followed by a positive voltage regulator is used to

    regulate the required dc voltage for the Microcontroller circuit operation.

    Microcontroller Section: This section forms the control unit of the whole project. This section

    basically consists of a Microcontroller with its associated circuitry like Crystal with capacitors,

    Reset circuitry, Pull up resistors (if needed) and so on. The Microcontroller forms the heart of the

    project because it controls the devices being interfaced and communicates with the devices

    according to the program being written.

    In transmitter the function of this block is to send the data from PC to RF transmitter.

    At reciver side this block is retrieve the data and do the function according to the command

  • 7/29/2019 Final Eb Meter

    12/49

    Motor1, Motor 2: This section basically consists of the required circuitry to drive the motors. This

    is nothing but an H-Bridge circuitry to drive the motors which controls direction of the robot.

    PC:

    This block acts as remote control. It is nothing but a personal computer. The commandsfrom PC are transferred to MCU.

    RF transmitter:

    This block contains RF transmitter module along with an encoder circuit. When MCUsends the data to this module from here this data converted into Radio signals.

    RF receiver:

    This block contains a reciver module with a decoder circuit. The data from RF receiver isretrieved and pass it to MCU.

    Schematic Diagram:

  • 7/29/2019 Final Eb Meter

    13/49

    Schematic Explanation:

    Firstly, the required operating voltage for Microcontroller 89s51 is 5V. Hence the 5V D.C.

    power supply is needed by the same. So in this project we are using +12V DC battery for providing

    the required voltage for the circuit operation.

    The12V DC battery is connected to the LM7805 regulator so that it allows us to have a

    Regulated Voltage which is +5V. This regulated voltage is filtered for ripples using an electrolyticcapacitor 100F. Now the output from this section is fed to 40 th pin of 89s51 microcontroller to

    supply operating voltage. This is required for the operation of the motor driver circuitry to drive the

    motors.

  • 7/29/2019 Final Eb Meter

    14/49

    The microcontroller 89c51 with Pull up resistors at Port0 and crystal oscillator of 11.0592

    MHz crystal in conjunction with couple of capacitors of is placed at 18th & 19th pins of 89c51 to

    make it work (execute) properly.

    Receiver:

    The motor driver is nothing but a H-bridge circuitry for controlling motors. That is for the

    controlling of the robot direction. The motor driver circuitry includes the two H-Bridges. Each H-

    bridge will take care of controlling motor. Each H-bridge having two inputs. That is, four inputs of

    two H-bridges are connected to the port pins P2.0, P2.1,P2.2, P2.3 of the Microcontroller.

    According the logic values applied at the input of the H-bridge circuitry the direction of the robot

    will be controlled. That will be done through the software. Sensor is connected to P2.0.

    HT12D IC is used to retrieve the data from RF receiver module. The function of this IC is

    to match the address of transmitter and collect the serial data and this data is transferred to

    microcontroller.

    Transmitter:

    The IC HT12E IC is used to encode the data from microcontroller and make it serial

    along with the destination address. This serial data is then transferred to RF transmitter.

    The command to the destination is taken from the computer. Microcontroller serialcommunication is used. MAX232 IC is used in between microcontroller and PC. This IC is used

    to convert the logic levels for microcontroller and PC. So MAX232 is logic level IC with

    capacitors as supporting circuitry.

  • 7/29/2019 Final Eb Meter

    15/49

    MICRO CONTROLLER (AT89S52)

    Introduction

    A Micro controller consists of a powerful CPU tightly coupled with memory, various I/Ointerfaces such as serial port, parallel port timer or counter, interrupt controller, data acquisition

    interfaces-Analog to Digital converter, Digital to Analog converter, integrated on to a single

    silicon chip.

    If a system is developed with a microprocessor, the designer has to go for external

    memory such as RAM, ROM, EPROM and peripherals. But controller is provided all these

    facilities on a single chip. Development of a Micro controller reduces PCB size and cost of

    design.

    One of the major differences between a Microprocessor and a Micro controller is that a

    controller often deals with bits not bytes as in the real world application.

    Intel has introduced a family of Micro controllers called the MCS-51.

    Figure: micro controllerFeatures:

  • 7/29/2019 Final Eb Meter

    16/49

    Compatible with MCS-51 Products

    4K Bytes of In-System Programmable (ISP) Flash Memory

    Endurance: 1000 Write/Erase Cycles

    4.0V to 5.5V Operating Range

    Fully Static Operation: 0 Hz to 33 MHz

    Three-level Program Memory Lock

    128 x 8-bit Internal RAM

    32 Programmable I/O Lines

    Two 16-bit Timer/Counters

    Six Interrupt Sources

    Full Duplex UART Serial Channel

    Low-power Idle and Power-down Modes

    Description

    The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of in-

    system programmable Flash memory. The device is manufactured using Atmels high-density

    nonvolatile memory technology and is compatible with the industry- standard 80C51 instruction set

    and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a

    conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system

    programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller whichprovides a highly-flexible and cost-effective solution to many embedded control applications.

  • 7/29/2019 Final Eb Meter

    17/49

    Block diagram:

    Figure: Block diagram

  • 7/29/2019 Final Eb Meter

    18/49

    Pin diagram:

    Figure: pin diagram of micro controller

  • 7/29/2019 Final Eb Meter

    19/49

    Pin Description

    VCC - Supply voltage.

    GND - Ground.

    Port 0:

    Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight

    TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance inputs. Port 0

    can also be configured to be the multiplexed low-order address/data bus during accesses to external

    program and data memory. In this mode, P0 has internal pull-ups. Port 0 also receives the code bytes

    during Flash programming and outputs the code bytes during program verification. External pull-ups

    are required during program verification.

    Port 1:

    Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can

    sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal

    pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will

    source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes

    during Flash programming and verification.

    Port 2:

  • 7/29/2019 Final Eb Meter

    20/49

    Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can

    sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal

    pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will

    source current (IIL) because of the internal pull-ups. Port 2 also receives the high-order address bits

    and some control signals during Flash programming and verification.

    Port 3:

    Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can

    sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal

    pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will

    source current (IIL) because of the pull-ups. Port 3 receives some control signals for Flash

    programming and verification. Port 3 also serves the functions of various special features of theAT89S51, as shown in the following table.

    RST:

    Reset input. A high on this pin for two machine cycles while the oscillator is running resets the

    device. This pin drives High for 98 oscillator periods after the Watchdog times out. The DISRTO bit

  • 7/29/2019 Final Eb Meter

    21/49

    in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO,

    the RESET HIGH out feature is enabled.

    ALE/PROG:

    Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during

    accesses to external memory. This pin is also the program pulse input (PROG) during Flash

    programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency

    and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is

    skipped during each access to external data memory. If desired, ALE operation can be disabled by

    setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC

    instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the

    microcontroller is in external execution mode.

    PSEN:

    Program Store Enable (PSEN) is the read strobe to external program memory. When the

    AT89S51 is executing code from external program memory, PSEN is activated twice each machine

    cycle, except that two PSEN activations are skipped during each access to external data memory.

    EA/VPP:

    External Access Enable. EA must be strapped to GND in order to enable the device to fetch

    code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if

    lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for

    internal program executions. This pin also receives the 12-volt programming enable voltage (VPP)

    during Flash programming.

    XTAL1:

    Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

    XTAL2:

    Output from the inverting oscillator amplifier.

  • 7/29/2019 Final Eb Meter

    22/49

    Oscillator Characteristics:

    XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier

    which can be configured for use as an on-chip oscillator, as shown in Figs 6.2.3. Either a quartz

    crystal or ceramic resonator may be used. To drive the device from an external clock source,XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 6.2.4.There are

    no requirements on the duty cycle of the external clock signal, since the input to the internal

    clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high

    and low time specifications must be observed.

    Fig 6.2.3 Oscillator Connections Fig 6.2.4 External Clock Drive Configuration

    Serial Communication

    Computers can transfer data in two ways: parallel and serial. In parallel data transfers, often 8

    or more lines (wire conductors) are used to transfer data to a device that is only a few feet away.

    Examples of parallel data transfer are printers and hard disks; each uses cables with many wire strips.Although in such cases a lot of data can be transferred in a short amount of time by using many wires

    in parallel, the distance cannot be great. To transfer to a device located many meters away, the serial

    method is used. In serial communication, the data is sent one bit at a time, in contrast to parallel

    communication, in which the data is sent a byte or more at a time. Serial communication of the 8051

  • 7/29/2019 Final Eb Meter

    23/49

    is the topic of this chapter. The 8051 has serial communication capability built into it, there by

    making possible fast data transfer using only a few wires.

    If data is to be transferred on the telephone line, it must be converted from 0s and 1s to audio

    tones, which are sinusoidal-shaped signals. A peripheral device called a modem, which stands formodulator/demodulator, performs this conversion.

    Serial data communication uses two methods, asynchronous and synchronous. The

    synchronous method transfers a block of data at a time, while the asynchronous method transfers a

    single byte at a time.

    In data transmission if the data can be transmitted and received, it is a duplex transmission.

    This is in contrast to simplex transmissions such as with printers, in which the computer only sends

    data. Duplex transmissions can be half or full duplex, depending on whether or not the data transfer

    can be simultaneous. If data is transmitted one way at a time, it is referred to as half duplex. If the

    data can go both ways at the same time, it is full duplex. Of course, full duplex requires two wire

    conductors for the data lines, one for transmission and one for reception, in order to transfer and

    receive data simultaneously.

    Asynchronous serial communication and data framing

    The data coming in at the receiving end of the data line in a serial data transfer is all 0s and1s; it is difficult to make sense of the data unless the sender and receiver agree on a set of rules, a

    protocol, on how the data is packed, how many bits constitute a character, and when the data begins

    and ends.

    Start and stop bits

    Asynchronous serial data communication is widely used for character-oriented transmissions,

    while block-oriented data transfers use the synchronous method. In the asynchronous method, each

    character is placed between start and stop bits. This is called framing. In the data framing for

    asynchronous communications, the data, such as ASCII characters, are packed between a start bit and

  • 7/29/2019 Final Eb Meter

    24/49

    a stop bit. The start bit is always one bit, but the stop bit can be one or two bits. The start bit is always

    a 0 (low) and the stop bit (s) is 1 (high).

    Data transfer rate

    The rate of data transfer in serial data communication is stated in bps (bits per second).

    Another widely used terminology for bps is baud rate. However, the baud and bps rates are not

    necessarily equal. This is due to the fact that baud rate is the modem terminology and is defined as the

    number of signal changes per second. In modems a single change of signal, sometimes transfers

    several bits of data. As far as the conductor wire is concerned, the baud rate and bps are the same, and

    for this reason we use the bps and baud interchangeably.

    The data transfer rate of given computer system depends on communication ports

    incorporated into that system. For example, the early IBMPC/XT could transfer data at the rate of 100

    to 9600 bps. In recent years, however, Pentium based PCS transfer data at rates as high as 56K bps. It

    must be noted that in asynchronous serial data communication, the baud rate is generally limited to

    100,000bps.

    Computers can transfer data in two ways: parallel and serial. In parallel data transfers, often 8

    or more lines (wire conductors) are used to transfer data to a device that is only a few feet away.Examples of parallel transfers are printers and hard disks; each uses cables with many wire strips.

    Although in such cases a lot of data can be transferred in a short amount of time by using many wires

    in parallel, the distance cannot be great. To transfer to a device located many meters away, the serial

    method is used. In serial communication, the data is sent one bit at a time, in contrast to parallel

    communication, in which the data is sent a byte or more at a time. The 8051 has serial communication

    capability built into it, there by making possible fast data transfer using only a few wires. The PC uses

    RS 232 as a Serial Communication Standard.

    RS232 Standards

  • 7/29/2019 Final Eb Meter

    25/49

    To allow compatibility among data communication equipment made by various manufacturers,

    an interfacing standard called RS232 was set by the Electronics Industries Association (EIA) in 1960.

    In 1963 it was modified and called RS232A. RS232B AND RS232C were issued in 1965 and 1969,

    respectively. Today, RS232 is the most widely used serial I/O interfacing standard. This standard is

    used in PCs and numerous types of equipment. However, since the standard was set long before the

    advert of the TTL logic family, its input and output voltage levels are not TTL compatible. In RS232,

    a 1 is represented by -3 to -25V, while a 0 bit is +3 to +25V, making -3 to +3 undefined. For this

    reason, to connect any RS232 to a microcontroller system we must use voltage converters such as

    MAX232 to convert the TTL logic levels to the RS232 voltage levels, and vice versa. MAX232 IC

    chips are commonly referred to as line drivers.

    RS232 pins

    RS232 cable connector commonly referred to as the DB-25 connector. In labeling, DB-

    25P refers to the plug connector (male) and DB-25S is for the socket connector (female). Since

    not all the pins are used in PC cables, IBM introduced the DB-9 Version of the serial I/O

    standard, which uses 9 pins only, as shown in table.

    DB-9 pin connector

    1 2 3 4 5

    6 7 8 9

    (Out of computer and exposed end of cable)

  • 7/29/2019 Final Eb Meter

    26/49

    Pin Functions:

    Pin Description

    1 Data carrier detect (DCD)2 Received data (RXD)

    3 Transmitted data (TXD)4 Data terminal ready(DTR)5 Signal ground (GND)6 Data set ready (DSR)7 Request to send (RTS)8 Clear to send (CTS)9 Ring indicator (RI)Note: DCD, DSR, RTS and CTS are active low pins.

    The method used by RS-232 for communication allows for a simple connection of three lines

    namely Tx, Rx, and Ground.

    TXD: carries data from DTE to the DCE.RXD: carries data from DCE to the DTE

    SG: signal ground

    8051 connection to RS232:

    Embedded

    Controller

    RXD

    TXD

    TXD

    RXD2

    3

    5

    GND

    MAX 232

  • 7/29/2019 Final Eb Meter

    27/49

    The RS232 standard is not TTL compatible; therefore, it requires a Line Driver such as the

    MAX232 chip to convert RS232 voltage levels to TTL levels, and vice versa.

    The 8051 has two pins that are used specifically for transferring and receiving data serially.

    These two pins are TXD and RXD and are a part of the port 3 (P3.0 and P3.1). Pin 11 of the 8051 isdesignated as TXD and pin 10 as RXD. These pins are TTL compatible; therefore, they require a line

    driver to make them RS232 compatible. One such line driver is the MAX232 chip.

    MAX232 converts from RS232 voltage levels to TTL voltage levels, and vice versa. One

    advantage of the MAX232 chip is that it uses a +5V power source which, is the same as the source

    voltage for the 8051. In the other words, with a single +5V power supply we can power both the 8051

    and MAX232, with no need for the power supplies. The MAX232 has two sets of line drivers for

    transferring and receiving data. The line drivers used for TXD are called T1 and T2, while the line

    drivers for RXD are designated as R1 and R2. In many applications only one of each is used.

    MAX-232

    Logic Signal Voltage

    Serial RS-232 (V.24) communication works with voltages (between -15V ... -3V and used to transmit

    a binary '1' and +3V ... +15V to transmit a binary '0') which are not compatible with today's computer

    logic voltages. On the other hand, classic TTL computer logic operates between 0V ... +5V (roughly

    0V ... +0.8V referred to as low for binary '0', +2V ... +5V for high binary '1' ). Modern low-power

    logic operates in the range of 0V ... +3.3V or even lower.

    So, the maximum RS-232 signal levels are far too high for today's computer logic electronics,

    and the negative RS-232 voltage can't be grokked at all by the computer logic. Therefore, to receive

    serial data from an RS-232 interface the voltage has to be reduced, and the 0 and 1 voltage levels

    inverted. In the other direction (sending data from some logic over RS-232) the low logic voltage has

    to be "bumped up", and a negative voltage has to be generated, too.

  • 7/29/2019 Final Eb Meter

    28/49

    RS-232 TTL Logic

    --------------------------------------------------------

    -15V ... -3V +2V ... +5V 1

    +3V ... +15V 0V ... +0.8V 0

    All this can be done with conventional analog electronics, e.g. a particular power supply and a couple

    oftransistors or the once popular 1488 (transmitter) and 1489 (receiver) ICs. However, since more

    than a decade it has become standard in amateur electronics to do the necessary signal level

    conversion with an integrated circuit (IC) from the MAX232 family (typically a MAX232A or some

    clone). In fact, it is hard to find some RS-232 circuitry in amateur electronics without a MAX232A or

    some clone.

    The MAX232 & MAX232A

    Fig: A MAX232 integrated circuit

    The MAX232 from Maxim was the first IC which in one package contains the necessary

    drivers (two) and receivers (also two), to adapt the RS-232 signal voltage levels to TTL logic. It

    http://en.wikipedia.org/wiki/transistorhttp://en.wikipedia.org/wiki/transistorhttp://www.maxim-ic.com/http://en.wikipedia.org/wiki/transistorhttp://www.maxim-ic.com/
  • 7/29/2019 Final Eb Meter

    29/49

    became popular, because it just needs one voltage (+5V) and generates the necessary RS-232 voltage

    levels (approx. -10V and +10V) internally. This greatly simplified the design of circuitry. Circuitry

    designers no longer need to design and build a power supply with three voltages (e.g. -12V, +5V, and

    +12V), but could just provide one +5V power supply, e.g. with the help of a simple 78x05 voltage

    converter.

    The MAX232 has a successor, the MAX232A. The ICs are almost identical, however, the

    MAX232A is much more often used than the original MAX232, and the MAX232A only needs

    external capacitors 1/10th the capacity of what the original MAX232 needs.

    It should be noted that the MAX232 (A) is just a driver/receiver. It does not generate the

    necessary RS-232 sequence of marks and spaces with the right timing, it does not decode the RS-232

    signal, it does not provide a serial/parallel conversion. All it does is to convert signal voltage levels.

    Generating serial data with the right timing and decoding serial data has to be done by additional

    circuitry, e.g. by a16550 UART or one of these small micro controllers (e.g. Atmel AVR, Microchip

    PIC) getting more and more popular.

    The MAX232 and MAX232A were once rather expensive ICs, but today they are cheap. It has

    also helped that many companies now produce clones (ie. Sipex). These clones sometimes need

    different external circuitry, e.g. the capacities of the external capacitors vary. It is recommended tocheck the data sheet of the particular manufacturer of an IC instead of relying on Maxim's original data

    sheet.

    The original manufacturer (and now some clone manufacturers, too) offers a large series of similar

    ICs, with different numbers of receivers and drivers, voltages, built-in or external capacitors, etc. E.g.

    The MAX232 and MAX232A need external capacitors for the internal voltage pump, while the

    MAX233 has these capacitors built-in. The MAX233 is also between three and ten times more

    expensive in electronic shops than the MAX232A because of its internal capacitors. It is also moredifficult to get the MAX233 than the garden variety MAX232A.

    A similar IC, the MAX3232 is nowadays available for low-power 3V logic.

    http://en.wikibooks.org/wiki/Serial_Programming:8250_UART_Programminghttp://en.wikibooks.org/wiki/Serial_Programming:8250_UART_Programminghttp://en.wikibooks.org/wiki/Atmel_AVRhttp://en.wikibooks.org/wiki/Embedded_Systems/PIC_Microcontrollerhttp://en.wikibooks.org/wiki/Embedded_Systems/PIC_Microcontrollerhttp://www.sipex.com/products/interface.htmhttp://en.wikibooks.org/wiki/Serial_Programming:8250_UART_Programminghttp://en.wikibooks.org/wiki/Atmel_AVRhttp://en.wikibooks.org/wiki/Embedded_Systems/PIC_Microcontrollerhttp://en.wikibooks.org/wiki/Embedded_Systems/PIC_Microcontrollerhttp://www.sipex.com/products/interface.htm
  • 7/29/2019 Final Eb Meter

    30/49

    MAX232(A) DIP Package

    No. Name Purpose Signal VoltageCapacitor

    MAX232

    Capacitor

    MAX232A

    1 C1++ connector for

    capacitor C1

    capacitor should stand at

    least 16V1F 100nF

    2 V+output of voltage

    pump

    +10V, capacitor should

    stand at least 16V1F to VCC 100nF to VCC

    3 C1-- connector for

    capacitor C1

    capacitor should stand at

    least 16V1F 100nF

    4 C2+ + connector for capacitor should stand at1F 100nF

  • 7/29/2019 Final Eb Meter

    31/49

    capacitor C2 least 16V

    5 C2-- connector for

    capacitor C2

    capacitor should stand at

    least 16V1F 100nF

    6 V-output of voltage

    pump / inverter

    -10V, capacitor should

    stand at least 16V1F to GND 100nF to GND

    7 T2out Driver 2 output RS-232

    8 R2in Receiver 2 input RS-232

    9 R2out Receiver 2 output TTL

    10 T2in Driver 2 input TTL

    11 T1in Driver 1 input TTL

    12 R1out Receiver 1 output TTL

    13 R1in Receiver 1 input RS-232

    14 T1out Driver 1 output RS-232

    15 GND Ground 0V 1F to VCC 100nF to VCC

    16 VCC Power supply +5V see above see above

    V+(2) is also connected to VCC via a capacitor (C3). V-(6) is connected to GND via a capacitor (C4).

    And GND(16) and VCC(15) are also connected by a capacitor (C5), as close as possible to the pins.

    A Typical Application

    The MAX232 (A) has two receivers (converts from RS-232 to TTL voltage levels) and two drivers

    (converts from TTL logic to RS-232 voltage levels). This means only two of the RS-232 signals can

    be converted in each direction. The old MC1488/1498 combo provided four drivers and receivers.

  • 7/29/2019 Final Eb Meter

    32/49

    Typically a pair of a driver/receiver of the MAX232 is used for

    TX and RX

    and the second one for

    CTS and RTS.

    There are not enough drivers/receivers in the MAX232 to also connect the DTR, DSR, and DCD

    signals. Usually these signals can be omitted when e.g. communicating with a PC's serial interface. If

    the DTE really requires these signals either a second MAX232 is needed, or some other IC from the

    MAX232 family can be used (if it can be found in consumer electronic shops at all). An alternative for

    DTR/DSR is also given below.

    The circuitry is completed by connecting five capacitors to the IC as it follows. The MAX232 needs

    1.0F capacitors, the MAX232A needs 0.1F capacitors. MAX232 clones show similar differences. It

    is recommended to consult the corresponding data sheet. At least 16V capacitor types should be used.

  • 7/29/2019 Final Eb Meter

    33/49

    If electrolytic or tantalic capacitors are used, the polarity has to be observed. The first pin as listed in

    the following table is always where the plus pole of the capacitor should be connected to.

    Capacitor + Pin - Pin Remark

    C1 1 3

    C2 4 5

    C3 2 16

    C4 GND 6This looks non-intuitive, but because pin 6 is

    on -10V, GND gets the + connector, and not the -

    C5 16 GND

    The 5V power supply is connected to

    +5V: Pin 16

    GND: Pin 15

    The output of the VT pin is high only when the transmission is valid. Otherwise it is low always.

    Output type: There are 2 types of output to select from:

    Momentary type: The data outputs follow the encoder during a valid transmission and

    the reset.

    Latch type: The data outputs follow the encoder during a valid

  • 7/29/2019 Final Eb Meter

    34/49

    DC Motor

    DC motors are configured in many types and sizes, including brush less, servo, and gear

    motor types. A motor consists of a rotor and a permanent magnetic field stator. The magnetic

    field is maintained using either permanent magnets or electromagnetic windings. DC motors are

    most commonly used in variable speed and torque.

    Motion and controls cover a wide range of components that in some way are used to

    generate and/or control motion. Areas within this category include bearings and bushings,

    clutches and brakes, controls and drives, drive components, encoders and resolves, Integratedmotion control, limit switches, linear actuators, linear and rotary motion components, linear

    position sensing, motors (both AC and DC motors), orientation position sensing, pneumatics and

    pneumatic components, positioning stages, slides and guides, power transmission (mechanical),

    seals, slip rings, solenoids, springs.

    Motors are the devices that provide the actual speed and torque in a drive system. This

    family includes AC motor types (single and multiphase motors, universal, servo motors,

    induction, synchronous, and gear motor) and DC motors (brush less, servo motor, and gear

    motor) as well as linear, stepper and air motors, and motor contactors and starters.

    In any electric motor, operation is based on simple electromagnetism. A current-carrying

    conductor generates a magnetic field; when this is then placed in an external magnetic field, it

    will experience a force proportional to the current in the conductor, and to the strength of the

  • 7/29/2019 Final Eb Meter

    35/49

    external magnetic field. As you are well aware of from playing with magnets as a kid, opposite

    (North and South) polarities attract, while like polarities (North and North, South and South)

    repel. The internal configuration of a DC motor is designed to harness the magnetic interaction

    between a current-carrying conductor and an external magnetic field to generate rotational

    motion.

    Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet

    or winding with a "North" polarization, while green represents a magnet or winding with a

    "South" polarization).

    Fig 25: Block Diagram of the DC motor

    Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator,

    field magnet(s), and brushes. In most common DC motors (and all that Beamers will see), the

    external magnetic field is produced by high-strength permanent magnets1. The stator is the

    stationary part of the motor -- this includes the motor casing, as well as two or more permanent

    magnet pole pieces. The rotor (together with the axle and attached commutator) rotates with

    respect to the stator. The rotor consists of windings (generally on a core), the windings being

    electrically connected to the commutator. The above diagram shows a common motor layout --

    with the rotor inside the stator (field) magnets.

    The geometry of the brushes, commutator contacts, and rotor windings are such that

    when power is applied, the polarities of the energized winding and the stator magnet(s) are

    misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets. As

    the rotor reaches alignment, the brushes move to the next commutator contacts, and energize the

  • 7/29/2019 Final Eb Meter

    36/49

    next winding. Given our example two-pole motor, the rotation reverses the direction of current

    through the rotor winding, leading to a "flip" of the rotor's magnetic field, and driving it to

    continue rotating.

    In real life, though, DC motors will always have more than two poles (three is avery common number). In particular, this avoids "dead spots" in the commutator. You can

    imagine how with our example two-pole motor, if the rotor is exactly at the middle of its rotation

    (perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole

    motor, there is a moment where the commutator shorts out the power supply (i.e., both brushes

    touch both commutator contacts simultaneously). This would be bad for the power supply, waste

    energy, and damage motor components as well. Yet another disadvantage of such a simple motor

    is that it would exhibit a high amount of torque ripple" (the amount of torque it could produce is

    cyclic with the position of the rotor).

    ]

    Fig 26: Block Diagram of the DC motor having two poles only

    So since most small DC motors are of a three-pole design, let's tinker with the

    workings of one via an interactive animation (JavaScript required):

    Fig 27: Block Diagram

    of the DC motor having Three

    poles

    You'll notice a few things

    from this -- namely, one pole is

    fully energized at a time (but two others are "partially" energized). As each brush transitions

  • 7/29/2019 Final Eb Meter

    37/49

    from one commutator contact to the next, one coil's field will rapidly collapse, as the next coil's

    field will rapidly charge up (this occurs within a few microsecond). We'll see more about the

    effects of this later, but in the meantime you can see that this is a direct result of the coil

    windings' series wiring:

    Fig 28: Internal Block Diagram of the Three pole DC motor

    H-Bridge:

  • 7/29/2019 Final Eb Meter

    38/49

    Fig: shows the H-Bridge operation. The H-Bridge consists of a four PNP transistors such as

    Q1, Q2, Q3 and Q4. These transistors are arranged in a way that a DC motor M can rotate. A and B

    are represented as two inputs for operating a motor through the transistors. For the circuit operation,we are providing +12V DC as a VCC. The operation will be explained as follows:

    The inputs A and B can be applied as a either logic 0 or logic 1 ie., may be either 5V DC

    voltage or Ground. If the input A =logic 0 and B=logic1 then transistors Q1 and Q4 will be

    ON state and Q2 and Q3 will be OFF state. The current flows from Q1 to Q4 so that the motor

    M can rotate in clockwise direction.

    If the input A =logic 1 and B=logic0 then transistors Q1 and Q4 will be OFF state and

    Q2 and Q3 will be ON state. The current flows from Q1 to Q4 so that the motor M can rotate in

    Anti-clockwise direction.

    If the input A =logic 1 and B=logic1 then transistors Q1 and Q4 will be OFF state and

    Q2 and Q3 will be OFF state. No current flows from in the circuit. The circuit will be in hold

    condition. The motor will not rotate any direction. So, there is no wastage of power will occur.

    Otherwise, if both inputs are low that is all transistors are come under working and more current willflows in the circuit. But the motor will be at hold condition. More power is wasted

    IR sensor

    Theory of Operation

    A line sensor in its simplest form is a sensor capable of detecting a contrast between adjacent

    surfaces, such as difference in color, roughness, or magnetic properties, for example. The

    simplest would be detecting a difference in color, for example black and white surfaces. Using

  • 7/29/2019 Final Eb Meter

    39/49

    simple optoelectronics, such as infrared photo-transistors, color contrast can easily be detected .

    Infrared emitter/detectors or photo-transistors are inexpensive (usually under $1 per sensor) and

    are easy to interface to a microcontroller. In addition, standard red LEDs and Cds photocells

    work well too and fall in the same price range as the infrared photo-transistors.

    The theory of operation is simple and for brevity, only the basics will be considered. For more

    information about the physics of these sensors, please refer to an optoelectronics and heat

    transfer text. Suffice for now, we will consider the basic effects of light and what happens when

    it shines on a black or white surface. When light shines on a white surface, most of the incoming

    light is reflected away from the surface. In contrast, most of the incoming light is absorbed if the

    surface is black. Therefore, by shining light on a surface and having a sensor to detect the

    amount of light that is reflected, a contrast between black and white surfaces can be detected.

    Figure 1 shows an illustration of the basics just covered.

    Figure 1. Light reflecting off a white and black surface.

    More light is reflected from the white surface compared to the black surface.Using what we

    know about light, and black and white surfaces, the objective of tracking a line is simple can be

    achieved using the appropriate sensors.

  • 7/29/2019 Final Eb Meter

    40/49

    Figure 3. Infrared emitter and detector sensors.

  • 7/29/2019 Final Eb Meter

    41/49

    Object Detection using IR light

    The basic idea is to send infra red light through IR-LEDs, which is then reflected by any objectin front of the sensor.Then all you have to do is to pick-up thereflected IR light. For detecting the reflectedIR light, we are going to use a very original

    technique: we are going to use another IR-

    LED, to detect the IR light that was emitted from

    another led of the exact same type!This is an electrical property of Light EmittingDiodes (LEDs) which is the fact that a ledProduce a voltage difference across its leadswhen it is subjected to light. As if it was a photo-cell, but with much lower output current. In otherwords, the voltage generated by the leds can't be- in any way - used to generate electrical powerfrom light, It can barely be detected. that's whyas you will notice in theschematic, we are going to use a Op-Amp (operational Amplifier) to accurately detect very smallvoltage changes.

    2X16 LCD:

    Most LCD programmed in 8 bit configuration. Moreover LCD put on equipment that show the

    value of measurement, i.e. temperature, voltage, current, etc. There are a lot of tutorial show

    steps how to configure out in order to LCD on. But each LCD has own characteristic

    Basic Specifications

    Power requirements 4.8 to 5.5Vdc @ 3mA

  • 7/29/2019 Final Eb Meter

    42/49

    User connector 5-pin header; 0.025" posts on 0.10" centers

    Connector pinout +5V GND SERIAL GND +5V

    Serial Input RS-232 or inverted TTL, 2400/9600, N81

    Operating Temperature 0 to 50 C

    Initialization switches LCD power; performs soft init

    Instruction prefix ASCII 254 (0FE hex)

    LCD type Supertwist (STN), yellow-green

    Optimum viewing direction 6 o'clock

    LCD Instructions by Function

    This is different from our other serial LCDs, which use a protocol that's similar to a text terminal.

    The Backpack protocol's simplicity means that it can run at a very low clock rate (480kHz) for

    the lowest possible current draw.

    Function ASCII Value

    Clear screen 1

    Home cursor 2

  • 7/29/2019 Final Eb Meter

    43/49

    Blank display (retaining data) 8

    Hide cursor 12

    Show underline cursor 14

    Move cursor 1 character left 16Move cursor 1 character right 20

    Scroll 1 character left 24

    Scroll 1 character right 28

    Set display address (position the cursor) 128 + location

    Move to 1st character of 1st line 128

    Move to nth character of 1st line 128 + n

    Move to 1st character of 2nd line 192

    Move to nth character of 2nd line 192 + n

    Set character-generator address 64 + address

    POWER SUPPLY UNIT:

    The input to the circuit is applied from the regulated power supply. The a.c. input i.e.,

    230V from the mains supply is step down by the transformer to 12V and is fed to a rectifier. The

    output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c voltage,

    the output voltage from the rectifier is fed to a filter to remove any a.c components present even

    after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc

    voltage.

  • 7/29/2019 Final Eb Meter

    44/49

    Circuit Diagram

    Transformer:

    Usually, DC voltages are required to operate various electronic equipment and these voltages are

    5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c input available at the

    mains supply i.e., 230V is to be brought down to the required voltage level. This is done by a

    transformer. Thus, a step down transformer is employed to decrease the voltage to a required

    level.

    Rectifier:

    The output from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C. The

    rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is usedbecause of its merits like good stability and full wave rectification.

    Filter:

    Capacitive filter is used in this project. It removes the ripples from the output of rectifier and

    smoothens the D.C. Output received from this filter is constant until the mains voltage and load

  • 7/29/2019 Final Eb Meter

    45/49

    is maintained constant. However, if either of the two is varied, D.C. voltage received at this point

    changes. Therefore a regulator is applied at the output stage.

    Voltage regulator:

    As the name itself implies, it regulates the input applied to it. A voltage regulator is an electrical

    regulator designed to automatically maintain a constant voltage level. In this project, power

    supply of 5V and 12V are required. In order to obtain these voltage levels, 7805 and 7812

    voltage regulators are to be used. The first number 78 represents positive supply and the numbers

    05, 12 represent the required output voltage levels.

    Notice in the above diagram that a relay uses an electromagnet. This is a device consisting of a

    coil of wire wrapped around an iron core. When electricity is applied to the coil of wire it

    becomes magnetic, hence the term electromagnet. The A B and C terminals are an SPDT switch

    controlled by the electromagnet. When electricity is applied to V1 and V2, the electromagnet

    acts upon the SPDT switch so that the B and C terminals are connected. When the electricity is

    disconnected, then the A and C terminals are connected. It is important to note that

    theelectromagnetis magnetically linked to theswitch but the two are NOT linked electrically.

    Software profile

    The Keil tool chain consists of the following executables located in the c:\c51eval\bin directory:

  • 7/29/2019 Final Eb Meter

    46/49

    Vision uvw51e.exe

    C Compiler c51.exe

    Assembler a51.exe

    LinkerbL51.exe

    dScope dsw51.exe

    Vision IDE

    Vision is a Windows based front end for the C Compiler and Assembler. It was developed in the

    USA as was the printed manual set. Compiler, Assembler and Linker options are set with simple

    mouse clicks. Vision runs on Windows 3.1, 95 and NT. The Compiler, Assembler and Linker

    are DOS executables. They can be accessed with your favorite batch files if you prefer. This

    provides maximum flexibility. This Integrated Development Environment (IDE) has been

    expressly designed with the user in mind. A full function editor is included. All IDE functions

    are intuitive via pull down menus with prompted selections. An extensive Help utility is

    included. External executables can be run from within Vision. This includes emulator

    software.

    C51 C Compiler for the 8051, 8x931Hx and 8x931Ax [USB]

    The C51 ANSI compiler along with the A51 assembler is designed specifically for the Intel

    MCS 8051 microcontroller family, including the 8x931 USB. The C51 is 100% compatible

    with existing 8051programs. Extensions provide access to all 8051 hardware components.

    Sample USB/931 code is available: www.keil.com/usb. C51 supports code banking. The

  • 7/29/2019 Final Eb Meter

    47/49

    compiler can be run in either DOS mode or called from the Windows based front end Vision.

    run from Vision which is included with every Assembler and Compiler package.

    Evaluation Version of the Keil Tool Set:

    The evaluation version of the Keil tool set is restricted to a 2K code size and the code must be

    located at 0x4000. Useful object code is produced. Other than these restrictions, the tool set

    works exactly as the full version does. This allows you to fully evaluate the features and power

    of Keil products. The full version has no restrictions and is fully ANSI compliant.

    ADVANTAGES & DISADVANTAGES:

    ZigBee is the most popular industry wireless mesh networking standard for

    connecting sensors, actuators, and instrumentation and control systems.

    The main advantages of ZigBee are:

    Power saving, as a result of the short working period, low power consumption of

    communication, and standby mode.

    Reliability: Collision avoidance is adopted, with a special time slot allocated for

    those communications that need fixed bandwidth so that competition and conflict are avoided

    when transmitting data. The MAC layer adopts completely confirmed data transmission, that is,

    every data packet sent must wait for the confirmation from the receiver.

    Low cost of the modules and the ZigBee protocol is patent fee free.

    Short time delay, typically 30 ms for device searching, 15 ms for standby to

    activation, and 15 ms for channel access of active devices.

  • 7/29/2019 Final Eb Meter

    48/49

    Large network capacity: One ZigBee network contains one master device and

    maximum 65,000 slave devices. There can be as many as 100 ZigBee networks

    within one area.

    Safety: ZigBee provides a data integrity check and authentication function. AES-

    128 is adopted and at the same time each application can flexibly determine its safety property.

    APPLICATIONS:

    Electricity departments

    Household Energy meter monitoring

    Industrial Energy remote monitoring

    Remote controlling systems

    CONCLUSION AND FUTURE SCOPE:

    The proposed system for energy billing is automatic without human intervention and consumer

    can directly know the amount he has to pay .So it is both consumer and EB friendly.

    The software can developed very easily with the present IT technology. Here the security

    measures are also taken in consideration so that this system overcomes the drawbacks in present

    system and also the new system does not give any such chances.

  • 7/29/2019 Final Eb Meter

    49/49

    In future, this system can be improved by some additional features meeting the consumer

    requirements like emergency signal from the EB station employees; bill payment

    acknowledgement alarm etc., by just replacing the transmitter in the consumer side with a

    transmitter and receiver antenna. The receiver micro controller can be made designated for some

    other applications also.

    REFERENCES

    1. http://watthourmeters.com/history.html

    2. Networking fundamentals: wide, local and personal area communications /Kaveh Pahlavan,

    Prashant Krishnamurthy ISBN 9780470992906

    3. ZigBee Alliance, www.zigbee.org

    4. Nuvotem Talema http://www.talema-nuvotem.com/en/products/as.shtml

    5. Instrumentacin Electrnica, Miguel A. Prez Garca, Juan C. lvarez Antn, Juan C. Campo

    Rodrguez, Fco. Javier Ferrero Martin, Gustavo J. Grillo Ortega.

    6. http://www.meshnetics.com/