You are on page 1of 79

CONTROLLER BASED AUTOMATIC BELL

CONTENT

CHAPTER 1
INTRODUCTION

CHAPTER 2
ABOUT THE PROJECT

CHAPTER 3
HARDWARE MODULE

CHAPTER 4
SOFTWARE MODULE

CHAPTER 5
CONCLUSION

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

CONTROLLER BASED AUTOMATIC BELL

CHAPTER 1
INTRODUCTION

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

CONTROLLER BASED AUTOMATIC BELL

INTRODUCTION
The basic requirements of a real time programmable timer generally used in schools and colleges for sounding the bell on times.

Precise time base for time keeping. Read/write memory for storing the bell timings. LCD or LED or SEVEN SEGEMENT display for displaying real time as well as other data to make the instrument user-friendly.

Keys for data entry. Electromechanical relay to operate the bell.

We are describing here a sophisticated, yet economical, timer based on Motorolas 20-pin MC68HC705J1A microcontroller.

FEATURES
Our project future implementation as follows Modify the Bluetooth remote controller LED remote cotroller Display changing the LCD or LED Controlled system view Add the ringtone mode I the bell Incrementing the counting of alaram time

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

CONTROLLER BASED AUTOMATIC BELL

ADVANDAGS
Set the 22 times in electronic college bell alaram It is consist the microcontroller unit integreted circuits Get the output in type of device, (a) AC output device, (b) DC output device Easily changig the set time

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

CONTROLLER BASED AUTOMATIC BELL

CHAPTER 2
HARDWARE MODULE

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

CONTROLLER BASED AUTOMATIC BELL

MICRO CONTROLLER
The MC68HC705J1A is a member of Motorolas low-cost, high-performance M68HC05 Family of 8-bit microcontroller units(MCUs). The M68HC05 Family is based on the customerspecified integrated circuit (CSIC) design strategy. All MCUs in the family use the popular M68HC05 central processor unit (CPU) and are available with a variety of subsystems, memory sizes and types, and package types On-chip memory of the MC68HC705J1A includes 1240 bytes of erasable, programmable read-only memory (EPROM). In packages without the transparent window for EPROM erasure, the 1240 EPROM bytes serve as one-time programmable read-only memory (OTPROM).The MC68HRC705J1A is a resistor-capacitor (RC) oscillator mask option version of the MC68HC705J1A

FEATURES OF MICROCONTROLLER
Features of the MC68HC705J1A include. Peripheral modules o 15-stage multifunction timer o Computer operating properly (COP) watchdog

14 bidirectional input/output (I/O) lines, including o 10-mA sink capability on four I/O pins o Mask option register (MOR) and software programmable
Pull downs on all I/O pins o

MOR selectable interrupt on four I/O pins, a keyboard


Scan feature

MOR selectable sensitivity on external interrupt (edge- and


6

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

CONTROLLER BASED AUTOMATIC BELL

o level-sensitive or edge-sensitive only)

On-chip oscillator with connections for o Crystal o Ceramic resonator o Resistor-capacitor (RC) oscillator o External clock

1240 bytes of EPROM/OTPROM, including eight bytes for user vectors

64 bytes of user random-access memory (RAM) Memory-mapped I/O registers Fully static operation with no minimum clock speed Power-saving stop, halt, wait, and data-retention modes External interrupt mask bit and acknowledge bit Illegal address reset Internal steering diode and pull up resistor from RESET pin to VDD

PIN ASSINGNMENT
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 7

CONTROLLER BASED AUTOMATIC BELL

VDD AND VSS


VDD and VSS are the power supply and ground pins. The MCU operates from a single power supply. Very fast signal transitions occur on the MCU pins, placing high, short - duration current demands on the power supply. To prevent noise problems, take special care as Figure shows, by placing the bypass capacitors as close as possible to the MCU. C2 is an optional bulk current bypass capacitor for use in applications that require the port pins to source high current levels.

PIN DIAGRAM

Figure 1: Motrolo Controller 68HC705JIA

OSC1 AND OSC2


DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 8

CONTROLLER BASED AUTOMATIC BELL

The OSC1 and OSC2 pins are the connections for the on-chip oscillator. The oscillator can be driven by any of these

1. Crystal. 2. Ceramic resonator. 3. Resistor/capacitor (RC) oscillator. 4. External clock signal. ( The frequency, fosc, of the oscillator or external clock) source is divided by two to produce the internal operating frequency, fop.

CRYSTAL OSCILLATOR
Typical crystal oscillator circuit for an. A T-cut, parallel resonant crystal. Follow the crystal suppliers recommendations, as the crystal parameters determine the external component values required to provide reliable startup and maximum stability. The load capacitance values used in the oscillator circuit design should include all stray layout capacitances. To minimize output distortion, mount the crystal and capacitors as close as possible to the pins. An internal startup resistor of approximately 2 Mc is provided between OSC1 and OSC2 for the crystal oscillator as a programmable mask option.

CERAMIC RESONATOR OSCILLATOR


To reduce cost, use a ceramic resonator instead of the crystal. The circuits show ceramic resonator circuits. Follow the resonator manufacturers recommendations, as the resonator parameters determine the external component values required for maximum stability and reliable starting. The load capacitance values used in the oscillator circuit design should include all stray capacitances . Mount the resonator and components as close as possible to the pins for startup stabilization and to minimize output distortion. An internal startup resistor of approximately 2 M s i provided between OSC1 and OSC2 as a programmable mask option.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

CONTROLLER BASED AUTOMATIC BELL

RESET
Applying a logic 0 to the RESET pin forces the MCU to a known startup state. An internal reset also pulls the RESET pin low. An internal resistor to VDD pulls the RESET pin high. A steering diode between the RESET and VDD pins discharges any RESET pin voltage when power is removed from the MCU. The RESET pin contains an internal Schmitt trigger to improve its noise immunity as an input. Refer to Resets and Interrupts for more information.

IRQ/VPP
The external interrupt/ programming voltage pin (IRQ/VPP) drives the a synchronous IRQ interrupt function of the CPU. Additionally, it is used to program the user EPROM and mask option register. The LEVEL bit in the mask option register provides negative edge-sensitive triggering or both negative edge-sensitive and low level-sensitive triggering for the interrupt function. If level sensitive triggering is selected, the IRQ/VPP input requires an external resistor to VDD for wired-OR operation. If the IRQ/VPP pin is not used, it must be tied to the VDD supply. The IRQ/VPP pin contains an internal Schmitt trigger as part of its input to improve noise immunity. The voltage on this pin should not exceed VDD except when the pin is being used for programming the EPROM. DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 10

CONTROLLER BASED AUTOMATIC BELL

PA0PA7
These eight input/output (I/O) lines comprise port A, a general - purpose, bidirectional I/O port. External Interrupt Module (IRQ).for information on PA0PA3 external interrupts.

PB0PB5
These six I/O lines comprise port B, a general-purpose, bidirectional I/O port.

MEMORY
This section describes the organization of the on-chip memory consisting of: 1232 bytes of user erasable, programmable read-only memory (EPROM), plus eight bytes for user vectors 64 bytes of user random-access memory (RAM)

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

11

CONTROLLER BASED AUTOMATIC BELL

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

12

CONTROLLER BASED AUTOMATIC BELL

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

13

CONTROLLER BASED AUTOMATIC BELL

RAM
The 64 addresses from $00 C0 to $00 FF serve as both the user RAM and the stack RAM. Before processing an interrupt, the central processor unit (CPU) uses five bytes of the stack to save the contents of the CPU registers. During a subroutine call, the CPU uses two bytes of the stack to store the return address. The stack pointer decrements when the CPU stores a byte on the stack and increments when the CPU retrieves a byte from the stack.

Be careful when using nested subroutines or multiple interrupt levels. The CPU may overwrite data in the RAM during a subroutine or during the interrupt stacking operation.

