Professional Documents
Culture Documents
In the partial fulfillment for B.E. (Electrical Engineering), Degree scheme under MDU, Rohtak.
Sonepat
Certificate
This is to certify that Mr. Varun Katoria of Hindu College of Engineering has created a project, Line Chaser Robot under the guidance of Miss Rakhi Kamra. The project is graded
Acknowledgement
It is my pleasure to acknowledge the assistance of Miss Rakhi Kamra, without whose help this project would not have been possible. I would like to express my gratitude to her for providing invaluable encourage, guidance and assistance. After doing this project I can confidently say that this experience has not only enriched me with technical knowledge but also has unparsed the maturity of thought and vision, the attributes required of being a successful professional.
Varun Katoria
Contents
1. Introduction to Microcontroller 2. Introduction to Robotics 3. History of Robot 4. Brief Description of Major Components Used i. ii. iii. iv. v. vi. vii. viii. Microcontroller 8951 Motor Driver IC ULN2003 Op-Amp LM358 IR L.E.D. Photo Diode Lithium Ion Battery Voltage Regulator DC Motor 8 10 12 13 14 33 36 42 44 46 48 51
5. Working of Line Chaser Robot 6. Programming of Microcontroller 7. Circuit Diagram of Line Chaser Robot 8. PCB art work used 9. Top View and Bottom View of Line Chaser Robot 10. Minor Components employed in circuit
53 56 58 59 60
63 67 68 71 73 75 78 81 92 93 94
11. PCB Manufacturing 12. Solder and Soldering Proficiency 13. Applications 14. Future Scope 15. References
Introduction - Microcontroller
Introduction to 8051 Microprocessor:
The Intel 8051 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 8051-compatible processor cores that are manufactured by more than 20 independent manufacturers including Atmel, Infineon Technologies, Maxim Integrated Products (via its Dallas Semiconductor subsidiary), NXP (formerly Philips Semiconductor), Winbond, ST Microelectronics, Silicon Laboratories (formerly Cygnal), Texas Instruments and Cypress Semiconductor. Intel's official designation for the 8051 family of Cs is MCS 51. Intel's original 8051 family was developed using NMOS technology, but later versions, identified by a letter "C" in their name, e.g. 80C51, used CMOS technology and were less power-hungry than their NMOS predecessors - this made them eminently more suitable for battery-powered devices.
Two 16-bit timers Two-level interrupt priority Power saving mode 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 to 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. 8051 based microcontrollers typically include one or two UARTs, two or three timers, 128 or 256 bytes of internal data RAM (16 bytes of which are bit-addressable), up to 128 bytes of I/O, 512 bytes to 64 kB of internal program memory, and sometimes a quantity of extended data RAM (ERAM) located in the external data space. The original 8051 core ran at 12 clock cycles per machine cycle, with most instructions executing in one or two machine cycles. With a 12 MHz clock frequency, the 8051 could thus execute 1 million one-cycle instructions per second or 500,000 two-cycle instructions per second. Enhanced 8051 cores are now commonly used which run at six, four, two, or even one clock per machine cycle, and have clock frequencies of up to 100 MHz, and are thus capable of an even greater number of instructions per second. All SILabs, some Dallas and a few Atmel devices have single cycle cores. Common features included in modern 8051 based microcontrollers include built-in reset timers with brown-out detection, on-chip oscillators, self-programmable Flash ROM program memory, bootloader code in ROM, EEPROM non-volatile data storage, IC, SPI, and USB host interfaces, PWM generators, analog comparators, A/D and D/A converters, RTCs, extra counters and timers, in-circuit debugging facilities, more interrupt sources, and extra power saving modes.
Programming:
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. Other high level languages such as Forth, BASIC, Pascal, PL/M and Modula 2 are available for the 8051, but they are less widely used than C and assembly.
Introduction to Robotics
A robot is a mechanical or virtual, artificial agent. It is usually an electromechanical system, which, by its appearance or movements, conveys a sense that it has intent or agency of its own. The word robot can refer to both physical robots and virtual software agents, but the latter are usually referred to as bots to differentiate. While there is still discussion about which machines qualify as robots, a typical robot will have several, though not necessarily all of the following properties: -is not 'natural' i.e. artificially created -can sense its environment, and manipulate or interact with things in it -has some ability to make choices based on the environment, often using automatic control or a preprogrammed sequence -is programmable -moves with one or more axes of rotation or translation -makes dexterous coordinated movements -appears to have intent or agency .
Defining characteristics:
The last property, the appearance of agency, is important when people are considering whether to call a machine a robot, or just a machine. In general, the more a machine has the appearance of agency, the more it is considered a robot.
Mental Agency:
For robotic engineers, the physical appearance of a machine is less important than the way its actions are controlled. The more the control system seems to have agency of its own, the more likely the machine is to be called a robot. An important feature of agency is the ability to make choices. So the more a machine could feasibly choose to do something different, the more agency it has. For example:
10
-a clockwork car is never considered a robot -a remotely operated vehicle is sometimes considered a robot (or telerobot) -a car with an onboard computer, like Bigtrak, which could drive in a programmable sequence, might be called a robot. -a self-controlled car, like the 1990s driverless cars of Ernst Dickmanns, or the entries to the DARPA Grand Challenge, which could sense its environment, and make driving decisions based on this information would quite likely be called robot. -a sentient car, like the fictional KITT, which can make decisions, navigate freely and converse fluently with a human, is usually considered a robot.
Physical Agency:
However, for many laymen, if a machine looks anthropomorphic or zoomorphic (e.g. ASIMO or Aibo), especially if it is limb-like (e.g. a simple robot arm), or has limbs, or can move around, it would be called a robot. For example, even if the following examples used the same control architecture: -a player piano is rarely characterized as a robot -a CNC milling machine is very occasionally characterized as a robot. -a factory automation arm is almost always characterized as a robot or an industrial robot. -an autonomous wheeled or tracked device, such as a self-guided rover or selfguided vehicle, is almost always characterized as a robot, a mobile robot or a service robot -a zoomorphic mechanical toy, like Roboraptor, is usually characterized as a robot. -a humanoid, like ASIMO, is almost always characterized as a robot or a service robot. Interestingly, while a 3-axis CNC milling machine may have a very similar or identical control system to a robot arm, it is the arm which is almost always called a robot, while the CNC machine is usually just a machine. Having a limb can make all the difference. Having eyes too gives people a sense that a machine is aware ("the eyes are the windows of the soul"). However, simply being anthropomorphic is not sufficient for something to
11
be called a robot. A robot must do something, whether it is useful work or not. So, for example, a rubber dog chew, shaped like ASIMO, would not be considered a robot.
History of Robot
The idea of artificial people dates at least as far back as the ancient legends of Cadmus, who sowed dragon teeth that turned into soldiers, and the myth of Pygmalion, whose statue of Galatea came to life. In Greek mythology, the deformed god of metalwork (Vulcan or Hephaestus) created mechanical servants, ranging from intelligent, golden handmaidens to more utilitarian three-legged tables that could move about under their own power, and the robot Talos defended Crete. Medieval Persian alchemist Jabir ibn Hayyan included recipes for creating artificial snakes, scorpions, and humans in his coded Book of Stones. Jewish legend tells of the Golem, a clay creature animated by Kabbalistic magic. Similarly, in the Younger Edda, Norse mythology tells of a clay giant, Mkkurklfi or Mistcalf, constructed to aid the troll Hrungnir in a duel with Thor, the God of Thunder. In ancient China, a curious account on automata is found in the Lie Zi text, written in the 3rd century BC. Within it there is a description of a much earlier encounter between King Mu of Zhou (1023 BC-957 BC) and a mechanical engineer known as Yan Shi, an 'artificer'. The latter proudly presented the king with a life-size, human-shaped figure of his mechanical handiwork. The king stared at the figure in astonishment. It walked with rapid strides, moving its head up and down, so that anyone would have taken it for a live human being. The artificer touched its chin, and it began singing, perfectly in tune. He touched its hand, and it began posturing, keeping perfect time...As the performance was drawing to an end, the robot winked its eye and made advances to the ladies in attendance, whereupon the king became incensed and would have had Yen Shih [Yan Shi] executed on the spot had not the latter, in mortal fear, instantly taken the robot to pieces to let him see what it really was. And, indeed, it turned out to be only a construction of leather, wood, glue and lacquer, variously coloured white, black, red and blue. Examining it closely, the king found all the internal organs completeliver, gall, heart, lungs, spleen, kidneys, stomach and intestines; and over these again, muscles, bones and limbs with their joints, skin, teeth and hair, all of them artificial...The king tried the effect of taking away the heart, and found that the mouth could no longer speak; he took away the liver and the eyes could no longer see; he took away the kidneys and the legs lost their power of locomotion. The king was delighted. Concepts akin to a robot can be found as long ago as the 4th century BC, when the Greek mathematician Archytas of Tarentum postulated a mechanical bird he called "The Pigeon" which was propelled by steam. Yet another early automaton was the clepsydra, made in 250 BC by Ctesibius of Alexandria, a physicist and inventor from Ptolemaic
12
Egypt.Hero of Alexandria (10-70 AD) made numerous innovations in the field of automata, including one that allegedly could speak.
13
Basic Pins:
PIN 9: PINS 18 & 19: PIN 40 and 20: PIN 9 is the reset pin which is used reset the microcontrollers internal registers and ports upon starting up. The 8051 has a built-in oscillator amplifier hence we need to only connect a crystal at these pins to provide clock pulses to the circuit. Pins 40 and 20 are VCC and ground respectively. The 8051 chip needs +5V 500mA to function properly, although there are lower
14
powered versions like the Atmel 2051 which is a scaled down version of the 8051 which runs on +3V. PINS 29, 30 & 31: As described in the features of the 8051, this chip contains a builtin flash memory. In order to program this we need to supply a voltage of +12V at pin 31. If external memory is connected then PIN 31, also called EA/VPP, should be connected to ground to indicate the presence of external memory. PIN 30 is called ALE (address latch enable), which is used when multiple memory chips are connected to the controller and only one of them needs to be selected. We will deal with this in depth in the later chapters. PIN 29 is called PSEN. This is "program select enable". In order to use the external memory it is required to provide the low voltage (0) on both PSEN and EA pins.
Fig.1.1
Ports:
There are 4 8-bit ports: P0, P1, P2 and P3. PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port which can be used for a variety of interfacing tasks. The other ports P0, P2 and P3 have dual roles or additional functions associated with them based upon the context of their usage.
15
PORT P3 acts as a normal IO port, but Port P3 has additional functions such as, serial transmit and receive pins, 2 external interrupt pins, 2 external counter inputs, read and write pins for memory access. PORT P2 can also be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P2 will act as an address bus in conjunction with PORT P0 to access external memory. PORT P2 acts as A8-A15, as can be seen from fig 1.1 PORT P0 can be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P0 acts as a multiplexed address and data bus that can be used to access external memory in conjunction with PORT P2. P0 acts as AD0AD7, as can be seen from fig 1.1
Oscillator Circuits:
The 8051 requires the existance of an external oscillator circuit.The oscillator circuit usually runs around 12MHz, although the 8051 (depending on which specific model) is capable of running at a maximum of 40MHz. Each machine cycle in the 8051 is 12 clock cycles, giving an effective cycle rate at 1MHz (for a 12KHz clock) to 3.33MHz (for the maximum 40MHz clock).
16
Direct Memory
The 8051 has 256 bytes of internal addressable RAM, although only the first 128 bytes are available for general use by the programmer. The first 128 bytes of RAM (from 0x00 to 0x7F) are called the Direct Memory, and can be used to store data. Figure 1.2 shows a functional block of the internal operation of an 8051 microcomputer. The internal components of the chip are shown within the broken line box.
DPTR
P.C.
Acc
Accumulator
ALU 8-bit
Control Lines
Port 1 etc...
Timer/ Counter 0
Timer/Couter 1
UART
17
MEMORY AND REGISTER ORGANISATION The 8051 has a separate memory space for code (programs) and data. We will refer here to on-chip memory and external memory as shown in figure 1.5. In an actual implementation the external memory may, in fact, be contained within the microcomputer chip. However, we will use the definitions of internal and external memory to be consistent with 8051 instructions which operate on memory. Note, the separation of the code and data memory in the 8051 architecture is a little unusual. The separated memory architecture is referred to as Harvard architecture whereas Von Neumann architecture defines a system where code and data can share common memory.
0000h
Internal Memory Internal SFRs Internal RAM
(up to 64KB)
FFFFh
0000h
(up to 64KB)
Figure 1.5 8051 Memory representation External Code Memory The executable program code is stored in this code memory. The code memory size is limited to 64KBytes (in a standard 8051). The code memory is read-only in normal operation and is programmed under special conditions e.g. it is a PROM or a Flash RAM type of memory.
18
Internal Memory The 8051s on-chip memory consists of 256 memory bytes organized as follows: First 128 bytes: 00h to 1Fh 20h to 2Fh 30 to 7Fh 80h to FFh Register Banks Bit Addressable RAM General Purpose RAM Special Function Registers
The first 128 bytes of internal memory is organised as shown in figure 1.6, and is referred to as Internal RAM, or IRAM.
Byte Address 7Fh Bit address
Internal Memory
FFh SFRs
Register Bank 0
Reg. 7 Reg. 6 Reg. 5 Reg. 4
19
Figure 1.6 Organisation of Internal RAM (IRAM) memory External RAM Data Memory This is read-write memory and is available for storage of data. Up to 64KBytes of external RAM data memory is supported (in a standard 8051). Register Banks: 00h to 1Fh The 8051 uses 8 general-purpose registers R0 through R7 (R0, R1, R2, R3, R4, R5, R6, and R7). These registers are used in instructions such as: ADD A, R2 ; adds the value contained in R2 to the accumulator
Note since R2 happens to be memory location 02h in the Internal RAM the following instruction has the same effect as the above instruction. ADD A, 02h There are four banks of these general-purpose registers defined within the Internal RAM. For the moment we will consider register bank 0 only. Register banks 1 to 3 can be ignored when writing introductory level assembly language programs. Bit Addressable RAM: 20h to 2Fh The 8051 supports a special feature which allows access to bit variables. This is where individual memory bits in Internal RAM can be set or cleared. In all there are 128 bits numbered 00h to 7Fh. Being bit variables any one variable can have a value 0 or 1. A bit variable can be set with a command such as SETB and cleared with a command such as CLR. Example instructions are: SETB 25h ; sets the bit 25h (becomes 1) CLR 25h ; clears bit 25h (becomes 0) Note, bit 25h is actually bit b5 of Internal RAM location 24h. The Bit Addressable area of the RAM is just 16 bytes of Internal RAM located between 20h and 2Fh. So if a program writes a byte to location 20h, for example, it writes 8 bit variables, bits 00h to 07h at once. Note bit addressing can also be performed on some of the SFR registers, which will be discussed later on.
20
Byte address FFh F0h E0h D0h B8h B0h A8h A0h 99h 98h 90h 8Dh 8Ch 8Bh 8Ah 89h 88h 87h 83h 82h 81h 80h
Bit address
b7 b6 b5 b4 b3 b2 b1 b0
B A (accumulator) PSW IP Port 3 (P3) IE Port 2 (P2) SBUF SCON Port 1 (P1) TH1 TH0 TL1 TL0 TMOD TCON PCON DPH DPL SP Port 0 (P0)
* * * * * * *
Internal Memory
FFh SFRs
* *
*indicates the SFR registers which are bit addressable Figure 1.7 SFR register layout General Purpose RAM: 30h to 7Fh These 80 bytes of Internal RAM memory are available for general-purpose data storage. Access to this area of memory is fast compared to access to the main memory and special
21
instructions with single byte operands are used. However, these 80 bytes are used by the system stack and in practice little space is left for general storage. The general purpose RAM can be accessed using direct or indirect addressing modes. Examples of direct addressing: MOV A, 6Ah ; reads contents of address 6Ah to accumulator Examples for indirect addressing (use registers R0 or R1): MOV R1, #6Ah ; move immediate 6Ah to R1 MOV A, @R1 ; move indirect: R1 contains address of Internal RAM which contains data that is moved to A. These two instructions have the same effect as the direct instruction above. SFR Registers The SFR registers are located within the Internal Memory in the address range 80h to FFh, as shown in figure 1.7. Not all locations within this range are defined. Each SFR has a very specific function. Each SFR has an address (within the range 80h to FFh) and a name which reflects the purpose of the SFR. Although 128 byes of the SFR address space is defined only 21 SFR registers are defined in the standard 8051. Undefined SFR addresses should not be accessed as this might lead to some unpredictable results. Port Registers SFR The standard 8051 has four 8 bit I/O ports: P0, P1, P2 and P3. For example Port 0 is a physical 8 bit I/O port on the 8051. Read (input) and write (output) access to this port is done in software by accessing the SFR P0 register which is located at address 80h. SFR P0 is also bit addressable. Each bit corresponds to a physical I/O pin on the 8051. Example access to port 0: SETB P0.7 CLR P0.7 ; sets the MSB bit of Port 0 ; clears the MSB bit of Port 0
The operand P0.7 uses the dot operator and refers to bit 7 of SFR P0. The same bit could be addressed by accessing bit location 87h. Thus the following two instructions have the same meaning: CLR CLR P0.7 87h
22
PSW, the Program Status Word is at address D0h and is a bit-addressable register. The status bits are listed in table 1.1. Table 1.1. Program status word (PSW) flags Symbol Bit C (or CY) AC F0 RS1 RS0 0V P Carry flag. C This is a conventional carry, or borrow, flag used in arithmetic operations. The carry flag is also used as the Boolean accumulator for Boolean instruction operating at the bit level. This flag is sometimes referenced as the CY flag. Auxiliary carry flag. AC This is a conventional auxiliary carry (half carry) for use in BCD arithmetic. Flag 0. F0 This is a general-purpose flag for user programming. Register bank select 0 and register bank select 1. RS0 and RS1 These bits define the active register bank (bank 0 is the default register bank). Overflow flag. OV This is a conventional overflow bit for signed arithmetic to determine if the result of a signed arithmetic operation is out of range. Even Parity flag. P Address PSW.7 D7h PSW.6 D6h PSW.5 D5h PSW.4 D4h PSW.3 D3h PSW.2 D2h PSW.1 D1h PSW.0 D0h Description Carry flag Auxiliary carry flag Flag 0 Register bank select 1 Register bank select 0 Overflow flag Reserved Even Parity flag
23
The parity flag is the accumulator parity flag, set to a value, 1 or 0, such that the number of 1 bits in the accumulator plus the parity bit add up to an even number.
Stack Pointer The Stack Pointer, SP, is an 8-bit SFR register at address 81h. The small address field (8 bits) and the limited space available in the Internal RAM confines the stack size and this is sometimes a limitation for 8051 programmes. The SP contains the address of the data byte currently on the top of the stack. The SP pointer in initialised to a defined address. A new data item is pushed on to the stack using a PUSH instruction which will cause the data item to be written to address SP + 1. Typical instructions, which cause modification to the stack are: PUSH, POP, LCALL, RET, RETI etc.. The SP SFR, on start-up, is initialised to 07h so this means the stack will start at 08h and expand upwards in Internal RAM. If register banks 1 to 3 are to be used the SP SFR should be initialised to start higher up in Internal RAM. The following instruction is often used to initialise the stack: MOV SP, #2Fh Data Pointer The Data Pointer, DPTR, is a special 16-bit register used to address the external code or external data memory. Since the SFR registers are just 8-bits wide the DPTR is stored in two SFR registers, where DPL (82h) holds the low byte of the DPTR and DPH (83h) holds the high byte of the DPTR. For example, if you wanted to write the value 46h to external data memory location 2500h, you might use the following instructions: MOV A, #46h ; Move immediate 8 bit data 46h to A (accumulator)
MOV DPTR, #2504h ; Move immediate 16 bit address value 2504h to A. ; Now DPL holds 04h and DPH holds25h. MOVX @DPTR, A ; Move the value in A to external RAM location 2500h. Uses indirect addressing. Note the MOVX (Move X) instruction is used to access external memory. Accumulator This is the conventional accumulator that one expects to find in any computer, which is used to the hold result of various arithmetic and logic operations. Since the 8051 microcontroller is just an 8-bit device, the accumulator is, as expected, an 8 bit register.
24
The accumulator, referred to as ACC or A, is usually accessed explicitly using instructions such as: INC A ; Increment the accumulator However, the accumulator is defined as an SFR register at address E0h. So the following two instructions have the same effect: MOV A, #52h MOV E0h, #52h ; Move immediate the value 52h to the accumulator ; Move immediate the value 52h to Internal RAM location E0h, which is, in fact, the accumulator SFR register.
Usually the first method, MOV A, #52h, is used as this is the most conventional (and happens to use less space, 2 bytes as oppose to 3 bytes!) B Register The B register is an SFR register at addresses F0h which is bit-addressable. The B register is used in two instructions only: i.e. MUL (multiply) and DIV (divide). The B register can also be used as a general-purpose register. Program Counter The PC (Program Counter) is a 2 byte (16 bit) register which always contains the memory address of the next instruction to be executed. When the 8051 is reset the PC is always initialised to 0000h. If a 2 byte instruction is executed the PC is incremented by 2 and if a 3 byte instruction is executed the PC is incremented by three so as to correctly point to the next instruction to be executed. A jump instruction (e.g. LJMP) has the effect of causing the program to branch to a newly specified location, so the jump instruction causes the PC contents to change to the new address value. Jump instructions cause the program to flow in a non-sequential fashion, as will be described later. SFR Registers for the Internal Timer The set up and operation of the on-chip hardware timers will be described later, but the associated registers are briefly described here: TCON, the Timer Control register is an SFR at address 88h, which is bit-addressable. TCON is used to configure and monitor the 8051 timers. The TCON SFR also contains some interrupt control bits, described later.
25
TMOD, the Timer Mode register is an SFR at address 89h and is used to define the operational modes for the timers, as will be described later. TL0 (Timer 0 Low) and TH0 (Timer 0 High) are two SFR registers addressed at 8Ah and 8Bh respectively. The two registers are associated with Timer 0. TL1 (Timer 1 Low) and TH1 (Timer 1 High) are two SFR registers addressed at 8Ch and 8Dh respectively. These two registers are associated with Timer 1. Power Control Register PCON (Power Control) register is an SFR at address 87h. It contains various control bits including a control bit, which allows the 8051 to go to sleep so as to save power when not in immediate use. Serial Port Registers Programming of the on-chip serial communications port will be described later in the text. The associated SFR registers, SBUF and SCON, are briefly introduced here, as follows: The SCON (Serial Control) is an SFR register located at addresses 98h, and it is bitaddressable. SCON configures the behaviour of the on-chip serial port, setting up parameters such as the baud rate of the serial port, activating send and/or receive data, and setting up some specific control flags. The SBUF (Serial Buffer) is an SFR register located at address 99h. SBUF is just a single byte deep buffer used for sending and receiving data via the on-chip serial port Interrupt Registers Interrupts will be discussed in more detail later. The associated SFR registers are: IE (Interrupt Enable) is an SFR register at addresses A8h and is used to enable and disable specific interrupts. The MSB bit (bit 7) is used to disable all interrupts. IP (Interrupt Priority) is an SFR register at addresses B8h and it is bit addressable. The IP register specifies the relative priority (high or low priority) of each interrupt. On the 8051, an interrupt may either be of low (0) priority or high (1) priority.
ADDRESSING MODES
26
There are a number of addressing modes available to the 8051 instruction set, as follows: Immediate Addressing Indirect Addressing Long Addressing Immediate Addressing Immediate addressing simply means that the operand (which immediately follows the instruction op. code) is the data value to be used. For example the instruction: MOV A, #99d Moves the value 99 into the accumulator (note this is 99 decimal since we used 99d). The # symbol tells the assembler that the immediate addressing mode is to be used. Register Addressing One of the eight general-registers, R0 to R7, can be specified as the instruction operand. The assembly language documentation refers to a register generically as Rn. An example instruction using register addressing is : ADD A, R5 ; Adds register R5 to A (accumulator) Register Addressing Relative Addressing Indexed Addressing Direct Addressing Absolute addressing
Here the contents of R5 is added to the accumulator. One advantage of register ddressing is that the instructions tend to be short, single byte instructions. Direct Addressing Direct addressing means that the data value is obtained directly from the memory location specified in the operand. For example consider the instruction: MOV A, 47h
Accumulator Internal RAM 48h 47h 46h
The instruction reads the data from Internal RAM address 47h and stores this in the accumulator. Direct addressing can be used to access Internal RAM , including the SFR registers.
27
Indirect Addressing Indirect addressing provides a powerful addressing capability, which needs to be appreciated. An example instruction, which uses indirect addressing, is as follows: MOV A, @R0
Internal RAM Accumulator 55h 54h 53h R0 54h
Note the @ symbol indicated that the indirect addressing mode is used. R0 contains a value, for example 54h, which is to be used as the address of the internal RAM. Location, which contains the operand data. Indirect addressing refers to Internal RAM only and cannot be used to refer to SFR registers. Note, only R0 or R1 can be used as register data pointers for indirect addressing when using MOV instructions. The 8052 (as opposed to the 8051) has an additional 128 bytes of internal RAM. These 128 bytes of RAM can be accessed only using indirect addressing. Relative Addressing This is a special addressing mode used with certain jump instructions. The relative address, often referred to as an offset, is an 8-bit signed number, which is automatically added to the PC to make the address of the next instruction. The 8-bit signed offset value gives an address range of + 127 to 128 locations. Consider the following example: SJMP LABEL_X
Code Memory 2006h 2005h 2004h 2003h 2002h 2001h
04
SJMP LABEL_X
PC is set to next instruction address: 2002h when SJMP begins execution. The target address is then the sum of the PC + relative offset needed to reach LABEL_X. Offset is 4 in this case.
28
80
An advantage of relative addressing is that the program code is easy to relocate in memory in that the addressing is relative to the position in memory. Absolute addressing Absolute addressing within the 8051 is used only by the AJMP (Absolute Jump) and ACALL (Absolute Call) instructions, which will be discussed later Long Addressing The long addressing mode within the 8051 is used with the instructions LJMP and LCALL. The address specifies a full 16 bit destination address so that a jump or a call can be made to a location within a 64KByte code memory space (216 = 64K). An example instruction is: LJMP 5000h ; full 16 bit address is specified in operand Indexed Addressing With indexed addressing a separate register, either the program counter, PC, or the data pointer DTPR, is used as a base address and the accumulator is used as an offset address. The effective address is formed by adding the value from the base address to the value from the offset address. Indexed addressing in the 8051 is used with the JMP or MOVC instructions. Look up tables are easy to implemented with the help of index addressing. Consider the example instruction: MOVC A, @A+DPTR MOVC is a move instruction, which moves data from the external code memory space. The address operand in this example is formed by adding the content of the DPTR register to the accumulator value. Here the DPTR value is referred to as the base address and the accumulator value us referred to as the index address. An example program using the indexed addressing mode will be shown later
29
The AT89C51 is normally shipped with the on-chip Flash memory array in the erased state (that is, contents = FFH) and ready to be programmed. The programming interface accepts either a high-voltage (12-volt) or a low-voltage (VCC) program enable signal. The low-voltage programming mode provides a convenient way to program the AT89C51 inside the users system, while the high-voltage programming mode is compatible with conventional third party Flash or EPROM programmers. The AT89C51 is shipped with either the high-voltage or low-voltage programming mode enabled. The respective top-side marking and device signature codes are listed in the following table.
The AT89C51 code memory array is programmed byte-by byte in either programming mode. To program any nonblank byte in the on-chip Flash Memory, the entire memory must be erased using the Chip Erase Mode. Programming Algorithm: Before programming the AT89C51, the address, data and control signals should be set up according to the Flash programming mode table and Figure 3 and Figure 4. To program the AT89C51, take the following steps. 1. 2. 3. 4. 5. Input the desired memory location on the address lines. Input the appropriate data byte on the data lines. Activate the correct combination of control signals. Raise EA/VPP to 12V for the high-voltage programming mode. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. The byte-write cycle is self-timed and typically takes no more than 1.5 ms.
Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached.
30
Data Polling: The AT89C51 features Data Polling to indicate the end of a write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the written datum on PO.7. Once the write cycle has been completed, true data are valid on all outputs, and the next cycle may begin. Data Polling may begin any time after a write cycle has been initiated. Ready/Busy: The progress of byte programming can also be monitored by the RDY/BSY output signal. P3.4 is pulled low after ALE goes high during programming to indicate BUSY. P3.4 is pulled high again when programming is done to indicate READY. Program Verify: If lock bits LB1 and LB2 have not been programmed, the programmed code data can be read back via the address and data lines for verification. The lock bits cannot be verified directly. Verification of the lock bits is achieved by observing that their features are enabled. Chip Erase: The entire Flash array is erased electrically by using the proper combination of control signals and by holding ALE/PROG low for 10 ms. The code array is written with all 1s. The chip erase operation must be executed before the code memory can be reprogrammed.
31
Reading the Signature Bytes: The signature bytes are read by the same procedure as a normal verification of locations 030H, 031H, and 032H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned are as follows. (030H) = 1EH indicates manufactured by Atmel (031H) = 51H indicates 89C51 (032H) = FFH indicates 12V programming
(032H) = 05H indicates 5V programming
32
Description
The ULN2001, ULN2002, ULN2003 and ULN 2004 are high voltage, high current Darlington arrays each containing seven open collector Darlington pairs with common emitters. Each channel rated at 500 mA and can withstand peak currents of 600 mA. Suppression diodes are included for inductive load driving and the inputs are pinned opposite the outputs to simplify board layout. These versatile devices are useful for driving a wide range of loads including solenoids, relays DC motors, LED displays filament lamps, thermal printheads and high power buffers. The 2003A and 2004A are supplied in 16 pin plastic DIP packages with a copper leadframe to reduce thermal resistance.
Schematic
33
diagram
Pin configuration
Maximum ratings
34
35
Pinout Diagram
36
Here I1 and I2 are the outputs of parallel port or a comparator or a microcontroller. So now your aim is to design a circuit which perform this function
37
38
Basic Operation:
The amplifier's differential inputs consist of an inverting input and a non-inverting input, and ideally the op-amp amplifies only the difference in voltage between the two. This is called the "differential input voltage". In its most common use, the op-amp's output voltage is controlled by feeding a fraction of the output signal back to the inverting input. This is known as negative feedback. If that fraction is zero, i.e., there is no negative feedback, the amplifier is said to be running "open loop" and its output is the differential input voltage multiplied by the total gain of the amplifier, as shown by the following equation:
Where V+ is the voltage at the non-inverting terminal, V is the voltage at the inverting terminal and G is the total open-loop gain of the amplifier. Because the magnitude of the open-loop gain is typically very large and not well controlled by the manufacturing process, op-amps are not usually used without negative feedback. Unless the differential input voltage is extremely small, open-loop operation results in op-amp saturation (see below in nonlinear imperfections). An example of how the output voltage is calculated when negative feedback exists is shown below in Basic non-inverting amplifier circuit. Another typical configuration of op-amps is the positive feedback, which takes a fraction of the output signal back to the non-inverting input. An important application of it is the comparator with hysteresis.
39
Thus the inputs of an ideal op-amp under negative feedback can be modeled using a nullator, the output with a norator and the combination (complete ideal op-amp) by a nullor. Real op-amps can only approach this ideal: in addition to the practical limitations on slew rate, bandwidth, offset and so forth mentioned above, real op-amp parameters are subject to drift over time and with changes in temperature, input conditions, etc. Modern integrated FET or MOSFET op-amps approximate more closely the ideal op-amp than bipolar ICs where large signals must be handled at room temperature over a limited bandwidth; input impedance, in particular, is much higher, although the bipolar op-amps usually exhibit superior (i.e., lower) input offset drift and noise characteristics. Where the limitations of real devices can be ignored, an op-amp can be viewed as a black box with gain; circuit function and parameters are determined by feedback, usually negative. IC op-amps as implemented in practice are moderately complex integrated circuits; see the internal circuitry for the relatively simple 741 op-amp below, for example.
40
Notation
The circuit symbol for an op-amp is:
where: V+: non-inverting input V: inverting input Vout: output VS+: positive power supply VS: negative power supply
The power supply pins (VS+ and VS) can be labeled in different ways (See IC power supply pins). Despite different labeling, the function remains the same. Often these pins are left out of the diagram for clarity, and the power configuration is described or assumed from the circuit. The positions of the inverting and non-inverting inputs may be reversed in diagrams where appropriate; the power supply pins are not commonly reversed.
41
gain may be required to be 100 times, with a tolerance of 5% but drift of less than 1% in a specified temperature range; the input impedance not less than 1 megohm; etc. A basic circuit is designed, often with the help of circuit modeling (on a computer). Specific commercially available op-amps and other components are then chosen that meet the design criteria within the specified tolerances at acceptable cost. If not all criteria can be met, the specification may need to be modified. A prototype is then built and tested; changes to meet or improve the specification, alter functionality, or reduce the cost, may be made
Where sgn(x) is the sign function. Generally, the positive and negative supplies VS will not match absolute value:
Equality of input values is very difficult to achieve in practice. The speed at which the change in output results from a change in input (often called the slew rate in operational amplifiers) is typically in the order of 10ns to 100ns, but can be as slow as a few tens of s.
Description of LM358:
The 532/358/LM2904 consists of two independent, high gain, internally frequencycompensated operational amplifiers internally frequency-compensated operational amplifiers designed specifically to operate from a single power supply over a wide range of voltages. Operation from dual power supplies is also possible, and the low power supply current drain is independent of the magnitude of the power supply voltage.
42
FEATURES
Internally frequency-compensated for unity gain Large DC voltage gain100dB Wide bandwidth (unity gain)1MHz (temperature-compensated) Wide power supply range single supply3VDC to 30VDC or dual supplies1.5VDC to 15VDC Very low supply current drain (400mA)essentially independent of supply voltage (1mW/op amp at +5VDC) Low input biasing current45nADC temperature-compensated Low input offset voltage2mVDC and offset current5nADC Differential input voltage range equal to the power supply voltage Large output voltage0VDC to V+ 1.5VDC swing
43
Equivalent Circuit
44
45
FEATURES Of IR L.E.D.
Wavelength= 940 nm Chip material =GaAs with AlGaAs window Package type: T-1 3/4 (5mm lens diameter) Matched Photosensor: QSD122/123/124 Medium Emission Angle, 40 High Output Power Package material and color: Clear, untinted, plastic
46
47
Principle of operation:
A photodiode is a PN junction or PIN structure. When a photon of sufficient energy strikes the diode, it excites an electron thereby creating a mobile electron and a positively charged electron hole. If the absorption occurs in the junction's depletion region, or one diffusion length away from it, these carriers are swept from the junction by the built-in field of the depletion region. Thus holes move toward the anode, and electrons toward the cathode, and a photocurrent is produced.
Photoconductive mode:
In this mode the diode is often (but not always) reverse biased. This increases the width of the depletion layer, which decreases the junction's capacitance resulting in faster response times. The reverse bias induces only a small amount of current (known as saturation or back current) along its direction while the photocurrent remains virtually the same.
48
49
Electrochemistry:
The three participants in the electrochemical reactions in a lithium ion battery are the anode, cathode, and electrolyte. Both the anode and cathode are materials into which lithium inserts and extracts. The process of lithium moving into the anode or cathode is referred to as insertion, and the reverse process, in which lithium moves out of the anode or cathode is referred to as extraction. When discharging of the cell, the lithium is extracted from the anode and inserted into the cathode. When charging the cell, the exact reverse process occurs: lithium is extracted from the cathode and inserted into the anode. The anode of a conventional Li-ion cell is made from carbon, the cathode is a metal oxide, and the electrolyte is a lithium salt in an organic solvent. The underlying chemical reaction that allows Li-ion cells to provide electricity is:
50
It is important to note that lithium ions themselves are not being oxidized; rather, in a lithium-ion battery the lithium ions are transported to and from the cathode or anode, with the transition metal, Co, in LixCoO2 being oxidized from Co3+ to Co4+ during charging, and reduced from Co4+ to Co3+ during discharge.
Electrolytes:
Liquid electrolytes in Li-ion batteries consist of solid lithium-salt electrolytes, such as LiPF6, LiBF4, or LiClO4, and organic solvents, such as ether. A liquid electrolyte conducts Li ions, which act as a carrier between the cathode and the anode when a battery passes an electric current through an external circuit. However, solid electrolytes and organic solvents are easily decomposed on anodes during charging, thus preventing battery activation. Nevertheless, when appropriate organic solvents are used for electrolytes, the electrolytes are decomposed and form a solid electrolyte interface at first charge that is electrically insulating and high Li-ion conducting. The interface prevents decomposition of the electrolyte after the second charge. For example, ethylene carbonate is decomposed at a relatively high voltage, 0.7 V vs. Li, and forms a dense and stable interface. See uranium trioxide for some details of how the cathode works. While uranium oxides are not used in commercially made batteries, the way in which uranium oxides can reversibly insert cations is the same as the way in which the cathode in many lithium-ion cells work.
51
Current generation cells can be fully charged in 45 minutes or less; some Lithium-Ion variants can reach 90% in as little as 10 minutes.
Features:
Output Current up to 1A Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V Thermal Overload Protection Short Circuit Protection Output Transistor Safe Operating Area Protection
Description:
The 78XX series of three-terminal positive regulator are available in the TO-220/D-PAK package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed
52
voltage regulators, these devices can be used with external components to obtain adjustable voltages and currents.
53
Typical Applications
54
DC motors:
A DC motor is designed to run on DC electric power. Two examples of pure DC designs are Michael Faraday's homopolar motor (which is uncommon), and the ball bearing motor, which is (so far) a novelty. By far the most common DC motor types are the brushed and brushless types, which use internal and external commutation respectively to create an oscillating AC current from the DC source -- so they are not purely DC machines in a strict sense.
Operation:
If an Electric current flows through two copper wires that are between the poles of a magnet, an upward force will move one wire up and a downward force will move the other wire down.
55
The loop can be made to spin by fixing a half circle of copper which is known as commutator, to each end of the loop. Current is passed into and out of the loop by brushes that press onto the strips. The brushes do not go round so the wire does not get twisted. This arrangement also makes sure that the current always passes down on the right and back on the left so that the rotation continues. This is how a simple Electric motor is made.
Working, Schematic Diagram, Programming And PCB art work of Line Chaser Robot
56
Working:
The line following characteristics is provided to the robot with the use of infrared light, a IR LED emits infrared light and a photodiode placed next to it receives infrared light which is reflected back from the surface, thus can differentiate in black and white colours (white will reflect all the infrared light while black surface will absorb the complete infrared light). The output from photo diode is fed to the op-amp LM358 (used as a comparator), which compares this voltage to a fixed voltage and amplifies the differential voltage to the give output in digital form, this output from op-amp is fed to the pins P1.0
57
and P1.1 of Port1 of the microcontroller 8051, which performs the programmed actions on the basis of these inputs. The output from the microcontroller is taken from P2.6 and P2.7 pins of Port2 of microcontroller, these outputs are fed to 1 and 2 pins of motor driver IC ULN2003, which amplifies this voltage and gives the output to DC motors running under its control. Microcontroller: The microcontroller used in the circuit is of Atmel Corporation named AT89C51, operating frequency range 3- 24 MHz, in circuit it is made to run at 24 MHz for faster response time. Programming of Microcontroller: Microcontroller is programmed in C, using software Keil C.
Voltage Regulators: Voltage regulator 7805 is used to fed appropriate voltage to the microcontroller i.e. 5 volts. Another Voltage regulator 7812 is used to feed motor driver IC and DC motors, supplying 12 volts. DC Motor: The DC motors used are fixed with a gear box to increase torque/speed ratio for appropriate movement of robot. Battery: Eight rechargeable Lithium Ion batteries of LG Corporation rated 3.7 volts are used to power the robot, connected in pairs of four serially to increase voltage rating and 2- four units are connected in parallel to increase current rating. Visual Indications: Three status LEDs are also provided to inform the user virtually of the operation of robot.
58
Indicates Power i.e. the circuit is getting sufficient power from the batteries or any other power source. Indicated circuit is in hold position i.e. motors will not move or will not respond to any of the signals from sensors. Indicated circuit is running properly and completely i.e. motors will now be moving under the influence of signals from sensors.
4. Red LED on sensor chip: Indicates the output from photo diode i.e. glows when the photodiode receives reflected light from IR LED(encountered with white surface) and remains off when photodiode doesnt receives any light from IR LED (encountered with black surface).
Operation:
The circuit is programmed in such way that the operation of microcontroller starts when a high pulse is provided to the pin P1.7 of Port1, for this purpose a micro switch is provided, thus circuit operation starts when the switch is pressed. A Reset switch is also provided, which when pressed resets the circuits i.e. the microcontroller starts or resets its execution from first memory location (0h). It is also having a feature of auto shut down i.e. if the sensors get same input for 20 sec the robot shuts down or stops moving automatically. (This feature is helpful when the robot gets dislocated from line and moves over the surface without any path).
59
Programming of Microcontroller
60
#include<at89x51.h>
void blackline() { char j; j=1; if(P1_0==0 && P1_1==0) whiteline(); delay(j); blackline(); } void delay(char j) { int i,k; unsigned int m=0; for(k=1;k<=3125;k++) { for(i=0;i<=49;i++) { if(P1_0= =P1_1) { if((i+4)%14= =0) { if(j= =1) { P2_7=P1_0; P2_6=P1_1; } if(j= =0) { P2_7=~P1_0; P2_6=~P1_1; } }
61
void main() { P2_6=0; P2_7=0; P2_1=1; P2_2=0; while(P1_7= =1); P2_1=0; P2_2=1; if(P1_0= =0 && P1_1= =0) whiteline(); blackline(); } void whiteline() { char j; j=0; if(P1_0= =1 && P1_1= =1) blackline(); delay(j); whiteline(); }
62
if(i%14==0)
TR0=0; if(TF0==0 &&(P1_0==P1_1)) break; } if(TF0==0 && (P1_0==P1_1)) break; } if(TF0==1) main(); }
{ P2_6=0; P2_7=0; }
63
m=0; } if(P1_0!=P1_1) { k=0; if(m==0) i=0; if((i+6)%16==0) { if(j==1) { P2_7=P1_0; P2_6=P1_1; } if(j==0) { P2_7=~P1_0; P2_6=~P1_1; } } if(i%16==0) { P2_6=0; P2_7=0; } m++; } TF0=0; TMOD=1; TH0=0xFF; TL0=0x7F; TR0=1; while(TF0= =0 && (P1_0= =1 || P1_1= =0) && (P1_0= =0 || P1_1= =1) && (P1_0= =j || P1_1= =j));
64
Bottom Layer
Top Layer
Top View
Bottom view
Serial No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Atmel AT89C51 ULN2003 LM358 IR LED Photo Diode Crystal (24MHz) White LED Red LED Green LED
Component Character
Quantity Used 1 1 2 2 2 1 1 3 1 2 2 2 2 1 5 5
Variable Resistor (0-20K) Geared DC Motor (100 R.P.M.) Ceramic Capacitor (33pF) Micro Switch Electrolytic Capacitor (10 uF) Resistors (8.2K ohms) Resistors (100 ohms)
68
16 17 18 19
Voltage Regulator 7805 Voltage Regulator 7812 Heat Sink Castor Wheel
1 1 2 1
Resistors
The resistor's function is to reduce the flow of electric current. This symbol to indicate a resistor in a circuit diagram, known as a schematic. is used
Resistance value is designated in units called the "Ohm." A 1000 Ohm resistor is typically shown as 1K-Ohm (kilo Ohm), and 1000 K-Ohms is written as 1M-Ohm (mega ohm). There are two classes of resistors; fixed resistors and the variable resistors. They are also classified according to the material from which they are made. The typical resistor is made of either carbon film or metal film. There are other types as well, but these are the most common. The resistance value of the resistor is not the only thing to consider when selecting a resistor for use in a circuit. The "tolerance" and the electric power ratings of the resistor are also important. The tolerance of a resistor denotes how close it is to the actual rated resistance value. For example, a 5% tolerance would indicate a resistor that is within 5% of the specified resistance value. The maximum rated power of the resistor is specified in Watts. Power is calculated using the square of the current (I2) x the resistance value (R) of the resistor. If the maximum rating of the resistor is exceeded, it will become extremely hot and even burn. Resistors in electronic circuits are typically rated 1/8W, 1/4W, and 1/2W. 1/8W is almost always used in signal circuit applications. Carbon Film Resistors This is the most general purpose, cheap resistor. Usually the tolerance of the resistance value is 5%. Power ratings of 1/8W, 1/4W and 1/2W are frequently used. Carbon film resistors have a disadvantage; they tend to be electrically noisy. Metal film resistors are recommended for use in analog circuits. However, I have never experienced any problems with this noise.
70
This resistor is called a Single-In-Line (SIL) resistor network. It is made with many resistors of the same value, all in one package. One side of each resistor is connected with one side of all the other resistors inside. One example of its use would be to control the current in a circuit powering many light emitting diodes (LEDs). In the photograph on the left, 8 resistors are housed in the package. Each of the leads on the package is one resistor. The ninth lead on the left side is the common lead. The face value of the resistance is printed. (It depends on the supplier). Some resistor networks have a "4S" printed on the top of the resistor network. The 4S indicates that the package contains 4 independent resistors that are not wired together inside. The housing has eight leads instead of nine. The internal wiring of these typical resistor networks has been illustrated below. The size (black part) of the resistor network which I have is as follows: For the type with 9 leads, the thickness is 1.8 mm, the height 5mm, and the width 23 mm. For the types with 8 component leads, the thickness is 1.8 mm, the height 5 mm, and the width 20 mm. The most common type for electronics use is the carbon resistor. They are made in different physical sizes with power dissipation limits commonly from 1 watt down to 1/8 watt. The resistance value and tolerance can be determined from the standard resistor color code.
71
Resistor Color Code 0 Black 1 Brown 2 Resistance value, first three bands. 1st band - 1st digit 2nd band - 2nd digit 3rd band - number of zeros. Red 3 Orange 4 Yellow 5 Green 6 8 Blue Gray 7 Violet 9 White
1% 5%
F J
2% G 10% K 20% M
Gold Silver
20% No band
72
five the
A variation on the color code is used for precision resistors which may have colored bands. In that case the first three bands indicate the first three digits of resistance value and the fourth band indicates the number of zeros. In the five band code the fifth band is gold for 1% resistors and silver for 2%.
Metal Film Resistors Metal film resistors are used when a higher tolerance (more accurate value) is needed. They are much more accurate in value than carbon film resistors. They have about 0.05% tolerance. They have about 0.05% tolerance. I don't use any high tolerance resistors in my circuits. Resistors that are about 1% are more than sufficient. Ni-Cr (Nichrome) seems to be used for the material of resistor. The metal film resistor is used for bridge circuits, filter circuits, and low-noise analog signal circuits.
73
Variable Resistors
There are two general ways in which variable resistors are used. One is the variable resistor which value is easily changed, like the volume adjustment of Radio. The other is semi-fixed resistor that is not meant to be adjusted by anyone but a technician. It is used to adjust the operating condition of the circuit by the technician. Semi-fixed resistors are used to compensate for the inaccuracies of the resistors, and to fine-tune a circuit. The rotation angle of the variable resistor is usually about 300 degrees. Some variable resistors must be turned many times to use the whole range of resistance they offer. This allows for very precise adjustments of their value. These are called "Potentiometers" or "Trimmer Potentiometers."
In the photograph to the left, the variable resistor typically used for volume controls can be seen on the far right. Its value is very easy to adjust.
The four resistors at the center of the photograph are the semi-fixed type. These ones are mounted on the printed circuit board. The two resistors on the left are the trimmer potentiometers. 74
This symbol
Capacitors
The capacitor's function is to store electricity, or electrical energy. The capacitor also functions as a filter, passing alternating current (AC), and blocking direct current (DC). This symbol is used to indicate a capacitor in a circuit diagram. The capacitor is constructed with two electrode plates facing each other, but separated by an insulator. When DC voltage is applied to the capacitor, an electric charge is stored on each electrode. While the capacitor is charging up, current flows. The current will stop flowing when the capacitor has fully charged. When a circuit tester, such as an analog meter set to measure resistance, is connected to a 10 microfarad (F) electrolytic capacitor, a current will flow, but only for a moment. It can confirm that the meter's needle moves off of zero, but returns to zero right away. When connected across the meter's probes to the capacitor in reverse, you will note that current once again flows for a moment. Once again, when the capacitor has fully charged, the current stops flowing. So the capacitor can be used as a filter that blocks DC current. (A "DC cut" filter.) However, in the case of alternating current, the current will be allowed to pass. Alternating current is similar to repeatedly switching the test meter's probes back and forth on the capacitor. Current flows every time the probes are switched. The value of a capacitor (the capacitance), is designated in units called the Farad (F). The capacitance of a capacitor is generally very small, so units such as the microfarad (10-6F), nanofarad ( 10-9F ), and picofarad (10-12F ) are used. Recently, a new capacitor
75
with very high capacitance has been developed. The Electric Double Layer capacitor has capacitance designated in Farad units. These are known as "Super Capacitors." Sometimes, a three-digit code is used to indicate the value of a capacitor. There are two ways in which the capacitance can be written. One uses letters and numbers, the other uses only numbers. In either case, there are only three characters used. [10n] and [103] denote the same value of capacitance. The method used differs depending on the capacitor supplier. In the case that the value is displayed with the three-digit code, the 1st and 2nd digits from the left show the 1st figure and the 2nd figure, and the 3rd digit is a multiplier which determines how many zeros are to be added to the capacitance. Picofarad ( pF ) units are written this way. The capacitor has an insulator (the dielectric) between 2 sheets of electrodes. Different kinds of capacitors use different materials for the dielectric. Breakdown voltage When using a capacitor, you must pay attention to the maximum voltage which can be used. This is the "breakdown voltage." The breakdown voltage depends on the kind of capacitor being used. You must be especially careful with electrolytic capacitors because the breakdown voltage is comparatively low. The breakdown voltage of electrolytic capacitors is displayed as Working Voltage. The breakdown voltage is the voltage that when exceeded will cause the dielectric (insulator) inside the capacitor to break down and conduct. When this happens, the failure can be catastrophic. Electrolytic Capacitors (Electrochemical type capacitors) Aluminum is used for the electrodes by using a thin oxidization membrane. Large values of capacitance can be obtained in comparison with the size of the capacitor, because the dielectric used is very thin. The most important characteristic of electrolytic capacitors is that they have polarity. They have a positive and a negative electrode. [Polarised] This means that it is very important which way round they are connected. If the capacitor is subjected to voltage exceeding its working voltage, or if it is connected with incorrect polarity, it may burst. It is extremely dangerous, because it can quite literally explode. Make absolutely no mistakes. Generally, in the circuit diagram, the positive side is indicated by a "+" (plus) symbol. Electrolytic capacitors range in value from about 1F to thousands of F. Mainly this type of capacitor is used as a ripple filter in a power supply circuit, or as a filter to bypass low frequency signals, etc. Because this type of capacitor is comparatively similar to the nature of a coil in construction, it isn't possible to use for high-frequency circuits. (It is said that the frequency characteristic is bad.)
76
The photograph on the left is an example of the different values of electrolytic capacitors in which the capacitance and voltage differ. From the left to right: 1F (50V) [diameter 5 mm, high 12 mm] 47F (16V) [diameter 6 mm, high 5 mm] 100F (25V) [diameter 5 mm, high 11 mm] 220F (25V) [diameter 8 mm, high 12 mm] 1000F (50V) [diameter 18 mm, high 40 mm]
Ceramic Capacitors Ceramic capacitors are constructed with materials such as titanium acid barium used as the dielectric. Internally, these capacitors are not constructed as a coil, so they can be used in high frequency applications. Typically, they are used in circuits which bypass high frequency signals to ground. These capacitors have the shape of a disk. Their capacitance is comparatively small.
The capacitor on the left is a 100pF capacitor with a diameter of about 3 mm. The capacitor on the right side is printed with 103, so 10 x 103pF becomes 0.01 F. The diameter of the disk is about 6 mm. Ceramic capacitors have no polarity.
77
Heat Sink
A heat sink (or heat sink) is an environment or object that absorbs and dissipates heat from another object using thermal contact (either direct or radiant). Heat sinks are used in a wide range of applications wherever efficient heat dissipation is required; major examples include refrigeration, heat engines and cooling electronic devices.
Principle
Heat sinks function by efficiently transferring thermal energy ("heat") from an object at high temperature to a second object at a lower temperature with a much greater heat capacity. This rapid transfer of thermal energy quickly brings the first object into thermal equilibrium with the second, lowering the temperature of the first object, fulfilling the heat sink's role as a cooling device. Efficient function of a heat sink relies on rapid transfer of thermal energy from the first object to the heat sink, and the heat sink to the second object. The most common design of a heat sink is a metal device with many fins. The high thermal conductivity of the metal combined with its large surface area result in the rapid transfer of thermal energy to the surrounding, cooler, air. This cools the heat sink and whatever it is in direct thermal contact with. Use of fluids (for example coolants in refrigeration) and thermal interface material (in cooling electronic devices) ensures good transfer of thermal energy to the heat sink. Similarly a fan may improve the transfer of thermal energy from the heat sink to the air.
Performance
78
Heat sink performance (including free convection, forced convection, liquid cooled, and any combination thereof) is a function of material, geometry, and overall surface heat transfer coefficient. Generally, forced convection heat sink thermal performance is improved by increasing the thermal conductivity of the heat sink materials, increasing the surface area (usually by adding extended surfaces, such as fins or foam metal) and by increasing the overall area heat transfer coefficient.
Use in electronics
Explanation: In common use, it is a metal object brought into contact with an electronic component's hot surface though in most cases, a thin thermal interface material mediates between the two surfaces. Microprocessors and power handling semiconductors are examples of electronics that need a heat sink to reduce their temperature through increased thermal mass and heat dissipation (primarily by conduction and convection and to a lesser extent by radiation). Heat sinks are widely used in electronics, and have become almost essential to modern integrated circuits like microprocessors, DSPs, GPUs, and more.
79
Crystal oscillator
A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters/receivers.
Operation
A crystal is a solid in which the constituent atoms, molecules, or ions are packed in a regularly ordered, repeating pattern extending in all three spatial dimensions. Almost any object made of an elastic material could be used like a crystal, with appropriate transducers, since all objects have natural resonant frequencies of vibration. For example, steel is very elastic and has a high speed of sound. It was often used in mechanical filters before quartz. The resonant frequency depends on size, shape, elasticity, and the speed of sound in the material. High-frequency crystals are typically cut in the shape of a simple, rectangular plate. Low-frequency crystals, such as those used in digital watches, are typically cut in the shape of a tuning fork. For applications not needing very precise timing, a low-cost ceramic resonator is often used in place of a quartz crystal. When a crystal of quartz is properly cut and mounted, it can be made to distort in an electric field by applying a voltage to an electrode near or on the crystal. This property is known as piezoelectricity. When the field is removed, the quartz will generate an electric field as it returns to its previous shape, and this can generate a voltage. The result is that a quartz crystal behaves like a circuit composed of an inductor, capacitor and resistor, with a precise resonant frequency. 80
Quartz has the further advantage that its elastic constants and its size change in such a way that the frequency dependence on temperature can be very low. The specific characteristics will depend on the mode of vibration and the angle at which the quartz is cut (relative to its crystallographic axes)1 Therefore, the resonant frequency of the plate, which depends on its size, will not change much, either. This means that a quartz clock, filter or oscillator will remain accurate. For critical applications the quartz oscillator is mounted in a temperature-controlled container, called a crystal oven, and can also be mounted on shock absorbers to prevent perturbation by external mechanical vibrations. Quartz timing crystals are manufactured for frequencies from a few tens of kilohertz to tens of megahertz. More than two billion (2109) crystals are manufactured annually. Most are small devices for consumer devices such as wristwatches, clocks, radios, computers, and cell phones. Quartz crystals are also found inside test and measurement equipment, such as counters, signal generators, and oscilloscopes.
Electrical model:
A quartz crystal can be modelled as an electrical network with low impedance (series) and a high impedance (parallel) resonance point spaced closely together. Mathematically the impedance of this network can be written as:
where s is the complex frequency (s = j), s is the series resonant frequency in radians per second and p is the parallel resonant frequency in radians per second. Adding additional capacitance across a crystal will cause the parallel resonance to shift downward. This can be used to adjust the frequency that a crystal oscillator oscillates at. Crystal manufacturers normally cut and trim their crystals to have a specified resonant 81
frequency with a known 'load' capacitance added to the crystal. For example, a 6 pF 32 kHz crystal has a parallel resonance frequency of 32,768 Hz when a 6.0 pF capacitor is placed across the crystal. Without this capacitance, the resonance frequency is higher than 32,768 Hz.
Light-emitting diode
A light-emitting diode, usually called an LED is a semiconductor diode that emits incoherent narrow-spectrum light when electrically biased in the forward direction of the p-n junction, as in the common LED circuit. This effect is a form of electroluminescence. A LED is usually a small area light source, often with extra optics added to the chip that shapes its radiation pattern. LEDs are often used as small indicator lights on electronic devices and increasingly in higher power applications such as flashlights and area lighting. The color of the emitted light depends on the composition and condition of the semiconducting material used, and can be infrared, visible, or ultraviolet. LEDs can also be used as a regular household light source. Besides lighting, interesting applications include sterilization of water and disinfection of devices.
LED technology
Like a normal diode, the LED consists of a chip of semiconducting material impregnated, or doped, with impurities to create a p-n junction. As in other diodes, current flows easily from the p-side, or anode, to the n-side, or cathode, but not in the reverse direction. Charge-carrierselectrons and holesflow into the junction from electrodes with different voltages. When an electron meets a hole, it falls into a lower energy level, and releases energy in the form of a photon. The wavelength of the light emitted, and therefore its color, depends on the band gap energy of the materials forming the p-n junction. In silicon or germanium diodes, the electrons and holes recombine by a non-radiative transition which produces no optical emission, because these are indirect band gap materials. The materials used for the LED
82
have a direct band gap with energies corresponding to near-infrared, visible or nearultraviolet light. LED development began with infrared and red devices made with gallium arsenide. Advances in materials science have made possible the production of devices with evershorter wavelengths, producing light in a variety of colors. LEDs are usually built on an n-type substrate, with an electrode attached to the p-type layer deposited on its surface. P-type substrates, while less common, occur as well. Many commercial LEDs, especially GaN/InGaN, also use sapphire substrate. Substrates that are transparent to the emitted wavelength, and backed by a reflective layer, increase the LED efficiency. The refractive index of the package material should match the index of the semiconductor, otherwise the produced light gets partially reflected back into the semiconductor, where it may be absorbed and turned into additional heat, thus lowering the efficiency. This type of reflection also occurs at the surface of the package if the LED is coupled to a medium with a different refractive index such as a glass fiber or air. The refractive index of most LED semiconductors is quite high, so in almost all cases the LED is coupled into a much lower-index medium. The large index difference makes the reflection quite substantial (per the Fresnel coefficients), and this is usually one of the dominant causes of LED inefficiency. Often more than half of the emitted light is reflected back at the LED-package and package-air interfaces. The reflection is most commonly reduced by using a dome-shaped (half-sphere) package with the diode in the center so that the outgoing light rays strike the surface perpendicularly, at which angle the reflection is minimized. An anti-reflection coating may be added as well. The package may be cheap plastic, which may be colored, but this is only for cosmetic reasons or to improve the contrast ratio; the color of the packaging does not substantially affect the color of the light emitted. Other strategies for reducing the impact of the interface reflections include designing the LED to reabsorb and reemit the reflected light (called photon recycling) and manipulating the microscopic structure of the surface to reduce the reflectance, either by introducing random roughness or by creating programmed moth eye surface patterns.
Considerations in use
Unlike incandescent light bulbs, which light up regardless of the electrical polarity, LEDs will only light with correct electrical polarity. When the voltage across the p-n junction is in the correct direction, a significant current flows and the device is said to be forwardbiased. If the voltage is of the wrong polarity, the device is said to be reverse biased, very little current flows, and no light is emitted. Some LEDs can be operated on an alternating current voltage, but they will only light with positive voltage, causing the LED to turn on and off at the frequency of the AC supply.
83
1. LEDs produce more light per watt than incandescent bulbs; this is useful in battery powered or energy-saving devices. 2. LEDs can emit light of an intended color without the use of color filters that traditional lighting methods require. This is more efficient and can lower initial costs. 3. The solid package of the LED can be designed to focus its light. Incandescent and fluorescent sources often require an external reflector to collect light and direct it in a usable manner. 4. When used in applications where dimming is required, LEDs do not change their color tint as the current passing through them is lowered, unlike incandescent lamps, which turn yellow. 5. LEDs are ideal for use in applications that are subject to frequent on-off cycling, unlike fluorescent lamps that burn out more quickly when cycled frequently, or HID lamps that require a long time before restarting. 6. LEDs, being solid state components, are difficult to damage with external shock. Fluorescent and incandescent bulbs are easily broken if dropped on the ground.
84
Manufacturing
Patterning (etching)
The vast majority of printed circuit boards are made by bonding a layer of copper over the entire substrate, sometimes on both sides, (creating a "blank PCB") then removing unwanted copper after applying a temporary mask (eg. by etching), leaving only the desired copper traces. A few PCBs are made by adding traces to the bare substrate (or a substrate with a very thin layer of copper) usually by a complex process of multiple electroplating steps. There are three common "subtractive" methods (methods that remove copper) used for the production of printed circuit boards:
85
1. Silk screen printing uses etch-resistant inks to protect the copper foil. Subsequent etching removes the unwanted copper. Alternatively, the ink may be conductive, printed on a blank (non-conductive) board. The latter technique is also used in the manufacture of hybrid circuits. 2. Photoengraving uses a photomask and chemical etching to remove the copper foil from the substrate. The photomask is usually prepared with a photoplotter from data produced by a technician using CAM, or computer-aided manufacturing software. Laser-printed transparencies are typically employed for phototools; however, direct laser imaging techniques are being employed to replace phototools for high-resolution requirements. 3. PCB milling uses a two or three-axis mechanical milling system to mill away the copper foil from the substrate. A PCB milling machine (referred to as a 'PCB Prototyper') operates in a similar way to a plotter, receiving commands from the host software that control the position of the milling head in the x, y, and (if relevant) z axis. Data to drive the Prototyper is extracted from files generated in PCB design software and stored in HPGL or Gerber file format. "Additive" processes also exist. The most common is the "semi-additive" process. In this version, the unpatterned board has a thin layer of copper already on it. A reverse mask is then applied. (Unlike a subtractive process mask, this mask exposes those parts of the substrate that will eventually become the traces.) Additional copper is then plated onto the board in the unmasked areas; copper may be plated to any desired weight. Tin-lead or other surface platings are then applied. The mask is stripped away and a brief etching step removes the now-exposed original copper laminate from the board, isolating the individual traces. The additive process is commonly used for multi-layer boards as it facilitates the platingthrough of the holes (to produce conductive vias) in the circuit board.
Lamination
Some PCBs have trace layers inside the PCB and are called multi-layer PCBs. These are formed by bonding together separately etched thin boards.
Drilling
Holes, or vias, through a PCB are typically drilled with tiny drill bits made of solid tungsten carbide. The drilling is performed by automated drilling machines with placement controlled by a drill tape or drill file. These computer-generated files are also
86
called numerically controlled drill (NCD) files or "Excellon files". The drill file describes the location and size of each drilled hole. When very small vias are required, drilling with mechanical bits is costly because of high rates of wear and breakage. In this case, the vias may be evaporated by lasers. Laserdrilled vias typically have an inferior surface finish inside the hole. These holes are called micro vias. It is also possible with controlled-depth drilling, laser drilling, or by pre-drilling the individual sheets of the PCB before lamination, to produce holes that connect only some of the copper layers, rather than passing through the entire board. These holes are called blind vias when they connect an internal copper layer to an outer layer, or buried vias when they connect two or more internal copper layers and no outer layers. The walls of the holes, for boards with 2 or more layers, are plated with copper to form plated-through holes that electrically connect the conducting layers of the PCB. For multilayer boards, those with 4 layers or more, drilling typically produces a smear comprised of the bonding agent in the laminate system. Before the holes can be plated through, this smear must be removed by a chemical de-smear process, or by plasma-etch.
Solder resist
Areas that should not be soldered to may be covered with a polymer solder resist (solder mask) coating. The solder resist prevents solder from bridging between conductors and thereby creating short circuits. Solder resist also provides some protection from the environment.
Screen printing
87
Line art and text may be printed onto the outer surfaces of a PCB by screen printing. When space permits, the screen print text can indicate component designators[1], switch setting requirements, test points, and other features helpful in assembling, testing, and servicing the circuit board. Screen print is also known as the silk screen, or, in one sided PCBs, the red print. Lately some digital printing solutions have been developed to substitute the traditional screen printing process. This technology allows printing variable data onto the PCB, including serialization and barcode information for traceability purposes.
88
Solder
A solder is a fusible metal alloy, with a melting point or melting range of 180 to 190 C (360 to 370 F), which is melted to join metallic surfaces, especially in the fields of electronics and plumbing, in a process called soldering.
Lead Solder
Tin/lead solders are commercially available with tin concentrations between 5% and 70% by weight. The greater the tin concentration, the greater the solders tensile and shear strengths. At the retail level, the two most common alloys are 60/40 Sn/Pb and 63/37 Sn/Pb. The 63/37 ratio is notable in that it is a eutectic mixture, which means: 1. 2. It has the lowest melting point (183 C or 361.4 F) of all the tin/lead alloys; and The melting point is truly a point not a range.
At a eutectic composition, the liquid solder solidifies as a eutectic, which consists of fine grains of nearly pure lead and nearly pure tin phases, but in no way is it an intermetallic, since there are no tin/lead intermetallics, as can be seen from a tin/lead equilibrium diagram. In plumbing, a higher proportion of lead was used. This had the advantage of making the alloy solidify more slowly, so that it could be wiped over the joint to ensure water tightness. Although lead water pipes were displaced by copper when the significance of lead poisoning began to be fully appreciated, lead solder was still used until the 1980s because it was thought that the amount of lead that could leach into water from the solder was negligible. Since even small amounts of lead have been found detrimental to health,
89
lead in plumbing solder was replaced by copper or antimony, with silver often added, and the proportion of tin was increased.
90
Different elements serve different roles in the solder alloy: 1. Silver provides mechanical strength, but has worse ductility than lead. In absence of lead, it improves resistance to fatigue from thermal cycles. 2. Copper lowers the melting point, improves resistance to thermal cycle fatigue, and improves wetting properties of the molten solder. It also slows down the rate of dissolution of copper from the board and part leads in the liquid solder. Bismuth significantly lowers the melting point and improves wettability. In presence of lead and tin, bismuth forms crystals of Sn16Pb32Bi52 with melting point of only 95 C, which diffuses along the grain boundaries and may cause a joint failure at relatively low temperatures. A lead-contaminated high-power part can therefore desolder under load when soldered with a bismuth-containing solder. Indium lowers the melting point and improves ductility. In presence of lead it forms a ternary compound that undergoes phase change at 114 C. Zinc lowers the melting point and is low-cost. However it is highly susceptible to corrosion and oxidation in air, therefore zinc-containing alloys are unsuitable for some purposes, e.g. wave soldering, and zinc-containing solder pastes have shorter shelf life than zinc-free ones. Antimony is added to increase strength without affecting wettability.
3.
4. 5.
6.
91
Soldering Proficiency
Soldering is a process in which two or more metal items are joined together by melting and flowing a filler metal into the joint, the filler metal having a relatively low melting point. Soft soldering is characterized by the melting point of the filler metal, which is below 400C.[1] The filler metal used in the process is called solder. Soldering is distinguished from brazing by use of a lower melting-temperature filler metal; it is distinguished from welding by the base metals not being melted during the joining process. In a soldering process, heat is applied to the parts to be joined, causing the solder to melt and be drawn into the joint by capillary action and to bond to the materials to be joined by wetting action. After the metal cools, the resulting joints are not as strong as the base metal, but have adequate strength, electrical conductivity, and watertightness for many uses. Soldering is an ancient technique that has been used practically as long as humans have been making items out of metal. Applications The most frequent application of soldering is assembling electronic components to printed circuit boards (PCBs). Another common application is making permanent but reversible connections between copper pipes in plumbing systems. Joints in sheet-metal objects such as food cans, roof flashing, rain gutters and automobile radiators have also historically been soldered, and occasionally still are. Jewelry and small mechanical parts are often assembled by soldering. Soldering is also used to join lead came and copper foil in stained glass work. Soldering can also be used to effect a semi-permanent patch for a leak in a container or cooking vessel.
92
Methods Soldering operations can be performed with hand tools, one joint at a time, or en masse on a production line. Hand soldering is typically performed with a soldering iron (for fine work) or gun (for larger items), a torch (again large or small depending on the size of the work), or occasionally a hot-air pencil. These techniques require a great deal of skill to use on the newest fine-pitch chip packages; in particular ball grid array (BGA) devices are notoriously difficult if not impossible to rework by hand. Currently, mass-production printed circuit boards (PCBs) are almost always wave soldered or reflow soldered. In wave soldering, parts are temporarily adhered to the PCB with small dabs of adhesive, and then the assembly is passed over a small fountain in a bulk container of molten solder. Reflow soldering is a somewhat newer process in which a solder paste (a sticky mixture of powdered solder and flux) is used to stick the components to their attachment pads, after which the assembly is heated by an infrared lamp or (more commonly) by passing it through a carefully-controlled oven. Since different components can be best assembled by different techniques, it is common to use two or more processes for a given PCB; the surface mounted parts may be reflow soldered, followed by a wave soldering process for the through-hole mounted components, with some of the bulkier parts hand-soldered on last. Note that the distinction between soldering and brazing is arbitrary, with the only difference being the melting temperature of the filler material. A temperature of 450 C is usually used as a practical cut-off. Different equipment and/or fixturing is usually required since (for instance) a soldering iron generally cannot achieve high enough temperatures for brazing. Practically speaking there is a significant difference between the two processesbrazing fillers have far more structural strength than solders, and are formulated for this as opposed to maximum electrical conductivity. Brazed connections are often as strong or nearly as strong as the parts they connect, even at elevated temperatures. "Hard soldering" or "silver soldering" (performed with high-temperature solder containing up to 40% silver) is also often a form of brazing, since it involves filler materials with melting points in the vicinity of, or in excess of, 450 C. Although the term "silver soldering" is used much more often than "silver brazing", it may be technically incorrect depending on the exact melting point of the filler in use. In silver soldering ("hard soldering"), the goal is generally to give a beautiful, structurally sound joint, especially in the field of jewelry. Thus, the temperatures involved, and the usual use of a torch rather than an iron, would seem to indicate that the process should be referred to as "brazing" rather than "soldering", but the endurance of the "soldering" apellation serves to indicate the arbitrary nature of the distinction (and the level of confusion) between the two processes.
94
can be cleaned with water or water based cleaners. This eliminates hazardous solvents from the production environment, and effluent.
Soldering Defects
Various problems may arise in the soldering process which leads to joints which are nonfunctional either immediately or after a period of use. The most common defect when hand-soldering results from the parts being joined not exceeding the solder's liquidus temperature, resulting in a "cold solder" joint. This is usually the result of the soldering iron being used to heat the solder directly, rather than the parts themselves. Properly done, the parts to be connected are heated by the iron, which in turn melts the solder, guaranteeing adequate heat in the joined parts for thorough wetting. An improperly selected or applied flux can cause joint failure, or if not properly cleaned off the joint, may corrode the metals in the joint over time and cause eventual joint failure. Without flux the joint may not be clean, or may be oxidized, resulting in an unsound joint. Movement of metals being soldered before the solder has cooled will cause a highly unreliable cracked joint.
Common Tools
Hand-soldering tools include the electric soldering iron, which has a variety of tips available ranging from blunt to very fine to chisel heads for hot-cutting plastics, and the 95
soldering gun, which typically provides more power, giving faster heat-up and allowing larger parts to be soldered. Hot-air guns and pencils allow rework of component packages which cannot easily be performed with irons and guns. Torches are available in sizes ranging from very small butane/oxygen units suitable for very fine but high-temperature jewelry work, to full-size oxy-fuel torches suitable for much larger work. Toaster ovens and handheld infrared lights have been used to reproduce production processes on a much smaller scale. Bristle brushes are usually used to apply plumbing paste flux. For electronic work, fluxcore solder is generally used, but additional flux may be used from a flux pen or dispensed from a small bottle with a syringe-like needle. Wire brushes, wire wool and emery cloth are commonly used to prepare plumbing joints for connection. Electronic joints rarely require mechanical cleaning. For PCB assembly and rework, alcohol and acetone are commonly used with cotton swabs or bristle brushes to remove flux residue. A heavy rag is usually used to remove flux from a plumbing joint before it cools and hardens. A glassfibre brush can also be used. For electronic work, solder wick and vacuum-operated "solder suckers" are used to undo solder connections.
Soldering Iron
A soldering iron is a device for applying heat to melt solder for attaching two metal parts. A soldering iron is composed of a heated metal tip and an insulated handle. Heating is often achieved electrically, by passing a current, supplied through an electrical cord or a battery, through a heating element. Another heating method includes combustion of a suitable gas, which can either be delivered through a tank mounted on the iron (flameless), or through an external torch. Some irons stay hot as long as they are turned on, while others heat up and cool down in a few seconds. For electrical work, wires are usually soldered to printed circuit boards, other wires, or small terminals. A low-power iron is suitable for this work. In earlier days wires were frequently soldered to large chassis made of heavy metal, but this high-power requirement is now rare. Higher power is used for non-electrical metalwork.
96
Small battery-operated or gas soldering irons are useful when there isnt a convenient source of electricity. Some soldering irons have interchangeable tips for different types of work. Pyramid tips with a triangular flat face are useful for soldering sheet metal. Fine round or chisel tips are typically used for electronics work. When not in use, soldering irons are often placed in stands to keep them away from flammable materials. Such a stand often also comes with a sponge and flux pot for cleaning the tip. Some soldering irons for continuous and professional use come as part of a soldering station, which allows the exact temperature of the tip to be adjusted, kept constant, and displayed. A new tip needs to be coated, heated, and then covered with solder before its first use. This procedure is called "tinning". The tinning forms a liquid layer which facilitates the transfer of heat to the work piece. A dirty tip does not transfer heat well. The tip needs to be kept coated with a shiny layer of solder by occasional wiping and applying solder directly to the tip. For best results, particularly in electrical work where good electrical contact is required, the iron should be used to heat the work piece, and solder applied to it: this helps to prevent "cold joints", where hot solder is applied by the iron to a relatively cold target, shrouding it in solder to look like a good joint, but without wetting it properly, and without forming a good connection. Electrical solder contains flux cores (the purpose of the flux is to clean the oxides off the metals to permit a good joint). If the solder is applied to the iron first then the flux is rapidly burnt off (the wispy white smoke you get from the tip of the iron) and cannot serve its purpose on the joint. In heavier applications, including plumbing, flux is normally applied completely separately. While soldering is used in plumbing applications, a soldering iron is not suitable for heating the large areas of heavy metal used, and a blow-torch is the tool of choice.
97
98
Applications
Increased productivity, accuracy, and endurance:
Jobs which require speed, accuracy, reliability or endurance can be performed far better by a robot than a human. Hence many jobs in factories which were traditionally performed by people are now robotized. This has led to cheaper mass-produced goods, including automobiles and electronics. Robots have now been working in factories for more than fifty years, ever since the Unimate robot was installed to automatically remove hot metal from a die casting machine. Since then, factory automation in the form of large stationary manipulators has become the largest market for robots. The number of installed robots has grown faster and faster, and today there are more than 1 million robots in operation worldwide (Half of the robot population is located in Asia, 1/3 in Europe, and 16% in North America. Australasia and Africa each account for 1%).
Future Scope
As of 2008, the robotic arm business is approaching a mature state, where advance features can be provided like speed, accuracy and ease of use for most of the applications. Vision guidance (machine vision) is bringing a lot of flexibility to robotic cells. So we have the arm and the eye, but the part that still has poor flexibility is the hand: the end effecter attached to a robot is often a simple pneumatic, 2-position wrench. This doesn't allow the robotic cell to easily handle different parts, in different orientations. Hand-in-hand with increasing off-line programmed applications, robot calibration is becoming more and more important in order to guarantee a good positioning accuracy. Other developments include downsizing industrial arms for consumer applications (micro-robotic arms), manufacture of domestic robots and using industrial arms in combination with more intelligent automated guided vehicles (AGVs) to make the automation chain more flexible between pick-up and drop-off. In future robots will be commonplace: in home, factories, agriculture, building & construction, undersea, space, mining, hospitals and streets for repair, construction, maintenance, security, entertainment, companionship, care. Purposes of these Future Robots: 1. Robotized space vehicles and facilities 2. Anthropomorphic general-purpose robots with hands like humans used for factory jobs 3. Intelligent robots for unmanned plants - Totally automated factories will be commonplace. 4. Robots for guiding blind people 5. Robots for almost any job in home or hospital, including Robo-surgery.
100
6. Housework robots for cleaning, washing etc - Domestic robots will be small, specialized and attractive, e.g. cuddly Properties of these Future Robots: 1. Autonomous, with environmental awareness sensors 2. Self diagnostic self repairing 3. Artificial brains with ten thousand or more cells
References
1. 2. 3. 4. 5. 6. 7. 8. 9. 10.
Op-Amp and Linear Integrated Circuits by Gayakwad IEEE Transactions on Automation Science and Engineering IEEE Transactions on Robotics IEEE Transactions on Pattern Analysis and Machine Intelligence IEEE Journal of Field Robotics International Journal of Robotics and Automation Cx51 Compiler - Optimizing C Compiler and Library Reference for Classic and Extended 8051 Microcontrollers 80C51 family programmers guide and instruction set 8051 Microcontroller and Embedded Systems by Muhammad Ali Mazidi Internet i. ii. iii. iv. v. Google.com Hobbytron.com Quasarelectronics.com Bityard.com Proporta.com
101
102