This action might not be possible to undo. Are you sure you want to continue?
Each and every part of our life is somehow linked with the embedded products. Embedded systems are the product of hardware and software co-design. Embedded system is becoming an integral part of Engineering design process for efficient analysis and effective operation. From data analysis to hardware work, everywhere embedded products are the main interest because of its reliability and time bound perfection. Due to time complexity in electronic aspects embedded systems have become a major part of our daily life. This project describes the design of an embedded system for the “MCROCONTROLLER BASED DAM CONTROL SYSTEM”. Personal Computer based electrical appliances control is an interesting Personal Computer based project, mainly useful for industrial applications, home automation, and supervisory control applications. This project gives exact concept of interfacing a high voltage electrical device or DC / AC motor to high sensitive personal computer system. We are using RS232 as the communication medium between personal computer and controller. We are controlling the dc motor by sending signals from the personal computer to controller. This project uses regulated 5V, 500mA power supply, LM7805 three terminal voltage regulators for voltage regulation. Full wave rectifier is used to rectify the ac output of secondary of 230/12V step down transformer. Water level in a dam needs to be maintained effectively to avoid complications. This is generally performed manually which requires full time supervision by the operators & have fairly large staff complements. Moreover, the quantity of water released is hardly ever correct resulting in wastage of water & it is impossible for a man to precisely control the gates without the knowledge of exact water level and water inflow rate. The main objective of this project is to develop a mechatronics based system, which will detect the level of water and thereby the movement of gates can be controlled in a real-time basis which offers more flexibility. This system consists of a set of sensors connected to a stepper motor through an 8-bit microcontroller (AT89S52). The water level is detected based on the feedback from the mechanism used. Based on this data, the level of dam gate can be controlled using a stepper motor via personal computer.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM
CHAPTER 1: INTRODUCTION TO MICROCONTROLLERS
1.1 What is a Microcontroller?
A Microcontroller is a computer-on-a-chip or a single-chip computer that contains the processor (the CPU), non-volatile memory for the program (ROM or flash), volatile memory for input and output (RAM), a clock and an I/O control unit. Micro suggests that the device is small and controller tells that the device might be used to control objects, processes or events. Another term is Embedded Microcontroller tells that it support circuits are often built into or embedded in the devices for control. You find microcontroller in all kinds of things never days. It is used for measures, controls, stores or displays information by placing microcontroller inside any device. The largest single use for microcontroller in automobiles-car manufactured today includes at least one microcontroller for engine control and more to control additional systems. In desktop computer, you may find microcontrollers inside keyboards, modems, printers, and other peripherals. In test equipment, microcontrollers make things easier to store measurement, to create and store user routines, and to display messages and waveforms. Consumer products like cameras, video recorders, compact-disk players, and ovens. And they are so many applications where we use microcontrollers. A micro controller is similar to the microprocessor inside a personal computer. Examples are Intel‟s 8086, Zilog‟s Z80. Both microprocessors and microcontrollers contain CPU. The CPU executes instructions that perform the basic logic, math, and data moving functions of a computer. To make a complete computer, a microprocessor require memory for storing data and programs, and I/O interfaces for connecting external devices like keyboard and displays. In contrast, microcontrollers are a single chip computer because it contains memory and I/O interfaces in addition to the CPU. It tends to limit the amount of memory and interfaces that can fit on single chip, microcontrollers tend to be used in smaller system. Examples of popular microcontrollers are Intel‟s 8052, 89C052, Motorola‟s 68HC11 and Zilog‟s Z8.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM
1.2 History: In January 1975 issue, Popular Electronics magazine featured an article describing the Altair 8800 computer that was the first microcomputer build and programs themselves. The basic Altair included no keyboard, video display, disk drives, or other elements essential for personal computer. Flipping toggle switches on front panel programmed its 8080 microprocessor. Altair‟s usability occurred when small company called Microsoft offered a version of different programming languages for it. Of course, Microsoft has become an enormous software publisher, and a typical personal computer now includes a keyboard, video display, disk drives, and Megabytes of RAM. There‟s no longer any need to build a personal computer from scratch. A personal computer like Apple‟s Macintosh or IBM‟s PC is a general-purpose machine, since you can use it for many applications- Word processing, spreadsheets, computer-aided design and more. But along with cheap, powerful, and versatile personal computers has developed a new interest in small, customized computers for specific uses. Each of these small computers is dedicated to one task or a set of closely related tasks. At core of many of these specialized computers is a micro controller. The computer‟s program is typically stored permanently in semiconductor memory such as ROM or EPROM. The interfaces between the microcontrollers and the outside world vary with the application, and may include a small display, a keypad or switches, sensors, relays, motors, and so on. These small, special purpose computers are sometimes called single-board computers or SBC‟s. Now, micro controllers have become the part and parcel of today‟s world. More and more advanced featured microcontrollers.
The prime use of a microcontroller is to control the operation of a machine using a fixed program that is stored in ROM and that does not change over the lifetime of the system. Like a microprocessor. performs limited calculations on that data. a microcontroller is a general purpose device.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 1. parallel I/O.SUNILKUMAR (9666822581) . as many as possible. and a clock circuit. counters. PC. hopefully. These instructions work in a hardware M. and control its environment based on those calculations.1: A basic block diagram of a typical Microcontroller 1.3 A block diagram of the Microcontroller: Figure 1. The microprocessor design accomplishes this goal by having a very flexible and extensive repertoire of multi-byte instructions. but one that is meant to read data. and registers. serial I/O. SP. It also has added the other features needed to make a complete computer: ROM.4 Micro-Processor CPU: The design incorporates all of the features found in a micro-processor CPU: ALU. RAM. The design approach of the microcontroller mirrors that of the microprocessor: make a single design that can be used in as many applications as possible in order to sell.
The architecture features working registers that can be programmed to take part in the memory access process.SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM configuration that enables large amounts of memory and I/O to be connected to the address and data bus pins on the integrated circuit package. or larger.2: pin diagram of 8051 microcontroller M. The pins that connect the microprocessor to the external memory are unique. The microcontroller design uses a much more limited set of single and double-byte instructions that are used to move code and data from internal memory to the ALU. capable of having several different functions depending on the wishes of the programmer. The microcontroller is concerned with getting data from and its own pins. Many instructions are coupled with pins on the integrated circuit package. and the instruction set is aimed at expediting this activity in order to improve throughout. the architecture and instruction set are optimized to handle data in bit and byte size. sizes. the pins are “programmable”that is. Much of the activity in the microprocessor has to do with moving code and data to and from external memory to the CPU. each having a single function. The pin diagram of the 8051 shows all of the input/output pins unique to microcontrollers: Figure 1. Data is handled in byte.
the microprocessor must have many additional parts to be operational. M. The microcontroller can function as a computer with the addition of no external digital parts. Microprocessors may have one or two types of bit handling instructions. microcontrollers may have one or two. The microcontroller is concerned with rapid movement of bits with in the chip.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM The following are some of the capabilities of 8051 microcontroller: Internal ROM and RAM I/O ports with programmable pins Timers and counters Serial data communication The 8051 architecture consists of these specific features: 16 bit PC &data pointer (DPTR) 8 bit program status word (PSW) 8 bit stack pointer (SP) Internal ROM 4k Internal RAM of 128 bytes 4 register banks. 1. each containing 8 registers 80 bits of general purpose data memory 32 input/output pins arranged as four 8 bit ports: P0-P3 Two 16 bit timer/counters: T0-T1 Two external and three internal interrupt sources Oscillator and Clock circuits.5 Comparing Microprocessors and Microcontrollers: The contrast between a microcontroller and a microprocessor is best exemplified by the fact that most microprocessors have many operational codes (op-codes) for moving data from external memory to the CPU.SUNILKUMAR (9666822581) . microcontrollers will have many. To summarize the microprocessor is concerned with rapid movement of code and data from external address to the chip.
Define the task. 2. Define the task: Every project begins with an idea or a problem that needs a solution i. how can I monitor light intensity at different locations and times of find the best location for a solar collector? Or how can I automate the process of drilling printed.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 1. logic. 1. full-screen M. Inside. But however you go about it. Since basic function microcontrollers are performing arithmetic. how does u know that this idea is suitable for a microcontroller. 4.. You may begin writing your program before you build the circuits or you may build and test some of the circuits before you start programming. Design and build the circuits. but modern fabrication processes allow thousands of these to fit on a single chip. a computer is the way to go when the circuits must make complex decisions or deal with complex data. On the other end. microcontrollers are little more than a carefully designed array logic gates and memory cells. Test and debug. animated display for a store window? Once you know what to accomplish.SUNILKUMAR (9666822581) . and will changes its output accordingly. and program branching functions-commonly useful in many applications. But it require many small-scale chips to build a circuit that stores a series of values representing sensor outputs and times they occurred and display easily. data-moving. a simple AND gate can easily decide whether or not two inputs are both valid logic highs. or whether you should use a full desktop computer? Then a system with keyboard. Sometimes the steps won‟t follow exactly in this order. To see what‟s involved in each step. In this type of applications microcontrollers in comes handy. let‟s look at each in more detail.e.circuit boards? Or how can I create a computer-controlled. each of the above steps is part of the process. Write the controls program. In general. 3. you need to determine whether that idea is been required to computer.6 Project steps: Putting together a microcontroller‟s project involves several steps: 1. For example.
and notebook-size computers are available with solid-state. but 4-bits. other hardware. Some 32-bit microcontrollers are as capable as desktop systems. Design and building: When you‟re ready to design and build the circuits for a project. M. and disk drives makes sense. and 32-bits architectures are also available. and solid-sate memory (no disk drives) can often do the job. diskless storage. and with varying amounts of RAM and other features. chance are that you can use any of several devices for a specific project.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM display. a microcontroller with perhaps a keypad. you‟ll usually find ma selection of family members. So there‟s something for everyone. small display. 16-bits. with less expense and smaller size. the 8052. each with different combination of options. recently the two extremes have been meeting. For simpler designs. You can select the version that best suits your system‟s requirements. 2. For example. there are several ways to proceed. And also expansion cards. but you can also use a kit or assembled broad as a base.SUNILKUMAR (9666822581) . adding only the interfaces and programming your application requires and you can also build yourself. with a higher number of bits generally including a faster or more powerful chip. Choosing a chip: Does it matter which microcontrollers chip you use? All microcontrollers contain CPU. You can buy an assembled single-board computer. Within each device. In fact. Eight-bit chips are popular for simpler design. Microcontrollers are also characterized by how many bits of data they process at once.BASIC is a member of the 8051 family of microcontrollers which includes chips with program memory in ROM or PRTOM. You can design your circuits from scratch. and software are now available for those who want to use desktop computer for monitoring and control tasks.
The opcodes perform basic functions like adding. but because it‟s cheaper than a windowed IC. moist microcontroller circuits store their programs on-chip. logic operations. All microcontrollers have a defined instruction set. but quickly becomes tedious. rather than a byte at a time. The program memory may be in the microcontrollers chip. If each socket must operate independently of others. EPROM. the instruction 0010 0110 tells to add the values in two locations. The binary instructions are also known as operation codes or opcodes for short.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Power consumption is another consideration. RAM. Control circuits often require reading or changing single bits of input or output. rather than reading and writing a byte at a time. compare. Options for storing programs: Another consideration in circuit design is how to store programs. which consists of the binary words that cause the CPU to carry out specific operations. so you can‟t erase its contents. or a separate component. For one-of-kind projects for small-volume production. Several techniques available for programming EPROM”s and other memory chips. it‟s a good choice when you finished the program and device is ready. a microcontroller might use the eight bits of an output port to switch power to eight sockets.SUNILKUMAR (9666822581) . especially for battery-powered systems. or battery-backed. Chips manufactured with CMOS process usually have lower power consumption than those manufactured with NMOS process. a way is needed to change each bit without affecting the others. or field-programmable. clear. With a manual programmer. It is acceptable for short programs. copy. subtraction. PROM has long been the most popular method of program storage. nonvolatile (NV). ROM. For example. and flash EPROM. Instead of using disk storage. This type has no windows. and controlling program branching. or perform other logic operations on single bits of data. Some microcontrollers contain a one time-programmable (OTP). moving and copying data.manipulation (also called Boolean) opcodes that easily allows to set. For example. Other options include EEPROM. Many microcontrollers include bit. you flip switches to toggle each bit and program the EPROM byte by byte. In EPROM programmer can M.
ROM‟s are cost-effective when you need thousands of copies of a single program. EEPROM and NVRAM. You can program NVRAM infinite no of times with the only limitation being battery life. switches. high cost. You can easily increase the available I/O by adding support chips. whose contents can change. and a limited no. of times that can be reprogrammed (typically 10. I/O requires design. but most flash devices erase all at once or byte-byte like EEPROM. When power is removed from the circuit.SUNILKUMAR (9666822581) . control circuits. M. Limitations of EEPROM include slow speed. save it to disk and store the program in a few steps. and convenience as well as price range.000). NVRAM typically includes a lithium cell. 000 to 100. program length. keypads. Some of other storing programs are EEPROM’s are much like EPROM except that they are electrically any ultraviolet sources are required. assembly language. Unlike EPROM. relays and displays. Most microcontrollers include some RAM. Flash EPROM is electrically erasable. Writing the controls programs: When its time to write program that controls your project. 3. like EEPROM. Most microcontrollers have ports for interfacing to the world outside the chip. the options include using machine code. ROM.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM write program. Most system require interface to things like sensors. Other memory: Most systems also require a store way for temporary use like RAM. lithium cells takes over and preserves the information in RAM for 10 years or more. or a higher-level language. typically a few 100bytes. and RAM encapsulated in a single IC package. Some Flash EPROM‟s requires special programming voltages. cant change. I/O options: Finally. Which programming languages you use depend on things like desired execution speed. ROM‟s must be factory-programmed and once programmed. The contents of the RAM disappear when you remove power the chip.
The mnemonics are easier to remember than the machine codes. Higher-level language: A disadvantage to assembly language is that each device family has its own set of mnemonics. Higher-level languages also simplify programming by allowing you to do in one or a few lines what would require many lines of assembly code to accomplish. Interpreters and compilers: Interpreter‟s and compilers are two forms of higher-level languages. For short programs. you need some ways of translating assembly-language programs into machine code. and is easier to remember than its binary code (11000011). the binary instruction that causes the CPU to perform the operations. creating a new. M. executable that the computer runs directly. in the 8052‟s assembly language. where abbreviation called mnemonics (memory aids) substitute for the machine codes. To get around this program. Pascal. such as formatting the program code and creating a listing both the machine. while a compiler translates only once. you can hand assemble or translate the mnemonics into machine codes. Forth. Another option is assemble. without re-translating. For example.SUNILKUMAR (9666822581) . so you have to learn a new vocabulary for each family. Most assemblers provide after features.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Machine code: The most fundamental program form is machine code. An interpreter translates a program into machine code each time the program runs. the mnemonic CLR C means clear the carry bit. Assembly language: One step removed from machine code is assembly language. FORTRAN. which is software that runs on a desktop computer and translates the mnemonics into machine code.code assembly-language versions of a program side-by-side. Since machine code is ultimately the only language that a CPU understands. higher-level languages like C. and BASIC follows a standard syntax.
and observes the results. In other words. Testing and debugging: After you have written a program. repeating as many times as necessary until the system is operating properly. Using the abilities of the monitor program. and a serial link to a personal computer. it‟s time to test it and find correct mistakes to get it work properly. so you can more easily monitor what the circuits and program are doing at each step. without a separate compiler or assembly. Development systems: Another option is to use development system. install the EPROM in your system. which is a program stored in EPROM or other memory in the microcontroller system.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM As interpreters are very convenient for shorter programs where execution speed is not critical. A typical development system consists of a monitor program. then run the program. Easy debugging and troubleshooting can make a big difference in how long it takes to get a system up and running. pausing after each step. In single stepping. setting breakpoints. you can use PC‟s to program a microcontroller. Each device family requires its own interpreter or compiler to translate the higher-level code into the machine level code. The process of ferreting out correcting mistakes is called debugging. Testing in EPROM: One way is to burn your program into EPROM. and retry as often as necessary until the program is working properly. If problems occur you modify he program. A compiler is a good choice when a program is long or has to execute quickly. An interpreter language. you run the program one step at a time. Most development systems also allow single stepping. you can run your program code immediately after you write it. 4. erase and reburn the EPROM and try again. and viewing and changing the data in memory. A breakpoint is a program location where the program stops executing and waits for M. modify it.SUNILKUMAR (9666822581) . You have several options. run the program. you can load your program from personal computer into RAM on the microcontroller system.
and usually provides the abilities of a development system as well. and single step or set breakpoint to stop program execution at a desired program location or condition. M. Simulators: Another development tool is a simulator. an emulator lets you control program execution and monitor what happens at each program step. You can look “inside” the simulated chip. Microprocessor emulators typically are expensive.SUNILKUMAR (9666822581) . Emulators: An in-circuit emulator (ICE) is hardware that replaces the microprocessor in question by plugging into the microprocessor‟s socket on the device you want to test. you can get a program working properly. Like simulator.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM a command to continue. You can set breakpoints at critical spots.response and timing characteristics. especially interrupt. you can view or change the contents of memory or perform. In this way. observe the contents of internal memory. At any breakpoint. which is software that runs on a desktop computer and uses the video display to demonstrate what would happen if a specific microprocessor or microcontroller were to run a particular program. One of the drawbacks is that they cant mimic all features of the chip of interest. A ROM emulator is a lower-cost option that simulates an EPROM for program storage.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM CHAPTER 2: STEPPER MOTOR 2. distance. There are numerous types of motion control systems. The simplest way to think of a stepper motor is a bar magnet and four coils. “The stepper motor is an electromagnetic device that converts digital pulses into mechanical shaft or spindle rotation”. or contacts. The sequence of the applied pulses is directly related to the direction of motor shafts rotation. Brushless Servo and more. in electronic terms. means to accurately control the movement of an object based on speed. DC Brush. Coil “B” is then turned off and coil “C” turned on. a “stepper motor consists of a magnet and coils of wire. A B C D Figure2.1: linear stepper motor basic principle. The shaft or spindle of a stepper motor rotates in discrete step increments when electrical command pulses are applied to it in the proper sequence. When the current flows through coil “A” the magnet is attracted and moves one step to the right.1 INTRODUCTION TO STEPPER MOTORS: Motion control. The motors rotation has several direct relationships to these applied input pulses. The speed of the motor shafts rotation is directly related to the frequency of the input pulses and the length of rotations applied. This document will concentrate on Step Motor technology. Whereas conventional motors spin continuously. The magnet moves another step to the right and soon.SUNILKUMAR (9666822581) . but the magnet is cylindrical and rotates inside the coils. load. Stepper Motor. Linear Step Motor. including. It has no brushes. a stepper motor moves around one small step at a time (hence the name). A similar process occurs inside the stepper motor. In order to make a stepper motor rotate you must turn on each coil in the M. A stepper motor is a marvel in simplicity. Basically it‟s a synchronous motor with the magnetic field electronically switched to rotate the armature magnet around. inertia or a combination of all these factors. Like many conventional electric motors.
the indexer is typically required to perform many other sophisticated command functions. speed of pulsating the coils in a sequence. The indexer (or Controller)) is a microprocessor capable of generating step pulses and direction signals for the driver. There are numerous types of drivers. PLC or Dumb Terminal): Figure2. The motor will continue to rotate as long as you continue the sequence.e. often with same type of user interface (Host Computer. The Driver (or Amplifier) converts the indexer command signals into the power necessary to energize the motor windings. or phases. The speed of rotation is determined by the frequency of the pulses to the coils i.3: General stepper motor system.2: General arrangement of windings inside a stepper motor A stepping motor system consists of three basic elements. In addition. Pulsing the coils.. with different M.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM correct sequence. sequentially will cause the motor to rotate clockwise or counterclockwise depending on the sequence chosen.SUNILKUMAR (9666822581) . Figure 2.
2 CONSTRUCTION AND TYPES OF STEPPER MOTORS: Stepping motors are electromagnetic. The most common frame sizes are 11. To determine this we must apply the relationship P=V*I.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM current/amperage ratings and construction technology. and 42.R) stepping motor. Variable reluctance (V. Stepper motor can also be classified based on their size and power. 17. 34. Hybrid stepper motor. M. Power: power levels for the stepper motors range typically from few hundred mill watts (for small motors) up to several watts (for larger motors). 2. Stepping motors are simple to drive in an open loop configuration and their size provides excellent torque at low speed. Although various types of stepping motor have been developed. incremental devices which convert digital pulses into mechanical rotation. 23. The amount of rotation is directly proportional to the number of pulses and the speed of rotation is relative to the frequency of those pulses. so when designing a Motion Control System the driver selection process is critical. Permanent magnet stepper (tin can) motor and 3. a size 23 stepper motor has a body size of approximately 2. For example. 2. Classification is based on the use of permanent magnets and/or iron rotors with laminated steel stators in their construction. The max power dissipation of a stepper motor is determined by the thermal limits of the windings in the motor. Size: Generally stepper motors are classified according to their frame size (body diameter). rotary.SUNILKUMAR (9666822581) . they all fall into three basic categories. The three types of stepping motors are: 1.3 inches. Not all drivers are suitable to run all motors.
Current applied to pole A through the motor winding causes a magnetic attraction that aligns the rotor ( tooth) to pole A. it has no detent torque. The variable reluctance or V.SUNILKUMAR (9666822581) . The stator of variable reluctance stepper motor is similar to that of permanent magnet stepper motor. such as the positioning of the micro slide.R motor consists of a rotor and stator each with a different number of teeth. The torque is developed due to large difference in magnetic reluctances that exist between direct and quadrature axis. As a result. the rated torque for a given frame size is restricted. Although the torque to inertia ratio is good.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 2. Therefore small frame sizes are generally used and then very seldom for industrial applications. this process will continue with pole C and back to A in M. The variable reluctance motor in the above illustration has four “stator pole sets” (A. the motor can move without constraint or “detent” torque.2.. energizing stator pole B causes the motor to rotate 15 deg in alignment with pole B. This type of construction is good in non industrial applications that do not require a high degree of motor torque. B.1 VARIABLE RELUCTANCE STEPPER MOTOR: The variable reluctance motor does not use a permanent magnet.4: Cross section of the variable reluctance stepper motor.e. Figure 2. C). set 15deg apart. The stationary field developed by the direct current in some stator coil tends to develop a torque which causes the rotor to move position where the reluctance of the flux path is minimum. Since the rotor does not have a permanent magnet it spins freely i.
It is a relatively low speed. Reversing the procedure (C to A) would result in counter clockwise rotation. Figure2. such as a line printer print wheel positioned. 2.2 PERMANENT MAGNET STEPPER MOTOR: The permanent magnet motor also referred to as “can-stack” motor has. 5: Variable reluctance stepper motor.6: Crosssection Through A Permanent Magnet M.2.SUNILKUMAR (9666822581) . as the name implies b a permanent magnet rotor. low torque device with large step angles of either 45 or 90 deg. Its simple construction and low cost make it an ideal choice for non industrial applications.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM clockwise direction. Figure 2.
Due to the manufacturing techniques used in constructing the stator they are also sometimes known as „claw pole‟ motors. The rotor of such a motor has even number of poles made of high retentively steel alloy (Alnico). 2. Both rotor and stator may employ salient or non salient pole construction usually the stepper motors have in small stepping angles are of non salient pole construction Unlike the other stepping motors. motor. the PM motor rotor has no teeth and is designed to be magnetized at a right angle to it's axis.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM In its simplest form the motor consists of a radially magnetized permanent magnet rotor and a stator similar to the V. and tin-can designs. 90 degree PM motor with four phases (A-D). Originally developed as a slow speed synchronous PM motor its construction is a combination of the V. with the opposing teeth off-set by half of one tooth pitch (fi8) to enable a high resolution of steps.7: Permanent magnet stepper motor. Figure 2. The single stack rotor contains two toothed pole pieces separated by an axially magnetized permanent magnet. Although it operates at fairly low speed the PM motor has a relatively high torque characteristic.3 HYBRID STEPPER MOTOR: The hybrid is probably the most widely used of all stepping motors.R.SUNILKUMAR (9666822581) .2. The above illustration shows a simple. Applying current to each phase in sequence will cause the rotor to rotate by adjusting to the changing magnetic fields. M.R. The hybrid consists of a multi-toothed stator and a three part (single stack).
SUNILKUMAR (9666822581) . Standard hybrid motors have 200 rotor teeth and rotate at 1.9ºand 3.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Hybrid motors combine the best characteristics of the variable reluctance and permanent magnet motors. Figure 2. hybrid motors are used in a wide variety of industrial applications. Other hybrid motors are available in 0.6º step angle configurations. M. They are constructed with multi-toothed stator poles and a permanent magnet rotor.8: Exploded Drawing Illustrating The Tooth Pitch Off-set Because they exhibit high static and dynamic torque and run at very high step rates.80 step angles.
switching simply reverses the current flow through the winding thereby changing the polarity of that phase. As illustrated.1 BIPOLAR WINDING: The two phase stepping sequence described utilizes a “bipolar coil winding”.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Figure 2.9: Hybrid Stepper Motor 2. The output stage of a typical two phase bipolar drive is further illustrated in the electrical schematic diagram and stepping sequence in figure 5. BIPOLAR M. Each phase consists of a single winding.3 WINDINGS OVERVIEW OF STEPPER MOTOR: 2. electromagnetic polarity is reversed. By reversing the current in the windings.3.SUNILKUMAR (9666822581) .
This consists of two windings on a pole connected in such a way that when one winding is energized a magnetic north pole is created. i.2 UNIPOLAR WINDING: Another common winding is the unipolar winding. The design allows for a simpler electronic drive.e.. from the drive to the coils is never reversed. This is referred to as a unipolar winding because the electrical polarity. UNIPOLAR M.3.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM BIPOLAR STEP 1 2 3 CW 4 1 Q2-Q3 ON OFF OFF ON ON Q1-Q4 OFF ON ON OFF OFF Q6-Q7 ON ON OFF OFF ON Q5-Q8 OFF OFF ON ON OFF CCW Figure 2. The stepping sequence is illustrated in figure 6. when the other winding is energized a south pole is created.10: Bipolar winding arrangement 2. current flow.SUNILKUMAR (9666822581) .
M. UNIPOLAR STEP 1 2 3 CW 4 1 ON ON OFF OFF OFF ON ON OFF CCW Q1 ON OFF OFF Q2 OFF ON ON Q3 ON ON OFF Q4 OFF OFF ON 2.11: Unipolar winding arrangement However. Micro-step.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Figure 2. and 3. there is approximately 30% less torque available compared to a bipolar winding. Half step.4 STEPPER MOTOR SWITCHING SEQUENCE: Switching sequences for stepper motor are: 1. Torque is lower because the energized coil only utilizes half as much copper as compared to a bipolar coil. Full step 2.SUNILKUMAR (9666822581) .
which is called a full-step switching sequence. Each of the windings is tapped at one end and they are connected through a resistor to the negative terminal of the power supply. The diagram for the motor shows the same four windings that were discussed in the theory of operation the previous section. During the third step of the sequence. The table shows the sequence for energizing the coils. SW2and SW4 are on and the other two are off. The diagram shows four switches with four separate amplifiers.SUNILKUMAR (9666822581) .4. . then the same four steps are repeated again. During the fourth step of the sequence. This sequence continues through four steps. SW2 and SW3 are on and the other two are off.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 2.12: (a) Diagram of switching circuits for stepper motor (b) The switching sequence for a four step (full step) switching mode M. switches SW1 and SW3 are on and the other two are off. These steps cause the motor to rotate one step or tooth on the rotor when a pulse is applied by closing two of the switches. Figure 2. Figure below shows a switching diagram and a table that indicates the sequence for the four switches used to control the stepper motor.1 FULL STEP MODE: The stepper motor uses a four switching sequence. During the second step of the sequence. During the first step of the sequence. switches SW1 and SW4 are on and the other two are off.
2 HALF STEP MODE: Another switching sequence for the stepper motor is called an eight-step or half. The way the controller gets the motor to reach the halfstep is to energize both phases at the sane time with equal current.SUNILKUMAR (9666822581) . 2. The half-step switching sequence requires a special motor controller.step sequence. c and d show the movement of rotor in sequence Figure 11 shows the position of the poles during each step when the motor is in full-step mode.8 deg. and SW2 and SW4 are off. The sequence for the first step is the same as the full-step sequence. This means that a 200-step motor. The diagrams a.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Figure 2. M. which has a resolution of 1. but it can be used with a standard hybrid motor.4. In this sequence the first step has SW1 and SW3 on.13: The diagram that shows the position of each pole while the motor is in full step mode. The second step has SW1 on and all of the remaining switches are off. b.9 deg. will have a resolution of 400 steps and 0. The switching diagram for the half-step sequence is shown in fig12. This configuration of switches causes the rotor to move an additional half-step. The main feature of this switching sequence is that you can double the resolution of the stepper motor by causing the rotor to move half the distance it does when the full-step switching sequence is used.
4. The current can be adjusted so that it looks similar to a sine wave.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM The third step has SW1 and SW4 on. 2. Figure 2.14: The stepper motor with its switches. which is the same as step 2 of the full-step sequence. The fact that the current to each individual phase increase and decreases like a sine wave and that is always out of time with the other phase will allow the rotor to reach hundreds of intermediate steps. The amount of resolution is also limited by the number of physical poles that the rotor can have.4. Figure 15 shows the waveform for the current to each phase. The amount of resolution (number of steps) can be increased by manipulating the current that the controller sends to the motor during each step. and sw2 and SW3 are off. The sequence continues for eight steps and then repeats. In fact it is possible for the controller to reach as many as 500 M. 6. and 8 are added to the full-step sequence to create the half-step moves. From this diagram you can see that the current sent to each of the two windings is timed so that it is always out of phase with each other. (b) the switching sequence for the eight step input (half step mode) The main difference between this sequence and the full step sequence is that steps 2.3 MICRO STEP MODE: The full-step and half-step motors tend to be slightly jerky in their operation as the motor moves from step to step.SUNILKUMAR (9666822581) .
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM
micro steps for a sequence full-step sequence, which will provide 100, 00 steps for each resolution. The voltage sent to the motor is now a sine wave. The motor for this type of application is generally a permanent magnet brushless DC motor. When the sine wave is sent to the motor at 60hz, it will cause the motor shaft to rotate at 72rpm. The motor windings will require capacitor to be wired in series for this type of application.
Figure 2.15: Phase-current diagram for a stepper motor controller in micro step mode
2.5 PERFORMANCE CHARACTERISTICS OF STEPPER MOTOR: 1. Rotation angle is proportion to the number of input pulses. 2. Rotational speed is proportional to the frequency of input pulses. 3. Open loop system with no position feedback required. 4. Excellent response to acceleration, deceleration and step commands. 5. No cumulative position error (+ or – 5% of step angle). 6. Excellent low speed and high torque characteristics without need for gear reduction.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM
7. Inherent detent torque. 8. Bi-directional operation. 9. Can be stalled without motor damage. 10. No brushes for longer trouble free life. 11. Precision ball bearings. 12. Repetition of accurate motion or velocity profiles. 13. A holding torque at 0 speed and 14. Capability for digital control 15. Holding torque when energized. 2.6 DRIVER TECHNOLOGY OVERVIEW: The stepper motor driver receives low-level signals from the indexer or control system and converts them into electrical (step) pulses to run the motor. One step pulse is required for every step of the motor shaft. In full step mode, with a standard 200 step motor, 200 step pulses are required to complete one revolution. Likewise, in microstepping mode the driver may be required to generate 50,000 or more step pulses per revolution. Speed and torque performance of the step motor is based on the flow of current from the driver to the motor winding. The factor that inhibits the flow, or limits the time it takes for the current to energize the winding, is known as inductance. The lower the inductance, the faster the current gets to the winding and the better the performance of the motor. To reduce inductance, most types of driver circuits are designed to supply a greater amount of voltage than the motors rated voltage. 2.6.1 TYPES OF STEP MOTOR DRIVERS: For industrial applications there are basically three types of driver technologies. They all utilize a "translator" to convert the step and direction signals from the indexer into electrical
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM
pulses to the motor. The essential difference is in the way they energize the motor winding. The circuit that performs this task is known as the "switch set."
Figure 2.16: Block diagram of switch set 2.6.2 UNIPOLAR: The name unipolar is derived from the fact that current flow is limited to one direction. As such, the switch set of a unipolar drive is fairly simple and inexpensive. The drawback to using a unipolar drive however, is its limited capability to energize all the windings at any one time. As a result, the number of amp turns (torque) is reduced by nearly 40% compared to other driver technologies. Unipolar drivers are good for applications that operate at relatively low step rates. 2.6.3 R/L: R/L (resistance/limited) drivers are, by today's standards, old technology but still exist in some (low power) applications because they are simple and inexpensive. The drawback to using R/L drivers is that they rely on a "dropping resistor" to get almost 10 times the amount of motor current rating necessary to maintain a useful increase in speed. This process also produces an excessive amount of heat and must rely on a DC power supply for its current source. 2.6.4 BIPOLAR CHOPPER: Bipolar chopper drivers are by far the most widely used drivers for industrial applications. Although they are typically more expensive to design, they offer high performance
Therefore the life of the motor is simply dependant on the life of the bearing. This "chopping" effect of the supply is what maintains the correct current voltage to the motor at all times. 2. Bipolar chopper drivers use an extra set of switching transistors to eliminate the need for two power sources.SUNILKUMAR (9666822581) . Very reliable since there are no contact brushes in the motor. Precise positioning and repeatability of movement since good stepper motors have an accuracy of 3 – 5% of a step and this error is non cumulative from one step to the next. are energized to the full supply level by turning on one set (top and bottom) of the switching transistors. Additionally. The motors response to digital input pulses provides open-loop control. M.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM and high efficiency. using a bipolar chopper driver. Motor windings. The rotation angle of the motor is proportional to the input pulse.7 STEPPER MOTOR ADVANTAGES AND DISADVANTAGES Advantages: 1. 4. these drivers use a four transistor bridge with recirculating diodes and a sense resistor that maintains a feedback voltage proportional to the motor current. The sense resistor monitors the linear rise in current until the required level is reached. Current "decay" (lose over time) occurs until a preset position is reached and the process starts over. Figure 2. Excellent response to starting/stopping/reversing. 6. making the motor simpler and less costly to control.17: Bipolar chopper drive switch circuit 2. The motor has full torque at standstill (if the windings are energized) 3. At this point the top switch opens and the current in the motor coil is maintained via the bottom switch and the diode. 5.
8. for a given size than the equivalent DC/AC motor. Known limit to the „dynamic position error‟. Disadvantages: 1. If over torque. high torque at low speeds and a simple. A wide range of rotational speeds can be realized as the speed is proportional to the frequency of the input pulses. 2. rugged construction that operates in almost any environment. high reliability. Low cost.8 APPLICATIONS OF STEPPER MOTOR: Stepper motors are used in a wide variety of applications in industry. Produces much less torque. 11. 4. 12. and robotics. all knowledge of position is lost and system must be re-initialized. including computer peripherals. It can be readily interfaced with microprocessor or computer based controller. business machines. Not easy to operate at extremely high speeds. A wide range of rotational speeds can be realized as the speed is proportional to the frequency of the input pulses. 2. motion control. 10. 9. 3. Use of stepper motor in different areas: Computer peripherals Business machines Process Control Machine Tool M. which are included and machine tool applications.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 7. It is possible to achieve very low speed synchronous rotation with a load that is directly coupled to the shaft. The main disadvantage in using a step motor is the resonance effect often exhibited at low speed and decreasing torque with increasing speed.SUNILKUMAR (9666822581) . Resonances can occur if not properly controlled.
SUNILKUMAR (9666822581) . M.18: simple example of stepper motor with paper drive mechanism.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Figure 2.
With the Keil tools. source code editing. link and locate object modules and libraries. The LIBx51 Library Manager combines object modules into libraries that may be used by the linker. µVision is an Integrated Development Environment that combines project management. The Keil Software 8051 development tools listed below are programs you use to compile your C code. Throughout this project we refer to these tools as the 8051 development tools.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM CHAPTER 3: ABOUT KEIL 3. The Ax51 Macro Assembler creates re-locatable object modules from your 8051 assembly source code. LX51 supports all variants of the Cx51 Compiler and the Ax51 Assembler. M. The OHx51 Object-HEX Converter creates Intel HEX files from absolute object modules. The LX51 Extended Linker/Locator supports extended device variants and provides additional features. and debug your target program. The BL51 Linker/Locator combines re-locatable object modules created by the C51 Compiler and the A51 Assembler into absolute object modules. and program debugging in one single. they support all derivatives and variants of the 8051 microcontroller family. However. powerful environment.SUNILKUMAR (9666822581) . The Cx51 ANSI Optimizing C Cross Compiler creates re-locatable object modules from your C source code. you can generate embedded applications for virtually every 8051 derivative.1 About Keil Keil Software to provide you with software development tools for 8051 based microcontrollers. create HEX files. assemble your assembly source files.
but any level of programmer can use them to get the most out of the 8051 microcontroller architecture. DEVELOPMENT TOOLS: This chapter discusses the advantages and features of the 8052 tools available from keil software. 3. They are easy to use and guaranteed help to achieve your design goals. time-critical software projects. They are designed for professional software developer. These tools have been designed to help quick and successful completion of job. The production kits also include one year of free technical support in product updates. The tools in the evaluation kit let you generate these applications up to 2kbytes in size.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM The RTX51 Tiny Real-time Operating System that simplifies the design of complex. You may use this kit to evaluate for the effectiveness of our 8051 tools and to generate small target applications The 8052 production kits discussed in “Product overview” topic section include the unlimited versions of our 8052 tools along with this user‟s guide and the full manual set. These development tools are meant for easy user understanding and easy endurance of user. These are integrated part of this IDE (INTEGRATED DEVELOPMENT ENVIRONMENT). The EK51 Evaluation Kit includes evaluation version of our 8051 tolls along with this user‟s guide.2 Getting started and creating applications: Evaluation kits and production kits: Keil software provides two types of kits in which our tools are delivered.SUNILKUMAR (9666822581) . M. but any level of programmer can use them to get the most out of the 8051 hardware The Keil Software 8051 development tools are designed for the professional software developer.
Advanced GDI interface for software debugging in the target hardware and for connection to Keil ULINK. project manager. 3. Flash programming utility for downloading the application program into Flash ROM. program debugging. compiling.4 ABOUT THE ENVIRONMENT The µvision3 screen provides you with a menu bar for command entry. Links to development tools manuals.SUNILKUMAR (9666822581) . and windows for source files. tool bar where you can rapidly select command button. Device database for configuring the development tool setting. macro assembler. Integrated make facility for assembling. dialog box and information displays. and linking your embedded applications. µVision3 integrates all tools including the C compiler. and HEX file generator. Project manager for creating and maintaining your projects. device datasheets & user‟s guides. MENU COMMANDS. With the tool bar buttons you can rapidly execute operations. and make facility. linker/locator. µVision3 helps expedite the development process of your embedded applications by providing the following: Full-featured source code editor. windows selection and manipulation.3 U-VISION3 INTEGRATED WINDOWS DEVELOPMENT ENVIRONMENT The µVision3 IDE is a Windows-based software development platform that combines a robust editor.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 3. The commands can be M. development tool option settings. µvision3 lets you simultaneously open and view multiple source files. project maintenance. Dialogs for all development tool settings. TOOL BARS AND SHORTCUTS: The menu bar provides you with menus for editor operations. and online help. True integrated source-level Debugger with high-speed CPU and peripheral simulator.
5 ADVANTAGES: Knowledge of the processor instruction set is not required.(but not necessary). numeric conversions and floating point arithmetic. The C run-time library contains many standard routines such as: formatted output. Use of high level language such as C has many advantages over assembly language programming. Programming and program test time is drastically reduced which increases your efficiency. C51 OPTIMIZING C CROSS COMPILER: For 8051 µcontroller operations the Keil C51 Cross Compiler offers a way to program in C which truly matches assembly programming in terms of code efficiency and speed. The keil C51 is not a universal C compiler that generates extremely fast and compact code. This leads to better program structure. M. The following tables give you an overview of the µvision3 commands and the default shortcuts.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM reached also with configurable keyboard shortcuts. Programs get a formal structure and can be divided into separate functions.SUNILKUMAR (9666822581) . rudimentary knowledge of the memory structure o the 8052 CPU is desirable. Details like register allocation and addressing of the various memory types and data types are managed by the compiler. 3. The ability to combine variable selection with specific operations improves program readability Keywords and operational functions can be used that more nearly resemble the human thought process.
1 Block Diagram: Figure 4.SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM CHAPTER 4: HARDWARE MODEL 4.1 Block diagram M.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 4.2 Circuit diagram M.SUNILKUMAR (9666822581) .2 Circuit diagram: Figure 4.
SUNILKUMAR (9666822581) .3 Circuit diagram of water level indicator: Figure 4.3 Water level indicator circuit M.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 4.
The other end of the reset pin is given to the power supply of 5V. A crystal oscillator is connected between the 18th and 19th pin.12-0-12 IC 7404 IC 7408 DB9 connector Piezo-Buzzer In this circuit design microcontroller is the main component. The 20th pin is grounded. 9. A capacitor of 10µ/25V is connected between the supply and the reset button.SUNILKUMAR (9666822581) .592MHz two capacitors of 22pf are connected and the other ends of capacitors are grounded. A resistor of value 8. AT89S52 Microcontroller 7805 Regulator ULN2003 driver Stepper motor-1Kg Torque Serial port communication.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 4.2KΩ is connected between the 9th pin and ground. 8. 5. 6. The 31st and 40th pin of the microcontroller are given to the supply of 5V. 7. 2. 10.4 CIRCUIT DESCRIPTION: This circuit design for supervisory control over serial communication makes use of the following main components 1. To this crystal oscillator of 11. 4.MAX 232 & RS 232 Transformer. The 9th pin of the microcontroller is given to the reset pin. +5v GND M. 3.
receive and transmit pins of the microcontroller are connected the 9th and 10th pins of the serial communication MAX 232 respectively. M. The 8th and 7th pin i.7µ/25Vor 0.4: various connections from a ULN 2003 driver The pins 21-24.SUNILKUMAR (9666822581) .1µ are connected between 6-16.. Capacitors of value 4. The 10th and 11th pin i. Since the RS232 is not in the standard form to make it compatible with the TTL CMOS we make use of MAX232.are connected via resistors to the ULN2003 driver which drives the stepper motor. 1-3 and 4-5 pins respectively. The MAX232 is used for receiving the value from serial port and the output of which is given as input to the microcontroller.e. RIN & T2OUT are connected to the 2nd and 3rd pins of DB9 connector. The 16th pin is given to the supply and the 15th is grounded. 2-15.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Figure 4.e.
high voltage. A capacitor of value 1000µf/25v is connected between the 1st and 2nd of the regulator and a capacitor of value 100µf/25V is connected between 2nd and 3rd pin.SUNILKUMAR (9666822581) . The 3rd pin of M. 14th. The 5th pin o the RS232 is grounded. The cathodes of these two diodes are junctioned and given to the 7805 regulator. The microcontroller acts as an interface between the user instructions and the stepper motor. a 12-0-12 step down transformer is made use. The standard defines the electrical characteristics and timing of signals. In the secondary side the two terminals are given to the anodes of the IN 4007 diodes.5: Connections from max232 standard In telecommunications. and the physical size and pin-out of connectors. The 8th pin of the ULN2003 is grounded and the 13th. The 9th pin of ULN2003. In the supply circuit. RS-232 (Recommended Standard 232) is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). 5pin stepper motor.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 11 10 A t 8 9 s 5 2 Figure 4. The primary of the transformer is given to the 230V supply. the meaning of signals. It is commonly used in computer serial ports. high current Darlington transistor arrays is given a supply of 5V. 15th & 16th are connected to the 1kg torque.
When the water tank M. it outputs a low voltage. Now as both pins 9 and 10 of gate (3) 7408 are high. So it outputs a low voltage. As a result. As water starts filling the dam. its output pin 8 also goes high.SUNILKUMAR (9666822581) . so pin10 also goes high.When there is a high voltage at the input pin of the NOT gate. Similarly. When the water in the dam rises to touch the low level. Pin 2 of the gate is connected to pin 10 of gate (3B) 7408. At this time.6: circuit diagram of LM7805 voltage regulator WATER LEVEL INDICATOR CIRCUIT DESCRIPTION AND CONNECTIONS: The circuit uses five sensors to sense the different water levels in the Dam. it outputs a high voltage. the input pins of IC 7404 are pulled high via a 1-mega-ohm resistor. when water in the tank touches the half level. output of pin 8 of 7408 goes low. which indicates water level is medium. there is a low voltage at input pin 1 of 7404 and high output at pin 2.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM the regulator is given to the 5V supply. Similarly. Sensor G is connected to the negative terminal (GND) of the power supply. When the dam is empty. pin 9 of gate 7408 also goes low via gate pins 3 and 4 of IC 7404. The other four sensors (L through O) are connected to the inputs of NOT gate IC 7404. pins 13 and 12 of AND gate becomes high. a low voltage is available at the input pins of the gate and it outputs a high voltage. for a low voltage at the input pin of the NOT gate. its output also goes high. 12-0-12v Figure 4. which indicates water level at low-level. Thus the transformer step down the supply voltage of 230V to 12V is given to the input pin of voltage regulator.
The buzzer sounds to indicate that water is overflowing the tank and you need to raise the gates immediately to control overflow of water. the voltage at pin 11 of gate (7404) and pin 11 of gate 7404 goes low. Use a non-corrosive material such as steel strip for the five sensors and hang them in the water tank as shown in the circuit diagram.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM becomes full. Use regulated 5V to power the circuit. Output pin 6 of gate (7408) goes high which indicates the water tank is full. pin 11 of another gate of 7404 goes low to make output pin 10 to high.SUNILKUMAR (9666822581) . When water starts overflowing the tank. M.
the cable required is more bulky because of the number of individual wires it must contain. There may either be 5.the transmit line and the signal ground.or M. and a common signal ground wire. 6.SUNILKUMAR (9666822581) .one to send. This allows data to be transferred very quickly. however. In fact. Almost all devices transmit data using either 7 or 8 data bits. only a few wires are required. a stop bit is sent. Both receiver and the transmitter must agree on the number of data bits. one to receive. you cannot send ASCII values greater than 127. depending on the number you have selected. or 8 data bits. A stop bit has a value of 1 . Some types of serial devices support only one-way communications and therefore use only two wires in the cable . In order to be able to do this. Notice that when only 7 data bits are employed.1 SERIAL COMMUNICATION All IBM PC and compatible computers are typically equipped with two serial ports and one parallel port. A serial port sends and receives data one bit at a time over one wire.3 Communicating by Bits Once the start bit has been sent. using 5 bits limits the highest possible value to 31. After the data has been transmitted. Although these two types of ports are used for communicating with external devices. they work in different ways. as well as the baud rate. While it takes eight times as long to transfer each byte of data this way.2 Bi-Directional Communications The serial port on your PC is a full-duplex device meaning that it can send and receive data at the same time. A parallel port sends and receives data eight bits at a time over 8 separate wires. 5. Likewise. 7. 5. it uses separate lines for transmitting and receiving data.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM CHAPTER 5: SOFTWARE MODEL 5. two-way (full duplex) communications is possible with only three separate wires . the transmitter sends the actual data bits. Parallel ports are typically used to connect a PC to a printer and are rarely used for much else.
Also. and a single bit is transmitted following the data bits to indicate whether the number of 1 bits just sent is even or odd. Odd parity is just the opposite.and it can be detected correctly even if the previous data bit also had a value of 1.5 RS-232C RS-232 stands for Recommend Standard number 232 and C is the latest revision of the standard. If even parity were in effect and the binary number 1101 0110 were sent. Stop bits can be 1. 1. Since these two parity options serve no useful purpose whatsoever. While it will tell you if there is a single bit error in the character. The full RS232C standard specifies a 25-pin "D" connector of which 22 pins are used. if even numbers of bits are in error then the parity bit would not reflect any error at all. mark parity. Most of these pins are not needed for normal PC communications.5. A parity bit affords a small amount of error checking. and indeed.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM a mark state . to help detect data corruption that might occur during transmission. M. For example. For the binary value of 0110 0011 the parity bit would be 0. they are almost never used. Parity error checking is very rudimentary. When even or odd parity is being used. an additional bit called a parity bit may optionally be transmitted along with the data. 5. This is accomplished by the stop bit's duration. it doesn't show which bit was received in error. the number of marks (logical 1 bits) in each data byte are counted. space parity or none at all. most new PCs are equipped with male D type connectors having only 9 pins. The serial ports on most computers use a subset of the RS-232C standard. and the parity bit is 0 when the number of mark bits in the preceding word is an odd number. when even parity is chosen. 5. Mark parity means that the parity bit is always set to the mark signal condition and likewise space parity always sends the parity bit in the space signal condition.4The Parity Bit Besides the synchronization provided by the use of start and stop bits. then the parity bit would be 1.SUNILKUMAR (9666822581) . the parity bit is transmitted with a value of 0 if the number of preceding marks is an even number. or 2 bit periods in length. You can choose either even parity. odd parity.
and DCE stands for Data Communications Equipment. you must instead use a null modem cable. Your computer is a DTE device. The list below shows the connections and signal directions for both 25 and 9-pin connectors.SUNILKUMAR (9666822581) . These terms are used to indicate the pin-out for the connectors on a device and the direction of the signals on the pins. Table 5. You can therefore connect a DTE device to a DCE using a straight pin-for-pin connection. and are discussed later in this chapter. However. If you have trouble keeping the two straight then replace the term "DTE device" with "your PC" and the term "DCE device" with "remote device" in the following discussion.6 DCE and DTE Devices Two terms you should be familiar with are DTE and DCE. DTE stands for Data Terminal Equipment.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 5. Null modem cables across the transmit and receive lines in the cable. and DCE devices use a 25-pin female connector. The RS-232 standard states that DTE devices use a 25-pin male connector. while most other devices are usually DCE devices.1: pin connectors on a DTE device 25 Pin Connector on a DTE device (PC connection) Male RS232 DB25 Pin Number 1 2 3 4 5 6 7 8 20 Direction of signal: Protective Ground Transmitted Data (TD) Outgoing Data (from a DTE to a DCE) Received Data (RD) Incoming Data (from a DCE to a DTE) Request To Send (RTS) Outgoing flow control signal controlled by DTE Clear To Send (CTS) Incoming flow control signal controlled by DCE Data Set Ready (DSR) Incoming handshaking signal controlled by DCE Signal Ground Common reference voltage Carrier Detect (CD) Incoming signal from a modem Data Terminal Ready (DTR) Outgoing handshaking signal controlled by DTE M. to connect two like devices.
The RD (receive data) wire is the one on which data is received by a DTE device.SUNILKUMAR (9666822581) . This name can be deceiving. because this wire is used by a DCE device to receive its data.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 22 Ring Indicator (RI) Incoming signal from a modem Table 5.2: 9 pin connector on a DTE device 9 Pin Connector on a DTE device (PC connection) Male RS232 DB9 Pin Number 1 2 3 4 5 6 7 8 9 Direction of signal: Carrier Detect (CD) (from DCE) Incoming signal from a modem Received Data (RD) Incoming Data from a DCE Transmitted Data (TD) Outgoing Data to a DCE Data Terminal Ready (DTR) Outgoing handshaking signal Signal Ground Common reference voltage Data Set Ready (DSR) Incoming handshaking signal Request To Send (RTS) Outgoing flow control signal Clear To Send (CTS) Incoming flow control signal Ring Indicator (RI) (from DCE) Incoming signal from a modem The TD (transmit data) wire is the one through which data from a DTE device is transmitted to a DCE device. RTS stands for Request To Send. If the DTE device is M. The TD line is kept in a mark condition by the DTE device when it is idle. The DTE device puts this line in a mark condition to tell the remote device that it is ready and able to receive data. and the DCE device keeps this line in a mark condition when idle. This line and the CTS line are used when "hardware flow control" is enabled in both the DTE and DCE devices.
With software flow control the RTS and CTS lines are not used. DTR stands for Data Terminal Ready. The Software Wedge supports this type of flow control. The last remaining line is RI or Ring Indicator. these two lines make up what is called RTS/CTS or "hardware" flow control. Software flow control uses special control characters transmitted from one device to another to tell the other device to stop or start sending data. The complement of the RTS wire is CTS. Because most modems transmit status information to a PC when either a carrier signal is detected (i. The Carrier Detect (CD) and the Ring Indicator (RI) lines are only available in connections to a modem. which stands for Clear To Send. CD stands for Carrier Detect. Some serial devices use DTR and DSR as signals to simply confirm that a device is connected and is turned on. Together. as well as Xon/XOff or "software" flow control. When the DTE device is ready to receive more data (i. The DCE device puts this line in a mark condition to tell the DTE device that it is ready to receive the data. when a connection is made to another modem) or when the line is ringing.7 9 to 25 Pin Adapters The following table shows the connections inside a standard 9 pin to 25 pin adapter. DTR and DSR are rarely used for flow control.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM not able to receive data (typically because its receive buffer is almost full). it will place this line in the space condition. Because of this. DSR (Data Set Ready) is the companion to DTR in the same way that CTS is to RTS. it will place this line back in the mark condition. The DTR and DSR lines were originally designed to provide an alternate method of hardware handshaking. The Software Wedge sets DTR to the mark state when the serial port is opened and leaves it in that state until the port is closed. or has detected a carrier tone. if the DCE device is unable to receive data. Its intended function is very similar to the RTS line. A modem toggles the state of this line when an incoming call rings your phone. 5. M. Carrier Detect is used by a modem to signal that it has a made a connection with another modem. It would be pointless to use both RTS/CTS and DTR/DSR for flow control signals at the same time. it will put this line in the space condition as a signal to the DCE to stop sending data.e.e. after data has been removed from its receive buffer).SUNILKUMAR (9666822581) . Likewise. these two lines are rarely used.
SUNILKUMAR (9666822581) . This is not always the same as bits per second (BPS). Thus. But when considering modems. the baud rate is actually limited to a maximum of 2400 baud. and data compression techniques.3: connections inside a standard 9 to 15 pin connector 9-Pin Connector Pin 1 DCD Pin 2 RD Pin 3 TD Pin 4 DTR Pin 5 GND Pin 6 DSR Pin 7 RTS Pin 8 CTS Pin 9 RI 25 Pin Connector Pin 8 DCD Pin 3 RD Pin 2 TD Pin 20 DTR Pin 7 GND Pin 6 DSR Pin 4 RTS Pin 5 CTS Pin 22 RI 5. Because modems transfer signals over a telephone line.8 Baud vs. This is a physical restriction of the lines provided by the phone company. who was an officer in the French Telegraph Service. The increased data throughput achieved with 9600 or higher baud modems is accomplished by using sophisticated phase modulation. M.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Table 5. if you are running at 19200 BPS. If you connect two serial devices together using direct cables then baud and BPS are in fact the same. Bits per Second The baud unit is named after Jean Maurice Emile Baudot. What baud really refers to is modulation rate or the number of times per second that a line changes state. He is credited with devising the first uniform-length 5-bit code for characters of the alphabet in the late 19th century. this isn't the case. then the line is also changing states 19200 times per second.
Table 5. well shielded cable. Any electrical noise affects all lines in the optically isolated cable equally . many devices can be configured as either DTE or DCE.including the signal ground line. cable lengths and unshielded cable lengths Baud Rate 110 300 1200 Shielded Cable Length 5000 4000 3000 Unshielded Cable Length 1000 1000 500 M.may use completely non-standard or proprietary pin-outs. This causes the voltages on the signal lines relative to the signal ground line to reflect the true voltage of the signal and thus canceling out the effect of any noise signals.as in the case of many data collection devices . Serial ports use both 9 and 25 pins. Because of this lack of standardization.4: comparison for various baud rates.SUNILKUMAR (9666822581) . gender changers and custom made cables are often required. and . Null Modems. You can greatly extend the cable length by using additional devices like optical isolators and signal boosters. all serial ports on every computer would be DTE devices with 25-pin male "D" connectors. even very short cables can pick up stray signals. since a cable can be as long as 10000 feet at baud rates up to 19200 if you use a high quality. This would allow you to use a cable in which each pin on one end of the cable is connected to the same pin on the other end. Unfortunately.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 5. special cables called null modem cables. The external environment has a large effect on lengths for unshielded cables.9 Cables. Optical isolators use LEDs and Photo Diodes to isolate each line in a serial cable including the signal ground. In electrically noisy environments. All other devices would be DCE devices with 25-pin female connectors. The following chart offers some reasonable guidelines for 24 gauge wire under typical conditions. 5.10 Cables Lengths The RS-232C standard imposes a cable length limit of 50 feet. and Gender Changers In a perfect world. we don't live in a perfect world. You can usually ignore this "standard".
The serial ports on IBMstyle PCs are asynchronous devices and therefore only support asynchronous serial communications. as well as RTS & CTS are also crossed in a Null Modem connection.13 Synchronous and Asynchronous Communications There are two basic types of serial communications. However. 5. synchronous and asynchronous. You can purchase gender changers at any computer or office supply store for under $5. because additional bits to mark the beginning and end of each data byte are not required. Asynchronous means "no synchronization".SUNILKUMAR (9666822581) . Even when data is not really being sent.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 2400 4800 9600 5. That is. each character that is sent is either actual data or an idle character.12 Null Modem Cables and Null Modem Adapters: If you connect two DTE devices (or two DCE devices) using a straight RS232 cable. then the transmit line on each device will be connected to the transmit line on the other device and the receive lines will likewise be connected to each other. With synchronous communications. 5. A Null Modem cable or Null Modem adapter simply crosses the receive and transmit lines so that transmit on one end is connected to receive on the other end and vice versa. In addition to transmit and receive.11 Gender Changers 2000 500 250 500 250 100 A problem you may encounter is having two connectors of the same gender that must be connected. a constant flow of bits allows each device to know where the other is at any given time. and thus does not require sending and receiving idle characters. Synchronous communications allows faster data transfer rates than asynchronous methods. the two devices initially synchronize themselves to each other. and then continually send characters to stay in sync. DTR & DSR. the beginning and end of each byte of data must be identified M.
A start bit has a value of 0 (also called a space state). M. The requirement to send these additional two bits causes asynchronous communication to be slightly slower than synchronous however it has the advantage that the processor does not have to deal with the additional idle characters. The start bit indicates when the data byte is about to begin and the stop bit signals when it ends. when the line switches from a value of 1 to a value of 0. the receiver is alerted that a data character is about to be sent. a start bit is sent. Thus. When a character is about to be transmitted. the devices are able to distinguish between an idle state and a disconnected line.SUNILKUMAR (9666822581) . By using this value to indicate that no data is currently being sent. An asynchronous line that is idle is identified with a value of 1 (also called a mark state).MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM by start and stop bits.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Snapshots of hardware M.SUNILKUMAR (9666822581) .
SUNILKUMAR (9666822581) . The principle proved thorough this project can be utilized in many real time applications. 6. With all the above discussion a conclusion can be made that the system “Supervisory Control over serial communication” has wide range of real time applications in industrial sector and domestic sectors as well. This project if implemented will help the people in a very major way by saving their time in this busy daily routine. Keil IDE has provided an easy user interface for the project. This project. The integrated hardware and software is tested successfully. “MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM” facilitates us to control the gates of a dam depending on the water level. Afterwards the code is dumped into an 89s52 micro controller. Efficient control over the device can be achieved in real time applications. This software is written in C language and simulation is tested on pc. Subsequently. Here as a part of our project to exhibit the control. the hardware is initially tested on bread board. There is a lot of scope for further development of the system with this idea using all technical advancements. It features high data rate (adjustable baud rate) and longer transmission distance. the hardware is wired on general purpose PCB.2 Future Work: RF modem can be used for applications that need two way wireless data transmission.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM CHAPTER 6: CONCLUSION AND FUTURE WORK 6. we control the operations of a stepper motor with the help of serial port communication. The communication M.1 Conclusion: In order to complete the project. The program code is compiled using the keil c compiler.
it will be kept in buffer for next transmission cycle.SUNILKUMAR (9666822581) . M. The data sent is checked for CRC error if any. It has internal 64 bytes of buffer for incoming data. After each transmission.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM protocol is self controlled and completely transparent to user interface. Means it can either transmit or receive but not both at same time. The LED for TX and RX indicates whether IC is currently receiving or transmitting data. The module can be embedded to your current design so that wireless communication can be set up easily. This module works in half-duplex mode. module will be switched to receiver mode automatically. If chip is transmitting and any data is input to transmit.
SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM APPENDIX M.
Null modem cables are designed forthis situation. a minimum of 8 lines are needed). parallel communications require at least as many lines as there are bits in a word being transmitted (for an 8-bit word. and is designed to connect a DTE device to a Dc device. Standards One of the advantages of a serial System is that it lends itself to transmission over telephone lines. Officially. Interfaces In addition to communications between computer equipment over telephone lines. M.” This definition defines data terminal equipment (DTE) as the computer. rather than having the pin.Parallel communications are used mainly for connections between test instruments or computers and printers. while data communications equipment (DCE) is the modem. the computer is data transmission equipment (DTE). In contrast. RS-232 is defined as the “Interface between data terminal equipment and data communications equipment using serial binary data exchange. Serial transmission involves the sending of data one bit at a time. over a single communications line. whereas parallel is designed for short distances or when very high transmission rates are required. RS232 is now widely used for direct connections between data acquisition devices and computer systems. while serial is often used between computers and other peripherals. Serial transmission is beneficial for long distance communications. null modem cables have different internal wiring to allow DTE devices to communicate with one another.to-pin connections of modem cables. and converted back to serial digital data at the receiving end of the line by another modem. However. A modem cable has pin-to-pin connections. placed onto a standard voicegrade telephone line.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 7.SUNILKUMAR (9666822581) .1 THE RS-232 STANDARD Information being transferred between data processing equipment and peripherals is in the form of digital data which is transmitted in either a serial or parallel mode. As in the definition of RS-232. many interface products are not data communications equipment (DCE). The serial digital data can be converted by modem.
SUNILKUMAR (9666822581) . Rather than having the standard 25-pin connector. this computer and many new expansion boards for PC‟s feature a 9-pin serial port. RS-232 Specifications TRANSMITTED SIGNAL VOLTAGE LEVELS: Binary 0: +5 to +15 Vdc (called a “space” or “on”) Binary 1: -5 to -15 Vdc (called a “mark” or “off”) RECEIVED SIGNAL VOLTAGE LEVELS: Binary 0: +3 to +13 Vdc Binary 1: -3 to -13 Vdc DATA FORMAT: Start bit: Binary 0 M. 5 and 8. 4-pin cables provide the bare minimum connections. and then determine which cable is required. what devices are to be connected? First. 25-pin or 9-pin (AT style)? Usually. male or female. Selecting a Cable The major consideration in choosing an RS-232 cable is. the 9-pin cables do not include many of the uncommonly used connections.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Cabling Options RS-232 cables are commonly available with either 4. and have jumpers to provide “handshaking” for those devices that require it. or the user can create his own cable specifically for that purpose. To connect this port to a standard 25. what connectors are required on each end. a 9-to-25-pin adaptor cable can be utilized. These jumpers connect pins 4. and also pins 6 and 20. The 25-pin cable connects every pin.pin port. it is recommended that the user obtain the two devices to be connected. are you connecting two DTE devices (null modem cable) or a DTE device to a DCE device (modem cable)? Second.The advent of the IBM PC AT has created a new wrinkle in RS-232 communications. 9 or 25-pin wiring.
and voltage-generator functions are available as cells in the Texas Instruments Lin ASIC library. even. These receivers have a typical threshold of 1. 6. and can accept 30 inputs. M.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Data: 5. MAX232I DUAL EIA-232 DRIVERS/RECEIVERS Description: The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply. The driver.SUNILKUMAR (9666822581) .3 V and a typical hysteresis of 0.one or two bits MAX232. 7 or 8 bits Parity: Odd. mark or space (not used with 8-bit data) Stop bit: Binary 1. receiver. Each driver converts -V TTL/CMOS input levels into EIA-232 levels. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels.5 V.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.SUNILKUMAR (9666822581) .
SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.
SUNILKUMAR (9666822581) † .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.
The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory pro-grammer. Description The AT89S52 is a low-power.SUNILKUMAR (9666822581) . on-chip oscillator. a full duplex serial port.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM C3 can be connected to VCC or GND. three 16-bit timer/counters. 256 bytes of RAM. Figure 4. high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmel‟s highdensity nonvolatile memory technology and is compatible with the indus-try-standard 80C51 instruction set and pinout. 32 I/O lines. a six-vector two-level interrupt architecture. and clock circuitry.2 8-bit Microcontroller with 8K Bytes In-System Programmable Flash AT89S52 1. In addition. two data pointers. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip. Typical Operating Circuit 7. the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. Watchdog timer. The AT89S52 provides the following standard features: 8K bytes of Flash. the AT89S52 is designed with static logic for M.
and interrupt system to continue functioning. The Idle Mode stops the CPU while allowing the RAM. The Power-down mode saves the RAM con-tents but freezes the oscillator. M.SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM operation down to zero frequency and supports two software selectable power saving modes. disabling all other chip functions until the next interrupt or hardware reset. timer/counters. serial port.
As an output port. When 1s are written to port 0 pins. In this mode.2 GND: Ground. the pins can be used as highimpedance inputs. M.1 VCC: Supply voltage. Pin Description 4. each pin can sink eight TTL inputs.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 4. 4. 4. P0 has internal pull-ups.SUNILKUMAR (9666822581) .3 Port 0: Port 0 is an 8-bit open drain bidirectional I/O port. Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external program and data memory.
When 1s are written to Port 1 pins. they are pulled high by the inter-nal pull-ups and can be used as inputs. As inputs. The Port 2 output buffers can sink/source four TTL inputs. Port 2 uses strong internal pull-ups when emitting 1s. Port 2 emits the high-order address byte during fetches from external program memory and dur-ing accesses to external data memory that use 16-bit addresses (MOVX @ DPTR).MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. As inputs.0/T2) and the timer/counter 2 trigger input (P1.SUNILKUMAR (9666822581) . they are pulled high by the inter-nal pull-ups and can be used as inputs. 4. Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI).0 and P1. P1.4 Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. Port 2 emits the contents of the P2 Special Function Register. In this application. Port 1 also receives the low-order address bytes during Flash programming and verification 4. respectively. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. When 1s are written to Port 2 pins. The Port 1 output buffers can sink/source four TTL inputs. M. In addition.5 Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups.1 can be configured to be the timer/counter 2 external count input (P1.1/T2EX). as shown in the follow-ing table. External pull-ups are required during program verification.
The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. as shown in the fol-lowing table.6 Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. however. As inputs. Note. 4. The Port 3 output buffers can sink/source four TTL inputs. the RESET HIGH out feature is enabled.7 RST: Reset input.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 4.8 ALE/PROG Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. they are pulled high by the inter-nal pull-ups and can be used as inputs. 4. This pin is also the program pulse input (PROG) during Flash programming. If desired. ALE operation M. Port 3 also serves the functions of various special features of the AT89S52. When 1s are written to Port 3 pins. 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. that one ALE pulse is skipped dur-ing each access to external data memory. Port 3 receives some control signals for Flash programming and verification. Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. A high on this pin for two machine cycles while the oscillator is running resets the device. In the default state of bit DISRTO. This pin drives high for 98 oscillator periods after the Watchdog times out.SUNILKUMAR (9666822581) .
M. however. Special Function Registers A map of the on-chip memory area called the Special Function Register (SFR) space is shown in Table 5-1. except that two PSEN activations are skipped during each access to external data memory. since they may be used in future products to invoke new features. When the AT89S52 is executing code from external program memory. In that case. 4.9 PSEN Program Store Enable (PSEN) is the read strobe to external program memory. EA will be internally latched on reset.2) and T2MOD (shown in Table 10-2) for Timer 2. and unoccupied addresses may not be imple-mented on the chip. With the bit set.11 XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. ALE is active only during a MOVX or MOVC instruction. Note. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming. 5.10 EA/VPP External Access Enable.SUNILKUMAR (9666822581) . RCAP2L) are the Capture/Reload registers for Timer 2 in 16-bit capture mode or 16-bit auto-reload mode. 4. User software should not write 1s to these unlisted locations.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM can be disabled by setting bit 0 of SFR location 8EH. Timer 2 Registers: Control and status bits are contained in registers T2CON (shown in Table 5. Setting the ALEdisable bit has no effect if the microcontroller is in external execution mode. and write accesses will have an indeterminate effect. 4. Read accesses to these addresses will in general return random data. Otherwise.12 XTAL2 Output from the inverting oscillator amplifier. PSEN is activated twice each machine cycle. the reset or inactive values of the new bits will always be 0. 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. The register pair (RCAP2H. Note that not all of the addresses are occupied. 4. the pin is weakly pulled high. that if lock bit 1 is programmed. EA should be strapped to VCC for internal program executions.
Bit DPS = 0 in SFR AUXR1 selects DP0 and DPS = 1 selects DP1. Two priorities can be set for each of the six interrupt sources in the IP register. Dual Data Pointer Registers: To facilitate accessing both internal and external data memory. two banks of 16-bit Data Pointer Registers are provided: DP0 at SFR address locations 82H-83H and DP1 at 84H-85H. The user should ALWAYS initialize the DPS bit to the appropriate value before accessing the respective Data Pointer Register.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Interrupt Registers: The individual interrupt enable bits are in the IE register.SUNILKUMAR (9666822581) . Power Off Flag: M.
4) in the PCON SFR. Memory Organization M. It can be set and rest under software control and is not affected by reset.SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM The Power Off Flag (POF) is located at bit 4 (PCON. POF is set to “1” during power up. 6.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM MCS-51 devices have a separate address space for Program and Data Memory. accesses the data byte at address 0A0H. the following direct addressing instruction accesses the SFR at location 0A0H (which is P2). #data Note that stack operations are examples of indirect addressing. For example. The upper 128 bytes occupy a parallel address space to the Special Function Registers. #data Instructions that use indirect addressing access the upper 128 bytes of RAM. When an instruction accesses an internal location above address 7FH. Instructions which use direct addressing access the SFR space. all program fetches are directed to external memory. program fetches to addresses 0000H through 1FFFH are directed to internal memory and fetches to addresses 2000H through FFFFH are to external memory.SUNILKUMAR (9666822581) . the following indirect addressing instruction. On the AT89S52. a user must write 01EH and 0E1H in sequence to the WDTRST register (SFR location 0A6H). if EA is connected to VCC. Watchdog Timer (One-time Enabled with Reset-out) The WDT is intended as a recovery method in situations where the CPU may be subjected to software upsets. M. rather than P2 (whose address is 0A0H). The WDT consists of a 14-bit counter and the Watchdog Timer Reset (WDTRST) SFR. the address mode used in the instruction specifies whether the CPU accesses the upper 128 bytes of RAM or the SFR space. 6.2 Data Memory The AT89S52 implements 256 bytes of on-chip RAM. MOV @R0. For example.1 Program Memory If the EA pin is connected to GND. The WDT is defaulted to disable from exiting reset. This means that the upper 128 bytes have the same addresses as the SFR space but are physically separate from SFR space. where R0 contains 0A0H. To enable the WDT. MOV 0A0H. 7. Up to 64K bytes each of external Program and Data Memory can be addressed. so the upper 128 bytes of data RAM are available as stack space. 6.
it is best to reset the WDT just before M. The WDT counter cannot be read or written.1 Using the WDT To enable the WDT. a user must write 01EH and 0E1H in sequence to the WDTRST register (SFR location0A6H). There are two methods of exiting Power-down mode: by a hardware reset or via a level-activated external interrupt which is enabled prior to entering Power-down mode. the WDT is not started until the interrupt is pulled high. To ensure that the WDT does not overflow within a few states of exiting Power-down. the user needs to service it by writing 01EH and 0E1H to WDTRST to avoid a WDT overflow. which means the WDT also stops. When WDT over-flows. and this will reset the device. servicing the WDT should occur as it normally does whenever the AT89S52 is reset. There is no way to disable the WDT except through reset (either hardware reset or WDT overflow reset). It is suggested that the WDT be reset during the interrupt service for the interrupt used to exit Power-down mode. it will drive an output RESET HIGH pulse at the RST pin. Exiting Power-down with an interrupt is significantly different. where TOSC = 1/FOSC. The 14-bit counter overflows when it reaches 16383 (3FFFH). When the WDT is enabled. When the interrupt is brought high. it will generate an output RESET pulse at the RST pin. the interrupt is serviced. 7. The WDT timeout period is dependent on the external clock frequency. the user does not need to service the WDT. it will increment every machine cycle while the oscillator is running. When Power-down is exited with hardware reset. it will increment every machine cycle while the oscillator is running. 7. To make the best use of the WDT. The RESET pulse dura-tion is 98xTOSC.SUNILKUMAR (9666822581) . WhenWDT overflows. To reset the WDT the user must write 01EH and 0E1H to WDTRST. WDTRST is a write-only register. When the WDT is enabled. To prevent the WDT from resetting the device while the interrupt pin is held low.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM When the WDT is enabled. This means the user must reset the WDT at least every 16383 machine cycles. it should be serviced in those sections of code that will periodically be executed within the time required to prevent a WDT reset. The interrupt is held low long enough for the oscillator to stabilize.2 WDT During Power-down and Idle In Power-down mode the oscillator stops. While in Power-down mode.
and baud rate generator. the WDT will stop to count in IDLE mode and resumes the count upon exit from IDLE.com/dyn/resources/prod_documents/DOC4316. the count rate is 1/12 of the oscil-lator frequency. Timer 2 Timer 2 is a 16-bit Timer/Counter that can operate as either a timer or an event counter. Before going into the IDLE mode. The modes are selected by bits in T2CON. Timer 2 has three operating modes: capture. The type of operation is selected by bit C/T2 in the SFR T2CON (shown in Table 5-2). as shown in Table 10-1. the WDIDLE bit in SFR AUXR is used to determine whether the WDT continues to count if enabled.com/dyn/resources/prod_documents/DOC4316. and reenter IDLE mode. 8. The WDT keeps counting during IDLE (WDIDLE bit = 0) as the default state. For further information on the timers‟ operation. TH2 and TL2.SUNILKUMAR (9666822581) . For further information on the UART operation. please click on the document link below: http://www.atmel. auto-reload (up or down counting). M. In the Timer function.atmel. To prevent the WDT from resetting the AT89S52 while in IDLE mode. With WDIDLE bit enabled.PDF 10. Since a machine cycle consists of 12 oscillator periods. UART The UART in the AT89S52 operates the same way as the UART in the AT89C51 and AT89C52.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM entering Power-down mode. Timer 2 consists of two 8-bit registers. Timer 0 and 1Timer 0 and Timer 1 in the AT89S52 operate the same way as Timer 0 and Timer 1 in the AT89C51 and AT89C52. the user should always set up a timer that will periodically exit IDLE. service the WDT.PDF 9. the TL2 register is incremented every machine cycle. please click on the document link below: http://www.
respectively. T2. 10. Since two machine cycles (24 oscillator periods) are required to recognize a 1-to-0 transition. depending on the value of the T2EX pin. the count is incremented. When the samples show a high in one cycle and a low in the next cycle. When DCEN is set. Timer 2 is a 16-bit timer or counter which upon overflow sets bit TF2 in T2CON. Upon reset. like TF2. the external input is sampled during S5P2 of every machine cycle. can generate an interrupt. the transition at T2EX causes bit EXF2 in T2CON to be set.2 Auto-reload (Up or Down Counter) Timer 2 can be programmed to count up or down when configured in its 16-bit autoreload mode. the DCEN bit is set to 0 so that timer 2 will default to count up. 10. This bit can then be used to generate an interrupt.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM In the Counter function. Timer 2 performs the same operation. If EXEN2 = 0. The new count value appears in the register during S3P1 of the cycle following the one in which the transition was detected. the maximum count rate is 1/24 of the oscillator frequency. If EXEN2 = 1. In addition. To ensure that a given level is sampled at least once before it changes. This feature is invoked by the DCEN (Down Counter Enable) bit located in the SFR T2MOD (see Table 10-2). but a 1-to-0 transi-tion at external input T2EX also causes the current value in TH2 and TL2 to be captured into RCAP2H and RCAP2L. the register is incremented in response to a 1-to-0 transition at its corre-sponding external input pin. the level should be held for at least one full machine cycle. The capture mode is illus-trated in Figure 10-1.1 Capture Mode In the capture mode. two options are selected by bit EXEN2 in T2CON. M. Timer 2 can count up or down.SUNILKUMAR (9666822581) . In this function. The EXF2 bit.
The underflow sets the TF2 bit and causes 0FFFFH to M. If EXEN2 = 1. The values in Timer in Capture ModeRCAP2H and RCAP2L are preset by software. the T2EX pin controls the direction of the count. A logic 0 at T2EX makes Timer 2 count down. Setting the DCEN bit enables Timer 2 to count up or down. Both the TF2 and EXF2 bits can generate an interrupt if enabled. two options are selected by bit EXEN2 in T2CON. a 16-bit reload can be triggered either by an overflow or by a 1-to-0 transition at external input T2EX. The overflow also causes the timer registers to be reloaded with the 16-bit value in RCAP2H and RCAP2L. In this mode. This transition also sets the EXF2 bit. as shown in Figure 10-2.SUNILKUMAR (9666822581) . The timer will overflow at 0FFFFH and set the TF2 bit. Timer 2 counts up to 0FFFFH and then sets the TF2 bit upon overflow.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Figure 10-2 shows Timer 2 automatically counting up when DCEN = 0. If EXEN2 = 0. The timer underflows when TH2 and TL2 equal the values stored in RCAP2H and RCAP2L. respectively. This overflow also causes the 16-bit value in RCAP2H and RCAP2L to be reloaded into the timer registers. A logic 1 at T2EX makes Timer 2 count up. In this mode. TH2 and TL2.
as shown in Figure 11-1. EXF2 does not flag an interrupt.SUNILKUMAR (9666822581) . 11. In this operating mode. Note that the baud rates for transmit and receive can be different if Timer 2 is used for the receiver or transmitter and Timer 1 is used for the other function. The baud rate generator mode is similar to the auto-reload mode.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM be reloaded into the timer registers. in that a rollover in TH2 causes the Timer 2 registers to be reloaded with the 16-bit value in registers RCAP2H and M. The EXF2 bit toggles whenever Timer 2 overflows or underflows and can be used as a 17th bit of resolution. Baud Rate Generator Timer 2 is selected as the baud rate generator by setting TCLK and/or RCLK in T2CON (Table 5-2). Setting RCLK and/or TCLK puts Timer 2 into its baud rate generator mode.
that if EXEN2 is set. it is con-figured for timer operation (CP/T2 = 0). The baud rates in Modes 1 and 3 are determined by Timer 2‟s overflow rate according to the fol-lowing equation. a 1-to-0 transition in T2EX will set EXF2 but will not cause a reload from (RCAP2H.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM RCAP2L. The baud rate formula is given below. TL2). The timer operation is different for Timer 2 when it is used as a baud rate generator. Under these conditions. Thus. when Timer 2 is in use as a baud rate generator. TH2 or TL2 should not be read from or written to. Normally. The Timer can be configured for either timer or counter operation. because a write might overlap a reload and cause write and/or reload errors. RCAP2L) to (TH2. which are preset by software. Note that a rollover in TH2 does not set TF2 and will not generate an inter-rupt. the Timer is incremented every state time.SUNILKUMAR (9666822581) . Note too. it increments every state time (at 1/2 the oscillator frequency). where (RCAP2H. This figure is valid only if RCLK or TCLK = 1 in T2CON. M. As a baud rate generator. Timer 2 as a baud rate generator is shown in Figure 11-1. however. In most applications. RCAP2L) is the content of RCAP2H and RCAP2L taken as a 16-bit unsigned integer. T2EX can be used as an extra external interrupt. Note that when Timer 2 is running (TR2 = 1) as a timer in the baud rate generator mode. it increments every machine cycle (at 1/12 the oscillator frequency). and the results of a read or write may not be accurate. The timer should be turned off (clear TR2) before accessing the Timer 2 or RCAP2 registers. The RCAP2 registers may be read but should not be written to. as a timer.
To configure the Timer/Counter 2 as a clock generator.2) starts and stops the timer. as shown in the following equation. has two alternate functions. In the clock-out mode. that the baud-rate and M.1) must be set. This pin. RCAP2L).0. This behavior is similar to when Timer 2 is used as a baud-rate generator. The clock-out frequency depends on the oscillator frequency and the reload value of Timer 2 capture registers (RCAP2H. however. Programmable Clock Out A 50% duty cycle clock can be programmed to come out on P1. Note.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 12. Bit TR2 (T2CON. Timer 2 roll-overs will not generate an interrupt.SUNILKUMAR (9666822581) . It is possible to use Timer 2 as a baudrate gen-erator and a clock generator simultaneously. bit C/T2 (T2CON. as shown in Figure 121. It can be programmed to input the external clock for Timer/Counter 2 or to output a 50% duty cycle clock ranging from 61 Hz to 4 MHz (for a 16-MHz operating frequency). besides being a regular I/O pin.1) must be cleared and bit T2OE (T2MOD.
since it may be used in future AT89 products. Note that Table 13-1 shows that bit position IE.6 is unimplemented. EA. The Timer 0 and Timer 1 flags. 1.SUNILKUMAR (9666822581) . 13. is set at S2P2 and is polled in the same cycle in which the timer overflows. three timer interrupts (Timers 0. and the serial port interrupt. In fact. These interrupts are all shown in Figure 13-1. IE also contains a global disable bit. which disables all interrupts at once. the service routine may have to determine whether it was TF2 or EXF2 that generated the interrupt. User software should not write a 1 to this bit position. are set at S5P2 of the cycle in which the timers overflow. Timer 2 interrupt is generated by the logical OR of bits TF2 and EXF2 in register T2CON. Nei-ther of these flags is cleared by hardware when the service routine is vectored to. TF0 and TF1. The values are then polled by the circuitry in the next cycle. TF2. and 2). M. However. Interrupts The AT89S52 has a total of six interrupt vectors: two external interrupts (INT0 and INT1). Each of these interrupt sources can be individually enabled or disabled by setting or clearing a bit in Special Function Register IE. the Timer 2 flag.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM clock-out frequencies cannot be determined independently from one another since they both use RCAP2H and RCAP2L. and that bit will have to be cleared in software.
of an inverting amplifier that can be configured for use as an on-chip oscillator.SUNILKUMAR (9666822581) . as shown in Figure 16-1.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 14. respectively. Oscillator Characteristics XTAL1 and XTAL2 are the input and output. Either a quartz M.
Idle Mode In idle mode. but access to the port pins is not inhibited. Reset redefines the SFRs but does not change the on-chip RAM. the device normally resumes pro-gram execution from where it left off. Power-down Mode In the Power-down mode. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize. Note that when idle mode is terminated by a hardware reset. XTAL2 should be left unconnected while XTAL1 is driven.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM crystal or ceramic resonator may be used. the CPU puts itself to sleep while all the on-chip peripherals remain active. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. the oscillator is stopped. There are no requirements on the duty cycle of the external clock signal.SUNILKUMAR (9666822581) . 15. but minimum and maximum voltage high and low time specifications must be observed. M. To drive the device from an external clock source. The idle mode can be terminated by any enabled interrupt or by a hardware reset. up to two machine cycles before the internal reset algorithm takes control. To eliminate the possibility of an unexpected write to a port pin when idle mode is terminated by a reset. as shown in Figure 16-2. since the input to the internal clock-ing circuitry is through a divide-by-two flip-flop. the instruction following the one that invokes idle mode should not write to a port pin or to external memory. The on-chip RAM and Special Function Registers retain their values until the Power-down mode is terminated. Exit from Power-down mode can be initiated either by a hardware reset or by an enabled external interrupt. The mode is invoked by software. On-chip hardware inhibits access to internal RAM in this event. 16. and the instruction that invokes Power-down is the last instruction executed.
C1. C2 = 30 pF ± 10 pF for Crystals = 40 pF ± 10 pF for Ceramic Resonators 17.SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Note: 1. M. Program Memory Lock Bits The AT89S52 has three lock bits that can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in Table 17-1.
4. Input the appropriate data byte on the data lines. M. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. The byte-write cycle is self-timed and typically takes no more than 50 μs. the latch initializes to a random value and holds that value until reset is activated.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM When lock bit 1 is programmed. Programming Algorithm: Before programming the AT89S52.SUNILKUMAR (9666822581) . Programming the Flash – Parallel Mode The AT89S52 is shipped with the on-chip Flash memory array ready to be programmed. Repeat steps 1 through 5. Input the desired memory location on the address lines. 3. 2. Activate the correct combination of control signals. take the following steps: 1. The programming interface needs a high-voltage (12-volt) program enable signal and is compatible with conventional third-party Flash or EPROM programmers. data. changing the address and data for the entire array or until the end of the object file is reached. Raise EA/VPP to 12V. and control signals should be set up according to the “Flash Programming Modes” (Table 22-1) and Figure 22-1 and Figure 22-2. 5. the address. If the device is powered up without a reset. 18. To program the AT89S52. The latched value of EA must agree with the current logic level at that pin in order for the device to function properly. The AT89S52 code memory array is programmed byte-by-byte. the logic level at the EA pin is sampled and latched during reset.
100H. Program Verify: If lock bits LB1 and LB2 have not been programmed. In the serial programming mode. P3.0 is pulled high again when programming is done to indicate READY. Dur-ing a write cycle. chip erase is self-timed and takes about 500 ms. Once the write cycle has been completed. an attempted read of the last byte written will result in the complement of the written data on P0.SUNILKUMAR (9666822581) . and the next cycle may begin. The values returned are as follows.0 is pulled low after ALE goes high during programming to indicate BUSY.7 must be pulled to a logic low. The status of the individual lock bits can be verified directly by reading them back. Data Polling may begin any time after a write cycle has been initiated. and 200H. except that P3.500 ns. P3. In this mode. M.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Data Polling: The AT89S52 features Data Polling to indicate the end of a byte write cycle. a chip erase operation is initiated by using the proper combination of control signals and by pulsing ALE/PROG low for a duration of 200 ns . (000H) = 1EH indicates manufactured by Atmel (100H) = 52H indicates AT89S52 (200H) = 06H Chip Erase: In the parallel programming mode.7. a chip erase operation is initiated by issuing the Chip Erase instruction. a serial read from any address location will return 00H at the data output. Ready/Busy: The progress of byte programming can also be monitored by the RDY/BSY output signal.6 and P3. the programmed code data can be read back via the address and data lines for verification. During chip erase. true data is valid on all outputs. Reading the Signature Bytes: The signature bytes are read by the same procedure as a nor-mal verification of locations 000H.
The frequency of the shift clock supplied at pin SCK/P1. The serial interface consists of pins SCK. Programming the Flash – Serial Mode The Code memory array can be programmed using the serial ISP interface while RST is pulled to VCC. The write cycle is self-timed and typically takes less than 0. Any memory location can be verified by using the Read instruction which returns the content at the selected address at serial output MISO/P1. the maximum SCK frequency is 2 MHz. Serial Programming Algorithm To program and verify the AT89S52 in the serial programming mode. Before a reprogramming sequence can occur. b. The Code array is programmed one byte at a time in either the Byte or Page mode. Set RST pin to “H”. apply a 3 MHz to 33 MHz clock to XTAL1 pin and wait for at least 10 milliseconds. Power-up sequence: a. After RST is set high. 20. the following sequence is recommended: 1.7 needs to be less than the CPU clock at XTAL1 divided by 16. Apply power between VCC and GND pins. With a 33 MHz oscillator clock. Either an external system clock can be supplied at pin XTAL1 or a crystal needs to be connected across pins XTAL1 and XTAL2.SUNILKUMAR (9666822581) .5. Enable serial programming by sending the Programming Enable serial instruction to pin MOSI/P1. M. a Chip Erase operation is required.6.5 ms at 5V. The Chip Erase operation turns the content of every memory location in the Code array into FFH. 2. MOSI (input) and MISO (output). If a crystal is not connected across pins XTAL1 and XTAL2. 4. The maximum serial clock (SCK) frequency should be less than 1/16 of the crystal frequency. 3. the Programming Enable instruction needs to be executed first before other operations can be executed.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 19.
M. Turn VCC power off.SUNILKUMAR (9666822581) . 2. The write operation cycle is self-timed and once initiated.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 5. Most major worldwide programming vendors offer support for the Atmel AT89 microcontroller series. Serial Programming Instruction Set The Instruction Set for Serial Programming follows a 4-byte protocol and is shown in Table 24-1. In this mode. Set RST to “L”. Data Polling: The Data Polling feature is also available in the serial mode. RST can be set low to commence normal device operation. during a write cycle an attempted read of the last byte written will result in the complement of the MSB of the serial output byte on MISO. At the end of a programming session. Power-off sequence (if needed): 1. Set XTAL1 to “L” (if a crystal is not used). 22. will automatically time itself to completion. Programming Interface – Parallel Mode Every code byte in the Flash array can be programmed by using the appropriate combination of control signals. 21. 3. Please contact your local programming vendor for the appropriate software revision.
3.500 ns for Write Lock Bits. RDY/BSY signal is output on P3. M.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Notes: 1. 2. Each PROG pulse is 200 ns .SUNILKUMAR (9666822581) . 5. Each PROG pulse is 200 ns .0 during programming.500 ns for Chip Erase. Each PROG pulse is 200 ns . 4.500 ns for Write Code Data. X = don‟t care.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.SUNILKUMAR (9666822581) .
SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.
SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.
This is a stress rating only and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of this specification is not implied. M. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM *NOTICE: Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent dam-age to the device.SUNILKUMAR (9666822581) .
SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.
making them useful in a wide range of applications. thermal shut down and safe operating area protection. Although designed primarily as fixed voltage regulators.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 7. making it essentially indestructible. Each type employs internal current limiting. M.SUNILKUMAR (9666822581) . If adequate heat sinking is provided.3 MC78XX/LM78XX/MC78XXA 3-Terminal 1A Positive Voltage Regulator Description: The MC78XX/LM78XX/MC78XXA series of three terminal positive regulators are available in the TO-220/D-PAK package and with several fixed output voltages. these devices can be used with external components to obtain adjustable voltages and currents. they can deliver over 1A output current.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Absolute Maximum Ratings Absolute maximum ratings are those values beyond which damage to the device may occur. The datasheet specifications should be met.SUNILKUMAR (9666822581) . without exception. to ensure that the system M.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM design is reliable over its power supply.SUNILKUMAR (9666822581) . temperature. and output/input loading variables. Fairchild does not recommend operation outside datasheet specifications. M.
Load and line regulation are specified at constant junction temperature. 2. are not 100% tested in production. although guaranteed. Pulse testing with low duty is used.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Notes:1. These parameters. Changes in VO due to heating effects must be taken into account separately. M.SUNILKUMAR (9666822581) .
are not 100% tested in production. These parameters. Changes in VO due to heating effects must be taken into account separately.MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM Notes: 3.SUNILKUMAR (9666822581) . Load and line regulation are specified at constant junction temperature. 4. M. although guaranteed. Pulse testing with low duty is used.
SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.
SUNILKUMAR (9666822581) .MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.SUNILKUMAR (9666822581) .
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM 7. The ULN2003 has a 2.4 ULN2003 HIGH VOLTAGE AND HIGH CURRENT DARLINGTON TRANSISTOR ARRAY DESCRIPTION The ULN2003 is a monolithic high voltage and high current Darlington transistor arrays. The darlington pairs may be parrlleled for higher current capability. Applications include relay drivers.display drivers(LED gas discharge). lampdrivers. The collectorcurrent rating of a single darlington pair is 500mA. It consists of seven NPN darlington pairs that features high-voltage outputs with commoncathode clamp diode for switching inductive loads.hammer drivers.7kW series base resistor for each darlington pair for operation directly with TTL or 5V CMOS devices. and logic buffers. M.SUNILKUMAR (9666822581) .line drivers.
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.SUNILKUMAR (9666822581) .
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.SUNILKUMAR (9666822581) .
MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM M.SUNILKUMAR (9666822581) .
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.