MEMORY EPROM/OTPROM
A microcontroller unit (MCU) with a quartz window has 1240 bytes offer as able, programmable ROM (EPROM). The quartz window allows EPROM erasure with ultraviolet light. Keep the quartz window covered with an opaque material except when programming the MCU. Ambient light can affect MCU operation. In an MCU without the quartz window, the EPROM cannot be erased and serves as 1240 bytes of one-time programmable ROM (OTPROM).These addresses are user EPROM/OTPROM locations $0300$07CF $07F8$07FF, used for user-defined interrupt and reset vectors

The computer operating properly (COP) register (COPR) is an EPROM/OTPROM location at address $07F0.The mask option register (MOR) is an EPROM/OTPROM location at address $07F1.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

14

CONTROLLER BASED AUTOMATIC BELL

EPROM/OTPROM PROGRAMING
The two ways to program the EPROM/OTPROM as follows. 1. Manipulating the control bits in the EPROM programming register to program the EPROM/OTPROM on a byte-by-byte basis 2. Programming the EPROM/OTPROM with the M68HC705J in circuit simulator (M68HC705JICS) available from Motorola EPROM Erasing The erased state of an EPROM bit is logic 0. Erase the EPROM by exposing it to 15 Ws/cm2 of ultraviolet light with a wave length of2537 angstroms. Position the ultraviolet light source one inch from the EPROM. Do not use a shortwave filter.

MASK OPTIO REGISTER


