Beruflich Dokumente
Kultur Dokumente
Contras t
16X2 LCD
Geared DC motor
AT89S52
AC ripple neutralizer
Voltage Sampler
ADC
Inverter
AC 230V Load
2. EMBEDDED SYSTEMS
An embedded system is a system which is going to do a predefined specified task is the embedded system and is even defined as combination of both software and hardware. A generalpurpose definition of embedded systems is that they are devices used to control, monitor or assist the operation of equipment, machinery or plant. "Embedded" reflects the fact that they are an integral part of the system. At the other extreme a general-purpose computer may be used to control the operation of a large complex processing plant, and its presence will be obvious. All embedded systems are including computers or microprocessors. Some of these computers are however very simple systems as compared with a personal computer. The very simplest embedded systems are capable of performing only a single function or set of functions to meet a single predetermined purpose. In more complex systems an application program that enables the embedded system to be used for a particular purpose in a specific application determines the functioning of the embedded system. The ability to have programs means that the same embedded system can be used for a variety of different purposes. In some cases a microprocessor may be designed in such a way that application software for a particular purpose can be added to the basic software in a second process, after which it is not possible to make further changes. The applications software on such processors is sometimes referred to as firmware.
The simplest devices consist of a single microprocessor (often called a "chip), which may itself be packaged with other chips in a hybrid system or Application Specific Integrated Circuit (ASIC). Its input comes from a detector or sensor and its output goes to a switch or activator which (for example) may start or stop the operation of a machine or, by operating a valve, may control the flow of fuel to an engine. As the embedded system is the combination of both software and hardware
Embedded System
Software
Hardware
ALP C VB Etc.,
Figure: 2 Block diagram of Embedded System Software deals with the languages like ALP, C, and VB etc., and Hardware deals with Processors, Peripherals, and Memory.
Memory: It is used to store data or address. Peripherals: These are the external devices connected Processor: It is an IC which is used to perform some task Applications of embedded systems
Manufacturing and process control
Construction industry Transport Buildings and premises Domestic service Communications Office systems and mobile equipment
3
Banking, finance and commercial Medical diagnostics, monitoring and life support Testing, monitoring and diagnostic systems
registers and the ALU and it synchronizes the execution of instructions (we will deal with instruction execution at a later date).
ALU CU
Timer, Counter, y serial communication ROM, ADC, DAC, Timers, USART, Oscillators
Memor
Higher-level language compilers produce more efficient code than formerly because they have always tended to use the smaller set of instructions to be found in a RISC computer.
RISC characteristics:
Simple instruction set:
In a RISC machine, the instruction set contains simple, basic instructions, from which more complex instructions can be composed.
1 machine-cycle instructions.
Most instructions complete in one machine cycle, which allows the processor to handle several instructions at the same time. This pipelining is a key technique used to speed up RISC machines.
As each instruction became more capable, fewer instructions could be used to implement a given task. This made more efficient use of the relatively slow main memory. Because micro program instruction sets can be written to match the constructs of high-level languages, the compiler does not have to be as complicated.
Memory Architecture
There two different types memory architectures there are: Harvard Architecture Von-Neumann Architecture
Harvard Architecture
Computers have separate memory areas for program instructions and data. There are two or more internal data buses, which allow simultaneous access to both instructions and data. The CPU fetches program instructions on the program memory bus. The Harvard architecture is a computer architecture with physically separate storage and signal pathways for instructions and data. The term originated from the Harvard Mark I relay-based computer, which stored instructions on punched tape (24 bits wide) and data in electro-mechanical counters. These early machines had limited data storage, entirely contained within the central processing unit, and provided no access to the instruction storage as data. Programs needed to be loaded by an operator, the processor could not boot itself.
facilitate SIMD and VLIW processing. Texas Instruments TMS320 C55x processors, as one example, have multiple parallel data busses (two write, three read) and one instruction bus. Microcontrollers are characterized by having small amounts of program (flash memory) and data (SRAM) memory, with no cache, and take advantage of the Harvard architecture to speed processing by concurrent instruction and data access. The separate storage means the program and data memories can have different bit depths, for example using 16-bit wide instructions and 8-bit wide data. They also mean that instruction pre-fetch can be performed in parallel with other activities. Examples include, the AVR by Atmel Corp, the PIC by Microchip Technology, Inc. and the ARM Cortex-M3 processor (not all ARM chips have Harvard architecture).
Von-Neumann Architecture
A computer has a single, common memory space in which both program instructions and data are stored. There is a single internal data bus that fetches both instructions and data. They cannot be performed at the same time The Von Neumann architecture is a design model for a stored-program digital computer that uses a central processing unit (CPU) and a single separate storage structure ("memory") to hold both instructions and data. It is named after the mathematician and early computer scientist John von Neumann. Such computers implement a universal Turing machine and have a sequential architecture. A stored-program digital computer is one that keeps its programmed instructions, as well as its data, in read-write, random-access memory (RAM). Stored-program computers were advancement over the program-controlled computers of the 1940s, such as the Colossus and the ENIAC, which were programmed by setting switches and inserting patch leads to route data and to control signals between various functional units. In the vast majority of modern computers, the same memory is used for both data and program instructions. The mechanisms for transferring the data and instructions between the CPU and memory are, however, considerably more complex than the original von Neumann architecture. The terms "von Neumann architecture" and "stored-program computer" are generally used interchangeably, and that usage is followed in this article.
10
11
12
3. BLOCK DESCRIPTION
3.1 POWER SUPPLY:
The input to the circuit is applied from the regulated power supply. The a.c. input i.e., 230V from the mains supply is step down by the transformer to 12V and is fed to a rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c voltage, the output voltage from the rectifier is fed to a filter to remove any a.c components present even after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc voltage.
230V AC 50Hz
D.C Output
Bridge Rectifier
FILTER
Regulator
Transformer:
13
Usually, DC voltages are required to operate various electronic equipment and these voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c input available at the mains supply i.e., 230V is to be brought down to the required voltage level. This is done by a transformer. Thus, a step down transformer is employed to decrease the voltage to a required level.
Rectifier:
The output from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C. The rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is used because of its merits like good stability and full wave rectification.
Fig 3.1: Rectifier The Bridge rectifier is a circuit, which converts an ac voltage to dc voltage using both half cycles of the input ac voltage. The Bridge rectifier circuit is shown in the figure. The circuit has four diodes connected to form a bridge. The ac input voltage is applied to the diagonally opposite ends of the bridge. The load resistance is connected between the other two ends of the bridge.
14
For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct, whereas diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series with the load resistance RL and hence the load current flows through RL. For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct whereas, D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in series with the load resistance RL and hence the current flows through RL in the same direction as in the previous half cycle. Thus a bi-directional wave is converted into a unidirectional wave.
Filter:
Capacitive filter is used in this project. It removes the ripples from the output of rectifier and smoothens the D.C. Output received from this filter is constant until the mains voltage and load is
15
maintained constant. However, if either of the two is varied, D.C. voltage received at this point changes. Therefore a regulator is applied at the output stage.
Voltage regulator:
As the name itself implies, it regulates the input applied to it. A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level. In this project, power supply of 5V and 12V are required. In order to obtain these voltage levels, 7805 and 7812 voltage regulators are to be used. The first number 78 represents positive supply and the numbers 05, 12 represent the required output voltage levels. The L78xx series of three-terminal positive regulators is available in TO-220, TO-220FP, TO-3, D2PAK and DPAK packages and several fixed output voltages, making it useful in a wide range of applications. These regulators can provide local on-card regulation, eliminating the distribution problems associated with single point regulation. Each type employs internal current limiting, thermal shut-down and safe area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1 A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltage and currents.
16
The Wind:
It might seem obvious, but an understanding of the wind is fundamental to wind turbine design. The power available from the wind varies as the cube of the wind speed, so twice the wind speed means eight times the power. This is why sites have to be selected carefully: below about 5m/s (0mph) wind speed there is not sufficient power in the wind to be useful. Conversely, strong gusts provide extremely high levels of power, but it is not economically viable to build machines to be able to make the most of the power peaks as their capacity would be wasted most of
17
the time. So the ideal is a site with steady winds and a machine that is able to make the most of the lighter winds whilst surviving the strongest gusts. As well as varying day-to-day, the wind varies every second due to turbulence caused by land features, thermals and weather. It also blows more strongly higher above the ground than closer to it, due to surface friction. All these effects lead to varying loads on the blades of a turbine as they rotate, and mean that the aerodynamic and structural design needs to cope with conditions that are rarely optimal. By extracting power, the turbine itself has an effect on the wind: downwind of the turbine the air moves more slowly than upwind. The wind starts to slow down even before it reaches the blades, reducing the wind speed through the disc (the imaginary circle formed by the blade tips, also called the swept area) and hence reducing the available power. Some of the wind that was heading for the disc diverts around the slower-moving air and misses the blades entirely. So there is an optimum amount of power to extract from a given disc diameter: try to take too much and the wind will slow down too much, reducing the available power. In fact the ideal is to reduce the wind speed by about two thirds downwind of the turbine, though even then the wind just before the turbine will have lost about a third of its speed. This allows a theoretical maximum of 59% of the winds power to be captured (this is called Betzs limit). In practice only 40-50% is achieved by current designs.
Number of blades:
The limitation on the available power in the wind means that the more blades there are the less power each can extract. A consequence of this is that each blade must also be narrower to maintain aerodynamic efficiency. The total blade area as a fraction of the total swept disc area is called the solidity, and aerodynamically there is an optimum solidity for a given tip speed; the higher the number of blades, the narrower each one must be. In practice the optimum solidity is low (only a few percent) which means that even with only three blades, each one must be very narrow. To slip through the air easily the blades must be thin relative to their width, so the limited solidity also limits the thickness of the blades. Furthermore, it becomes difficult to build the blades strong enough if they are too thin or the cost per blade increases significantly as more expensive materials are required. For this reason, most large machines do not have more than three blades. The other
18
factor influencing the number of blades is aesthetics: it is generally accepted that three-bladed turbines are less visually disturbing than one- or two-bladed designs.
19
20
21
Blade twist:
If there were no structural requirements, this is how a wind turbine blade would be proportioned, but of course the blade needs to support the lift, drag and gravitational forces acting on it. These structural requirements generally mean the aerofoil needs to be thicker than the aerodynamic optimum, especially at locations towards the root (where the blade attaches to the hub) where the bending forces are greatest. Fortunately that is also where the apparent wind is moving more slowly and the blade has the least leverage over the hub, so some aerodynamic inefficiency at that point is less serious than it would be closer to the tip. Having said this, the section cant get too thick for its chord length or the air flow will separate from the back of the blade similar to what happens when it stalls and the drag will increase dramatically.
Fig: 3.2 Blade Twist on Wind Mill To increase thickness near the root without creating a very short, fat, aerofoil section, some designs use a flat back section. This is either a standard section thickened up to a square trailing (back) edge, or a longer aerofoil shape that has been truncated. This reduces the drag compared to a rounder section, but can generate more noise so its suitability depends on the wind farm site. There is a trade-off to be made between aerodynamic efficiency and structural efficiency even if a thin blade can be made strong and stiff enough by using lots of reinforcement inside, it might still be better to make the blade a bit thicker (hence less aerodynamically efficient) if it saves so much cost of material that the overall cost of electricity is reduced. The wind is free after all; its
22
only the machine that we have to pay for. So there is inevitably some iteration in the design process to find the optimum thickness for the blade.
Rotational speed:
23
The speed at which the turbine rotates is a fundamental choice in the design, and is defined in terms of the speed of the blade tips relative to the free wind speed (i.e. Before the wind is slowed down by the turbine). This is called the tip speed ratio. High tip speed ratio means the aerodynamic force on the blades (due to lift and drag) is almost parallel to the rotor axis, so relies on a good lift/drag ratio. The lift/drag ratio can be affected severely by dirt or roughness on the blades. Low tip speed ratio would seem like a better choice but unfortunately results in lower aerodynamic efficiency, due to two effects. Because the lift force on the blades generates torque, it has an equal but opposite effect on the wind, tending to push it around tangentially in the other direction. The result is that the air downwind of the turbine has swirl, i.e. it spins in the opposite direction to the blades. That swirl represents lost power so reduces the available power that can be extracted from the wind. Lower rotational speed requires higher torque for the same power output, so lower tip speed results in higher wake swirl losses.
Fig: 3.2 Rotational Speed The other reduction in efficiency at low tip speed ratio comes from tip losses, where highpressure air from the upwind side of the blade escapes around the blade tip to the low pressure side, thereby wasting energy. Since power = force x speed, at slower rotational speed the blades need to generate more lift force to achieve the same power. To generate more lift for a given length the
24
blade has to be wider, which means that, geometrically speaking, a greater proportion of the blades length can be considered to be close to the tip. Thus more of the air contributes to tip losses and the efficiency decreases. Various techniques can be used to limit tip losses such as winglets (commonly seen on airliners) but few are employed in practice owing to their additional cost. The higher lift force on a wider blade also translates to higher loads on the other components such as the hub and bearings, so low tip speed ratio will increase the cost of these items. On the other hand the wide blade is better able to carry the lift force (as discussed previously), so the blade itself may be cheaper. All this means that turbine designers typically compromise on tip speed ratios in the region of -0, so at design wind speed (usually 2-5 meters per second) the blade tip can be moving at around 20 m/s (approximately 20 miles per hour). There are practical limits on the absolute tip speed too: at these speeds, bird impacts and rain erosion start to become a problem for the longevity of the blades and noise increases dramatically with tip speed.
25
An alternative to decreasing the angle of attack above the design wind speed is deliberately to increase it to the point where the blade stalls (active stall control). This decreases lift and increases drag, so has the desired slowing effect on blade rotation. It is also less sensitive to gusts of wind than feathering: by decreasing the apparent wind angle, gusts increase the angle of attack so tend to make the blade stall more. Therefore controlling blade speed by stall rather than feathering can be beneficial in gusty conditions. Both methods are used by different designs.
3.3 DC MOTOR:
In any electric motor, operation is based on simple electromagnetism. A currentcarrying conductor generates a magnetic field; when this is then placed in an external magnetic field, it will experience a force proportional to the current in the conductor, and to the strength of the external magnetic field. As you are well aware of from playing with magnets as a kid, opposite (North and South) polarities attract, while like polarities (North and North, South and South) repel. The internal configuration of a DC motor is designed to harness the magnetic interaction between a current-carrying conductor and an external magnetic field to generate rotational motion.
Fig: 3.3 DC Motor Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet or winding with a "North" polarization, while green represents a magnet or winding with a "South" polarization).
26
Fig:3.3 Simple 2-pole dc electric motor Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field magnet(s), and brushes. In most common DC motors (and all that Beamers will see), the external magnetic field is produced by high-strength permanent magnets 1. The stator is the stationary part of the motor -- this includes the motor casing, as well as two or more permanent magnet pole pieces. The rotor (together with the axle and attached commutator) rotate with respect to the stator. The rotor consists of windings (generally on a core), the windings being electrically connected to the commutator. The above diagram shows a common motor layout -- with the rotor inside the stator (field) magnets. The geometry of the brushes, commutator contacts, and rotor windings are such that when power is applied, the polarities of the energized winding and the stator magnet(s) are misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets. As the rotor reaches alignment, the brushes move to the next commutator contacts, and energize the next winding. Given our example two-pole motor, the rotation reverses the direction of current through the rotor winding, leading to a "flip" of the rotor's magnetic field, driving it to continue rotatin
Fig: 3.3 rotation of rotor in dc motor In real life, though, DC motors will always have more than two poles (three is a very common number). In particular, this avoids "dead spots" in the commutator. You can imagine how
27
with our example two-pole motor, if the rotor is exactly at the middle of its rotation (perfectly aligned with the field magnets); it will get "stuck" there. Meanwhile, with a two-pole motor, there is a moment where the commutator shorts out the power supply (i.e., both brushes touch both commutator contacts simultaneously). This would be bad for the power supply, waste energy, and damage motor components as well. Yet another disadvantage of such a simple motor is that it would exhibit a high amount of torque "ripple" (the amount of torque it could produce is cyclic with the position of the rotor). So since most small DC motors are of a three-pole design, let's tinker with the workings of one via an interactive animation (JavaScript required): You'll notice a few things from this -- namely, one pole is fully energized at a time (but two others are "partially" energized). As each brush transitions from one commutator contact to the next, one coil's field will rapidly collapse, as the next coil's field will rapidly charge up (this occurs within a few microsecond). We'll see more about the effects of this later, but in the meantime you can see that this is a direct result of the coil windings' series wiring:
Fig: 3.3 Placing of Commutator in DC Motor The use of an iron core armature (as in the Mabuchi, above) is quite common, and has a number of advantages. First off, the iron core provides a strong, rigid support for the windings -- a particularly important consideration for high-torque motors. The core also conducts heat away from the rotor
28
windings, allowing the motor to be driven harder than might otherwise be the case. Iron core construction is also relatively inexpensive compared with other construction types. But iron core construction also has several disadvantages. The iron armature has a relatively high inertia which limits motor acceleration. This construction also results in high winding inductances which limit brush and commutator life. In small motors, an alternative design is often used which features a 'coreless' armature winding. This design depends upon the coil wire itself for structural integrity. As a result, the armature is hollow, and the permanent magnet can be mounted inside the rotor coil. Coreless DC motors have much lower armature inductance than iron-core motors of comparable size, extending brush and commutator life/
Fig: 3.3 courtesy of Micromole The coreless design also allows manufacturers to build smaller motors; meanwhile, due to the lack of iron in their rotors, coreless motors are somewhat prone to overheating. As a result, this design is generally used just in small, low-power motors. Beamers will most often see coreless DC motors in the form of pager motors.
derived from an alternating current (ac) source. This ripple is due to incomplete suppression of the alternating waveform within the power supply. As well as this time-varying phenomenon, there is a frequency domain ripple that arises in some classes of filter and other signal processing networks. In this case the periodic variation is a variation in the insertion loss of the network against increasing frequency. The variation may not be strictly linearly periodic. In this meaning also, ripple is usually to be considered an unwanted effect, its existence being a compromise between the amount of ripple and other design parameters.
Fig: 3.4 Time domine ripple The simplest scenario in ac to dc conversion is a rectifier without any smoothing circuitry at all. The ripple voltage is very large in this situation; the peak-to-peak ripple voltage is equal to the peak ac voltage. A more common arrangement is to allow the rectifier to work into a large smoothing capacitor which acts as a reservoir. After a peak in output voltage the capacitor (C) supplies the current to the load (R) and continues to do so until the capacitor voltage has fallen to the value of the now rising next half-cycle of rectified voltage. At that point the rectifiers turn on
30
again and deliver current to the reservoir until peak voltage is again reached. If the time constant, CR, is large in comparison to the period of the ac waveform, then a reasonable accurate approximation can be made by assuming that the capacitor voltage falls linearly. A further useful assumption can be made if the ripple is small compared to the dc voltage. In this case the phase angle through which the rectifiers conduct will be small and it can be assumed that the capacitor is discharging all the way from one peak to the next with little loss of accuracy
Fig: 3.4 Ripple wave form Ripple voltage from a full-wave rectifier, before and after the application of a smoothing capacitor With the above assumptions the peak-to-peak ripple voltage can be calculated as: For a full-wave rectifier:
Where
App. is the peak-to-peak ripple voltage I is the current in the circuit f is the frequency of the ac power
31
C is the capacitance
For the rms value of the ripple voltage, the calculation is more involved as the shape of the ripple waveform has a bearing on the result. Assuming a saw tooth waveform is a similar assumption to the ones above and yields the result:
Where
Another approach to reducing ripple is to use a series choke. A choke has a filtering action and consequently produces a smoother waveform with less high-order harmonics. Against this, the dc output is close to the average input voltage as opposed to the higher voltage with the reservoir capacitor which is close to the peak input voltage. With suitable approximations, the ripple factor is given by:
Where
More complex arrangements are possible; the filter can be an LC ladder rather than a simple choke or the filter and the reservoir capacitor can both be used to gain the benefits of both. The most commonly seen of these is a low-pass -filter consisting of a reservoir capacitor followed by a series choke followed by a further shunt capacitor. However, use of chokes is deprecated in contemporary designs for economic reasons. A more common solution where good ripple rejection is required is to use a reservoir capacitor to reduce the ripple to something manageable and then pass through a voltage regulator circuit. The regulator circuit, as well as regulating the output, will
32
incidentally filter out nearly all of the ripple as long as the minimum level of the ripple waveform does not go below the voltage being regulated to. The majority of power supplies are now switched mode. The filtering requirements for such power supplies are much easier to meet due to the frequency of the ripple waveform being very high. In traditional power supply designs the ripple frequency is either equal to (half-wave), or twice (full-wave) the ac line frequency. With switched mode power supplies the ripple frequency is not related to the line frequency, but is instead related to the frequency of the chopper circuit. The ripple frequency and its harmonics are within the audio band and will therefore be audible on equipment such as radio receivers, equipment for playing recordings and professional studio equipment. The ripple frequency is within television video bandwidth. Analogue TV receivers will exhibit a pattern of moving wavy lines if too much ripple is present. The presence of ripple can reduce the resolution of electronic test and measurement instruments. On an oscilloscope it will manifest itself as a visible pattern on screen. Within digital circuits, it reduces the threshold, as does any form of supply rail noise, at which logic circuits give incorrect outputs and data is corrupted. High amplitude ripple currents reduce the life of electrolytic capacitors.
Fig:3.4 Ripple on a fifth order prototype Chebyshev filter Ripple in the context of the frequency domain is referring to the periodic variation in insertion loss with frequency of a filter or some other two-port network. Not all filters exhibit ripple, some have monotonically increasing insertion loss with frequency such as the Butterworth
33
filter. Common classes of filter which exhibit ripple are the Chebyshev filter, inverse Chebyshev filter and the Elliptical filter. The ripple is not usually strictly linearly periodic as can be seen from the example plot. Other examples of networks exhibiting ripple are impedance matching networks that have been designed using Chebyshev polynomials. The ripple of these networks, unlike regular filters, will never reach 0dB at minimum loss if designed for optimum transmission across the pass band as a whole. The amount of ripple can be traded for other parameters in the filter design. For instance, the rate of roll-off from the pass band to the stop band can be increased at the expense of increasing the ripple without increasing the order of the filter (that is, the number of components has stayed the same). On the other hand, the ripple can be reduced by increasing the order of the filter while at the same time maintaining the same rate of roll-off.
Rechargeable batteries have lower total cost of use and environmental impact than disposable batteries. Some rechargeable battery types are available in the same sizes as disposable types. Rechargeable batteries have higher initial cost, but can be recharged very cheaply and used many times. Rechargeable batteries are used for automobile starters, portable consumer devices, light vehicles (such as motorized wheelchairs, golf carts, electric bicycles, and electric forklifts), tools, and uninterruptible power supplies. Emerging applications in hybrid electric vehicles and electric vehicles are driving the technology to reduce cost and weight and increase lifetime. Normally, new rechargeable batteries have to be charged before use; newer low self-discharge batteries hold their charge for many months, and are supplied charged to about 70% of their rated capacity. Grid energy storage applications use rechargeable batteries for load leveling, where they store electric energy for use during peak load periods, and for renewable uses, such as storing power generated from photovoltaic arrays during the day to be used at night. By charging batteries during periods of low demand and returning energy to the grid during periods of high electrical demand, load-leveling helps eliminate the need for expensive peaking power plants and helps amortize the cost of generators over more hours of operation. The US National Electrical Manufacturers Association has estimated that U.S. demand for rechargeable batteries is growing twice as fast as demand for non -rechargeable.
35
Fig: 3.5 A solar-powered charger for rechargeable batteries The energy used to charge rechargeable batteries usually comes from a battery charger using AC mains electricity. Chargers take from a few minutes (rapid chargers) to several hours to charge a battery. Most batteries are capable of being charged far faster than simple battery chargers are capable of; there are chargers that can charge consumer sizes of NiMH batteries in 15 minutes. Fast charges must have multiple ways of detecting full charge (voltage, temperature, etc.) to stop charging before onset of harmful overcharging. Rechargeable multi-cell batteries are susceptible to cell damage due to reverse charging if they are fully discharged. Fully integrated battery chargers that optimize the charging current are available. Attempting to recharge non-rechargeable batteries with unsuitable equipment may cause battery explosion Flow batteries, used for specialised applications, are recharged by replacing the electrolyte liquid. Battery manufacturers' technical notes often refer to VPC; this is volts per cell, and refers to the individual secondary cells that make up the battery. For example, to charge a 12 V battery (containing 6 cells of 2 V each) at 2.3 VPC requires a voltage of 13.8 V across the battery's terminals.
36
Non-rechargeable alkaline and zinc-carbon cells output 1.5V when new, but this voltage gradually drops with use. Most NiMH AA and AAA batteries rate their cells at 1.2 V, and can usually be used in equipment designed to use alkaline batteries up to an end-point of 0.9 to 1.2V
Reverse charging:
Subjecting a discharged cell to a current in the direction which tends to discharge it further, rather than charge it, is called reverse charging; this damages cells. Reverse charging can occur under a number of circumstances, the two most common being:
When a battery or cell is connected to a charging circuit the wrong way round. When a battery made of several cells connected in series is deeply discharged.
When one cell completely discharges ahead of the rest, the live cells will apply a reverse current to the discharged cell ("cell reversal"). This can happen even to a "weak" cell that is not fully discharged. If the battery drain current is high enough, the weak cell's internal resistance can experience a reverse voltage that is greater than the cell's remaining internal forward voltage. This results in the reversal of the weak cell's polarity while the current is flowing through the cells. [3]
[4]
this can significantly shorten the life of the affected cell and therefore of the battery. The higher
the discharge rate of the battery needs to be, the better matched the cells should be, both in kind of cell and state of charge. In some extreme cases, the reversed cell can begin to emit smoke or catch fire. In critical applications using Ni-Cad batteries, such as in aircraft, each cell is individually discharged by connecting a load clip across the terminals of each cell, thereby avoiding cell reversal, then charging the cells in series.
3.6 INVERTER
An inverter is an electrical device that converts direct current (DC) to alternating current (AC); the converted AC can be at any required voltage and frequency with the use of appropriate transformers, switching, and control circuits. Solid-state inverters have no moving parts and are used in a wide range of applications, from small switching power supplies in computers, to large electric utility high-voltage direct current applications that transport bulk power. Inverters are commonly used to supply AC power from DC sources such as solar panels or batteries.
37
Fig: 3.6 Inverter There are two main types of inverter. The output of a modified sine wave inverter is similar to a square wave output except that the output goes to zero volts for a time before switching positive or negative. It is simple and low cost (~$0.10USD/Watt) and is compatible with most electronic devices, except for sensitive or specialized equipment, for example certain laser printers. A pure sine wave inverter produces a nearly perfect sine wave output (<3% total harmonic distortion) that is essentially the same as utility-supplied grid power. Thus it is compatible with all AC electronic devices. This is the type used in grid-tie inverters. Its design is more complex, and costs 5 or 10 times more per unit power (~$0.50 to $1.00USD/Watt). [1] The electrical inverter is a highpower electronic oscillator. It is so named because early mechanical AC to DC converters were made to work in reverse, and thus were "inverted", to convert DC to AC. The inverter performs the opposite function of a rectifier.
38
Fig:3.6 Inverter snap An inverter converts the DC electricity from sources such as batteries, solar panels, or fuel cells to AC electricity. The electricity can be at any required voltage; in particular it can operate AC equipment designed for mains operation, or rectified to produce DC at any desired voltage. Grid tie inverters can feed energy back into the distribution network because they produce alternating current with the same wave shape and frequency as supplied by the distribution system. They can also switch off automatically in the event of a blackout. Micro-inverters convert direct current from individual solar panels into alternating current for the electric grid. They are grid tie designs by default.
Induction heating:
Inverters convert low frequency main AC power to higher frequency for use in induction heating. To do this, AC power is first rectified to provide DC power. The inverter then changes the DC power to high frequency AC power.
Variable-frequency drive :
A variable-frequency drive controls the operating speed of an AC motor by controlling the frequency and voltage of the power supplied to the motor. An inverter provides the controlled power. In most cases, the variable-frequency drive includes a rectifier so that DC power for the inverter can be provided from main AC power. Since an inverter is the key component, variablefrequency drives are sometimes called inverter drives or just inverters.
Air conditioning :
An air conditioner bearing the inverter tag uses a variable-frequency drive to control the speed of the motor and thus the compressor.
Basic designs:
In one simple inverter circuit, DC power is connected to a transformer through the centre tap of the primary winding. A switch is rapidly switched back and forth to allow current to flow back to the DC source following two alternate paths through one end of the primary winding and then the other. The alternation of the direction of current in the primary winding of the transformer produces alternating current (AC) in the secondary circuit.
40
The electromechanical version of the switching device includes two stationary contacts and a spring supported moving contact. The spring holds the movable contact against one of the stationary contacts and an electromagnet pulls the movable contact to the opposite stationary contact. The current in the electromagnet is interrupted by the action of the switch so that the switch continually switches rapidly back and forth. This type of electromechanical inverter switch, called a vibrator or buzzer, was once used in vacuum tube automobile radios. A similar mechanism has been used in door bells, buzzers and tattoo guns. As they became available with adequate power ratings, transistors and various other types of semiconductor switches have been incorporated into inverter circuit designs.
Output waveforms:
The switch in the simple inverter described above, when not coupled to an output transformer, produces a square voltage waveform due to its simple off and on nature as opposed to the sinusoidal waveform that is the usual waveform of an AC power supply. Using Fourier analysis, periodic waveforms are represented as the sum of an infinite series of sine waves. The sine wave that has the same frequency as the original waveform is called the fundamental component. The other sine waves, called harmonics that are included in the series have frequencies that are integral multiples of the fundamental frequency. The quality of the inverter output waveform can be expressed by using the Fourier analysis data to calculate the total harmonic distortion (THD). The total harmonic distortion is the square root of the sum of the squares of the harmonic voltages divided by the fundamental voltage:
The quality of output waveform that is needed from an inverter depends on the characteristics of the connected load. Some loads need a nearly perfect sine wave voltage supply in order to work properly. Other loads may work quite well with a square wave voltage.
41
Advanced designs:
There are many different power circuit topologies and control strategies used in inverter designs. Different design approaches address various issues that may be more or less important depending on the way that the inverter is intended to be used.
Fig: 3.6 H-bridge inverter circuit The issue of waveform quality can be addressed in many ways. Capacitors and inductors can be used to filter the waveform. If the design includes a transformer, filtering can be applied to the primary or the secondary side of the transformer or to both sides. Low-pass filters are applied to allow the fundamental component of the waveform to pass to the output while limiting the passage of the harmonic components. If the inverter is designed to provide power at a fixed frequency, a resonant filter can be used. For an adjustable frequency inverter, the filter must be tuned to a frequency that is above the maximum fundamental frequency. Since most loads contain inductance, feedback rectifiers or antiparallel diodes are often connected across each semiconductor switch to provide a path for the peak inductive load current when the switch is turned off. The antiparallel diodes are somewhat similar to the freewheeling diodes used in AC/DC converter circuits.
harmonics harmonics
System
THD
42
Fourier analysis reveals that a waveform, like a square wave, that is anti-symmetrical about the 180 degree point contains only odd harmonics, the 3rd, 5th, 7th, etc. Waveforms that have steps of certain widths and heights can attenuate certain lower harmonics at the expense of amplifying higher harmonics. For example, by inserting a zero-voltage step between the positive and negative sections of the square-wave, all of the harmonics that are divisible by three (3rd and 9th, etc.) can be
43
eliminated. That leaves only the 5th, 7th, 11th, 13th etc. The required width of the steps is one third of the period for each of the positive and negative steps and one sixth of the period for each of the zero-voltage steps. Changing the square wave as described above is an example of pulse-width modulation (PWM). Modulating, or regulating the width of a square-wave pulse is often used as a method of regulating or adjusting an inverter's output voltage. When voltage control is not required, a fixed pulse width can be selected to reduce or eliminate selected harmonics. Harmonic elimination techniques are generally applied to the lowest harmonics because filtering is much more practical at high frequencies, where the filter components can be much smaller and less expensive. Multiple pulse-width or carrier based PWM control schemes produce waveforms that are composed of many narrow pulses. The frequency represented by the number of narrow pulses per second is called the switching frequency or carrier frequency. These control schemes are often used in variablefrequency motor control inverters because they allow a wide range of output voltage and frequency adjustment while also improving the quality of the waveform. Multilevel inverters provide another approach to harmonic cancellation. Multilevel inverters provide an output waveform that exhibits multiple steps at several voltage levels. For example, it is possible to produce a more sinusoidal wave by having split-rail direct current inputs at two voltages, or positive and negative inputs with a central ground. By connecting the inverter output terminals in sequence between the positive rail and ground, the positive rail and the negative rail, the ground rail and the negative rail, then both to the ground rail, a stepped waveform is generated at the inverter output. This is an example of a three level inverter: the two voltages and ground.
Three-phase inverters are used for variable-frequency drive applications and for high power applications such asHVDC power transmission. A basic three-phase inverter consists of three single-phase inverter switches each connected to one of the three load terminals. For the most basic control scheme, the operation of the three switches is coordinated so that one switch operates at each 60 degree point of the fundamental output waveform. This creates a line-to-line output waveform that has six steps. The six-step waveform has a zero-voltage step between the positive and negative sections of the square-wave such that the harmonics that are multiples of three are eliminated as described above. When carrier-based PWM techniques are applied to six-step waveforms, the basic overall shape, or envelope, of the waveform is retained so that the 3rd harmonic and its multiples are cancelled.
Fig:3.6 3-phase inverter waveform 3-phase inverter switching circuit showing 6-step switching sequence and waveform of voltage between terminals A and C To construct inverters with higher power ratings, two six-step three-phase inverters can be connected in parallel for a higher current rating or in series for a higher voltage rating. In either case, the output waveforms are phase shifted to obtain a 12-step waveform. If additional inverters are combined, an 18-step inverter is obtained with three inverters etc. Although inverters are usually combined for the purpose of achieving increased voltage or current ratings, the quality of the waveform is improved as well. Controlled rectifier inverters Since early transistors were not available with sufficient voltage and current ratings for most inverter applications, it was the 1957 introduction of the thyristor or silicon-controlled rectifier (SCR) that initiated the transition to solid state inverter circuits.
45
Fig: 3.6 12-pulse line-commutated inverter circuit The commutation requirements of SCRs are a key consideration in SCR circuit designs. SCRs do not turn off or commutate automatically when the gate control signal is shut off. They only turn off when the forward current is reduced to below the minimum holding current, which varies with each kind of SCR, through some external process. For SCRs connected to an AC power source, commutation occurs naturally every time the polarity of the source voltage reverses. SCRs connected to a DC power source usually require a means of forced commutation that forces the current to zero when commutation is required. The least complicated SCR circuits employ natural commutation rather than forced commutation. With the addition of forced commutation circuits, SCRs have been used in the types of inverter circuits described above. In applications where inverters transfer power from a DC power source to an AC power source, it is possible to use AC-to-DC controlled rectifier circuits operating in the inversion mode. In the inversion mode, a controlled rectifier circuit operates as a line commutated inverter. This type of operation can be used in HVDC power transmission systems and in regenerative braking operation of motor control systems. Another type of SCR inverter circuit is the current source input (CSI) inverter. A CSI inverter is the dual of a six-step voltage source inverter. With a current source inverter, the DC power supply is configured as a current source rather than a voltage source. The inverter SCRs are switched in a six-step sequence to direct the current to a three-phase AC load as a stepped current waveform. CSI inverter commutation methods include load commutation and parallel capacitor commutation. With both methods, the input current regulation assists the commutation. With load commutation, the load is a synchronous motor operated at a leading power factor.
46
As they have become available in higher voltage and current ratings, semiconductors such as transistors or IGBTs that can be turned off by means of control signals have become the preferred switching components for use in inverter circuits.
47
Fig: 3.7 Switches A switch may be directly manipulated by a human as a control signal to a system, such as a computer keyboard button, or to control power flow in a circuit, such as a light switch. Automatically operated switches can be used to control the motions of machines, for example, to indicate that a garage door has reached its full open position or that a machine tool is in a position to accept another workpiece. Switches may be operated by process variables such as pressure, temperature, flow, current, voltage, and force, acting as sensors in a process and used to automatically control a system. For example, a thermostat is a temperature-operated switch used to control a heating process. A switch that is operated by another electrical circuit is called a relay. Large switches may be remotely operated by a motor drive mechanism. Some switches are used to isolate electric power from a system, providing a visible point of isolation that can be pad-locked if necessary to prevent accidental operation of a machine during maintenance, or to prevent electric shock.
ADC0808:
49
The ADC0808, ADC0809 data acquisition component is a monolithic CMOS device with an 8-bit analog-to-digital converter, 8-channel multiplexer and microprocessor compatible control logic. The 8-bit A/D converter uses successive approximation as the conversion technique. The converter features a high impedance chopper stabilized comparator, a 256R voltage divider with analog switch tree and a successive approximation register. The 8-channel multiplexer can directly access any of 8-single-ended analog signals. The device eliminates the need for external zero and full-scale adjustments. Easy interfacing to microprocessors is provided by the latched and decoded multiplexer address inputs and latched TTL TRI-STATE outputs. The design of the ADC0808, ADC0809 has been optimized by incorporating the most desirable aspects of several A/D conversion techniques. The ADC0808, ADC0809 offers high speed, high accuracy, minimal temperature dependence, excellent long-term accuracy and
50
repeatability, and consumes minimal power. These features make this device ideally suited to applications from process and machine control to consumer and automotive applications. For 16channel multiplexer with common output (sample/hold port).
Features:
Easy interface to all microprocessors Operates ratiometrically or with 5 VDC or analog span adjusted voltage reference No zero or full-scale adjust required 8-channel multiplexer with address logic 0V to VCC input range Outputs meet TTL voltage level specifications ADC0808 equivalent to MM74C949 ADC0809 equivalent to MM74C949-1
Key Specifications:
Resolution 8 Bits Total Unadjusted Error LSB and 1 LSB Single Supply 5 VDC Low Power 15 mW Conversion Time 100 s
4. AT89S52 MICROCONTROLLER
51
Microprocessors and microcontrollers are widely used in embedded systems products. Microcontroller is a programmable device. A microcontroller has a CPU in addition to a fixed amount of RAM, ROM, I/O ports and a timer embedded all on a single chip. The fixed amount of on-chip ROM, RAM and number of I/O ports in microcontrollers makes them ideal for many applications in which cost and space are critical. The Intel 8052 is Harvard architecture, single chip microcontroller (C) which was developed by Intel in 1980 for use in embedded systems. It was popular in the 1980s and early 1990s, but today it has largely been superseded by a vast range of enhanced devices with 8052compatible processor cores that are manufactured by more than 20 independent manufacturers including Atmel, Infineon Technologies and Maxim Integrated Products. 8052 is an 8-bit processor, meaning that the CPU can work on only 8 bits of data at a time. Data larger than 8 bits has to be broken into 8-bit pieces to be processed by the CPU. 8052 is available in different memory types such as UV-EPROM, Flash and NV-RAM. The present project is implemented on Keil Uvision. In order to program the device, proload tool has been used to burn the program onto the microcontroller. The features, pin description of the microcontroller and the software tools used are discussed in the following sections.
FEATURES OF AT89S52:
4K Bytes of Re-programmable Flash Memory. RAM is 128 bytes. 2.7V to 6V Operating Range. Fully Static Operation: 0 Hz to 24 MHz. Two-level Program Memory Lock. 128 x 8-bit Internal RAM.
52
32 Programmable I/O Lines. Two 16-bit Timer/Counters. Six Interrupt Sources. Programmable Serial UART Channel.
Low-power Idle and Power-down Modes.
Description:
The AT89S52 is a low-voltage, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcomputer, which provides a highly flexible and cost-effective solution to many embedded control applications. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The power-down mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.
53
PIN DIAGRAM:
54
ARCHITECTURE DIAGRAM:
Fig: 4 Architecture
55
GND:
Pin 20 is the ground.
Fig: 4.1 Oscillator Connections C1, C2 = 30 pF 10 pF for Crystals = 40 pF 10 pF for Ceramic Resonators
56
RESET:
Pin9 is the reset pin. It is an input and is active high. Upon applying a high pulse to this pin, the microcontroller will reset and terminate all the activities. This is often referred to as a power-on reset.
EA (External access):
Pin 31 is EA. It is an active low signal. It is an input pin and must be connected to either Vcc or GND but it cannot be left unconnected. The 8052 family members all come with on-chip ROM to store programs. In such cases, the EA pin is connected to Vcc. If the code is stored on an external ROM, the EA pin must be connected to GND to indicate that the code is stored externally.
Ports 0, 1, 2 and 3:
57
The four ports P0, P1, P2 and P3 each use 8 pins, making them 8-bit ports. All the ports upon RESET are configured as input, since P0-P3 have value FFH on them.
Port 0(P0):
Port 0 is also designated as AD0-AD7, allowing it to be used for both address and data. ALE indicates if P0 has address or data. When ALE=0, it provides data D0-D7, but when ALE=1, it has address A0-A7. Therefore, ALE is used for demultiplexing address and data with the help of an internal latch. When there is no external memory connection, the pins of P0 must be connected to a 10Kohm pull-up resistor. This is due to the fact that P0 is an open drain. With external pull-up resistors connected to P0, it can be used as a simple I/O, just like P1 and P2. But the ports P1, P2 and P3 do not need any pull-up resistors since they already have pull-up resistors internally. Upon reset, ports P1, P2 and P3 are configured as input ports.
Port 3:
Port 3 occupies a total of 8 pins, pins 10 through 17. It can be used as input or output. P3 does not need any pull-up resistors, the same as port 1 and port 2. Port 3 has an additional function of providing some extremely important signals such as interrupts.
58
ALE/PROG:
59
Address Latch Enable is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.
Ports 0, 1, 2 and 3:
The four ports P0, P1, P2 and P3 each use 8 pins, making them 8-bit ports. All the ports upon RESET are configured as input, since P0-P3 have value FFH on them.
Port 0(P0):
Port 0 is also designated as AD0-AD7, allowing it to be used for both address and data. ALE indicates if P0 has address or data. When ALE=0, it provides data D0-D7, but when ALE=1, it has address A0-A7. Therefore, ALE is used for demultiplexing address and data with the help of an internal latch When there is no external memory connection, the pins of P0 must be connected to a 10K-ohm pullup resistor. This is due to the fact that P0 is an open drain. With external pull-up resistors connected to P0, it can be used as a simple I/O, just like P1 and P2. But the ports P1, P2 and P3 do not need
60
any pull-up resistors since they already have pull-up resistors internally. Upon reset, ports P1, P2 and P3 are configured as input ports.
Port 1:
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current because of the internal pull-ups. Some Port 1 pins provide additional functions. P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively. Furthermore, P1.4, P1.5, P1.6, and P1.7 can be configured as the SPI slave port select, data input/output and shift clock input/output pins. Port 1 also receives the low-order address bytes during Flash programming and verification.
Port 2:
With no external memory connection, P2 are used as simple I/O. With external memory connections, port 2 must be used along with P0 to provide the 16-bit address for the external memory. Port 2 is designated as A8-A15 indicating its dual function. While P0 provides the lower 8 bits via A0-A7, it is the job of P2 to provide bits A8-A15 of the address. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.
Port 3:
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current because of the pull-ups. Port 3 receives some control signals for Flash programming and verification. Port 3 also serves the functions of various special features of the AT89S8252, as shown in the following table.
63
The EEMEN and EEMWE bits are used to select the 2K bytes on-chip EEPROM, and to enable byte-write. The DPS bit selects one of two DPTR registers available.
Function Prescaler Bits. When all three bits are set to 0, the timer has a nominal period of 16 ms. When all three bits are set to 1; the nominal period is 2048 ms. These bits are used for watchdog timer.
EEPROM Data Memory Write Enable Bit. Set this bit to 1 before initiating byte write to on-chip EEPROM with the MOVX instruction. User software should set this bit to 0 after EEPROM write is completed.
EEMEN
Internal EEPROM Access Enable. When EEMEN = 1, the MOVX instruction with DPTR will access on-chip EEPROM instead of external data memory. When EEMEN = 0, MOVX with DPTR accesses external data memory.
DPS
Data Pointer Register Select. DPS = 0 selects the first bank of Data Pointer Register, DP0, and DPS = 1 selects the second bank, DP1
RDY/BSY
RDY/BSY = 1 means that the EEPROM is ready to be programmed. While programming operations are being executed, the RDY/BSY bit equals 0 and is automatically reset to 1 when programming is completed.
WDTEN
EEPROM:
In the design of all microprocessors-based systems, semiconductor memories are used as primary storage for code and data. Semiconductor memories are connected directly to the CPU and they are the memory that the CPU first asks for information (code and data). For this reason, semiconductor memories are sometimes referred to as primary memory.
64
Steps To Write An Assembly / C Language Program In Keil And How To Compile It:
1. Install the Keil Software in the PC in any of the drives. 2. After installation, an icon will be created with the name Keil uVision3. Just drag this icon onto the desktop so that it becomes easy whenever you try to write programs in keil. 3. Double click on this icon to start the keil compiler. 4. A page opens with different options in it showing the project workspace at the leftmost corner side, output window in the bottom and an ash coloured space for the program to be written. 5. Now to start using the keil, click on the option project.
65
6. A small window opens showing the options like new project, import project, open project etc. Click on New project. 7. A small window with the title bar Create new project opens. The window asks the user to give the project name with which it should be created and the destination location. The project can be created in any of the drives available. You can create a new folder and then a new file or can create directly a new file. 8. After the file is saved in the given destination location, a window opens where a list of vendors will be displayed and you have to select the device for the target you have created. 9. The most widely used vendor is Atmel. So click on Atmel and now the family of microcontrollers manufactured by Atmel opens. You can select any one of the microcontrollers according to the requirement. 10. When you click on any one of the microcontrollers, the features of that particular microcontroller will be displayed on the right side of the page. The most appropriate microcontroller with which most of the projects can be implemented is the AT89S52. Click on this microcontroller and have a look at its features. Now click on OK to select this microcontroller. 11. A small window opens asking whether to copy the startup code into the file you have created just now. Just click on No to proceed further. 12. Now you can see the TARGET and SOURCE GROUP created in the project workspace. 13. Now click on File and in that New. A new page opens and you can start writing program in it. 14. After the program is completed, save it with any name but with the .asm or .c extension. Save the program in the file you have created earlier. 15. You can notice that after you save the program, the predefined keywords will be highlighted in bold letters. 16. Now add this file to the target by giving a right click on the source group. A list of options open and in that select Add files to the source group. Check for this file where you have saved and add it. 17. Right click on the target and select the first option Options for target. A window opens with different options like device, target, output etc. First click on target.
66
18. Since the set frequency of the microcontroller is 11.0592 MHz to interface with the PC, just enter this frequency value in the Xtal (MHz) text area and put a tick on the Use on-chip ROM. This is because the program what we write here in the keil will later be dumped into the microcontroller and will be stored in the inbuilt ROM in the microcontroller. 19. Now click the option Output and give any name to the hex file to be created in the Name of executable text area and put a tick to the Create HEX file option present in the same window. The hex file can be created in any of the drives. You can change the folder by clicking on Select folder for Objects. 20. Now to check whether the program you have written is errorless or not, click on the icon exactly below the Open file icon which is nothing but Build Target icon. You can even use the shortcut key F7 to compile the program written. 21. To check for the output, there are several windows like serial window, memory window, project window etc. Depending on the program you have written, select the appropriate window to see the output by entering into debug mode. 22. The icon with the letter d indicates the debug mode. 23. Click on this icon and now click on the option View and select the appropriate window to check for the output. 24. After this is done, click the icon debug again to come out of the debug mode. 25. The hex file created as shown earlier will be dumped into the microcontroller with the help of another software called Proload.
PROLOAD:
Proload is a software which accepts only hex files. Once the machine code is converted into hex code, that hex code has to be dumped into the microcontroller placed in the programmer kit and this is done by the Proload. Programmer kit contains a microcontroller on it other than the one which is to be programmed. This microcontroller has a program in it written in such a way that it accepts the hex file from the keil compiler and dumps this hex file into the microcontroller which is to be programmed. As this programmer kit requires power supply to be operated, this power supply is given from the power supply circuit designed above. It should be noted that this programmer kit contains a power supply section in the board itself but in order to switch on that power supply, a
67
source is required. Thus this is accomplished from the power supply board with an output of 12volts or from an adapter connected to 230 V AC. 1. Install the Proload Software in the PC. 2. Now connect the Programmer kit to the PC (CPU) through serial cable. 3. Power up the programmer kit from the ac supply through adapter. 4. Now place the microcontroller in the GIF socket provided in the programmer kit. 5. Click on the Proload icon in the PC. A window appears providing the information like Hardware model, com port, device type, Flash size etc. Click on browse option to select the hex file to be dumped into the microcontroller and then click on Auto program to program the microcontroller with that particular hex file. 6. The status of the microcontroller can be seen in the small status window in the bottom of the page.After this process is completed, remove the microcontroller from the programmer kit and place it in your system board. Now the system board behaves according to the program written in the microcontroller.
68
ADVANTAGES: 1. The wind is free and with modern technology it can be captured efficiently. 2. Once the wind turbine is built the energy it produces does not cause green house gases or other pollutants. 3. Although wind turbines can be very tall each takes up only a small plot of land. This means that the land below can still be used. This is especially the case in agricultural areas as farming can still continue. 4. Many people find wind farms an interesting feature of the landscape. 5. Remote areas that are not connected to the electricity power grid can use wind turbines to produce their own supply. 6. Wind turbines have a role to play in both the developed and third world. 7. Wind turbines are available in a range of sizes which means a vast range of people and businesses can use them. Single households to small towns and villages can make good use of range of wind turbines available today. APPLICATIONS
69
Farm Windmill Golf Course Aeration Cattle Farm Windmill Pond Aeration Residential Water Aeration Fish Ponds and Hatcheries West Nile Virus Prevention
7. RESULT
INPUT:
OUTPUT:
70
8. CONCLUSION
Windmills have been used for centuries for various purposes. Today, they are primarily used to generate power and they do so quite efficiently when compared with other renewable resources such as solar. The energy is completely clean and has little effects of the environment. Depending on the overall size the rotor will directly affect the power output capabilities of the system. The larger the rotor is the higher the output power. The downside to a windmill is that they cannot always generate 100% power. The wind hitting the rotor is constantly changing and with it so does the power output of the windmill. Windmills can also be noisy because of the rotation from the rotors, because of this they are not good to be placed near homes. Another downside, is since wind is not always constant these systems need to be backed up with other renewable sources in case of the absence of wind. However, windmills are still a very vital and important part of the move towards complete renewable energy and we may start to see a substantial increase in their use around the world.
71
72
11. BIBILOGRAPHY
1. http://www.windmillpower.com/product-info.html 2. The Boy Who Harnessed the Windby William Kamkwamba and Bryan Mealer 3. http://www.royalwindandsolar.com/ 4. wikipedia 5. 6. 7. 8. 9. EMBEDDED SYSTEM BY RAJ KAMAL Magazines Electronics for you Electrikindia WWW.google.com
73
12. APPENDIX
12.1 ABBREVATIONS
74
12.2 CODING
75
76
77