Professional Documents
Culture Documents
ABSTRACT
Embedded systems are designed to do some specific task, rather than be a generalpurpose computer for multiple tasks. Some also have real time performance constraints that must be met, for reason such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs.
An embedded system is not always a separate block - very often it is physically built-in to the device it is controlling. The software written for embedded systems is often called firmware, and is stored in read-only memory or flash convector chips rather than a disk drive. It often runs with limited computer hardware resources: small or no keyboard, screen, and little memory.
In todays world in cultivation where there is a requirement of pumping water to lands, by using this scenario we can have the knowledge of the land weather it is dry or wet with the help of microcontroller, we can activate the motor with the help of its driver circuit L293D and thereby motor pumps the water into the land, the status of the presence of water available in land can be notified with the help of an SMS in the form of alert to the authorized mobile number which is programmed into the microcontroller. The status of the project is displayed on a 16X2 LCD. This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac output of secondary of 12V battery, which is powered by a solar panel.
BLOCK DIAGRAM:
Technical Specifications :
1. INTRODUCTION EMBEDDED SYSTEMS In this world of knowledge everything around us is run by Computing Systems. The technical Brilliance and Developments in different fields has led to a drastic change in our lives especially in the communications field. Due to various changes in technologies many systems have come up with breathtaking developments. One amongst them is the EMBEDDED SYSTEMS. It is the evolution or further development of computing system. Its applications provide tremendous opportunities for creative use of computer technology. Almost every new system introduced in the market is an example of Embedded System. An embedded system is basically a close interaction of hardware and software. The design part involves different instruction sets in terms of functionality, compactness of code, power consumption, performance, and reliability so on. The Embedded software interacts with the hardware circuitry to generate the desired functionality. An embedded application software. systems typically comprises the hardware, embedded RTOS, device drivers, communication stacks and embedded
Understand Understanduser user requirements requirements Fig:1.1 parts of an embedded system Choose optimum optimum Apart from the common Choose computer applications there are many applications, which electronic electronicchip chip do not need high performances. S/W Side H/W Side
HLL/ALL HLL/ALL Algorithm Embedded Product Algorithm development Life Cycle:Coding/Editing Coding/Editing Compiling/Assembling Compiling/Assembling Debugging Debugging Testing Testing Simulator Simulator S/W S/W Download H/W H/W Testing Testing PCB PCBLayout Layoutdesign design
Fig:1.2 life cycle of an embedded system Design Considerations for an Embedded System Unlike software designed for general-purpose computers, embedded software cannot usually be run on other embedded system without significant modification. This is mainly because of the incredible variety in the underlying hardware. The hardware in each embedded system is tailored specifically to the application, in order to keep system costs low. As a result, unnecessary circuitry is eliminated and hardware resources are shared whenever possible. In order to have software, there must be a place to store the executable code and temporary storage for runtime data manipulation. These take the form of ROM and RAM, respectively. All embedded systems also contain some type of inputs and outputs. It is almost always the case that the outputs of the embedded system are a function of its inputs and several other factors. The inputs to the system usually take the form of sensors and probes, communication signals, or control knobs and buttons. The outputs are typically displays, communication signals, or changes to the physical world.
Memory Memory
Inputs Inputs
Processor Processor
Outputs Outputs
Fig:1.3 design considerations of embedded systems Other common design requirement includes Processing power Memory Development cost Number of Units Expected Lifetime Reliability Processing power This is the amount of processing power necessary to get the hob done. A common way to compare processing power is the MIPS (millions of instructions per second) rating. Other important features of the processor need to be consider is register width, typically ranges from 8 to 64 bits.
Memory The amount of memory (ROM and RAM) required holding the executable software and data it manipulates. The amount of memory required can also affect the processor selection. In general, the register width off a processor establishes the upper limit of the amount of memory it can access. Development cost The development cost of the hardware and software design processes is a fixed, one-time cost, so it might be that money is no object or that this is the only accurate measure of system cost.
Some common characteristics of embedded systems are Single-functioned Executes a single program, repeatedly Tightly-constrained Low cost, low power, small, fast, etc.
EMBEDDED SYSTEM CLASSIFICATION Autonomous Embedded Systems: response times are not critical. devices. Eg. : Air Conditioners, CD Players. Real time Embedded Systems: These are used to carry out time critical task process control. Eg. : Boiler Plant must open the valves in a stipulated time; else the pressure Exceeding its threshold results in a catastrophe. Networked Embedded Systems: They monitor plant parameters such as temperature, Pressure, humidity and send the data over the network to a centralized system for online monitoring. Eg. : A network enabled web cam monitoring the plant floor transmits its video output to a remote controlling organization. Mobile Embedded Systems: Mobile gadgets need to store databases locally in their memory. These gadgets imbibe powerful, computing and communication capabilities to perform real time as well as non-real time tasks and handle multimedia applications. The gadgets embed powerful processor and OS and a lot of memory with minimal power consumption. Advantage Customization yields lower area, power, cost. Disadvantages These systems function in standalone mode Where the The input signals originating from transducers Convert a
physical quantity like temperature into electric signals. Also, the system output controls the
functions
etc.)
in
8-bit ALU, Accumulator and 8-bit Registers; hence it is an 8-bit microcontroller 8-bit data bus - It can access 8 bits of data in one operation 16-bit address bus - It can access 216 memory locations - 64 KB (65536 locations) each of RAM and ROM On-chip RAM - 128 bytes (data memory) On-chip ROM - 4 kByte (program memory) Four byte bi-directional input/output port UART (serial port) Two 16-bit Counter/timers Two-level interrupt priority Power saving mode (on some derivatives)
A particularly useful feature of the 8051 core is the inclusion of a boolean processing engine which allows bit-level boolean logic operations to be carried out directly and efficiently on internal registers and RAM. This feature helped cement the 8051's popularity in industrial control applications. Another valued feature is that it has four separate register sets, which can be used to greatly reduce interrupt latency compared to the more common method of storing interrupt context on a stack.
Memory architecture The 8051 has four distinct types of memory - internal RAM, special function registers, program memory, and external data memory.
Programming There are various high-level programming language compilers for the 8051. Several C compilers are available for the 8051, most of which feature extensions that allow the programmer to specify where each variable should be stored in its six types of memory, and provide access to 8051 specific hardware features such as the multiple register banks and bit manipulation instructions. There are many commercial C compilers. SDCC is a popular open source C compiler. Other high level languages such as Forth, BASIC, Pascal/Object Pascal, PL/M and Modula-2 are available for the 8051, but they are less widely used than C and assembly. Because IRAM, XRAM, and PMEM all have an address 0, C compilers for the 8051 architecture provide compiler-specific pragmas or other extensions to indicate where a particular piece of data should be stored (i.e. constants in PMEM or variables needing fast access
direct register, using ACC (the accumulator) and R0-R7 direct memory, which access the internal RAM or the SFR's, depending on the address indirect memory, using R0, R1, or DPTR to hold the memory address. The instruction used may vary to access internal RAM, external RAM, or program memory. individual bits of a range of IRAM and some of the SFR's
Many of the operations allow any addressing mode for the source or the destination, for example, MOV 020h, 03fh will copy the value in memory location 0x3f in the internal RAM to the memory location 0x20, also in internal RAM. Because the 8051 is an accumulator-based architecture, all arithmetic operations must use the accumulator, e.g. ADD A, 020h will add the value in memory location 0x20 in the internal RAM to the accumulator. One does not need to master these instructions to program the 8051. With the availability of good quality C compilers, including open source SDCC, virtually all programs can be written with high-level language.
Related processors
Table:1.5 Graphical presentation of the 8051's SFRs, their names, and their address
As you can see, although the address range of 80h through FFh offer 128 possible addresses, there are only 21 SFRs in a standard 8051. All other addresses in the SFR range (80h through FFh) are considered invalid. Writing to or reading from these registers may produce undefined values or behavior. Programming Tip: It is recommended that you not read or write to SFR addresses that have not been assigned to an SFR. Doing so may provoke undefined behavior and may cause your program to be incompatible with other 8051-derivatives that use the given SFR for some other purpose.
SFR Types As mentioned in the chart itself, the SFRs that have a blue background are SFRs related to the I/O ports. The 8051 has four I/O ports of 8 bits, for a total of 32 I/O lines. Whether
SFR Descriptions This section will endeavor to quickly overview each of the standard SFRs found in the above SFR chart map. It is not the intention of this section to fully explain the functionality of each SFR--this information will be covered in separate chapters of the tutorial. This section is to just give you a general idea of what each SFR does. P0 (Port 0, Address 80h, Bit-Addressable): This is input/output port 0. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 0 is pin P0.0, bit 7 is pin P0.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level. Programming Tip: While the 8051 has four I/O port (P0, P1, P2, and P3), if your hardware uses external RAM or external code memory (i.e., your program is stored in an external ROM or EPROM chip or if you are using external RAM chips) you may not use P0 or P2. This is because the 8051 uses ports P0 and P2 to address the external memory. Thus if you are using external RAM or code memory you may only use ports P1 and P3 for your own use. SP (Stack Pointer, Address 81h): This is the stack pointer of the microcontroller. This SFR indicates where the next value to be taken from the stack will be read from in Internal RAM. If you push a value onto the stack, the value will be written to the address of SP + 1. That is to say, if SP holds the value 07h, a PUSH instruction will push the value onto the stack at address 08h. This SFR is modified by all instructions which modify the stack, such as PUSH, POP, LCALL, RET, RETI, and whenever interrupts are provoked by the microcontroller. Programming Tip: The SP SFR, on startup, is initialized to 07h. This means the stack will start at 08h and start expanding upward in internal RAM. Since alternate register banks 1, 2, and 3 as well as the user bit variables occupy internal RAM from addresses 08h through 2Fh, it is necessary to initialize SP in your program to some other value if you will be using the alternate register banks and/or bit memory. It's not a bad idea to initialize SP to 2Fh as the first instruction of every
SCON (Serial Control, Addresses 98h, Bit-Addressable): The Serial Control SFR is used to configure the behavior of the 8051's on-board serial port. This SFR controls the baud rate of the serial port, whether the serial port is activated to receive data, and also contains flags that are set when a byte is successfully sent or received. Programming Tip: To use the 8051's on-board serial port, it is generally necessary to initialize the following SFRs: SCON, TCON, and TMOD. This is because SCON controls the serial port. However, in most cases the program will wish to use one of the timers to establish the serial port's baud rate. In this case, it is necessary to configure timer 1 by initializing TCON and TMOD. SBUF (Serial Control, Addresses 99h): The Serial Buffer SFR is used to send and receive data via the on-board serial port. Any value written to SBUF will be sent out the serial port's TXD pin. Likewise, any value which the 8051 receives via the serial port's RXD pin will be delivered to the user program via SBUF. In other words, SBUF serves as the output port when written to and as an input port when read from. P2 (Port 2, Address A0h, Bit-Addressable): This is input/output port 2. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 2 is pin P2.0, bit 7 is pin P2.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level. Programming Tip: While the 8051 has four I/O port (P0, P1, P2, and P3), if your hardware uses external RAM or external code memory (i.e., your program is stored in an external ROM or EPROM chip or if you are using external RAM chips) you may not use P0 or P2. This is because the 8051 uses ports P0 and P2 to address the external memory. Thus if you are using external RAM or code memory you may only use ports P1 and P3 for your own use. IE (Interrupt Enable, Addresses A8h): The Interrupt Enable SFR is used to enable and disable specific interrupts. The low 7 bits of the SFR are used to enable/disable the specific interrupts, where as the highest bit is used to enable or disable ALL interrupts. Thus, if the high bit of IE is 0 all interrupts are disabled regardless of whether an individual interrupt is enabled by setting a lower bit. P3 (Port 3, Address B0h, Bit-Addressable): This is input/output port 3. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 3 is pin P3.0, bit 7 is pin P3.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level. IP (Interrupt Priority, Addresses B8h, Bit-Addressable): The Interrupt Priority SFR is used to specify the relative priority of each interrupt. On the 8051, an interrupt may either be of low (0) priority or high (1) priority. An interrupt may only interrupt interrupts of lower priority. For example, if we configure the 8051 so that all interrupts are of low priority except the serial interrupt, the serial interrupt will always be able to interrupt the system, even if another interrupt is currently executing. However, if a serial interrupt is executing no other interrupt will be able to interrupt the serial interrupt routine since the serial interrupt routine has the highest priority. PSW (Program Status Word, Addresses D0h, Bit-Addressable): The Program Status Word is used to store a number of important bits that are set and cleared by 8051 instructions. The PSW SFR contains the carry flag, the auxiliary carry flag, the overflow
Other SFRs
The chart above is a summary of all the SFRs that exist in a standard 8051. All derivative microcontrollers of the 8051 must support these basic SFRs in order to maintain compatability with the underlying MSCS51 standard. A common practice when semiconductor firms wish to develop a new 8051 derivative is to add additional SFRs to support new functions that exist in the new chip. For example, the Dallas Semiconductor DS80C320 is upwards compatible with the 8051. This means that any program that runs on a standard 8051 should run without modification on the DS80C320. This means that all the SFRs defined above also apply to the Dallas component. However, since the DS80C320 provides many new features that the standard 8051 does not, there must be some way to control and configure these new features. This is accomplished by adding additional SFRs to those listed here. For example, since the DS80C320 supports two serial ports (as opposed to just one on the 8051), the SFRs SBUF2 and SCON2 have been added. In addition to all the SFRs listed above, the DS80C320 also recognizes these two new SFRs as valid and uses their values to determine the mode of operation of the secondary serial port. Obviously, these new SFRs have been assigned to SFR addresses that were unused in the original 8051. In this manner, new 8051 derivative chips may be developed which will run existing 8051 programs.
PIN DIAGRAM
BLOCKDIAGRAM
Pin Description VCC: Supply voltage. GND: Ground. Port 0 Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external
port 3 pin description RESET Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROG Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALEdisable bit has no effect if the microcontroller is in external execution mode. Program Store Enable is the read strobe to external program memory. When the AT89S51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA /VPP External Access Enable must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2
Connections of oscillator
Diagram for types of memory EXTERNAL CODE MEMORY Is code (or program) memory that resides off-chip. This is often in the form of an external EPROM. EXTERNAL RAM Is RAM memory that resides off-chip. This is often in the form of standard static RAM or flash RAM. CODE MEMORY Code memory is the memory that holds the actual 89S52 program that is to be run. This memory is limited to 64K and comes in many shapes and sizes: Code memory may be found on-chip, either burned into the microcontroller as ROM or EPROM. Code may also be stored completely off-chip in an external ROM or, more commonly, an external EPROM. Flash RAM is also another popular method of storing a program. Various combinations of these memory types may also be used that is to say, it is possible to have 4K of code memory on-chip and 64k of code memory off chip in an EPROM. When the program is stored on-chip the 64K maximum is often reduced to 4k, 8k, or 16k. This varies depending on the version of the chip that is being used. Each version offers specific capabilities and one of the distinguishing factors from chip to chip is how much ROM/EPROM space the chip has.
Fig3.6 On chip memory diagram As is illustrated in above map, the 89S52 has a bank of 128 bytes of Internal RAM. This Internal RAM is found on-chip on the 89S52 so it is the fastest RAM available, and it is also the most flexible in terms of reading, writing, and modifying its contents. Internal RAM is volatile, so when the 89S52 is reset this memory is cleared.
POWER SUPPLY The power supplies are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronic circuits and other devices. A power supply can by broken down into a series of blocks, each of which performs a particular function. A d.c power supply which maintains the output voltage constant irrespective of a.c mains fluctuations or load variations is known as Regulated D.C Power Supply For example a 5V regulated power supply system as shown below:
Block diagram of power supply Transformer Transformers are static devices made up of one or more windings, in which those with two or more windings are coupled, and may be manufactured with or without a magnetic core. They are used in induction of currents, producing a coupling between two circuits. Transformers typically change values of voltage and current and are always used in transferring power through electromagnetic induction between circuits at the same frequency. To the left are links to pages o this site that are about various kinds of transformers. A Transformer's output (neglecting losses due to resistance or other manufacturing and physical factors) will be predictably computed by the general formula: V2/V1=N2/N1. And transformer can also be defined as A transformer is an electrical device which is used to convert electrical power from one Electrical circuit to another without change in frequency. Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is AC. Transformers can be differentiated in two ways they are 1. Step up Transformer 2. Step down Transformer
Step up transformer
step up transformer Transformers only work with alternating current. Using direct current will create a magnetic field in the core but it will not be a changing magnetic field and so no voltage will be induced in the secondary coil. Using a step up transformer to increase the voltage does not give you something for nothing. As the voltage goes up, the current goes down by the same proportion. The power equation shows that the overall power remains the same. P=V x I Power = Voltage x Current In reality, the power output is always less than the power input because the changing magnetic field in the core creates currents (called eddy currents) which heat the core. This heat is then lost to the environment, it is wasted energy. Electricity is first produced at the power plants. Electricity is then sent to step-up transformers where low-voltage electricity is changed to high voltage to facilitate the transfer of power from the power plant to the customer. Voltage must be increased so that the electric current has the "push" it needs to efficiently travel long distances. From the step-up transformer, transmission lines carry the high voltage electric current long distances through thick wires mounted on tall towers that keep the transmission lines high above the ground. Insulators made of porcelain or polymers are used to prevent the electricity from leaving the transmission lines. High-voltage transmission lines carry the electric current to substations where the voltage is lowered so it that can be distributed locally on smaller power lines known as distribution lines. Distribution line voltage levels are typically 4 kV or 12 kV. These voltages are reduced one last time at smaller pole-top transformers to utilization voltages, typically 120 and 240 volts, to make the power safe to use in our homes. Step down transformer
step down transformer Step down transformers are designed to reduce electrical voltage. Their primary voltage is greater than their secondary voltage. This kind of transformer "steps down" the voltage applied to it. For instance, a step down transformer is needed to use a 110v product in a country with a 220v supply. Step down transformers convert electrical voltage from one level or phase configuration usually down to a lower level. They can include features for electrical isolation, power distribution, and control and instrumentation applications. Step down transformers typically rely on the principle of magnetic induction between coils to convert voltage and/or current levels. Step down transformers are made from two or more coils of insulated wire wound around a core made of iron. When voltage is applied to one coil (frequently called the primary or input) it magnetizes the iron core, which induces a voltage in the other coil, (frequently called the secondary or output). The turns ratio of the two sets of windings determines the amount of voltage transformation. An example of this would be: 100 turns on the primary and 50 turns on the secondary, a ratio of 2 to 1. Step down transformers can be considered nothing more than a voltage ratio device. With step down transformers the voltage ratio between primary and secondary will mirror the "turns ratio" (except for single phase smaller than 1 kv a which have compensated secondarys). A practical application of this 2 to 1 turns ratio would be a 480 to 240 voltage step down. Note that if the input were 440 volts then the output would be 220 volts. The ratio between input and output voltage will stay constant. Transformers should not be operated at voltages higher than the nameplate rating, but may be operated at lower voltages than rated. Because of this it is possible to do some non-standard applications using standard transformers. Single phase step down transformers 1 kva and larger may also be reverse connected to stepdown or step-up voltages. (Note: single phase step up or step down transformers sized less than 1 KVA should not be reverse connected because the secondary windings have additional turns to
Turns ratio = Vp/ VS = Np/NS Power Out= Power In VS X IS=VP X IP Vp = primary (input) voltage Np = number of turns on primary coil Ip = primary (input) current
Fig:3.14 Bridge rectifier Alternate pairs of diodes conduct, changing over the connections so the alternating directions of AC are converted to the one direction of DC
During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward biased while D2 and D3 are in reverse biased as shown in the fig(c). The current flow direction is shown in the fig (c) with dotted arrows
Fig:3.16 bridge rectifier negative half cycle Single diode rectifier A single diode can be used as a rectifier but this produces half-wave varying DC which has gaps when the AC is negative. It is hard to smooth this sufficiently well to supply electronic circuits unless they require a very small current so the smoothing capacitor does not significantly discharge during the gaps. Please see the Diodes page for some examples of rectifier diodes.
A circuit which is used to convert a.c to dc is known as RECTIFIER. The process of conversion a.c to d.c is called rectification
Comparison of rectifier circuits Type of Rectifier Parameter Number of diodes 1 PIV of diodes Vm D.C output voltage Vm/ 2Vm 2Vm/ Vm 2Vm/ 2 4 Half wave Full wave Bridge
Table:3.2 comparision of rectifier circuits Full-wave Rectifier From the above comparison we came to know that full wave bridge rectifier as more advantages than the other two rectifiers. So, in our project we are using full wave bridge rectifier circuit. Filter or smoothening circuit Smoothing is performed by a large value electrolytic capacitor connected across the DC supply to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The diagram shows the unsmoothed varying DC (dotted line) and the smoothed DC (solid line). The capacitor charges quickly near the peak of the varying DC, and then discharges as it supplies current to the output.
fig:3.18 smoothing circuit and its waveform Note that smoothing significantly increases the average DC voltage to almost the peak value (1.4 RMS value). For example 6V RMS AC is rectified to full wave DC of about 4.6V RMS (1.4V is lost in the bridge rectifier), with smoothing this increases to almost the peak value giving 1.4 4.6 = 6.4V smooth DC. Smoothing is not perfect due to the capacitor voltage falling a little as it discharges,
A Filter is a device which removes the a.c component of rectifier output but allows the d.c component to reach the load As we have already seen, the rectifier circuitry takes the initial ac sine wave from the transformer or other source and converts it to pulsating dc. A full-wave rectifier will produce the waveform shown to the right, while a half-wave rectifier will pass only every other half-cycle to its output. This may be good enough for a basic battery charger, although some types of rechargeable batteries still won't like it. In any case, it is nowhere near good enough for most electronic circuitry. We need a way to smooth out the pulsations and provide a much "cleaner" dc power source for the load circuit. To accomplish this, we need to use a circuit called a filter. In general terms, a filter is any circuit that will remove some parts of a signal or power source, while allowing other parts to continue on without significant hinderance. In a power supply, the filter must remove or drastically reduce the ac variations while still making the desired dc available to the load circuitry. Filter circuits aren't generally very complex, but there are several variations. Any given filter may involve capacitors, inductors, and/or resistors in some combination. Each such combination has both advantages and disadvantages, and its own range of practical application. We will examine a number of common filter circuits on this page. A Single Capacitor
Fig:3.19 single capacitor circuit and its waveform If we place a capacitor at the output of the full-wave rectifier as shown to the left, the capacitor will charge to the peak voltage each half-cycle, and then will discharge more slowly through the load while the rectified voltage drops back to zero before beginning the next half-cycle. Thus, the capacitor helps to fill in the gaps between the peaks, as shown in red in the first figure to the right. Although we have used straight lines for simplicity, the decay is actually the normal exponential decay of any capacitor discharging through a load resistor. The extent to which the capacitor voltage drops depends on the capacitance of the capacitor and the amount of current drawn by the load; these two factors effectively form the RC time constant for voltage decay.
As a result, the actual voltage output from this combination never drops to zero, but rather takes the shape shown in the second figure to the right. The blue portion of the waveform corresponds to the portion of the input cycle where the rectifier provides current to the load, while the red portion shows when the capacitor provides current to the load. As you can see, the output voltage, while not pure dc, has much less variation (or ripple, as it is called) than the unfiltered output of the rectifier. A half-wave rectifier with a capacitor filter will only recharge the capacitor on every other peak shown here, so the capacitor will discharge considerably more between input pulses. Nevertheless, if the output voltage from the filter can be kept high enough at all times, the capacitor filter is sufficient for many kinds of loads, when followed by a suitable regulator circuit.
RC Filters
RC filters In order to reduce the ripple still more without losing too much of the dc output, we need to extend the filter circuit a bit. The circuit to the right shows one way to do this. This circuit does cause some dc loss in the resistor, but if the required load current is low, this is an acceptable loss.To see how this circuit reduces ripple voltage more than it reduces the dc output voltage, consider a load circuit that draws 10 mA at 20 volts dc. We'll use 100 f capacitors and a 100 resistor in the filter. For dc, the capacitors are effectively open circuits. Therefore any dc losses will be in that 100 resistor. for a load current of 10 mA (0.01 A), the resistor will drop 100 0.01 = 1 volt. Therefore, the dc output from the rectifier must be 21 volts, and the dc loss in the filter resistor amounts to 1/21, or about 4.76% of the rectifier output. This is generally quite acceptable. On the other hand, the ripple voltage (in the USA) exists mostly at a frequency of 120 Hz (there are higher-frequency components, but they will be attenuated even more than the 120 Hz component). At this frequency, each capacitor has a reactance of about 13.26 . Thus R and C2 form a voltage divider that reduces the ripple to about 13% of what came from the rectifier. Therefore, for a dc loss of less than 5%, we have attenuated the ripple by almost 87%. This is a substantial amount of ripple reduction, although it doesn't remove the ripple entirely. If the amount of ripple is still too much for the particular load circuit, additional filtering or a regulator circuit will be required.
LC Filters
full wave rectifier with a capacitor filter To understand better the effect that filtering has on E avg , compare the rectifier circuits without filters in figure 3-21 to those with filters in figure 3-22. The output waveforms in figure 3-21 represent the unfiltered outputs of the half-wave and full-wave rectifier circuits. Current pulses flow through the load resistance (R L) each time a diode conducts. The dashed line indicates the average value of output voltage. For the halfwave rectifier, Eavg is less than half the peak output voltage (or approximately 0.318 of the peak output voltage). For the full-wave rectifier, E avg is approximately 0.637. This value is still much less than the applied voltage. With no capacitor connected across the output of the rectifier circuit, the waveform has a large pulsating component (ripple) compared with the average or dc component. Now refer to figure 3-22. When a capacitor is connected across the output (in parallel with R L), the average value of output voltage (Eavg) is increased due to the filtering action of capacitor C1.
The value of the capacitor is fairly large (several microfarads); it thus presents a relatively low reactance to the pulsating current and stores a substantial charge. The rate of charge for the capacitor is limited only by the relatively low resistance of the conducting diode. The RC charge time of the circuit is, therefore, relatively short. As a result, when the pulsating voltage is first applied to the circuit, the capacitor charges rapidly and almost reaches the peak value of the rectified voltage within the first few cycles. The capacitor attempts to charge to the peak value of the rectified voltage anytime a diode is conducting, and tends to retain its charge when the rectifier output falls to zero. (The capacitor cannot discharge immediately). The capacitor slowly discharges through the load resistance (RL) during the time the rectifier
fig:3.25 Regulators An assortment of 78XX ICs The 78xx (also sometimes known as LM78xx) series of devices is a family of selfcontained fixed linear voltage regulator integrated circuits. The 78xx family is a very popular choice for many electronic circuits which require a regulated power supply, due to their ease of use and relative cheapness. When specifying individual ICs within this family, the xx is replaced with a two-digit number, which indicates the output voltage the particular device is designed to provide (for example, the 7805 has a 5 volt output, while the 7812 produces 12 volts). The 78xx line are positive voltage regulators, meaning that they are designed to produce a voltage that is positive relative to a common ground. There is a related line of 79xx devices which are complementary negative voltage regulators. 78xx and 79xx ICs can be used in combination to provide both positive and negative supply voltages in the same circuit, if necessary. 78xx ICs have three terminals and are most commonly found in the TO220 form factor, although smaller surface-mount and larger TO3 packages are also available from some manufacturers. These devices typically support an input voltage which can be anywhere from a couple of volts over the intended output voltage, up to a maximum of 35 or 40 volts, and can typically provide up to around 1 or 1.5 amps of current (though smaller or larger packages may have a lower or higher current rating). Advantages The 78xx series has several key advantages over many other voltage regulator circuits which have resulted in its popularity:
78xx series ICs do not require any additional components to provide a constant, regulated source of power, making them easy to use, as well as economical, and also efficient uses of circuit board real estate. By contrast, most other voltage
78xx series ICs have built-in protection against a circuit drawing too much power. They also have protection against overheating and short-circuits, making them quite robust in most applications. In some cases, the current-limiting features of the 78xx devices can provide protection not only for the 78xx itself, but also for other parts of the circuit it is used in, preventing other components from being damaged as well.
Disadvantages The 78xx devices have a few drawbacks which can make them unsuitable or less desirable for some applications:
The input voltage must always be higher than the output voltage by some minimum amount (typically 2 volts). This can make these devices unsuitable for powering some devices from certain types of power sources (for example, powering a circuit which requires 5 volts using 6-volt batteries will not work using a 7805). As they are based on a linear regulator design, the input current required is always the same as the output current. As the input voltage must always be higher than the output voltage, this means that the total power (voltage multiplied by current) going into the 78xx will be more than the output power provided. The extra input power is dissipated as heat. This means both that for some applications an adequate heatsink must be provided, and also that a (often substantial) portion of the input power is wasted during the process, rendering them less efficient than some other types of power supplies. When the input voltage is significantly higher than the regulated output voltage (for example, powering a 7805 using a 24 volt power source), this inefficiency can be a significant issue. Even in larger packages, 78xx integrated circuits cannot supply as much power as many designs which use discrete components, and therefore are generally not
National Semiconductor Fairchild Semiconductor Datel Korea Electronics Company (KEC) Semelab Unisonic Technologies Bay Linear NTE Electronics Power Mate (PDuke) Motorola
Individual devices in series There are several common configurations for 78xx ICs, including 7805 (5 volt), 7806 (6 volt), 7808 (8 volt), 7809 (9 volt), 7810 (10 volt), 7812 (12 volt), 7815 (15 volt), 7818 (18 volt), and 7824 (24 volt) versions. The 7805 is very commonly used, as its regulated 5 volt supply can provide an easy and useful power source for most TTL components. Some manufacturers also produce less common variations on the 78xx design, including lower-power versions such as the LM78Mxx series (500mA) and LM78Lxx series (100mA) from National Semiconductor. Some devices also provide slightly different voltages than usual, such as the LM78L62 (6.2 volts) and LM78L82 (8.2 volts).
Unrelated Devices Despite similar names, the LM78S40 device from National Semiconductor is not part of the usual 78xx family, and does not use the same design. It is intended to be used as a component in switching regulator designs, and is not a linear regulator like other 78xx devices. Likewise, the 7803SR from Datel is actually a full switching power
LM317 A similar linear regulator chip with a configurable output voltage. DC to DC converter A class of devices which convert one DC voltage level to another. Linear regulators (and thus 78xx devices) are a form of DC to DC converter.
External links Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output voltages. The maximum current they can pass also rates them. Negative voltage regulators are available, mainly for use in dual supplies. Most regulators include some automatic protection from excessive current ('overload protection') and overheating ('thermal protection'). Many of the fixed voltage regulator ICs has 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805 is simple to use. You simply connect the positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and then when you turn on the power, you get a 5 volt supply from the
output pin. Fig:3.26 LM7805 Regulators 78XX The Bay Linear LM78XX is integrated linear positive regulator with three terminals. The LM78XX offer several fixed output voltages making them useful in wide range of applications. When used as a zener diode/resistor combination replacement, the LM78XX usually results in an effective output impedance improvement of two orders of magnitude, lower quiescent current. The LM78XX is available in the TO-252, TO-220 & TO-263packages, Features Output Current of 1.5A Output Voltage Tolerance of 5% Internal thermal overload protection
FUNCTION
CONNECTING AND SOLDERING LEDs must be connected the correct way round, the diagram may be labelled a or + for anode and k or - for cathode (yes, it really is k, not c, for cathode!). The cathode is the short lead and there may be a slight flat on the body of round LEDs. If you can see inside the LED the cathode is the larger electrode (but this is not an official identification method). LEDs can be damaged by heat when soldering, but the risk is small unless you are very slow. No special precautions needed for soldering most LEDs. TESTING AN LED Never connect an LED directly to a battery powersupply! It will be destroyed almost instantly because too much current will pass through and burn it out. LEDs must have a resistor in series to limit the current to a safe value, for quick testing purposes a 1k resistor is suitable for most LEDs if your supply voltage is 12V or less. Remember connect the LED the correct way round! MAX232 The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver and typically converts the RX, TX, CTS and RTS signals. The drivers provide RS-232 voltage level outputs (approx. 7.5 V) from a single + 5 V supply via on-chip charge pumps and external capacitors. This makes it useful for implementing RS-232 in devices that otherwise do not need any voltages outside the 0 V to + 5 V range, as power supply design does not need to be made more complicated just for driving the RS-232 in this case. The receivers reduce RS-232 inputs (which may be as high as 25 V), to standard 5 V TTLlevels. These receivers have a typical threshold of 1.3 V, and a
+3 V to +15 V 0 V
-3 V to -15 V 5 V
-3 V to -15 V 5 V
+3 V to +15 V 0 V
RELAYS
Relay and Switch: 1. Mechanical relay: Typical Mechanical Relay connection pin This is a very important section. The introduction to this electrical control switch, call a Relay. It is basically a device to activate a mechanical switch, by electrical means. This is unlike a switch which is activated manually. In another words it is a device that convert electrical signal to a mechanical energy back to electrical signal again.Similar to mechanical switch, they can be described as 2P2T, single pole double throw, etc...
2. Reed relay : Reed Relay is a smaller version of relay. Package is inplastic. It is about the same size as a 14 pin DIP IC socket. It has a slightly different magnetize structure,however the principle is the same as a mechanical relay. Since it is small, this reed relay is suitable for handling signal, and not high power or high current drawing load. Switching sound is hardly noticeable. You can still be able to hear some tick tick sound when it is activate. Switching speed is considerable faster than a relay because the switch mechanism inside the package is small.
3. Solid state relay: This is newer switch device known as Solid State Relay (SSR) or MOSFET relay. It is a semiconductor device, to replace the mechanical relay as a reliable alternative. In solid state relay, the input and switched output have voltage polarity. Be careful not to connect to the wrong terminal. Some SSR are design to have the same package and pin layout design as a reed relay. It looks like a reed relay. You can differential between a reed and a SSR device by testing it's input terminal. A reed relay is able to function with a reverse input priority, however a SSR will not be able to function with reverse input priority. The solid state relay can be smaller than a mechanical relay. It is a soft start device and does not result in current slug or arcing effect. It has no mechanical switching and is able to do faster switching. This mean that there are no noise, no glitches mechanical switching, lesser wear and tear. All these advantage adds up to longer lasting and more reliable device. The device works with a wider range of input voltage (typical 3V to 12V) and consume relatively less power to turn on the switch.
Switch: 1.Wire connection: Long long time ago, circuit connection is achieved usingmuscular means. The telephone network is one of a majorcommunication system in the early days. To Call your buddynext block, the first step you have to do is to pick up the phone. A human operator will attend to your pick up. Speakto her about the intention to talk to your buddy. The operator will manually plunk in wire connector linking your home telephone to your buddy phone. And Yes, you can now talk to your friend because there are operator doing the switching at the end of your telephone line. Sounds a lot of manual work. Yes, this is the good old days. The telephone operators in the central telephone exchange house, are making the circuit connection manually. This is what this
2.Mechanical switch: Mechanical switches is a simple type of interface to control electrical stuff using the means of some mechanical action. In short, a switch is a mechanical to electrical conversion device. I can't find any history on the evolution of the mechanical switches. I guess people might have become smarter. Rather than using a jumper wire to make connection manually, human invented switch to make short circuiting task more efficient. Tedious and time consuming work. Plucking the wires in and out takes a lot more effort, compare to toggling switches.Of course mechanical switches are not suitable for telephone exchange application for the millions of household. However understand the roles of switches.. The greatest thing to understand about switches is allabout the component/device rating. Some people refer it as the power handling capacity, which is the voltage and the current. The voltage it can handle across the switch terminals without destroying itself. Sometimes refer to as the breakdown voltage. The maximum amount of current that can flow through, without destroying itself. Sometimes refer to as the load current the switch can support. In fact, the whole idea of this "switch" thingy is aboutunderstanding the rating and capabilities of the various type of electronics components. I mean it applies to all the electronics devices, includingeven wires. To me, this is also the most important concept towards understanding of all other electronics. It is so important. Fortunately it is also easy to understand, if you pay enough attention in this topic. Not just switch have rating. Wire also have it's rating, since we know that switch is in fact another form of wire, or to be precise we call it a conductor.
RS232 CABLE: To allow compatibility among data communication equipment, an interfacing standard called RS232 is used. Since the standard was set long before the advent of the TTL logic family, its input and output voltage levels are not TTL compatible. For this reason, to connect any RS232 to a microcontroller system, voltage converters such as MAX232 are used to convert the TTL logic levels to the RS232 voltage levels and vice versa. MAX 232: Max232 IC is a specialized circuit which makes standard voltages as required by RS232 standards. This IC provides best noise rejection and very reliable against discharges and short circuits. MAX232 IC chips are commonly referred to as line drivers. To ensure data transfer between PC and microcontroller, the baud rate and voltage levels of Microcontroller and PC should be the same. The voltage levels of microcontroller are logic1 and logic 0 i.e., logic 1 is +5V and logic 0 is 0V. But for PC, RS232 voltage levels are considered and they are: logic 1 is taken as -3V to -25V and logic 0 as +3V to +25V. So, in order to equal these voltage levels, MAX232 IC is used. Thus this IC converts RS232 voltage levels to microcontroller voltage levels and vice versa. Fig: Pin diagram of MAX 232 IC:
SCON (serial control) register: The SCON register is an 8-bit register used to program the start bit, stop bit and data bits of data framing. SM0 SM0 TI SM1 RI SM0 SM1 SM2 REN TB8 RB8 TI SCON.7 SCON.6 SCON.5 SCON.4 SCON.3 SCON.2 SCON.1 Serial port mode specifier Serial port mode specifier Used for multiprocessor communication Set/cleared by software to enable/disable reception Not widely used Not widely used Transmit interrupt flag. Set by hardware at the beginning of the stop bit in mode 1. Must be cleared by software. RI SCON.0 Receive interrupt flag. Set by hardware at the beginning of the stop bit in mode 1. Must be cleared by software. SM1 SM2 REN TB8 RB8 SM2 REN TB8 RB8 TI RI
SM0 0 0 1 1
SM1 0 1 0 1 Serial Mode 0 Serial Mode 1, 8-bit data, 1 stop bit, 1 start bit Serial Mode 2 Serial Mode 3
Of the four serial modes, only mode 1 is widely used. In the SCON register, when serial mode 1 is chosen, the data framing is 8 bits, 1 stop bit and 1 start bit, which makes it compatible with the COM port of IBM/ compatible PCs. And the most important is serial mode 1 allows the baud rate to be variable and is set by Timer 1 of the 8051. In serial mode 1, for each character a total of 10 bits are transferred, where the first bit is the start bit, followed by 8 bits of data and finally 1 stop bit. GSM (Global System for Mobile Communications , originally Groupe Spcial Mobile), is a standard set developed by the European Telecommunications Standards Institute (ETSI) to describe technologies for second generation (2G) digital cellular networks. Developed as a replacement for first generation(1G) analog cellular networks, the GSM standard originally described a digital, circuit switched network optimized for full duplex voice telephony. The standard was expanded over time to include first circuit switched data transport, then packet data transport via GPRS (General Packet Radio services). Packet data transmission speeds were later increased via EDGE(Enhanced Data rates
History Early European analogue cellular networks employed an uncoordinated mix of technologies and protocols that varied from country to country, preventing interoperability of subscriber equipment and increasing complexity for equipment manufacturers who had to contend with varying standards from a fragmented market. The work to develop a European standard for digital cellular voice telephony began in 1982 when theEuropean Conference of Postal and Telecommunications Administrations (CEPT) created the Groupe Spcial Mobile committee and provided a permanent group of technical support personnel, based in Paris. In 1987, 15 representatives from 13 European countries signed amemorandum of understanding to develop and deploy a common cellular telephone system across Europe. The foresight of deciding to develop a continental standard paid off, eventually resulting in a unified, open, standard-based network larger than that in the United States.[1][2][3][4] France and Germany signed a joint development agreement in 1984 and were joined by Italy and the UK in 1986. In 1986 the European Commission proposed to reserve the 900 MHz spectrum band for GSM. By 1987, basic parameters of the GSM standard had been agreed upon and 15 representatives from 13 European nations signed a memorandum of understanding in Copenhagen, committing to deploy GSM. In 1989, the Groupe Spcial Mobile committee was transferred from CEPT to the European Telecommunications Standards Institute (ETSI).[3] Phase I of the GSM specifications were published in 1990. The historic world's first GSM call was made by the Finnish prime minister Harri Holkeri to Kaarina Suonio (mayor in city of Tampere) on July 1, 1991. The first network was built by Telenokia and Siemens and operated byRadiolinja.[5] In 1992, the first short messaging service (SMS or "text message") message was sent and Vodafone UK and Telecom Finland signed the first international roaming agreement. Work had begun in 1991 to expand the GSM standard to the
GSM cell site antennas in the Deutsches Museum, Munich, Germany GSM is a cellular network, which means that cell phones connect to it by searching for cells in the immediate vicinity. There are five different cell sizes in a GSM network macro, micro, pico, femtoand umbrella cells. The coverage area of each cell varies according to the implementation environment. Macro cells can be regarded as cells where the base station antenna is installed on a mast or a building above average roof top level. Micro cells are
The structure of a GSM network The network is structured into a number of discrete sections:
The Base Station Subsystem (the base stations and their controllers). the Network and Switching Subsystem (the part of the network most similar to a fixed network). This is sometimes also just called the core network. The GPRS Core Network (the optional part which allows packet based Internet connections). The Operations support system (OSS) for maintenance of the network.
Subscriber Identity Module (SIM) Main article: Subscriber Identity Module One of the key features of GSM is the Subscriber Identity Module, commonly known as a SIM card. The SIM is a detachable smart card containing the user's subscription information and phone book. This allows the user to retain his or her information after switching handsets. Alternatively, the user can also change operators while retaining the handset simply by changing the SIM. Some operators will block this by allowing the phone to use only a single SIM, or only a SIM issued by them; this practice is known as SIM locking. Phone locking Main article: SIM lock
GSM open-source software Several open-source software projects exist that provide certain GSM features:
gsmd daemon by Openmoko OpenBTS develops a Base transceiver station The GSM Software Project aims to build a GSM analyzer for less than $1000 OsmocomBB developers intend to replace the proprietary baseband GSM stack with a free software implementation.
Issues with patents and open source Patents remain a problem for any open-source GSM implementation, because it is not possible for GNU or any other free software distributor to guarantee immunity from all lawsuits by the patent holders against the users. Furthermore new features are being added to the standard all the time which means they have patent protection for a number of years.[citation needed] The original GSM implementations from 1991 are now entirely free of patent encumbrances and it is expected that OpenBTS will be able to implement features of that initial specification without limit and that as patents subsequently expire, those features can be added into the open source version. As of 2011, there have been no law suits against users of OpenBTS over GSM use. See also
International Mobile Subscriber Identity (IMSI) MSISDN Mobile Subscriber ISDN Number Handoff Visitors Location Register (VLR) Um interface
GSM-R (GSM-Railway) GSM services Cell Broadcast GSM localization Multimedia Messaging Service (MMS) NITZ Network Identity and Time Zone Wireless Application Protocol (WAP) Network simulation Simulation of GSM networks Standards Comparison of mobile phone standards GEO-Mobile Radio Interface Intelligent Network Parlay X RRLP Radio Resource Location Protocol GSM 03.48 Security mechanisms for the SIM application toolkit
RTP audio video profile Enhanced Network Selection (ENS) Huawei SingleRAN: RAN technology that allows migration from GSM to UMTS or simultaneous use of both.
PIN DIAGRAM:
Description
As you would probably guess from this description, the interface is a parallel bus, allowing simple and fast reading/writing of data to and from the LCD.
Above is the quite simple schematic pin diagram. The LCD panel's Enable and Register Select is connected to the Control Port. The Control Port is an open collector / open drain output. While Pins 1 2 3 4 5 6 Ground Vcc Contrast Voltage "R/S" _Instruction/Register Select "R/W" _Read/Write LCD Registers "E" Clock Description
7 - 14 Data I/O Pins most Parallel Ports have internal pull-up resistors, there are a few which don't. Therefore by incorporating the two 10K external pull up resistors, the circuit is more portable for a wider range of computers, some of which may have no internal pull up resistors. We make no effort to place the Data bus into reverse direction. Therefore we hard wire the R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the data lines. As a result we cannot read back the LCD's internal Busy Flag, which tells us if the LCD has accepted and finished processing the last instruction. This problem is overcome by inserting known delays into our program. The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy here. You can use a bench power supply set to 5v or use a onboard +5 regulator.
The 2 line x 16 character LCD modules are available from a wide range of manufacturers and should all be compatible with the HD44780. The diagram to the right, shows the pin numbers for these devices. When viewed from the front, the left pin is pin 14 and the right pin is pin 1.
LCDs can be added quite easily to an application and use as few as three digital output pins for control. As for cost, LCDs can be often pulled out of old devices or found in surplus stores for
As you would probably guess from this description, the interface is a parallel bus, allowing simple and fast reading/writing of data to and from the LCD. This waveform will write an ASCII Byte out to the LCD's screen. The ASCII code to be displayed is eight bits long and is sent to the LCD either four or eight bits at a time. If four-bit mode is used, two "nibbles" of data (Sent high four bits and then low four bits with an "E" Clock pulse with each nibble) are sent to make up a full eight-bit transfer. The "E" Clock is used to initiate the data transfer within the LCD. Sending parallel data, as either four or eight bits are the two primary modes of operation. While there are secondary considerations and modes, deciding how to send the data to the LCD is most critical decision to be made for an LCD interface application. Eight-bit mode is best used when speed is required in an application and at least ten I/O pins are available. Four-bit mode requires a minimum of six bits. To wire a microcontroller to an LCD in four-bit mode, just the top four bits (DB4-7) are written to. The "R/S" bit is used to select whether data or an instruction is being transferred between the microcontroller and the LCD. If the Bit is set, then the byte at the current LCD "Cursor" Position can be read or written. When the Bit is reset, either an instruction is being sent to the LCD or the execution status of the last
1 ID S Set Cursor Move Direction D C B Enable Display/Cursor * Move Cursor/Shift Display * Set Interface Length *
1 SC RL *
1 DL N F
1 A A A A A A Move Cursor into CGRAM * * * * * * Poll the "Busy Flag" Write a Character to the Display at the Current Cursor Position Read the Character on the Display at the Current Cursor Position
D D D D D D D D D D D D D D D D
"*" - Not Used/Ignored. This bit can be either "1" or "0" Set Cursor Move Direction: ID - Increment the Cursor After Each Byte Written to Display if Set S - Shift Display when Byte Written to Display Enable Display/Cursor D - Turn Display On (1)/Off (0) C - Turn Cursor On (1)/Off (0) B - Cursor Blink On (1)/Off (0) Move Cursor/Shift Display SC - Display Shift On (1)/Off (0) RL - Direction of Shift Right (1)/Left (0) Set Interface Length DL - Set Data Interface Length 8(1)/4(0) N - Number of Display Lines 1(0)/2(1) F - Character Font 5x10(1)/5x7(0)
Reading Data back is best used in applications, which required data to be moved back and forth on the LCD (such as in applications which scroll data between lines). The "Busy Flag" can be polled to determine when the last instruction that has been sent has completed processing. This simplifies the application because when data is read back, the microcontroller I/O pins have to be alternated between input and output modes. For most applications, there really is no reason to read from the LCD. As well as making my application software simpler, it also frees up a microcontroller pin for other uses. Different LCDs execute instructions at different rates. In terms of options, it is seen that a 5x10 LCD display. This means that the "F" bit in the "Set Interface Instruction" should always be reset (equal to "0"). Before you can send commands or data to the LCD module, the Module must be initialized. For eight-bit mode, this is done using the following series of operations: 1. 2. 3. 4. 5. Wait more than 15 msecs after power is applied. Write 0x030 to LCD and wait 5 msecs for the instruction to complete Write 0x030 to LCD and wait 160 usecs for instruction to complete Write 0x030 AGAIN to LCD and wait 160 usecs or Poll the Busy Flag Set the Operating Characteristics of the LCD o Write "Set Interface Length" o Write 0x010 to turn off the Display o Write 0x001 to Clear the Display o Write "Set Cursor Move Direction" Setting Cursor Behavior Bits o Write "Enable Display/Cursor" & enable Display and Optional Cursor
In describing how the LCD should be initialized in four bit mode, will specify writing to the LCD in terms of nibbles. This is because initially, just single nibbles are sent (and not two, which make up a byte and a full instruction). As mentioned above, when a byte is sent, the high nibble
Write "Set Interface Length" Write 0x01/0x00 to turn off the Display Write 0x00/0x01 to Clear the Display Write "Set Cursor Move Direction" Setting Cursor Behavior Bits Write "Enable Display/Cursor" & enable Display and Optional Cursor
Once the initialization is complete, the LCD can be written to with data or instructions as required. Each character to display is written like the control bytes, except that the "R/S" line is set. During initialization, by setting the "S/C" bit during the "Move Cursor/Shift Display" command, after each character is sent to the LCD, the cursor built into the LCD will increment to the next position (either right or left). Normally, the "S/C" bit is set (equal to "1") along with the "R/L" bit in the "Move Cursor/Shift Display" command for characters to be written from left to right (as with a "Teletype" video display). The "Ninth Character" is the position of the Ninth character on the first line. Most LCD displays have a 44780 and support chip to control the operation of the LCD. The 44780 is responsible for the external interface and provides sufficient control lines for sixteen characters on the LCD. The support chip enhances the I/O of the 44780 to support up to 128 characters on an LCD. From the table above, it should be noted that the first two entries ("8x1", "16x1") only have the 44780 and not the support chip. This is why the ninth character in the 16x1 does
Eight programmable characters are available and use codes 0x000 to 0x007. They are programmed by pointing the LCD's "Cursor" to the Character Generator RAM ("CGRAM") Area at eight times the character address. The next eight characters written to the RAM are each line of the programmable character, starting at the top. We like to represent this as eight squares by five as is shown in the diagram to the right. Above diagram, noted that most displays were 7 pixels by 5 for each character, so the extra row may be confusing. Each LCD character is actually eight pixels high, with the bottom row normally used for the underscore cursor. The bottom row can be used for graphic characters, although if you are going to use a visible underscore cursor and have it at the character (i.e., set the line to 0x000).
Using this box, we can draw in the pixels that define your special character and then use the bits to determine what the actual data codes are. .
The user defined character line information is saved in the LCD's "CGRAM" area. These sixtyfour bytes of memory is accessed using the "Move Cursor into CGRAM" instruction in a similar manner to that of moving the cursor to a specific address in the memory with one important difference. This difference is that each character starts at eight times it's character value. This means that user definable character 0 has it's data starting at address 0 of the CGRAM, character 1 starts at address 8, character 2 starts at address 0x010 (16) and so on. To get a specific line within the user definable character, its offset from the top (the top line has an offset of 0) is added to the starting address. In most applications, characters are written to all at one time with character 0 first. In this case, the instruction 0x040 is written to the LCD followed by all the user-defined characters. A special note for Wirz Electronics "SLI-OEM" users. When the new characters are defined, it is a good idea to make sure that the upper three bits are set in the user defined character byte. When the "Move Cursor into CGRAM" instruction is received, the SLI-OEM goes into a special mode where the character row counter is not updated when a new character is received. This mode is turned off when a new instruction is sent to the SLI-OEM or an ASCII "Backspace", "Carriage Return", "Line Feed" or "Form Feed" character is received. Since all these characters are valid LCD user defined character line definitions, you will find that the SLI-OEM is not interpreting
This can be further reduced by using the circuit shown below in which the serial data is combined with the contents of the shift register to produce the "E" strobe at the appropriate interval. This circuit "ANDs" (using the 1K resistor and IN914 diode) the output of the sixth "D-Flip Flop" of the 74LS174 and the "Data" bit from the device writing to the
LCD to form the "E" Strobe. This method requires one less pin than the three wire interface and a few more instructions of code.
Figure 1. Initial design for the solar seeker. Our initial design was quite simple, we had 5V on one end of the photocell group and ground on the other end. If the same amount of light fell on both photocells the middle voltage would be 2.5V. In the second stage, we had a comparator that compared the photocell group middle voltage to 2.5V. If the photocell voltage was higher than 2.5V, meaning more light falls on the left photocell, the comparator would output 1 and then in the following step the H-bridge would force the servo to turn to the photocell group to the left, aiming to equalize the amount of incident light falling on both photocells. Essentially, we were on the right track but we had some technical problems in our design 1- As it is, the servo motors would always turn full force! this meant that even if the photocells received slightly different amounts of light, the comparator would output a 1 or 0 and turn the motor as fast as it can. The situation is analogous to a soccer player trying to dribble the ball in a straight line but who is only allowed to kick the ball with full force. 2- The comparator typically outputs about 3.5V, but we would like to be able to have higher voltages around 12. In order to solve problem 1, we used pulse width modulation, and for the second problem we used two buffers. PULSE WIDTH MODULATION So how does the pulse width modulator help us? In the previous setup, we used 2.5V only, now if we compare to a high frequency triangle wave, the output of the motor will be high for some fraction of
Figure 2. Pulse width modulation. As seen in Figure 2, the triangle wave results in the output voltage being high for some portion of the period and low for the rest. Analog input A causes the output to be low most of the time, this approximately corresponds to a voltage output of around 1V. Analog input B results in a 50% duty cycle that corresponds to a mean voltage output of 2.5V. Now our analogous soccer player is able to have little touches on the ball to keep it in line. BUFFERS We would ideally like to have a voltage output of 12 Volts for the H-bridge, however the TTL logic high output is about 3.5V. In order to achieve 12V we used buffers. Figure 3 shows our final design. the open-collector invertor is the 7406 and the buffer is the 7407.
A solar panel (also solar module, photovoltaic module or photovoltaic panel) is a packaged, connected assembly ofphotovoltaic cells. The solar panel can be used as a component of a larger photovoltaic system to generate and supply electricity in commercial and residential applications. Because a single solar panel can produce only a limited amount of power, many installations contain several panels. A photovoltaic system typically includes an array of solar panels, an inverter, and sometimes a battery and interconnection wiring.
[edit]Theory
and construction
silicon modules
modules
Main articles: Thin film solar cell, Third generation solar cell, and Low-cost photovoltaic cell Third generation solar cells are advanced thin-film cells. They produce high-efficiency conversion at low cost.
thin-film modules
In rigid thin film modules, the cell and the module are manufactured in the same production line. The cell is created on a glass substrate or superstrate, and the electrical connections are created in situ, a so called "monolithic integration". The substrate or superstrate is laminated with an encapsulant to a front or back sheet, usually another sheet of glass. The main cell technologies in this category are CdTe, or a-Si, or a-Si+uc-Si tandem, or CIGS (or variant). Amorphous silicon has a sunlight conversion rate of 6-12%. [edit]Flexible
thin-film modules
Flexible thin film cells and modules are created on the same production line by depositing the photoactive layer and other necessary layers on a flexible substrate. If the substrate is an insulator (e.g. polyester or polyimide film) then monolithic integration can be used. If it is a conductor then another technique for electrical connection must be used. The cells are assembled into modules by laminating them to a transparent colourless fluoropolymer on the front side (typically ETFE or FEP) and a polymer suitable for bonding to the final substrate on the other side. The only commercially available (in MW quantities) flexible module uses amorphous silicon triple junction (from Unisolar). So-called inverted metamorphic (IMM) multijunction solar cells made on compound-semiconductor technology are just becoming commercialized in July 2008. The University of Michigan'ssolar car that won the North American Solar Challenge in July 2008 used IMM thin-film flexible solar cells. The requirements for residential and commercial are different in that the residential needs are simple and can be packaged so that as solar cell technology progresses, the other base line equipment such as the battery, inverter and voltage sensing transfer switch still need to be compacted and unitized for residential use. Commercial use, depending on the size of the service will be limited in the photovoltaic cell arena, and more complex parabolic reflectors and solar concentrators are becoming the dominant technology. The global flexible and thin-film photovoltaic (PV) market, despite caution in the overall PV industry, is expected to experience a CAGR of over 35% to 2019, surpassing 32 GW according to a major new study by IntertechPira.[4] [edit]Module
embedded electronics
See also: Solar micro-inverter Several companies have begun embedding electronics into PV modules. This enables performing maximum power point tracking (MPPT) for each module individually, and the measurement of performance data for monitoring and fault detection at module level. Some of these solutions make use of power optimizers, a DC-to-DC converter technology developed to maximize the power harvest from solar photovoltaic systems. As of about 2010, such electronics can also compensate for shading effects, wherein a shadow falling across a section of a panel causes the electrical output of one or more strings of cells in the panel to fall to zero, but not having the output of the entire panel fall to zero.
Module performance is generally rated under standard test conditions (STC): irradiance of 1,000 W/m, solar spectrum of AM 1.5 and module temperature at 25C. Electrical characteristics include nominal power (PMAX, measured in W), open circuit voltage (VOC), short circuit current (ISC, measured in amperes), maximum power voltage (VMPP),maximum power current (IMPP), peak power, kWp, and module efficiency (%). Nominal voltage refers to the voltage of the battery that the module is best suited to charge; this is a leftover term from the days when solar panels were used only to charge batteries. The actual voltage output of the panel changes as lighting, temperature and load conditions change, so there is never one specific voltage at which the panel operates. Nominal voltage allows users, at a glance, to make sure the panel is compatible with a given system. Open circuit voltage or VOC is the maximum voltage that the panel can produce when not connected to an electrical circuit or system. VOC can be measured with a meter directly on an illuminated panel's terminals or on its disconnected cable.[5] The peak power rating, kWp, is the maximum output according under standard test conditions (not the maximum possible output). Solar panels must withstand heat, cold, rain and hail for many years. Many crystalline silicon module manufacturers offer a warranty that guarantees electrical production for 10 years at 90% of rated power output and 25 years at 80%.[6] [edit]Production
In 2010, 15.9 GW of solar PV system installations were completed, with solar PV pricing survey and market research company PVinsights reporting growth of 117.8% in solar PV installation on a year-on-
ten producers
The top ten solar panel producers (by MW shipments) in 2010 were: [7] 1. Suntech 2. First Solar 3. Sharp Solar 4. Yingli 5. Trina Solar 6. Canadian Solar 7. Hanwha Solarone 8. Sunpower 9. Renewable Energy Corporation 10. Solarworld
Price
See also: Grid parity Average pricing information divides in three pricing categories: those buying small quantities (modules of all sizes in the kilowatt range annually), mid-range buyers (typically up to 10 MWpannually), and large quantity buyers (self explanatoryand with access to the lowest prices). Over the long termand only in the long-termthere is clearly a systematic reduction in the price of cells and modules. For example in 1998 it was estimated that the quantity cost per watt was about $4.50, which was 33 times lower than the cost in 1970 of $150.[8][9] Following to RMI, Balance-of-System (BoS) elements, this is, non-module cost of non-microinverter solar panels (as wiring, converters, racking systems and various components) make up about half of the total costs of installations. Also, standardizing technologies could encourage greater adoption of solar panels and, in turn, economies of scale.[citation needed] [edit]Mounting [edit]Trackers Solar trackers increase the amount of energy produced per panel at a cost of mechanical complexity and need for maintenance. They sense the direction of the Sun and tilt the panels as needed for maximum exposure to the light. [edit]Fixed
systems
racks
Fixed racks hold panels stationary as the sun moves across the sky. The fixed rack sets the angle at which the panel is held. Tilt angles equivalent to an installation's latitude are common.
mounted
Ground mounted solar power systems consist of solar panels held in place by racks or frames that are attached to ground based mounting supports. Ground based mounting supports include: Pole mounts, which are driven directly into the ground or embedded in concrete. Foundation mounts, such as concrete slabs or poured footings Ballasted footing mounts, such as concrete or steel bases that use weight to secure the solar panel system in position and do not require ground penetration. This type of mounting system allows for decommissioning or relocation of solar panel systems with no ground excavation.
[edit]Roof
mounted
Roof mounted solar power systems consist of solar panels held in place by racks or frames attached to roof based mounting supports. Roof based mounting supports include: Pole mounts, which are attached directly to the roof structure and may use additional rails for attaching the panel racking or frames. Ballasted footing mounts, such as concrete or steel bases that use weight to secure the panel system in position and do not require through penetration. This mounting method allows for decommissioning or relocation of solar panel systems with no adverse effect on the roof structure.
A ground mounted solar panel A roof mounted solar panel system installation using precast concrete ballasted footings. system installed using flat roof precast concrete ballasted footings.
A roof mounted solar panel system installed on a sloped roof using pole mounts and rails.
ABOUT SOFTWARE Our projects completed on schedule. Keil development tools for the 8051 Microcontroller Architecture support every level of software developer from the professional applications engineer to the student just learning about embedded software development. The industry-standard Keil C Compilers, Macro Assemblers, Debuggers, Real-time Kernels, Singleboard Computers, and Emulators support all 8051 derivatives and help you get. SIMULATION The Vision Simulator allows you to debug programs using only your PC using simulation drivers provided by Keil and various third-party developers. A good simulation environment, like Vision, does much more than simply simulate the instruction set of a microcontroller it simulates your entire target system including interrupts, start up code, onchip peripherals, external signals, and I/O. This software is used for execution of microcontroller programs. Keil development tools for the MC architecture support every level of software developer from the professional applications engineer to the student just learning about embedded software development. The industry-standard keil C compilers, macro assemblers, debuggers, real, time Kernels, Single-board computers and emulators support all microcontroller derivatives and help you to get more projects completed on schedule. The keil software development tools are designed to solve the complex Problems facing embedded software developers. When starting a new project, simply select the microcontroller you the device database and the vision IDE sets all compiler, assembler, linker, and memory options for you. Numerous example programs are included to help you get started with the most popular embedded avr devices. The keil Vision debugger accurately simulates on-chip peripherals (PC,CAN,UART,SPI,Interrupts,I/Oports,A/D converter, D/A converter and PWM modules)of your avr device. Simulation helps you understand h/w configurations and avoids time wasted on setup problems. Additionally, with simulation, you can write and test applications before target h/w is available. When you are ready to begin testing your s/w application with target h/w,use the MON51, MON390, MONADI, or flash MON51 target monitors, the ISD51 In-System Debugger, or the ULINK USB-JTAG adapter to download and test program code on your target system Click on the Keil uVision Icon on DeskTop The following fig will appear
1.
Click on the Project menu from the title bar Then Click on New Project
2.
Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\
3. 4.
Select the component for u r project. i.e. Atmel Click on the + Symbol beside of Atmel
5.
6. 7.
8. 9. 10.
Then Click either YES or NOmostly NO Now your project is ready to USE Now double click on the Target1, you would get another option Source group 1 as shown in next page.
11.
Click on the file option from menu bar and select new
12.
The next screen will be as shown in next page, and just maximize it by double clicking on its blue boarder.
13. 14.
Now start writing program in either in C or ASM For a program written in Assembly, then save it with extension . asm and for C based program save it with extension .C
15.
Now right click on Source group 1 and click on Add files to Group Source
16.
Now you will get another window, on which by default C files will appear.
Now select as per your file extension given while saving the file Click only one time on option ADD Now Press function key F7 to compile. Any error will appear if so happen.
20. 21.
If the file contains no error, then press Control+F5 simultaneously. The new window is as follows
22. 23.
Then Click OK Now Click on the Peripherals from menu bar, and check your required port as shown in fig below
24.
25.
Now keep Pressing function key F11 slowly and observe. You are running your program successfully