The mask option register (MOR) is an EPROM/OTPROM byte that controls these options: COP watchdog (enable or disable) External interrupt pin triggering (edge-sensitive only or edge- and levelsensitive) Port A external interrupts (enable or disable) Port pull down resistors (enable or disable) STOP instruction (stop mode or halt mode) Crystal oscillator internal resistor (enable or disable) EPROM security (enable or disable) Short oscillator delay (enable or disable

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

15

CONTROLLER BASED AUTOMATIC BELL

SWAIT-STOP-TO-WAIT
The SWAIT bit enables halt mode. When the SWAIT bit is set, the CPU interprets the STOP instruction as a WAIT instruction, and the MCU enters halt mode. Halt mode is the same as wait mode, except that an oscillator stabilization delay of 1 to 4064 tcyc occurs after exiting halt mode. 1 = Halt mode enabled 0 = Halt mode not enabled SWPDI - Software Pull down Inhibit Bit The SWPDI bit inhibits software control of the I/O port pull down devices. The SWPDI bit overrides the pull down inhibit bits in the port pull down inhibit registers. 1 = Software pull down control inhibited 0 = Software pull down control not inhibited PIRQ Port A External Interrupt Bit The PIRQ bit enables the PA0PA3 pins to function as external interrupt pins. 1 = PA0PA3 enabled as external interrupt pins 0 = PA0PA3 not enabled as external interrupt pins LEVEL - External Interrupt Sensitivity Bit The LEVEL bit controls external interrupt triggering sensitivity. 1 = External interrupts triggered by active edges and active levels 0 = External interrupts triggered only by active edges COPEN - COP Enable Bit The COPEN bit enables the COP watchdog. 1 = COP watchdog enabled 0 = COP watchdog disabled

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

16

CONTROLLER BASED AUTOMATIC BELL

RESISTOR
A resistor is a two - terminal electronic component which implements electrical resistance as a circuit element. When a voltage V is applied across the terminals of a resistor, a current I will flow through the resistor in direct proportion to that voltage. The reciprocal of the constant of proportionality is known as the resistance R, since, with a given voltage V, a larger value of R further "resists" the flow of current I as given by Ohm's law: Resistors are common elements of electrical networks and electronic circuits and are ubiquitous in most electronic equipment. Practical resistors can be made of various compounds and films, as well as resistance wire (wire made of a high - resistivity alloy, such as nickelchrome). Resistors are also implemented within integrated circuit, particularly analog devices, and can also be integrated into hybrid and printed circuits. The electrical functionality of a resistor is specified by its resistance: common

commercial resistors are manufactured over a range of more than 9 orders of magnitude. When specifying that resistance in an electronic design, the required precision of the resistance may require attention to the manufacturing tolerance of the chosen resistor, according to its specific application. The temperature coefficient of the resistance may also be of concern in some precision applications. Practical resistors are also specified as having a maximum power rating which must exceed the anticipated power dissipation of that resistor in a particular circuit: this is mainly of concern in power electronics applications. Resistors with higher power ratings are physically larger and may require heat sinking. In a high voltage circuit, attention must sometimes be paid to the rated maximum working voltage of the resistor. The series inductance of a practical resistor causes its behavior to depart from ohms law; this specification can be important in some high - frequency applications for smaller values of resistance. In a low-noise amplifier or pre-amp the noise characteristics of a resistor may be an issue. The unwanted inductance, excess noise, and temperature coefficient are mainly dependent on the technology used in manufacturing the resistor.
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 17

CONTROLLER BASED AUTOMATIC BELL

They

are

not

normally

specified individually for a particular family of resistors

manufactured using a particular technology. A family of discrete resistors is also characterized according to its form factor, that is, the size of the device and position of its leads (or terminals) which is relevant in the practical manufacturing of circuits using them.

UNITS
The ohm (symbol: ) is the SI unit of electrical resistance, named after Georg Simon Ohm. An ohm is equivalent to a volt per ampere. Since resistors are specified and manufactured over a very large range of values, the derived units of milliohm (1 m = 103 ), kilohm (1 k = 103 ), and megohm (1 M = 106 ) are also in common usage. The reciprocal of resistance R is called conductance G = 1/R and is measured in Siemens (SI unit), sometimes referred to as a mho. Thus a Siemens is the reciprocal of an ohm: S = 1. Although the concept of conductance is often used in circuit analysis, practical resistors are always specified in terms of their resistance (ohms) rather than conductance.

OHMS LAW
The behavior of an ideal resistor is dictated by the relationship specified in Ohm's law:

Ohm's law states that the voltage (V) across a resistor is proportional to the current (I) passing through it, where the constant of proportionality is the resistance (R).Equivalently, Ohm's law can be stated:

This formulation of Ohm's law states that, when a voltage (V) is present across a resistance (R), a current (I) will flow through the resistance. This is directly used in practical computations.
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 18

CONTROLLER BASED AUTOMATIC BELL

For example, if a 300 ohm resistor is attached across the terminals of a 12 volt battery, then a current of 12 / 300 = 0.04 amperes (or 40 milliamperes) will flow through that resistor.

SERIES AND PARALLEL RESISTOR


In a series configuration, the current through all of the resistors is the same, but the voltage across each resistor will be in proportion to its resistance. The potential difference (voltage) seen across the network is the sum of those voltages, thus the total resistance can be found as the sum of those resistances:

As a special case, the resistance of N resistors connected in series, each of the same resistance R, is given by NR. Resistors in a parallel configuration are each subject to the same potential difference (voltage), however the currents through them add. The conductances of the resistors then add to determine the conductance of the network. Thus the equivalent resistance (Req) of the network can be computed:

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

19

CONTROLLER BASED AUTOMATIC BELL

The parallel equivalent resistance can be represented in equations by two vertical lines "||" (as in geometry) as a simplified notation. For the case of two resistors in parallel, this can be calculated using:

As a special case, the resistance of N resistors connected in parallel, each of the same resistance R, is given by R/N. A resistor network that is a combination of parallel and series connections can be broken up into smaller parts that are either one or the other. For instance,

However, some complex networks of resistors cannot be resolved in this which has been replaced by a resistor.

manner,

requiring more sophisticated circuit analysis. For instance, consider a cube, each edge of

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

20

CONTROLLER BASED AUTOMATIC BELL

The resistance that would be measured between two opposite vertices? In the case of 12 equivalent resistors, it can be shown that the corner-to-corner resistance is 56 of the individual resistance. More generally, the Y- transform, or matrix methods can be used to solve such a problem. One practical application of these relationships is that a non-standard value of resistance can generally be synthesized by connecting a number of standard values in series and/or parallel. This can also be used to obtain a resistance with a higher power rating than that of the individual resistors used. In the special case of N identical resistors all connected in series or all connected in parallel, the power rating of the individual resistors is thereby multiplied by N.

CAPACITOR
A capacitor ( formerly known as condenser ) Is a passive electronic

component consisting of a pair of conductors separated by a dielectric (insulator). When there is a potential difference (voltage) across the conductors, a static electric field develops in the dielectric that stores energy and produces a mechanical force between the conductors. An ideal capacitor is characterized by a single constant value, capacitance, measured in farads. This is the ratio of the electric charge on each conductor to the potential difference between them. Capacitors are widely used in electronic circuits for blocking direct current while allowing alternating current to pass, in filter networks, for smoothing the output of power supplies, in the resonant circuits that tune radios to particular frequencies and for many other purposes. The effect is greatest when there is a narrow separation between large areas of conductor; hence capacitor conductors are often called "plates", referring to an early means of construction. In practice the dielectric between the plates passes a small amount of leakage current and also has an electric field strength limit, resulting in a breakdown voltage, while the conductors and leads introduce an undesired inductance and resistance.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

21

CONTROLLER BASED AUTOMATIC BELL

Charge separation in a parallel - plate capacitor causes an internal electric field. A dielectric (orange) reduces the field and increases the capacitance.

A capacitor consists of two conductors separated by a non-conductive region

called

the dielectric medium though it may be a vacuum or a semiconductor depletion region chemically identical to the conductors. A capacitor is assumed to be self-contained and isolated, with no net electric charge and no influence from any external electric field. The conductors thus hold equal and opposite charges on their facing surfaces, and the dielectric develops an electric field. In SI units, a capacitance of one farad means that one coulomb of charge on each conductor causes a voltage of one volt across the device. The capacitor is a reasonably general model for electric fields within electric circuits. An ideal capacitor is wholly characterized by a constant capacitance C, defined as the ratio of charge Q on each conductor to the voltage V between them:

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

22

CONTROLLER BASED AUTOMATIC BELL

Sometimes charge build up affects the capacitor mechanically, causing its capacitance to vary. In this case, capacitance is defined in terms of incremental changes:

ENERGY STORAGE
Work must be done by an external influence to "move" charge between the conductors in a capacitor. When the external influence is removed the charge separation persists in the electric field and energy is stored to be released when the charge is allowed to return to its equilibrium position. The work done in establishing the electric field, and hence the amount of energy stored, is given by:

DIODE

Close up of a diode, showing the square shaped semiconductor crystal (black object on left).

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

23

CONTROLLER BASED AUTOMATIC BELL

Bottom: A bridge rectifier. I most diodes, a white or black painted band identifies the cathode terminal, the is, the terminal which conventional current flows out of when the diode is conducting.

Structure of a vacuum tube diode. The filament may be bare, or more commonly (as shown here), embedded within and insulated from an enclosing cathode. In electronics , a diode is a two terminal electronic component that conducts electric current in only one direction. The term usually refers to a semiconductor diode, the most common type today. This is a crystalline piece of semiconductor material connected to two electrical terminals. A vacuum tube diode ( now little used except in some high - power technologies) is a vacuum tube with two electrodes: a plate and a cathode. The most common function of a diode is to allow an electric current to pass in one direction (called the diode's forward direction) while blocking current in the opposite direction (the reverse direction). Thus, the diode can be thought of as an electronic version of a check valve. This unidirectional behavior is called rectification, and is used to convert alternating current to direct current, and to extract modulation from radio signals in radio receivers.
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 24

CONTROLLER BASED AUTOMATIC BELL

However, diodes can have more complicated behavior than this simple on-off action. This is due to their complex non - linear electrical characteristics, which can be tailored by varying the construction of their P-N junction. These are exploited in special purpose diodes that perform many different functions. For example, specialized diodes are used to regulate voltage (Zener diodes), to electronically tune radio and TV receivers (varactor diodes), to generate negative resistance, which makes them useful in some types of circuits. Diodes were the first semiconductor electronic devices. The discovery of crystals' rectifying abilities was made by German physicist Ferdinand Braun in 1874. The first semiconductor diodes, called cat's whisker diodes, developed around 1906, were made of mineral crystals such as galena. Today most diodes are made of silicon, but other semiconductors such as germanium are sometimes used. radio frequency oscillations (tunnel diodes), and to produce light (light emitting diodes). Tunnel diodes exhibit

ZENOR DIODE
Diodes that can be made to conduct backwards. This effect, called Zener breakdown, occurs at a precisely defined voltage, allowing the diode to be used as a precision voltage reference. In practical voltage reference circuits Zener and switching diodes are connected in series and opposite directions to balance the temperature coefficient to near zero. Some devices labeled as high-voltage Zener diodes are actually avalanche diodes (see above). Two (equivalent) Zeners in series and in reverse order, in the same package, constitute a transient absorber (or Transorb, a registered trademark). The Zener diode is named for Dr. Charles zenor diode of Carnegie Mellon University, inventor of the device. Other uses for semiconductor diodes include sensing temperature, and computing analog logarithms (Operational amplifier applications Logarithmic).

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

25

CONTROLLER BASED AUTOMATIC BELL

Diode

Zener diode

Schottky diode

Tunnel diode

Diode

Photodiode

Varicap

Silicon controlled rectifier

TRANSISTER SEMICONDUCTOR DIODES

Typical diode packages in same alignment as diode symbol. Thin bar depicts the cathode. modern A semiconductor diode is made of a crystal of semiconductor like silicon that has impurities added to it to create a region on one side that contains negative charge carriers (electrons), called n-type semiconductor, and a region on the other side that contains positive charge carriers (holes), called p-type semiconductor. The diode's terminals are attached to each of these regions. The boundary within the crystal between these regions, called a PN junction, is where the action of the diode takes
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 26

CONTROLLER BASED AUTOMATIC BELL

place. The crystal conducts a current of electrons in a direction from the N-type side (called the cathode) to the P-type side (called the anode), but not in the opposite direction; that is, a conventional current flows from anode to cathode (opposite to the electron flow, since electrons have negative charge). Another type of semiconductor diode, the Schottky diode is formed from the contact between a metal and a semiconductor rather than by a p-n junction.

CURRENT-VOLTAGE CHARACTERISTICS
A semiconductor diodes behavior in a circuit is given by its currentvoltage characteristic, or IV graph (see graph below). The shape of the curve is determined by the transport of charge carriers through the so-called depletion layer or depletion region that exists at the p-n junction between differing semiconductors. When a p-n junction is first created, conduction band (mobile) electrons from the N-doped region diffuse into the P-doped region where there is a large population of holes (vacant places for electrons) with which the electrons recombine. When a mobile electron recombines with a hole, both hole and electron vanish, leaving behind an immobile positively charged donor (dopant) on the N-side and negatively charged acceptor (dopant) on the P-side. The region around the p-n junction becomes depleted of charge carriers and thus behaves as an insulator. However, the width of the depletion region (called the depletion width) cannot grow without limit. For each electron-hole pair that recombines, a positively charged dopant ion is left behind in the N-doped region, and a negatively charged dopant ion is left behind in the P-doped region. As recombination proceeds more ions are created, an increasing electric field develops through the depletion zone which acts to slow and then finally stop recombination. At this point, there is a built-in potential across the depletion zone. If an external voltage is placed across the diode with the same polarity as the built-in potential, the depletion zone continues to act as an insulator, preventing any significant electric

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

27

CONTROLLER BASED AUTOMATIC BELL

current flow (unless electron/hole pairs are actively being created in the junction by, for instance, light. see photodiode). This is the reverse bias phenomenon. However, if the polarity of the external voltage opposes the built-in potential, recombination can once again proceed, resulting in substantial electric current through the p-n junction (i.e. substantial numbers of electrons and holes recombine at the junction). For silicon diodes, the built-in potential is approximately 0.7 V (0.3 V for Germanium and 0.2 V for Schottky). Thus, if an external current is passed through the diode, about 0.7 V will be developed across the diode such that the P-doped region is positive with respect to the N-doped region and the diode is said to be turned on as it has a forward bias. A diodes 'IV characteristic' can be approximated by four regions of operation. A transistor is a semiconductor device used to amplify and switch electronic signals. It is made of a solid piece of semiconductor material, with at least three terminals for connection to an external circuit. A voltage or current applied to one pair of the transistor's terminals changes the current flowing through another pair of terminals. Because the controlled (output) power can be much more than the controlling (input) power, the transistor provides amplification of a signal. Today, some transistors are packaged individually, but many more are found embedded in integrated circuits. The transistor is the fundamental building block of modern electronic devices, and is ubiquitous in modern electronic systems. Following its release in the early 1950s the transistor revolutionized the field of electronics, and paved the way for smaller and cheaper radios, calculators, and computers, among other things.

IMPORTANCE
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 28

CONTROLLER BASED AUTOMATIC BELL

The transistor is the key active component in practically all modern electronics, and is considered by many to be one of the greatest inventions of the twentieth century. Its importance in today's society rests on its ability to be mass produced using a highly automated process (semiconductor device fabrication) that achieves astonishingly low per-transistor costs. Although several companies each produce over a billion individually packaged (known as discrete) transistors every year, the vast majority of transistors now produced are in integrated circuits (often shortened to IC, microchips or simply chips), along with diodes, resistors, capacitors and other electronic components, to produce complete electronic circuits. A logic gate consists of up to about twenty transistors whereas an advanced microprocessor, as of 2011, can use as many as 3 billion transistors (MOSFETs). "About 60 million transistors were built this year [2002] ... for [each] man, woman, and child on Earth." The transistor's low cost, flexibility, and reliability have made it a ubiquitous device. Transistorized mechatronic circuits have replaced electromechanical devices in controlling appliances and machinery. It is often easier and cheaper to use a standard microcontroller and write a computer program to carry out a control function than to design an equivalent mechanical control function.

USAGE
The bipolar junction transistor, or BJT, was the most commonly used transistor in the 1960s and 70s. Even after MOSFETs became widely available, the BJT remained the transistor of choice for many analog circuits such as simple amplifiers because of their greater linearity and ease of manufacture. Desirable properties of MOSFETs, such as their utility in low-power devices, usually in the CMOS configuration, allowed them to capture nearly all market share for digital circuits; more recently MOSFETs have captured most analog and power applications as well, including modern clocked analog circuits, voltage regulators, amplifiers, power transmitters, motor drivers, etc.

SIMPLIFIED OPERATION
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 29

CONTROLLER BASED AUTOMATIC BELL

The essential usefulness of a transistor comes from its ability to use a small signal applied between one pair of its terminals to control a much larger signal at another pair of terminals. This property is called gain.

A transistor can control its output in proportion to the input signal; that is, it can act as an amplifier. Alternatively, the transistor can be used to turn current on or off in a circuit as an electrically controlled switch, where the amount of current is determined by other circuit elements

COMMON TRANSISTER

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

30

CONTROLLER BASED AUTOMATIC BELL

. The two types of transistors have slight differences in how they are used in a circuit. A bipolar transistor has terminals labeled base, collector, and emitter. A small current at the base terminal (that is, flowing from the base to the emitter) can control or switch a much larger current between the collector and emitter terminals. For a field-effect transistor, the terminals are labeled gate, source, and drain, and a voltage at the gate can control a current between source and drain. The image to the right represents a typical bipolar transistor in a circuit. Charge will flow between emitter and collector terminals depending on the current in the base. Since internally the base and emitter connections behave like a semiconductor diode, a voltage drop develops between base and emitter while the base current exists. The amount of this voltage depends on the material the transistor is made from, and is referred to as VBE.

TRANSISTER AS A SWITCH

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

31

CONTROLLER BASED AUTOMATIC BELL

BJT used as an electronic switch, in grounded-emitter configuration. Transistors are commonly used as electronic switches for both high- and low-power applications such as switched-mode power supplies and logic gates respectively. In a grounded-emitter transistor circuit, such as the light-switch circuit shown, as the base voltage rises the base and collector current rise exponentially, and the collector voltage drops because of the collector load resistor. The relevant equations: VRC = ICE RC, the voltage across the load (the lamp with resistance RC) VRC + VCE = VCC, the supply voltage shown as 6V If VCE could fall to 0 (perfect closed switch) then Ic could go no higher than VCC / RC, even with higher base voltage and current. The transistor is then said to be saturated. Hence, values of input voltage can be chosen such that the output is either completely off or completely on. The transistor is acting as a switch, and this type of operation is common in digital circuits where only "on" and "off" values are relevant.

TRANSISTER AS AN AMPLIFIER
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 32

CONTROLLER BASED AUTOMATIC BELL

The common-emitter amplifier is designed so that a small change in voltage in (Vin) changes the small current through the base of the transistor and the transistor's current amplification combined with the properties of the circuit mean that small swings in Vin produce large changes in Vout.

Various configurations of single transistor amplifier are possible, with some providing current gain, some voltage gain, and some both. From mobile phones to televisions, vast numbers of products include amplifiers for sound reproduction, radio transmission, and signal processing. The first discrete transistor audio amplifiers barely supplied a few hundred milliwatts, but power and audio fidelity gradually increased as better transistors became available and amplifier architecture evolved. Modern transistor audio amplifiers of up to a few hundred watts are common and relatively inexpensive.

ADVANTAGES OF TRANSISTOR
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 33

CONTROLLER BASED AUTOMATIC BELL

The key advantages that have allowed transistors to replace their vacuum tube predecessors in most applications are Small size and minimal weight, allowing the development of miniaturized electronic devices valves;

Highly automated manufacturing processes, resulting in low per-unit cost. Lower possible operating voltages, making transistors suitable for small, battery-powered applications. No warm-up period for cathode heaters required after power application. Lower power dissipation and generally greater energy efficiency. Higher reliability and greater physical ruggedness. Extremely long life. Some transistorized devices have been in service for more than 50 years. Complementary devices available, facilitating the design of complementarysymmetry circuits, something not possible with vacuum tubes. Insensitivity to mechanical shock and vibration, thus avoiding the problem of micro phonics in audio applications.

LIMITATIONS
Silicon transistors do not operate at voltages higher than about 1,000 volts (SiC devices can be operated

as high as 3,000 volts). In contrast, vacuum tubes have been developed that can be operated at tens of thousands of volts. High-power, high-frequency operation, such as that used in over-the-air television broadcasting, is better achieved in vacuum tubes due to improved electron mobility in a vacuum.

Silicon transistors are much more vulnerable than vacuum tubes to an electromagnetic pulse generated by a high-altitude nuclear explosion.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

34

CONTROLLER BASED AUTOMATIC BELL

THE NPN TRANSISTER


In the preceding tutorial it was presented that the typical Bipolar Transistor or BJT comes in two major forms, the NPN (Negative-Positive-Negative) type and the PNP (Positive-NegativePositive) type with the NPN Transistor being the most commonly used transistor type. We also find out that the transistor junctions can be biased in one of the three different ways namely Common Base, Common Emitter and Common Collector . Now in this tutorial, we will study in detail the Common-Emitter configuration using NPN Transistors . Shown below is an example of its current flow characteristics.

NPN TRANSISTER CONFIGURATION


Apparently, transistor is a CURRENT operated device which has a very large amount of current (I c ) which flows without restraint through the device between the collector and emitter terminals. But this is only possible if a small amount of biasing current (I b ) is present in the base terminal of the transistor making the base to act as a current control input.

The symbol hfe or sometimes referred to as Beta ( ) is actually the ratio of these two currents (I c /I b ) and is described as the DC Current Gain of the device. Therefore making Beta as unitless since it is expressed as a ratio. Alpha (a) on the other hand is the current gain form the emitter to the collector terminal, I c /I e , and is a function of the transistor itself.
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 35

CONTROLLER BASED AUTOMATIC BELL

Typically the value of the parameter a is almost close to unity since the emitter current I e is the product of a very small base current I b and very large collector current I c . In general, the value of a in a low-power signal transistor ranges only from about 0.959 to 0.999.

AND RELATIONSHIP

Two mathematical equations can be derived by combining the two parameters a and which will describe the relationship between the different currents flowing in the transistors.

The figure Beta ranges from about 20 to 1000 for high current power transistors and for high frequency low power type bipolar transistors respectively. By rearranging the equation of Beta to make it a function of the collector current I c , and then equating the base current to zero (I b = 0) would eventually result to zero collector current (I c = x 0 ). In addition, as base current increases collector current also increases thus making the base current as the controlling parameter for the collector current. Moreover, the most significant feature of the Bipolar Junction Transistor is that only a very small amount of base current is needed to control a very high collector current.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

36

CONTROLLER BASED AUTOMATIC BELL

THE PNP TRANSISTER


NPN Transistor , which was discussed in the previous tutorial, has an exact opposite which is the PNP Transistor . The configuration of the two diodes in PNP transistor is in the reversed configuration compared to the NPN type. Hence, the Emitter terminal, which is identified by the arrow, is pointing inward in the transistor symbol. The polarities are also reversed which indicates that PNP transistors sink current while NPN transistors source current. Minimal amount of base current is used by PNP Transistors as well as negative base voltage to control the large amount of emitter-collector current. The structure of PNP transistor is composed of two P-type semiconductor materials which is placed on both sides of the N-type material as shown in the figure below.

PNP TRANSISTER CONFIGURATION


On the other hand, PNP Transistor has also some similarities to its counterpart NPN type aside from the polarities and biasing of the current as well as the voltage directions which are of opposite path as compared from the three possible configurations in the first tutorial which are the Common Base configuration, Common Emitter configuration and Common Collector configuration.

Normally, negative voltage (-v e ) is needed at the collector terminal of the PNP transistors and as a result the flow of the current through the emitter-collector junction are determined by the
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 37

CONTROLLER BASED AUTOMATIC BELL

Holes which is in contrary to the Electrons of the NPN type. That makes PNP transistors slower compared to its opposite type NPN in terms of its operation because the movement of holes across the depletion region tends to be slower than that of the electrons. The Base terminal of a PNP transistor should be more negative than the Emitter terminal by approximately 0.3 volts for a germanium material and 0.7 volts for a silicon material to set off the Base current to flow. The formulas below best illustrates this operation which is also of the formulas used for the NPN transistor in finding the Base resistor, Base current or Collector current.

In reality, PNP transistor can be used as a replacement for the NPN transistor in electronic circuits though the difference would be on the polarities of the voltages and the direction of the current flow. PNP transistors can also act as a switching device as shown in the figure below.

PNP TRANSISTER CIRCUIT

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

38

CONTROLLER BASED AUTOMATIC BELL

PNP and NPN transistors have similar appearance in terms of its Output Characteristics Curves . However the former are rotated by 180 to take effect the reverse polarity of the voltages and currents. Take note that the currents flowing out of the Base and Collector terminal of a PNP transistor are negative. Emitter-Base Terminals The Emitter-Base junction should conduct in one way only just like a normal diode. Collector-Base Terminals The Collector- Base junction should conduct in one way only just like a normal diode. Emitter-Collector Terminals The Emitter-Collector junction should not conduct in either direction.

RELAY
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 39

CONTROLLER BASED AUTOMATIC BELL

Electric motors need over current protection to prevent damage from over-loading the motor, or to protect against short circuits in connecting cables or internal faults in the motor windings. One type of electric motor overload protection relay is operated by a heating element in series with the electric motor. The heat generated by the motor current heats a bimetallic strip or melts solder, releasing a spring to operate contacts. Where the overload relay is exposed to the same environment as the motor, a useful though crude compensation for motor ambient temperature is provided.

POLE AND THROW


Relays are switches, the terminology applied to switches is also applied to relays. A relay will switch one or more poles, each of whose contacts can be thrown by energizing the coil in one of three ways:

Normally-open (NO) contacts connect the circuit when the relay is activated; the circuit is disconnected when the relay is inactive. It is also called a Form A

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

40

CONTROLLER BASED AUTOMATIC BELL

contact or "make" contact. NO contacts can also be distinguished as "earlymake" or NOEM, which means that the contacts will close before the button or switch is fully engaged.

Normally-closed (NC) contacts disconnect the circuit when the relay is activated; the circuit is connected when the relay is inactive. It is also called a Form B contact or "break" contact. NC contacts can also be distinguished as "late-break" or NCLB, which means that the contacts will stay closed until the button or switch is fully disengaged.

Change-over (CO), or double-throw (DT), contacts control two circuits: one normally-open contact and one normally-closed contact with a common terminal. It is also called a Form C contact or "transfer" contact ("break before make"). If this type of contact utilizes a "make before break" functionality, then it is called a Form D contact.

The following designations are commonly encountered:

SPST Single Pole Single Throw. These have two terminals which can be connected or disconnected. Including two for the coil, such a relay has four terminals in total. It is ambiguous whether the pole is normally open or normally closed. The terminology "SPNO" and "SPNC" is sometimes used to resolve the ambiguity.

SPDT Single Pole Double Throw. A common terminal connects to either of two others. Including two for the coil, such a relay has five terminals in total. DPST Double Pole Single Throw. These have two pairs of terminals. Equivalent to two SPST switches or relays actuated by a single coil. Including two for the coil, such a relay has six terminals in total. The poles may be Form A or Form B (or one of each).

DPDT Double Pole Double Throw. These have two rows of change-over terminals. Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay has eight terminals, including the coil.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

41

CONTROLLER BASED AUTOMATIC BELL

The "S" or "D" may be replaced with a number, indicating multiple switches connected to a single actuator. For example 4PDT indicates a four pole double throw relay (with 14 terminals). EN 50005 are among applicable standards for relay terminal numbering; a typical EN 50005-compliant SPDT relay's terminals would be numbered 11, 12, 14, A1 and A2 for the C, NC, NO, and coil connections, respectively.

APPLICATIONS
Relays are used to and for:

Control a high-voltage circuit with a low-voltage signal, as in some types of modems or audio amplifiers, Control a high-current circuit with a low-current signal, as in the starter solenoid of an automobile, Detect and isolate faults on transmission and distribution lines by opening and closing circuit breakers (protection relays),

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

42

CONTROLLER BASED AUTOMATIC BELL

Isolate the controlling circuit from the controlled circuit when the two are at different potentials, for example when controlling a mains-powered device from a low-voltage switch. The latter is often applied to control office lighting as the low voltage wires are easily installed in partitions, which may be often moved as needs change. They may also be controlled by room occupancy detectors in an effort to conserve energy,

Logic functions. For example, the boolean AND function is realised by connecting normally open relay contacts in series, the OR function by connecting normally open contacts in parallel. The change-over or Form C contacts perform the XOR (exclusive or) function. Similar functions for NAND and NOR are accomplished using normally closed contacts. The Ladder programming language is often used for designing relay logic networks.

Early computing. Before vacuum tubes and transistors, relays were used as logical elements in digital computers. See ARRA (computer), Harvard Mark II, Zuse Z2, and Zuse Z3.

Safety-critical logic. Because relays are much more resistant than semiconductors to nuclear radiation, they are widely used in safety-critical logic, such as the control panels of radioactive waste-handling machinery.

Time delay functions. Relays can be modified to delay opening or delay closing a set of contacts. A very short (a fraction of a second) delay would use a copper disk between the armature and moving blade assembly. Current flowing in the disk maintains magnetic field for a short time, lengthening release time. For a slightly longer (up to a minute) delay, a dashpot is used. A dashpot is a piston filled with fluid that is allowed to escape slowly. The time period can be varied by increasing or decreasing the flow rate. For longer time periods, a mechanical clockwork timer is installed.

SEVEN SEGMENT DISPLAYS


There are two types of LED 7-segment displays:

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

43

CONTROLLER BASED AUTOMATIC BELL

1. Common Cathode (CC) 2. Common anode (CA) The difference between the two displays is the common cathode has all the cathodes of the 7-segments connected directly together and the common anode has all the anodes of the 7-segments connected together. Shown below is a common anode seven segment.

As shown above all the anode segments are connected together. When working with a CA seven segment display, power must be applied externally to the anode connection that is common to all the segments. Then by applying a ground to a particular segment connection (a-g), the appropriate segment will light up. An additional resistor must be added to the circuit to limit the amount of current flowing thru each LED segment.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

44

CONTROLLER BASED AUTOMATIC BELL

The above diagram shows the instance when power is applied to the CA connection and segments b & c are grounded causing these two segments to light up. A typical pin out for a seven segment common anode display is shown below.

A common cathode seven segment is different from a common anode segment in that the cathodes of all the LEDs are connected together. For the use of this seven segment the common cathode connection must be grounded and power must be applied to appropriate segment in order to illuminate that segment.
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 45

CONTROLLER BASED AUTOMATIC BELL

BELL
The Bell was notable, particularly under the editorship of Sen Faolin, as an outspoken liberal voice at a time of political and intellectual stagnation, fiercely critical of censorship, Gaelic revivalist ideology, clericalism, and general parochialism. Under Peadar O'Donnell (194654), the Bell became more leftwing in content and irregular in frequency of publication but continued to produce material of high quality. W. R. Rodgers and Louis MacNeice were among the authors whose work sustained the magazine's connection with cultural activities in Ulster, in addition to which it repeatedly featured writing from various parts of Europe. In the course of its fourteen-year career, the Bell was variously subtitled A Survey of Irish Life, A Magazine of Creative Fiction, and A Magazine of Ireland Today; its concern with social and political matters gave rise to incisive commentaries on such topics as state censorship in Ireland, on which George Bernard Shaw wrote in an issue of 1945, the restrictive influence of the Church, and reactionary tendencies in Irish literature.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

46

CONTROLLER BASED AUTOMATIC BELL

Having undergone financial difficulties which resulted in its temporary closure between 1948 and 1950, it finally ceased appearing in 1954. Along With The Dublin Magazine, The Bell is accounted the most important literary and intellectual journal of Ireland in the twentieth century

BELL CIRCUIT DIAGRAM


DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 47

CONTROLLER BASED AUTOMATIC BELL

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

48

CONTROLLER BASED AUTOMATIC BELL

CHAPTER 3
HARDWARE MODULE

BLOKC DIAGRAM

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

49

CONTROLLER BASED AUTOMATIC BELL

INPUT VOLTAGE

POWER 8-LINE DRIVE

TIME D BELL R I DELET E V E R STOR E

M C 6 8 H C 7 0 5 J
BELL RELA Y 7 SEGMENT DISPLAY R DECODE

SWITCH

BLOCK DIAGRAM DESCRIPTION

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

50

CONTROLLER BASED AUTOMATIC BELL

Our project block diagram is consist as a many blocks, there blocks are, Motorola controller MC68HC705J1A IC, delete, switch, store, bell, driver, time, decoder, 8-line decoder, 7 seven segment, and relay. Controller is control the all blocks. In automatic bell circuit works with power supply and battery. Keys are used the data entry or entered the time. The stored the block is used stored the input time and alaram time. Delete block is used to delete the old time or data. We have used in the two types of output, there output is AC output and DC output. The AC output device is ac bell and dc output device is pizeo puzzer. Driver is to the decoder purpose in the 1 to 4 decoder. Encoder is used to the 4 to 1.

CONTROLER IC
The MC68HC705J1A is a member of Motorolas low-cost, high-performance M68HC05 Family of 8-bit microcontroller units(MCUs). The M68HC05 Family is based on the customerspecified integrated circuit (CSIC) design strategy. All MCUs in the family use the popular M68HC05 central processor unit (CPU) and are available with a variety of subsystems, memory sizes and types, and package types On-chip memory of the MC68HC705J1A includes 1240 bytes of erasable, programmable read-only memory (EPROM). In packages without the transparent window for EPROM erasure, the 1240 EPROM bytes serve as one-time programmable read-only memory (OTPROM).The MC68HRC705J1A is a resistor-capacitor (RC) oscillator mask option version of the MC68HC705J1A

POWER SUPPLY
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 51

CONTROLLER BASED AUTOMATIC BELL

A power supply is a device that supplies electrical energy to one or more electric loads. The term is most commonly applied to devices that convert one form of electrical energy to another, though it may also refer to devices that convert another form of energy ( e.g., mechanical, chemical, solar) to electrical energy. A regulated power supply is one that controls the output voltage or current to a specific value; the controlled value is held nearly constant despite variations in either load current or the voltage supplied by the power supply's energy source. Every power supply must obtain the energy it supplies to its load, as well as any energy it consumes while performing that task, from an energy source. Depending on its design, a power supply may obtain energy from:

Electrical energy transmission systems. Common examples of this include power supplies that convert AC line voltage to DC voltage. Energy storage devices such as batteries and fuel cells. Electromechanical systems such as generators and alternators. Solar power.

A power supply may be implemented as a discrete, stand-alone device or as an integral device that is hardwired to its load. In the latter case, for example, low voltage DC power supplies are commonly integrated with their loads in devices such as computers and household electronics. Constraints that commonly affect power supplies include

The amount of voltage and current they can supply. How long they can supply energy without needing some kind of refueling or recharging (applies to power supplies that employ portable energy sources). How stable their output voltage or current is under varying load conditions. Whether they provide continuous or pulsed energy.

RELAY
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 52

CONTROLLER BASED AUTOMATIC BELL

Electric motors need over current protection to prevent damage from over-loading the motor, or to protect against short circuits in connecting cables or internal faults in the motor windings. One type of electric motor overload protection relay is operated by a heating element in series with the electric motor. The heat generated by the motor current heats a bimetallic strip or melts solder, releasing a spring to operate contacts. Where the overload relay is exposed to the same environment as the motor, a useful though crude compensation for motor ambient temperature is provided.

SEVEN SEGMENT DISPLAY


The difference between the two displays is the common cathode has all the cathodes of the 7-segments connected directly together and the common anode has all the anodes of the 7-segments connected together. Shown below is a common anode seven segment.

PCB LAYOUT
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 53

CONTROLLER BASED AUTOMATIC BELL

CIRCUIT DESIGN

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

54

CONTROLLER BASED AUTOMATIC BELL

CIRCUIT DIAGRAM

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

55

CONTROLLER BASED AUTOMATIC BELL

CIRCUIT DESCRIPTION
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 56

CONTROLLER BASED AUTOMATIC BELL

The pin assignments and main features of the microcontroller are shown in Fig.1 and the Box, respectively. The complete system is divided into four sections, namely, the time keeping section, the input section (keyboard), the output (display, indicators, and relay driving) section, and power supply and battery backup.

THE TIME KEEPING SECTION


Accurate time-keeping depends on the accuracy of time base used for driving the microcontroller. In this project, the microcontroller is driven by AT - cut parallel resonant crystal oscillator that is expected to provide a very stable clock. A 3.2768MHz crystal provides a time base to the controller. The frequency (fosc) of the oscillator is internally divided by 2 to get the operating frequency (fop). This sequencing of CPU instructions. high-frequency clock source is used to control the

TIMER
The basic function of a timer is the measurement the or generation of time clock of the

dependant events. Timers usually measure time relative to

internal

microcontroller. The MC68HC705J1A has a 15-stage ripple counter preceded by a pre - scaler that divides the internal clock signal by 4.This provides the timing reference for timer functions. The programmable timer status and control register (TSCR) is used for deciding the interrupt rate. It can be programmed to give interrupts after every 16,384, 3,2768, 65,536, or 131,072 clock cycles. In Table I, the control word is set to provide the interrupts after every 16,384 cycles. For a 32,768MHz crystal, the interrupt period will be 10 ms. Thus, timer interrupts will bee generated after every 10 ms (100Hz). That is, 100 interrupts will make 1 second.

Now time-keeping becomes very simple. As we are having a precise 1-second time count, a real-time clock can be easily built. The MC68HC705J1A has a 64 byte RAM that is

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

57

CONTROLLER BASED AUTOMATIC BELL

used for data storage. Real time (in terms of seconds, minutes, hours, days of a month, and months) is stored in this RAM. Thus an accurate real-time clock is generated.

THE INPUT SECTION


For setting the real-time clock and storing operating times, the timer requires to be programmed externally. Data is fed using the keyboard. Press to on type keys are interfaced to the microcontroller using an 8-bit priority encoder CD4532. This encoder detects the key-press operation and generates the equiva-lent 3-bit binary data. Its truth table is shown in Table II. The priority encoder is inter - faced to port A of the microcontroller. Various keys used in the timer along with their functions, are described below: Time (4): For setting real time in minutes and hours. Bell (5): For setting the bells operating timings. Digit Advance (6): Data setting is done digit wise (hours digit followed by digit).The Digit Advance key shifts the decimal point to the right. Store (7): For storing the data (real time or bell time).

Delete (3): For deleting a particular bell timing. Here, the figures within parentheses indicate the decimal equivalents of 3-bit binary data from the keyboard.

SET AND RUN MODES


Data setting is possible only in set mode. Set mode or run mode can be selected by

toggle switch S6. By using a lock switch for S6, the timer can be protected from unauthorised data entry/storage.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

58

CONTROLLER BASED AUTOMATIC BELL

In run mode if you press Bell key once, the display shows the bells various operating timings one after the other, in the same order Time key at any stage to revert back to the display of real time. in which these had been previously stored. In case you want to discontinue seeing all the bell timings, you may press

THE OUTPUT SECTION


Seven segment displays are used for data display. As LEDs are brighter, these have been used in the system. There are two techniques for driving the displays: (i)driving each display using a separate driver (like 74LS47 or CD4511) (ii)using multiplexed displays. The first technique works well, but practically it has two problems: it uses a large number of IC packages and consumes a fairly large amount of current. By using multi-plexed display both the problems can be solved. In multiplexing, only one input is dis-played at any given instant. But if you chop or alter inputs fast enough, your eyes see the result as a continuous display. With LEDs, only one digit is lighted up at a time. This saves a lot of power and also components, making the system economical. Generally, displays are refreshed at a frequency of 50 to 150Hz. Here, displays are refreshed at a frequency of 100 Hz (after every 10 ms). The display - refreshing program is an interrupt service routine program. BCD - to - 7 - segment decoder/ driver 74LS47, along with transistor 2N2907, and 3 line to 8 line decoder 74LS138 are used common-anode displays. In multiplexed display, the current through the segments is doubled to increase the displays brightness. 74LS47 is rated for sinking a current of up to 24 mA. As the current persists for a very small time in multiplexed display, it is peaky and can be as high as 40 mA per segment. for driving

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

59

CONTROLLER BASED AUTOMATIC BELL

The decimal point is controlled individually by transistor BC547, as 74LS47 does not support the decimal point. PA0 and PA1 bits of port A are used for controlling the electro mechanical relay and buzzer, respectively.

POWER SUPPLY
A power supply is a device that supplies electrical energy to one or more electric loads. The term is most commonly applied to devices that convert one form of electrical energy to another, though it may also refer to devices that convert another form of energy ( e.g., mechanical, chemical, solar) to electrical energy. A regulated power supply is one that controls the output voltage or current to a specific value; the controlled value is held nearly constant despite variations in either load current or the voltage supplied by the power supply's energy source. Every power supply must obtain the energy it supplies to its load, as well as any energy it consumes while performing that task, from an energy source. Depending on its design, a power supply may obtain energy from:

Electrical energy transmission systems. Common examples of this include power supplies that convert AC line voltage to DC voltage. Energy storage devices such as batteries and fuel cells. Electromechanical systems such as generators and alternators. Solar power.

A power supply may be implemented as a discrete, stand-alone device or as an integral device that is hardwired to its load. In the latter case, for example, low voltage DC power supplies are commonly integrated with their loads in devices such as computers and household electronics. Constraints that commonly affect power supplies include:

The amount of voltage and current they can supply.


60

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

CONTROLLER BASED AUTOMATIC BELL

How long they can supply energy without needing some kind of refueling or recharging (applies to power supplies that employ portable energy sources). How stable their output voltage or current is under varying load conditions. Whether they provide continuous or pulsed energy.

BATTERY
A battery is an alternative to a line operated power supply; it is independent of the availability of mains electricity, suitable for portable equipment and use in locations without mains power. A battery consists of several electrochemical cells connected in series to provide the voltage desired. Batteries may be primary ( able to supply current when constructed, discarded when drained) or secondary (rechargeable; can be charged, used, and recharged many times) The primary cell first used was the carbon-zinc dry cell. It had a voltage of 1.5 volts; later battery types have been manufactured, when possible, to give the same voltage per cell. Carbon-zinc and related cells are still used, but the alkaline battery delivers more energy per unit weight and is widely used. The most commonly used battery voltages are 1.5 (1 cell) and 9V (6 cells). Various technologies of rechargeable battery are used. Types most commonly used are NiMH, and lithium ion and variants.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

61

CONTROLLER BASED AUTOMATIC BELL

CHAPTER 4
SOFTWARE MODULE

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

62

CONTROLLER BASED AUTOMATIC BELL

SOFTWARE
Motorola offers programming its Integrated Development and complete Environment development ( IDE ) of the software system. for The

microcontroller

development board comes with Editor, Assembler, and Programmer software to support Motorolas device programmer and software simulator. The ICS05JW in circuit simulator along with development board (pod) forms a

complete simulator and non-real-time I/O emulator for simulating, programming, and debugging code for a MC68HC705J1A/KJ1 family device. When you connect the pod to your host computer and target hardware, you can use the actual inputs and outputs of the target system during simulation of the code. You can also use the ISC05JW software to edit and assemble the code in standalone mode, without input/output to/from pod. The pod(MC68HC705J1CS) can be interfaced to any Windows 3.x - or Windows 95-based IBM computer using serial port. The software for the timer has been so developed that the system becomes as user friendly as possible. The main constraint is read/write memory (RAM) space. As mentioned earlier, the microcontroller has only 64 byte RAM. About twenty bell operating timings are required to be stored. So the efficient use of RAM becomes essential. The software routines for the timer, along with their Assembly language codes, are listed in a folder. (Note: This folder, containing source code (.asm) and listing file (.lst) will form part of the EFY-CD provided with the August issue. As files are quite large, it is not feasible to include them here.) Basically, the following functions are performed by the software program: Initialisation of ports and the timer. Reading of key-pressed data. Storing of real time and bell timings. Comparison of real time and bell time. If the two match, the bell rings.
63

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

CONTROLLER BASED AUTOMATIC BELL

Display of data. Time-keeping.

For a user-friendly system, the associated software is required to perform many data manipulation tricks and internal branching. The operation and logic can be understood from the Assembly language listings. The software is mainly divided into the following modules:

KEYBOARD
When a key is pressed, CD4532 sends the corresponding data. After reading the data, the controller decides on the action. Set/ Run key(S6) is connected to port PA4.

BELL
This part of the program is used for displaying the bell operating timings stored in the RAM. The operating timings are displayed one by one with a delay of 5 seconds between two consecutive timings.

SET
The real time and bell timings are stored using this part of the software. Data is entered digitwise; for example, 08:30 a.m. will be stored as 0, followed by 8, followed by 3, and finally 0. Data is stored in 24-hour format. Data fed from the keyboard is converted into equivalent hex and stored in RAM. Any particular operating timing can be deleted from the memory using Delete key, provided the timing is already stored in the memory.

RUN
Here the real time is compared with bell operating time. If the two match, the relay is operated.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

64

CONTROLLER BASED AUTOMATIC BELL

DATA CONTROLE
This part of the software is used for finding out the decimal equivalent of hex data. The microcontroller manipulates the hex data and converts it into BCD format for display.

TIMER
The timer of the microcontroller Is initialised to give an interrupt after every 10 ms. A real time clock is generated using the interrupt. Also the display is refreshed during the interrupt service routine. For real-time systems battery backup is very essential, because power failure affects the time keeping. In interrupt service routine, the availability of power supply is checked. If the power is available, displays are refreshed and the timer operates normally. However, during the power-failure period, displays are off and system is taken to low power mode. In this mode only the timer part of the microcontroller remains activated while operations of all other peripherals are suspended. This conside - rably reduces the power consumption. When the supply gets restored, the controller starts operating in normal fashion.

CIRUIT OPERATION
When the power is switched on, the display shows 12.00. Two settings are required in the timer: (a) setting of real time and (b) setting of bell operating timings. For setting real time clock Time key is used, while for setting bell timings Bell key is used. Storing of real time. To store real time, say, 05:35 p.m., flip Run/Set key (S6) to set mode. The display will show 0.000. Press Time key. Further pressing of Time key
DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 65

CONTROLLER BASED AUTOMATIC BELL

will in crement the data, like 0.000, 1.000, 2.000, and thereafter it will repeat 0.000, etc. To select the digit, press Digit Advance. This stores the present digit and the next digit is selected as indicated by the decimal pointer. Data is stored in 24-hour format. The time to be stored is 17.35, of which the first digit will be 1.000. The second, third, and fourth digits can be stored in similar fashion. After the fourth digit, press Digit Advance key once more. The display will show 1735(with no decimal). Now press Store to store the data. Storing of bell timings. The procedure to store bell operating timings is similar to that of setting real time. The only difference is that here data is changed by Bell key in place of Time key. Any number of bell timings (<20) can be stored in the same fashion. If the number of bell operating timings exceeds 20, the timer will not accept any new bell timing until one of the previously stored timings is deleted. Deletion of bell operating timings. For deleting a particular timing, first store this timing using the steps given above. Then press Delete key to delete the specific data from the memory. Display of real time. If Run/Set key is taken to run mode, real time will be displayed. Checking of bell operating times. For checking the bell operating times, press bell key in Run mode only. The stored bell operating timings will be displayed one by one with a delay of 5 seconds between two consecutive timings.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

66

CONTROLLER BASED AUTOMATIC BELL

PROGRAM
#include<reg68.h > void main() int c=0,i; init(); { int c=0,I; int (); p11=0;p12=0;p13=0;p14=0;p15=0;p16=0;p17=0;p18=0; time(00,00) while(1) { p15=p11 p16=p12 p17=p13 p18=p14 if(p11-1) { Display(time); For(i=0;i<=60;i++) Delay() DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 67

CONTROLLER BASED AUTOMATIC BELL

} If(p12=1) { Display(time); Display(00,00); For(i=0;i<=20;i++) Delay(); } } }

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

68

CONTROLLER BASED AUTOMATIC BELL

******************* pin assignment code************************** #include<reg68.h> #include<stdio.h> #define sevensegmentsbit p1=P0; sbit p11=P0^7; sbit p12=P0^6; sbit p13=P0^5; sbit p14=P0^4; sbit p15=P0^3; sbit p16=P0^2; sbit p17=P0^1; sbit p18=P0^0; sbit VB1=P2^0; sbit VB2=P2^1; sbit VB3=P2^2; sbit VB4=P2^3; sbit IND=P2^4; sbit RS=P2^5; sbit RW=P2^6; sbit EN=P2^7; DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 69

CONTROLLER BASED AUTOMATIC BELL

************************ delay************************************ void delay(); void init(); void commdwrite(int datad); void ready(); void display(data ,int); void delay() { int i; for(i=0;i<30000;i++); for(i=0;i<30000;i++); } void init() { P0=0xFF; P1=0x00; } //make as input port //serial

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

70

CONTROLLER BASED AUTOMATIC BELL

******************************* comment code******************** Void init() { commdwrite(0x3c); commdwrite(0x0C); commdwrite(0x06); commdwrite(0x01); } Void commdwrite(int datad) { ready(); sev=0x00; sev=datad; RS=0; RW=0; EN=1; EN=0; } //choose cmd //write //make as op

void datawrite(char datad) { DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI 71

CONTROLLER BASED AUTOMATIC BELL

ready(); sev =0x00;//make as op sev=data; RS=1;//choose data EN=1; EN=0; } void ready() { EN=0; Sev =0xff; RS=0; While(wait==1) } //20 //19

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

72

CONTROLLER BASED AUTOMATIC BELL

FLOW CHART
START

DATA

TIM E

TIM E

INCREMENT B

DELETE A STORE

STOP

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

73

CONTROLLER BASED AUTOMATIC BELL

ALGORITHM

Step 1: start the program Step 2: display the data or input the time Step 3: set mode for time or bell Step 4: increment time or bell set mode Step 5: time set mode true go to option A Step 6: time set mode false go to option B Step 7: stored the program Step 8: continue rotate the functions option C Step 9: stop the program

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

74

CONTROLLER BASED AUTOMATIC BELL

CHAPTER 5
CONCLUSION

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

75

CONTROLLER BASED AUTOMATIC BELL

BIBILIOGRAPHY
BOOKS Principals of electronics, D. Roy Choudhry Printed Circuit Boards Design And Technology, Walter C Boss Hart Electrical Measurements Fundamentals Concepts Applications, Martin U Reissland

Linear Integrated circuits, D. Roy Choudhry Surtell, Tim (2001). Electronics in Meccano. 555 Timer Circuits - the Astable, Monostable and Bistable Hewes, John (2010) 555 and 556 Timer Circuits The Electronics Club

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

76

CONTROLLER BASED AUTOMATIC BELL

WEB SITES

www.google.com www.datasheets.com http://en.wikipedia.org/wiki/The_Bell_(magazine) www.datasheetscatelog.com www.wikipedia.com www.encyclopedia.com www.answer.com www.electronics4u.com http://www.ehow.com/facts_5769892_principles-npn-transistor

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

77

CONTROLLER BASED AUTOMATIC BELL

CONCLUSION
The designed equipment is working properly. And it applicable to the schools, collages, more educational institutions, offices, factories, and etc.. It can be enhanced to use it for many more applications in the future without any major modifications. This project was a over all success. The specifications originally suggested were met, and others were added to future improve the design and functioning of the device. In this project modify the more applications using a PIC controller.

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

78

CONTROLLER BASED AUTOMATIC BELL

DEPARTMENT OF E & C (2008 2011) |SHASC, KILAKARAI

79

You might also like