Sei sulla pagina 1di 80

INTRODUCTION

An embedded system is a computer system designed to perform one or more dedicated functions often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs. Embedded systems control many devices in common use today Picture of the internals of an ADSL modem/router. A modern example of an embedded system. Labelled parts include a microprocessor , RAM , and flash memory . Embedded systems are controlled by one or more main processing cores that are typically either microcontrollers or digital signal processors (DSP). The key characteristic, however, is being dedicated to handle a particular task, which may require very powerful processors. For example, air traffic control systems may usefully be viewed as embedded, even though they involve mainframe computers and dedicated regional and national networks between airports and radar sites ( each radar probably includes one or more embedded systems of its own). Since the embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the size and cost of the product and increase the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale. Physically, embedded systems range from portable devices such as digital watches and MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power plants. Complexity varies from low, with a single microcontroller chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or enclosure. In general, "embedded system" is not a strictly definable term, as most systems have some element of extensibility or programmability. For example, handheld computers share some elements with embedded systems such as the operating systems and microprocessors which power them, but they allow different applications to be loaded and peripherals to be connected. Moreover, even systems which don't expose programmability as a primary feature generally need to support software updates. On a continuum from "general purpose" to "embedded", large application systems will have subcomponents at most points even if the system as a whole is "designed to perform one or a few dedicated functions", and is thus appropriate to call "embedded". VARIETY OF EMBEDDED SYSTEMS Embedded systems span all aspects of modern life and there are many examples of their use. Telecommunications systems employ numerous embedded systems from telephone switches for the network to mobile phones at the end-user. Computer networking uses dedicated routers and network bridges to route data. 1

Consumer electronics include personal digital assistants (PDAs), mp3 players, mobile phones, videogame consoles, digital cameras, DVD players, GPS receivers, and printers. Many household appliances, such as microwave ovens, washing machines and dishwashers, are including embedded systems to provide flexibility, efficiency and features. Advanced HVAC systems use networked thermostats to more accurately and efficiently control temperature that can change by time of day and season. Home automation uses wired- and wireless-networking that can be used to control lights, climate, security, audio/visual, surveillance, etc., all of which use embedded devices for sensing and controlling Transportation systems from flight to automobiles increasingly use embedded systems. New airplanes contain advanced avionics such as inertial guidance systems and GPS receivers that also have considerable safety requirements. Various electric motors brushless DC motors, induction motors and DC motors are using electric/electronic motor controllers. Automobiles, electric vehicles, and hybrid vehicles are increasingly using embedded systems to maximize efficiency and reduce pollution. Other automotive safety systems include anti-lock braking system (ABS), Electronic Stability Control (ESC/ESP), traction control (TCS) and automatic four-wheel drive. PC Engines' ALIX.1C Mini-ITX embedded board with an x86 AMD Geode LX 800 together with Compact Flash, miniPCI and PCI slots, 44-pin IDE interface, audio, USB and 256MB RAM. An embedded Router Board 112 with U.FL-RSMA pigtail and R52 miniPCI Wi-Fi card widely used by wireless Internet service providers (WISPs) in the Czech Republic. Medical equipment is continuing to advance with more embedded systems for vital signs monitoring, electronic stethoscopes for amplifying sounds, and various medical imaging (PET, SPECT, CT, MRI) for non-invasive internal inspections. In addition to commonly described embedded systems based on small computers, a new class of miniature wireless devices called motes are quickly gaining popularity as the field of wireless sensor networking rises. Wireless sensor networking, WSN, makes use of miniaturization made possible by advanced IC design to couple full wireless subsystems to sophisticated sensors, enabling people and companies to measure a myriad of things in the physical world and act on this information through IT monitoring and control systems. These motes are completely self contained, and will typically run off a battery source for many years before the batteries need to be changed or charged.

HISTORY
In the earliest years of computers in the 194050s, computers were sometimes dedicated to a single task, but were far too large and expensive for most kinds of tasks performed by embedded computers of today. Over time however, the concept of programmable controllers evolved from traditional electromechanical sequencers, via solid state devices, to the use of computer technology. One of the first recognizably modern embedded systems was the Apollo Guidance Computer, developed by Charles Stark Draper at the MIT Instrumentation Laboratory. At the project's inception, the Apollo guidance computer was considered the riskiest item in the Apollo project as it employed the then newly developed monolithic integrated circuits to reduce the size and weight. An early mass-produced embedded system was the Autonetics D-17 guidance computer for the Minuteman missile, released in 1961. It was built from transistor logic and had a hard disk for main memory. When the Minuteman II went into production in 1966, the D-17 was replaced with a new computer that was the first high-volume use of integrated circuits. This program alone reduced prices on quad nand gate ICs from $1000/each to $3/each [permitting their use in commercial products. Since these early applications in the 1960s, embedded systems have come down in price and there has been a dramatic rise in processing power and functionality. The first microprocessor for example, the Intel 4004, was designed for calculators and other small systems but still required many external memory and support chips. In 1978 National Engineering Manufacturers Association released a "standard" for programmable microcontrollers, including almost any computer-based controllers, such as single board computers, numerical, and event-based controllers. As the cost of microprocessors and microcontrollers fell it became feasible to replace expensive knob-based analog components such as potentiometers and variable capacitors with up/down buttons or knobs read out by a microprocessor even in some consumer products. By the mid-1980s, most of the common previously external system components had been integrated into the same chip as the processor and this modern form of the microcontroller allowed an even more widespread use, which by the end of the decade were the norm rather than the exception for almost all electronics devices. The integration of microcontrollers has further increased the applications for which embedded systems are used into areas where traditionally a computer would not have been considered. A general purpose and comparatively low-cost microcontroller may often be programmed to fulfill the same role as a large number of separate components. Very few additional components may be needed and most of the design effort is in the software. The intangible nature of software makes it much easier to prototype and test new revisions compared with the design and construction of a new circuit not using an embedded processor. 3

CHARACTERISTICS
1. Embedded systems are designed to do some specific task, rather than be a general-purpose computer for multiple tasks. Some also have real-time performance constraints that must be met, for reasons such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs. 2. Embedded systems are not always standalone devices. Many embedded systems consist of small, computerized parts within a larger device that serves a more general purpose. For example, the Gibson Robot Guitar features an embedded system for tuning the strings, but the overall purpose of the Robot Guitar is, of course, to play music. Similarly, an embedded system in an automobile provides a specific function as a subsystem of the car itself. 3. The program instructions written for embedded systems are referred to as firmware, and are stored in read-only memory or Flash memory chips. They run with limited computer hardware resources: little memory, small or non-existent keyboard and/or screen.

USER INTERFACE
Embedded systems range from no user interface at all dedicated only to one task to complex graphical user interfaces that resemble modern computer desktop operating systems. Simple embedded devices use buttons, LEDs, graphic or character LCDs (for example popular HD44780 LCD) with a simple menu system A more sophisticated devices use graphical screen with touch sensing or screen-edge buttons provide flexibility while minimizing space used: the meaning of the buttons can change with the screen, and selection involves the natural behaviour of pointing at what's desired. Handheld systems often have a screen with a "joystick button" for a pointing device. Some systems provide user interface remotely with the help of a serial (e.g. RS-232, USB, IC, etc.) or network (e.g. Ethernet) connection. In spite of the potentially necessary proprietary client software and/or specialist cables that are needed, this approach usually gives a lot of advantages: extends the capabilities of embedded system, avoids the cost of a display, simplifies BSP, allows to build rich user interface on the PC. A good example of this is the combination of an embedded web server running on an embedded device (such as an IP camera or network routers. The user interface is displayed in a web browser on a PC connected to the device, therefore needing no bespoke software to be installed.

PROCESSORS IN EMBEDDED SYSTEMS


Embedded processors can be broken into two broad categories: ordinary microprocessors (P) and microcontrollers (C), which have many more peripherals on chip, reducing cost and size. Contrasting to the personal computer and server markets, a fairly large number of basic CPU architectures are used; there are Von Neumann as well as various degrees of Harvard architectures, RISC as well as non-RISC and VLIW; word lengths vary from 4-bit to 64-bits and beyond (mainly in DSP processors) although the most typical remain 8/16-bit. Most architecture come in a large number of different variants and shapes, many of which are also manufactured by several different companies. A long but still not exhaustive list of common architectures are: 65816, 65C02, 68HC08, 68HC11, 68k, 8051, ARM, AVR, AVR32, Blackfin, C167, Coldfire, COP8, Cortus APS3, eZ8, eZ80, FR-V, H8, HT48, M16C, M32C, MIPS, MSP430, PIC, PowerPC, R8C, SHARC, SPARC, ST6, SuperH, TLCS-47, TLCS-870, TLCS-900, Tricore, V850, x86, XE8000, Z80, AsAP etc.

Block Diagram
+5V

POWER SUPPLY UNIT

+12V

D7 IR SENSOR MICRO CONTROLLER 89C51 CURRENT AMPLIFIER OUTPUT RELAYS

D0

Bock description
Power supply
Power supply used is a regulated power supply which generates +5v vDC for microcontroller. The MC78XX/LM78XX/MC78XXA series of three terminal positive regulators are available in the TO-220/D-PAK package and with several fixed output voltages, 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 voltage regulators, these devices can be used with external components to obtain adjustable voltages and currents.

Microcontroller
A microcontroller (also MCU or C) is a functional computer system-on-a-chip. It contains a processor core, memory, and programmable input/output peripherals. Microcontrollers include an integrated CPU, memory (a small amount of RAM, program memory, or both) and peripherals capable of input and output. It emphasizes high integration, in contrast to a microprocessor which only contains a CPU (the kind used in a PC). In addition to the usual arithmetic and logic elements of a general purpose microprocessor, the microcontroller integrates additional elements such as read-write memory for data storage, read-only memory for program storage, Flash memory for permanent data storage, peripherals, and input/output interfaces. At clock speeds of as little as 32KHz, microcontrollers often operate at very low speed compared to microprocessors, but this is adequate for typical applications. They consume relatively little power (milliwatts or even microwatts), and will generally have the ability to retain functionality while waiting for an event such as a button press or interrupt. Power consumption while sleeping (CPU clock and peripherals disabled) may be just nanowatts, making them ideal for low power and long lasting battery applications. Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, remote controls, office machines, appliances, power tools, and toys. By reducing the size, cost, and power consumption compared to a design using a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to electronically control many more processes.

Circuit diagram

Circuit description
1. Regulated Supply: A 5 V Of Battery Is used To Provide Power To The Whole Branches Of The Circuit . As the microcontroller works on 5 v , so a regulated supply of 5 v is provided through IC 7805 all branches ( microcontroller , IR sensors and opamps) 2. TSOP 1738 SENSORS (IR RECEIVER) : Infrared (IR) radiation is electromagnetic radiation whose wavelength is longer than that of visible light, but shorter than that of terahertz radiation and microwaves. The name means "below red" (from the Latin infra, "below"), red being the color of visible light with the longest wavelength. Infrared radiation has wavelengths between about 750 nm and 1 mm, spanning three orders of magnitude. Infrared sensors transmits infrared radiations in all the directions to sense the hurdles , if the transmitted radiations reflects back then it senses a obstacle automatically generate signal. 7

3. Microcontroller: We are using AT89C51 microcontroller which belongs to Atmel, 8051 family. The AT89C51 is a low-power, high-performance CMOS 8bit microcontroller with 4K bytes of Flash programmable and erasable read only memory (PEROM).The output provided from the codes generated is fed to the input port of the microcontroller and it works according to the program fed .

Infrared Transmitter & Receiver


IR LED emits infrared radiation. This radiation illuminates the surface in front of LED. Surface reflects the infrared light. Depending on reflectivity of the surface, amount of light reflected varies. This reflected light is made incident on reverse biased IR sensor. When photons are incident on reverse biased junction of this diode, electron-hole pairs are generated, which results in reverse leakage current. Amount of electron-hole pairs generated depends on intensity of incident IR radiation. More intense radiation results in more reverse leakage current. This current can be passed through a resistor so as to get proportional voltage. Thus as intensity of incident rays varies, voltage across resistor will vary accordingly. This voltage can then be given to OPAMP based comparator.Output of the comparator can be read by uC.

INFRARED LED

PHOTOTRANSISTOR

TSOP 1738:
Description The TSOP1738 series are miniaturized receivers for Infrared remote control systems. PIN diode and Preamplifier are assembled on lead frame, the epoxy package is designed as IR filter. The demodulated output signal can directly be Decoded by a microprocessor. TSOP1738 is the Standard IR remote control receiver series, supporting All major transmission codes.

PIN DESDRIPTION:GND VS OUT

Features _ Photo detector and preamplifier in one package _ internal filter for PCM frequency _ TTL and CMOS compatibility _ Output active low _ Low power consumption _ High immunity against ambient light _ Continuous data transmission possible (up to 2400 bps) _ Improved shielding against electrical field disturbance 9

Microcontroller

The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of In-System Programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industrystandard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with In-System Programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89S51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, two 16-bit timer/counters, a fivevector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and 10

interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next external interrupt or hardware reset.

Pin Description VCC Supply voltage (all packages except 42-PDIP). GND Ground (all packages except 42-PDIP; for 42-PDIP GND connects only the logic core and the embedded program memory). VDD Supply voltage for the 42-PDIP which connects only the logic core and the embedded program memory. PWRVDD Supply voltage for the 42-PDIP which connects only the I/O Pad Drivers. The application board MUST connect both VDD and PWRVDD to the board supply voltage. PWRGND Ground for the 42-PDIP which connects only the I/O Pad Drivers. PWRGND and GND are weakly connected through the common silicon substrate, but not through any metal link. The application board MUST connect both GND and PWRGND to the board ground. Port 0 Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance inputs. Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during program verification. Port 1 Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers cansink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by theinternal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming andverification. Port 2 Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits

11

the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3 Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 receives some control signals for Flash programming and verification. Port 3 also serves the functions of various special features of the AT89S51, as shown in the following table. RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives High for 98 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled. ALE/PROG Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier

12

Project source code

VAR1 equ r7 TEMP equ 10H COUNT equ 11H

;Temporary Variable ;Temp variable ;Count ;Device address ;Command ;Flip bit ;Temp bit for flip ;IR Receiver connected to this pin ;Switch 1 connected here ;Switch 2 connected here ;Switch 3 connected here ;Switch 4 connected here ;Switch 5 connected here ;Switch 6 connected here ;Switch 7 connected here ;Switch 8 connected here ;Port at which switches are connected

ADDR equ 12H CMD equ 13H FLIP bit 00H TOG bit 01H IR equ P3.3

SW1 equ P2.0 SW2 equ P2.1 SW3 equ P2.2 SW4 equ P2.3 SW5 equ P2.4 SW6 equ P2.5 SW7 equ P2.6 SW8 equ P2.7 SWport equ P2

13

org 00H mov SWport,#00H mov sp,#50H clr TOG main: jb IR,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#100 djnz VAR1,$ mov c,IR mov FLIP,c clr A mov COUNT,#5

;Start of prog ;switch all relays off! ;Stack pointer initialization ;Clear temp bit

;Wait for first bit ;3.024mS delay

;Read Flip bit

;Count for address

14

fadd: mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#4 djnz VAR1,$ mov c,IR rlc a djnz COUNT,fadd mov ADDR,A clr a mov COUNT,#6 fcmd: mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#4 15 ;1.728mS Delay for each bit ;Count for Command ;Save the address ;1.728mS delay for each bit

djnz VAR1,$ mov c,IR rlc a djnz COUNT,fcmd mov TEMP,CMD mov CMD,a mov a,ADDR cjne a,#00,nvalid mov a,TEMP cjne a,CMD,valid nvalid: ljmp main valid: clr a mov c,FLIP rlc a mov TEMP,a clr a mov c,TOG rlc a cjne a,TEMP,valid1 sjmp nvalid valid1: 16 ;Key press check ;Check for valid command ;Save the old command ;Save the new command ;Cheack for valid address

mov c,FLIP mov TOG,c mov a,CMD clr c cjne a,#1,skip1 jb SW1,isset1 setb SW1 ljmp main isset1: clr SW1 ljmp main skip1: cjne a,#2,skip2 jb SW2,isset2 setb SW2 ljmp main isset2: clr SW2 ljmp main skip2: cjne a,#3,skip3 jb SW3,isset3 setb SW3 17 ;Check for SW3 ;Check for SW2 ;Check for SW1

ljmp main

isset3: clr SW3 ljmp main skip3: cjne a,#4,skip4 jb SW4,isset4 setb SW4 ljmp main isset4: clr SW4 ljmp main skip4: cjne a,#5,skip5 jb SW5,isset5 setb SW5 ljmp main isset5: clr SW5 ljmp main skip5: cjne a,#6,skip6 ;Check for SW6 18 ;Check for SW5 ;Check for SW4

jb SW6,isset6 setb SW6 ljmp main

isset6: clr SW6 ljmp main skip6: cjne a,#7,skip7 jb SW7,isset7 setb SW7 ljmp main isset7: clr SW7 ljmp main skip7: cjne a,#8,skip8 jb SW8,isset8 setb SW8 ljmp main isset8: clr SW8 ljmp main 19 ;Check for SW8 ;Check for SW7

skip8: cjne a,#0CH,exit mov SWport,#00H ljmp main ;Check for all switches

exit: ljmp main

END

;End of program

20

Relays
The relay takes advantage of the fact that when electricity flows through a coil, it becomes an electromagnet. The electromagnetic coil attracts a steel plate, which is attached to a switch. So the switch's motion (ON and OFF) is controled by the current flowing to the coil, or not, respectively. A very useful feature of a relay is that it can be used to electrically isolate different parts of a circuit. It will allow a low voltage circuit (e.g. 5VDC) to switch the power in a high voltage circuit (e.g. 100 VAC or more). The relay operates mechanically, so it can not operate at high speed.

There are many kind of relays. You can select one according to your needs. The various things to consider when selecting a relay are its size, voltage and current capacity of the contact points, drive voltage, impedance, number of contacts, resistance of the contacts, etc. The resistance voltage of the contacts is the maximum voltage that can be conducted at the point of contact in the switch. When the maximum is exceeded, the contacts will spark and melt, sometimes fusing together. The relay will fail. The value is printed on the relay.

21

On the left in the photograph is a small relay with a coil driving voltage of 12 VDC. It has two electrically independant points of contact (switches.) Although the resistance and permissible voltage and current at the point of contact are indistinct, I think that it will handle several hundred mA. The relay on the right in the photograph can be used to control a 100 VAC system. Its driving voltage is 3 VDC, and if it is used to control an AC system, the maximum resistance voltage is 125 VAC, and the permissible current limit is 1A. If it is used to control a DC system, the maximum resistance voltage is DC30V, and the permissible current limit is 2A. It has one contact only. Both types of relay can be mounted on the PWB; the spacing of the component leads is a multiple of 0.1 inches. It can also be mounted on the universal PWB. The physical dimensions of the relay on the left are width 19.5 mm, height 10 mm, and depth 10 mm. The one that is on the right has the width 20 mm, height 15 mm, and depth 11 mm. The relay pictured to the right is able to handle a little larger electric power. Its driving voltage is 12 VDC, maximum resistance voltage is AC 240V, and the permissible current limit is 5A in case of AC system. In a DC system, the maximum resistance voltage is DC 28V, and the permissible current limit is 5A. This type of relay can not be mounted on the PWB. It needs a socket, and mounts on the case or some other place with a screw. The dimensions are width 22 mm, height 35 mm, and depth 20 mm. 22

BASIC ELECTRONICS
Resistors
The resistor's function is to reduce the flow of electric current. This symbol is used to indicate a resistor in a circuit diagram, known as a schematic. 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 ( megohm ). 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 resistence value. For example, a 5% tolerance would indicate a resistor that is within 5% of the specified resistance value. The power rating indicates how much power the resistor can safely tolerate. Just like you wouldn't use a 6 volt flashlight lamp to replace a burned out light in your house, you wouldn't use a 1/8 watt resistor when you should be using a 1/2 watt resistor. 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 typicaly rated 1/8W, 1/4W, and 1/2W. 1/8W is almost always used in signal circuit applications. When powering a light emitting diode, a comparatively large current flows through the resistor, so you need to consider the power rating of the resistor you choose. Rating electric power For example, to power a 5V circuit using a 12V supply, a three-terminal voltage regulator is usually used. However, if you try to drop the voltage from 12V to 5V using only a resistor, then you need to calculate the power rating of the resistor as well as the resistance value. At this time, the current consumed by the 5V circuit needs to be known. Here are a few ways to find out how much current the circuit demands. Assemble the circuit and measure the actual current used with a multi-meter. Check the component's current use against a standard table. Assume the current consumed is 100 mA (milliamps) in the following example. 7V must be dropped with the resistor. The resistance value of the resistor becomes 7V / 0.1A = 70(ohm). The consumption of electric power for this resistor becomes 0.1A x 0.1A x 70 ohm = 0.7W. 23

Resistance value
As for the standard resistance value, the values used can be divided like a logarithm. ( See the logarithm table ) For example, in the case of E3, The values [1], [2.2], [4.7] and [10] are used. They divide 10 into three, like a logarithm. In the case of E6 : [1], [1.5], [2.2], [3.3], [4.7], [6.8], [10]. In the case of E12 : [1], [1.2], [1.5], [1.8], [2.2], [2.7], [3.3], [3.9], [4.7], [5.6], [6.8], [8.2], [10]. It is because of this that the resistance value is seen at a glance to be a discrete value. The resistance value is displayed using the color code( the colored bars/the colored stripes , because the average resistor is too small to have the value printed on it with numbers. You had better learn the color code, because almost all resistors of 1/2W or less use the color code to display the resistance value.

Fixed Resistors A fixed resistor is one in which the value of its resistance cannot change. 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. The physical size of the different resistors is as follows.

Rough size Rating power Thickness Length (W) (mm) (mm) From the top of the photograph 1/8W 1/4W 1/2W 1/8 1/4 1/2 2 2 3 3 6 9

24

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.

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.

Rough size Rating power Thickness Length (W) (mm) (mm) From the top of the photograph 1/8W (tolerance 1%) 1/4W (tolerance 1%) 25 1/8 1/4 2 2 3 6

1W (tolerance 5%) 2W (tolerance 5%)

1 2

3.5 5

12 15

Variable Resistor:-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. This symbol is used to indicate a variable resistor in a circuit diagram. There are three ways in which a variable resistor's value can change according to the rotation angle of its axis.When type "A" rotates clockwise, at first, the resistance value changes slowly and then in the second half of its axis, it changes very quickly. The "A" type variable resistor is typically used for the volume control of a radio, for example. It is well suited to adjust a low sound subtly. It suits the characteristics of the ear. The ear hears low sound changes well, but isn't as sensitive to small changes in loud sounds. A larger change is 26

needed as the volume is increased. These "A" type variable resistors are sometimes called "audio taper" potentiometers. As for type "B", the rotation of the axis and the change of the resistance value are directly related. The rate of change is the same, or linear, throughout the sweep of the axis. This type suits a resistance value adjustment in a circuit, a balance circuit and so on. They are sometimes called "linear taper" potentiometers. Type "C" changes exactly the opposite way to type "A". In the early stages of the rotation of the axis, the resistance value changes rapidly, and in the second half, the change occurs more slowly. This type isn't too much used. It is a special use. As for the variable resistor, most are type "A" or type "B". CDS Elements Some components can change resistance value by changes in the amount of light hitting them. One type is the Cadmium Sulfide Photocell. (Cd) The more light that hits it, the smaller its resistance value becomes. There are many types of these devices. They vary according to light sensitivity, size, resistance value etc. Pictured at the left is a typical CDS photocell. Its diameter is 8 mm, 4 mm high, with a cylinder form. When bright light is hitting it, the value is about 200 ohms, and when in the dark, the resistance value is about 2M ohms. This device is using for the head lamp illumination confirmation device of the car, for example.

Other Resistors There is another type of resistor other than the carbon-film type and the metal film resistors. It is the wirewound resistor. A wirewound resistor is made of metal resistance wire, and because of this, they can be manufactured to precise values. Also, high-wattage resistors can be made by using a thick wire material. Wirewound resistors cannot be used for high-frequency circuits. Coils are used in high frequency circuits. Since a wirewound resistor is a wire wrapped around an insulator, it is also a coil, in a manner of speaking. Using one could change the behavior of the circuit. Still another type of resistor is the Ceramic resistor. These are wirewound resistors in a ceramic case, strengthened with a special cement. They have very high power ratings, from 1 or 2 watts to dozens of watts. These resistors can become extremely hot when used for high power applications, and this must be taken into account when designing the circuit. These devices can easily get hot enough to burn you if you touch one.

27

The photograph on the left is of wirewound resistors. The upper one is 10W and is the length of 45 mm, 13 mm thickness. The lower one is 50W and is the length of 75 mm, 29 mm thickness. The upper one is has metal fittings attached. These devices are insulated with a ceramic coating.

The photograph on above is a ceramic (or cement) resistor of 5W and is the height of 9 mm, 9 mm depth, 22 mm width. Thermistor ( Thermally sensitive resistor ) The resistance value of the thermistor changes according to temperature. This part is used as a temperature sensor. There are mainly three types of thermistor. NTC(Negative Temperature Coefficient Thermistor) : With this type, the resistance value decreases continuously as the temperature rises. PTC(Positive Temperature Coefficient Thermistor) : With this type, the resistance value increases suddenly when the temperature rises above a specific point.

28

CTR(Critical Temperature Resister Thermistor) : With this type, the resistance value decreases suddenly when the temperature rises above a specific point. The NTC type is used for the temperature control. The relation between the temperature and the resistance value of the NTC type can be calculated using the following formula.

R : The resistance value at the temperature T T : The temperature [K] R0 : The resistance value at the reference temperature T0 T0 : The reference temperature [K] B : The coefficient As the reference temperature, typically, 25C is used. The unit with the temperature is the absolute temperature(Value of which 0 was -273C) in K(Kelvin). 25C are the 298 kelvins.

Resistor color code Tolerance (%) 1 2 0.05 -

Color Black Brown Example 1 (Brown=1),(Black=0),(Orange=3) 10 x 103 = 10k ohm Tolerance(Gold) = 5% Red Orange Yellow

Value Multiplier 0 1 2 3 4 0 1 2 3 4

29

Green Blue Violet Gray White Example 2 (Yellow=4),(Violet=7),(Black=0),(Red=2) 470 x 102 = 47k ohm Tolerance(Brown) = 1% Gold Silver None

5 6 7 8 9 -

5 6 7 8 9 -1 -2 -

0.5 0.25 0.1 5 10 20

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 eachother, 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. You can confirm that the meter's needle moves off of zero, but returns to zero right away. When you connect 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 30

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, an new capacitor 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. For example, when the code is [103], it indicates 10 x 103, or 10,000pF = 10 nanofarad( nF ) = 0.01 microfarad( F ). If the code happened to be [224], it would be 22 x 104 = or 220,000pF = 220nF = 0.22F. Values under 100pF are displayed with 2 digits only. For example, 47 would be 47pF. 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.

31

I will introduce the different types of capacitors below. 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. 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]

32

1000F (50V) [diamete r 18 mm, high 40 mm] The size of the capacito r sometimes depends on the manufacturer. So the sizes shown here on this page are just examples In the photograph to the right, the mark indicating the negative lead of the component can be seen. You need to pay attention to the polarity indication so as not to make a mistake when you assemble the circuit. Tantalum Capacitors Tantalum Capacitors are electrolytic capacitors that is use a material called tantalum for the electrodes. Large values of capacitance similar to aluminum electrolytic capacitors can be obtained. Also, tantalum capacitors are superior to aluminum electrolytic capacitors in temperature and frequency characteristics. When tantalum powder is baked in order to solidify it, a crack forms inside. An electric charge can be stored on this crack. These capacitors have polarity as well. Usually, the "+" symbol is used to show the positive component lead. Do not make a mistake with the polarity on these types. Tantalum capacitors are a little bit more expensive than aluminum electrolytic capacitors. Capacitance can change with temperature as well as frequency, and these types are very stable. Therefore, tantalum capacitors are used for circuits which demand high stability in the capacitance values. Also, it is said to be common sense to use tantalum capacitors for analog signal systems, because the current-spike noise that occurs with aluminum electrolytic capacitors does not appear. Aluminum electrolytic capacitors are fine if you don't use them for circuits which need the high stability characteristics of tantalum capacitors. 33

The photograph on the left illustrates the tantalum capacitor. The capacitance values are as follows, from the left: 0.33 F (35V) 0.47 F (35V) 10 F (35V)

show the positive lead written on the body.

The "+" symbol is used to of the component. It is

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. Ceramic capacitors should not be used for analog circuits, because they can distort the signal.

34

Multilayer Ceramic Capacitors The multilayer ceramic capacitor has a manylayered dielectric. These capacitors are small in size, and have good temperature and frequency characteristics. Square wave signals used in digital circuits can have a comparatively high frequency component included. This capacitor is used to bypass the high frequency to ground. In the photograph, the capacitance of the component on the left is displayed as 104. So, the capacitance is 10 x 104 pF = 0.1 F. The thickness is 2 mm, the height is 3 mm, the width is 4 mm. The capacitor to the right has a capacitance of 103 (10 x 103 pF = 0.01 F). The height is 4 mm, the diameter of the round part is 2 mm. These capacitors are not polarized. That is, they have no polarity.

35

Polystyrene Film Capacitors In these devices, polystyrene film is used as the dielectric. This type of capacitor is not for use in high frequency circuits, because they are constructed like a coil inside. They are used well in filter circuits or timing circuits which run at several hundred KHz or less. The component shown on the left has a red color due to the copper leaf used for the electrode. The silver color is due to the use of aluminum foil as the electrode. The device on the left has a height of 10 mm, is 5 mm thick, and is rated 100pF. The device in the middle has a height of 10 mm, 5.7 mm thickness, and is rated 1000pF. The device on the right has a height of 24 mm, is 10 mm thick, and is rated 10000pF. These devices have no polarity. Electric Double Layer Capacitors (Super Capacitors) This is a "Super Capacitor," which is quite a wonder. The capacitance is 0.47 F (470,000 F). I have not used this capacitor in an actual circuit.

Care must be taken when using a capacitor with such a large capacitance in power supply circuits, etc. The rectifier in the circuit can be destroyed by a huge rush of current when the capacitor is empty. For a brief moment, the capacitor is more like a short circuit. A protection circuit needs to be set up. The size is small in spite of capacitance. Physically, the diameter is 21 mm, the height is 11 mm. 36

Care is necessary, because these devices do have polarity.

Polyester Film Capacitors This capacitor uses thin polyester film as the dielectric. They are not high tolerance, but they are cheap and handy. Their tolerance is about 5% to 10%. From the left in the photograph Capacitance: 0.001 F (printed with 001K) [the width 5 mm, the height 10 mm, the thickness 2 mm] Capacitance: 0.1 F (printed with 104K) [the width 10 mm, the height 11 mm, the thickness 5mm] Capacitance: 0.22 F (printed with .22K) [the width 13 mm, the height 18 mm, the thickness 7mm] Care must be taken, because different manufacturers use different methods to denote the capacitance values.

Here are some other polyester film capacitors. Starting from the left Capacitance: 0.0047 F (printed with 472K) [the width 4mm, the height 6mm, the thickness 2mm] Capacitance: 0.0068 F (printed with 682K) [the width 4mm, the height 6mm, the thickness 2mm] Capacitance: 0.47 F (printed with 474K) [the width 11mm, the height 14mm, the thickness 7mm]

37

These capacitors have no polarity.

Polypropylene Capacitors This capacitor is used when a higher tolerance is necessary than polyester capacitors offer. Polypropylene film is used for the dielectric. It is said that there is almost no change of capacitance in these devices if they are used with frequencies of 100KHz or less. The pictured capacitors have a tolerance of 1%. From the left in the photograph Capacitance: 0.01 F (printed with 103F) [the width 7mm, the height 7mm, the thickness 3mm] Capacitance: 0.022 F (printed with 223F) [the width 7mm, the height 10mm, the thickness 4mm] Capacitance: 0.1 F (printed with 104F) [the width 9mm, the height 11mm, the thickness 5mm] When I measured the capacitance of a 0.01 F capacitor with the meter which I have, the error was +0.2%. These capacitors have no polarity.

Mica Capacitors These capacitors use Mica for the dielectric. Mica capacitors have good stability because their temperature coefficient is small. Because their frequency characteristic is excellent, they are used for resonance circuits, and high 38

frequency filters. Also, they have good insulation, and so can be utilized in high voltage circuits. It was often used for vacuum tube style radio transmitters, etc. Mica capacitors do not have high values of capacitance, and they can be relatively expensive. Pictured at the right are "Dipped mica capacitors." These can handle up to 500 volts. The capacitance from the left Capacitance: 47pF (printed with 470J) [the width 7mm, the height 5mm, the thickness 4mm] Capacitance: 220pF (printed with 221J) [the width 10mm, the height 6mm, the thickness 4mm] Capacitance: 1000pF (printed with 102J) [the width 14mm, the height 9mm, the thickness 4mm] These capacitors have no polarity.

Metallized Polyester Film Capacitors These capacitors are a kind of a polyester film capacitor. Because their electrodes are thin, they can be miniaturized. From the left in the photograph Capacitance: 0.001F (printed with 1n. n means nano:10-9) Breakdown voltage: 250V [the width 8mm, the height 6mm, the thickness 2mm] Capacitance: 0.22F (printed with u22) Breakdown voltage: 100V [the width 8mm, the height 6mm, the thickness 3mm] Capacitance: 2.2F (printed with 2u2) Breakdown voltage: 100V [the width 15mm, the height 10mm, the thickness 8mm] Care is necessary, because the component lead easily breaks off from these capacitors. Once lead has come off, there is no way to fix it. It must be discarded. These capacitors have no polarity. 39

Variable Capacitors Variable capacitors are used for adjustment etc. of frequency mainly. On the left in the photograph is a "trimmer," which uses ceramic as the dielectric. Next to it on the right is one that uses polyester film for the dielectric. The pictured components are meant to be mounted on a printed circuit board. When adjusting the value of a variable capacitor, it is advisable to be careful. One of the component's leads is connected to the adjustment screw of the capacitor. This means that the value of the capacitor can be affected by the capacitance of the screwdriver in your hand. It is better to use a special screwdriver to adjust these components. Pictured in the upper left photograph are variable capacitors with the following specifications: Capacitance: 20pF (3pF - 27pF measured) [Thickness 6 mm, height 4.8 mm] Their are different colors, as well. Blue: 7pF (2 - 9), white: 10pF (3 - 15), green: 30pF (5 - 35), brown: 60pF (8 - 72). In the same photograph, the device on the right has the following specifications: Capacitance: 30pF (5pF - 40pF measured) [The width (long) 6.8 mm, width (short) 4.9 mm, and the height 5 mm] The components in the photograph on the right are used for radio tuners, etc. They are called "Varicons" but this may be only in Japan. The variable capacitor on the left in the photograph, uses air as the dielectric.

40

DIODES

A diode is a semiconductor device which allows current to flow through it in only one direction. Although a transistor is also a semiconductor device, it does not operate the way a diode does. A diode is specifically made to allow current to flow through it in only one direction. Some ways in which the diode can be used are listed here. A diode can be used as a rectifier that converts AC (Alternating Current) to DC (Direct Current) for a power supply device. Diodes can be used to separate the signal from radio frequencies. Diodes can be used as an on/off switch that controls current. This symbol is used to indicate a diode in a circuit diagram. The meaning of the symbol is (Anode) (Cathode). Current flows from the anode side to the cathode side. Although all diodes operate with the same general principle, there are different types suited to different applications. For example, the following devices are best used for the applications noted. Voltage regulation diode (Zener Diode) The circuit symbol is . It is used to regulate voltage, by taking advantage of the fact that Zener diodes tend to stabilize at a certain voltage when that voltage is applied in the opposite direction. Light emitting diode The circuit symbol is . This type of diode emits light when current flows through it in the forward direction. (Forward biased.) Variable capacitance diode The circuit symbol is . The current does not flow when applying the voltage of the opposite direction to the diode. In this condition, the diode has a capacitance like the capacitor. It is a very small capacitance. The capacitance of the diode changes when changing voltage. With the change of this capacitance, the frequency of the oscillator can be changed.

41

The graph on the right shows the electrical characteristics of a typical diode. When a small voltage is applied to the diode in the forward direction, current flows easily. Because the diode has a certain amount of resistance, the voltage will drop slightly as current flows through the diode. A typical diode causes a voltage drop of about 0.6 - 1V (VF) (In the case of silicon diode, almost 0.6V) This voltage drop needs to be taken into consideration in a circuit which uses many diodes in series. Also, the amount of current passing through the diodes must be considered. When voltage is applied in the reverse direction through a diode, the diode will have a great resistance to current flow. Different diodes have different characteristics when reverse-biased. A given diode should be selected depending on how it will be used in the circuit. The current that will flow through a diode biased in the reverse direction will vary from several mA to just A, which is very small. The limiting voltages and currents permissible must be considered on a case by case basis. For example, when using diodes for rectification, part of the time they will be required to withstand a reverse voltage. If the diodes are not chosen carefully, they will break down.

42

Rectification / Switching / Regulation Diode

The stripe stamped on one end of the diode shows indicates the polarity of the diode. The stripe shows the cathode side. The top two devices shown in the picture are diodes used for rectification. They are made to handle relatively high currents. The device on top can handle as high as 6A, and the one below it can safely handle up to 1A. However, it is best used at about 70% of its rating because this current value is a maximum rating. The third device from the top (red color) has a part number of 1S1588. This diode is used for switching, because it can switch on and off at very high speed. However, the maximum current it can handle is 120 mA. This makes it well suited to use within digital circuits. The maximum reverse voltage (reverse bias) this diode can handle is 30V. The device at the bottom of the picture is a voltage regulation diode with a rating of 6V. When this type of diode is reverse biased, it will resist changes in voltage. If the input voltage is increased, the output voltage will not change. (Or any change will be an insignificant amount.) While the output voltage does not increase with an increase in input voltage, the output current will. This requires some thought for a 43

protection circuit so that too much current does not flow. The rated current limit for the device is 30 mA. Generally, a 3terminal voltage regulator is used for the stabilization of a power supply. Therefore, this diode is typically used to protect the circuit from momentary voltage spikes. 3 terminal regulators use voltage regulation diodes inside.

Diode bridge Rectification diodes are used to make DC from AC. It is possible to do only 'half wave rectification' using 1 diode. When 4 diodes are combined, 'full wave rectification' occurrs. Devices that combine 4 diodes in one package are called diode bridges. They are used for full-wave rectification. The photograph on the left shows two examples of diode bridges. The cylindrical device on the right in the photograph has a current limit of 1A. Physically, it is 7 mm high, and 10 mm in diameter. The flat device on the left has a current limit of 4A. It is has a thickness of 6 mm, is 16 mm in height, and 19 mm in width. The photograph on the right shows a large, high-power diode bridge. It has a current capacity of 15A. The peak reverse-bias voltage is 400V. Diode bridges with large current capacities like this one, require a heat sink. Typically, they are screwed to a piece of metal, or the chasis of device in which they are used. The heat sink allows the device to radiate excess heat. As for size, this one is 26 mm wide on each side, and the height of the module part is 10 mm. Light Emitting Diode ( LED ) Light emitting diodes must be choosen according to how they will be used, because there are various kinds. The diodes are available in several colors. The most common colors are red and

44

green, but there are even blue ones. The device on the far right in the photograph combines a red LED and green LED in one package. The component lead in the middle is common to both LEDs. As for the remaing two leads, one side is for the green, the other for the red LED. When both are turned on simultaneously, it becomes orange. When an LED is new out of the package, the polarity of the device can be determined by looking at the leads. The longer lead is the Anode side, and the short one is the Cathode side. The polarity of an LED can also be determined using a resistance meter, or even a 1.5 V battery. When using a test meter to determine polarity, set the meter to a low resistance measurement range. Connect the probes of the meter to the LED. If the polarity is correct, the LED will glow. If the LED does not glow, switch the meter probes to the opposite leads on the LED. In either case, the side of the diode which is connected to the black meter probe when the LED glows, is the Anode side. Positive voltage flows out of the black probe when the meter is set to measure resistance. It is possible to use an LED to obtain a fixed voltage. The voltage drop (forward voltage, or VF) of an LED is comparatively stable at just about 2V. I explain a circuit in which the voltage was stabilized with an LED in "Thermometer of bending apparatus-2".

45

Shottky barrier diode Diodes are used to rectify alternating current into direct current. However, rectification will not occur when the frequency of the alternating current is too high. This is due to what is known as the "reverse recovery characteristic." The reverse recovery characteristic can be explained as follows: IF the opposite voltage is suddenly applied to a forward-biased diode, current will continue to flow in the forward direction for a brief moment. This time until

the current stops flowing is called the Reverse Recovery Time. The current is considered to be stopped when it falls to about 10% of the value of the peak reverse current. The Shottky barrier diode has a short reverse recovery time, which makes it ideally suited to use in high frequency rectification. The shottky barrier diode has the following characteristics. The voltage drop in the forward direction is low. The reverse recovery time is short. However, it has the following disadvantages. The diode can have relatively high leakage current. The surge resistance is low. Because the reverse recovery time is short, this diode is often used for the switching regulator in a high frequency circuit.

46

Transistors
The transistor's finction is to amplify an electric current. Many different kinds of transistors are used in analog circuits, for different reasons. This is not the case for digital circuits. In a digital circuit, only two values matter; on or off. The amplification abilitiy of a transistor is not relevant in a digital circuit. In many cases, a circuit is built with integrated circuits(ICs). Transistors are often used in digital circuits as buffers to protect ICs. For example, when powering an electromagnetic switch (called a 'relay'), or when controlling a light emitting diode. (In my case.) Two different symbols are used for the transistor. PNP type and NPN type

The name (standard part number) of the transistor, as well as the type and the way it is used is shown below. 2SAXXXX PNP type high frequency 2SBXXXX PNP type low frequency 2SCXXXX NPN type high frequency 2SDXXXX NPN type low frequency The direction of the current flow differs between the PNP and NPN type. When the power supply is the side of the positive (plus), the NPN type is easy to use.

47

Appearance of the Transistor The outward appearance of the transistor varies. Here, two kinds are shown.

On the left in the photograph is a 2SC1815 transistor, which is good for use in a digital circuit. They are inexpensive when I buy them in quantity. In Japan it costs 2,000 yen for a pack of 200 pieces. (About 10 US cents/piece in 1998) On the right is a device which is used when a large current is to be handled. Its part number is 2SD880.

The electrical characteristics of each is as follows. Item VCEO(V) IC(mA) PC(mW) hFE fT(MHz) 2SC1815 2SD880 50 150 400 70 - 700 80 60 3A 30W 60 - 300 3

VCEO IC PC

: The maximum voltage that can be handled across the collector(C) and emitter(E) when the base(B) is open. (Not connected) (It may be shown as VCE) : The maximum collector(C) current. Maximum collector(C) loss that continuously can cause it consumed : at surroundings temperature (Ta)=25C (no radiator)

48

hFE fT

The current gain to DC at the emitter(E). (IC/IB)

: The maximum DC switching frequency. (the transision frequency)

Component Lead of the Transistor Because the component leads differ between kinds of transistors, you need to confirm the leads with a datasheet, etc.

Example of 2SC1815 transistor Part number is printed on the flat face of the transistor, and indicates the front. Right side : Base Center : Collector Left side : Emitter Example of 2SD880 transistor Part number is printed on the flat face of the transistor, and indicates the front. Right side : Emitter Center : Collector Left side : Base 2SC1815 is opposite.

49

Printed Wiring Boards


When assembling an electronic circuit, a board is needed on which the components can be mounted and wired together. This board is called a Printed Wiring Board (PWB). In Japan, the printed wiring board used to be called a "Printed Circuit Board." Nowadays in Japan the name "Printed Circuit Board" is not used because the initials of "Printed Circuit Board" are "PCB." PCB also stands for "Polychlorinated Biphenyls (PCBs)," which is a poison. So in Japan, we refer to the boards as "Printed Wiring Boards." In other countries, they are still refered to as "Printed Circuit Boards," or PCBs. Making a PWB takes a lot of work, and can be very difficult. For this reason, for many hand-made circuits, I often use a universal PWB. The universal PWB consists of an insulation board drilled with .8mm holes at 0.1 inch (2.54 mm) intervals. The board is completely covered with these holes from edge to edge. The insulation board is comprised of fiberglass (glass epoxy), paper epoxy, or bakelite plastic. Centered around each hole on the bottom of the PWB is an 2mm copper leaf (known as the "land" or "pad"). To use the board, the parts are mounted on the face of the board, and the component leads are passed through the nearest holes, to project through the bottom of the board, where the wires can be soldered together. The interval between the holes is 0.1 inches (2.54 mm), so DIP or SIP ICs can be easily mounted. The photograph shows a PWB made of glass epoxy. The color is green. Paper epoxy boards have a beige color. In case of bakelite, the color is thin brown. 50

As for the size of the board, there are several kinds by the number of the holes. From the left side in the photograph 55 x 40 holes (size 160 x 115 mm) 30 x 25 holes (size 95 x 72 mm) 25 x 15 holes (size 72 x 47 mm) There are various sizes in addition to what I have shown, so you can select a board according to your needs. The boards can also be cut to size. On the top right in the photograph, the back side is shown. The copper leaf on this board has been pre-soldered ("tinned") to make soldering easier, so it has a silver color. If the board has not been pre-soldered, then it is seen to have a copper color.

Wiring materials
Wire is used to electrically connect circuit parts, devices, equipment etc. There are various kinds of wiring materials. On this page, I introduce the type that is used for the assembly of electronic circuits. The different types of wire can be divided largely into two categories: single wire and twisted strand wire. It really doesn't matter which kind you use for a given application, but usually, single wire is used to connect devices (resistors, capacitors ect) together on the PWB. (Parts that don't move) It is also used for jumper wiring. Twisted strand wire can bend freely, so it can be used for wiring on the PWB, and also to connect discrete pieces of equipment. If single wire is used to connnect separate equipment, it will break soon, as it is not very flexible. It is convenient to use the single tin coated wire of the diameter 0.32 mm for the wiring of PWB. If the diameter is larger, soldering becomes a little bit difficult. And if the diameter is too thin, it becomes difficult to bend the wire the way you want it to stay. It's best to use whatever wire you are comfortable with, and not worry about those things. 51

If you want to connect separated parts on the PWB, twisted wire covered with soft insulation material is most convenient for wiring. It's convenient to wire the circuit using different color wires for different purposes. Otherwise, wiring the circuit with many wires the same color gets confusing. The photograph on the left shows several colors of twisted wire. It is called 0.12/7PVC. The pictured wire is comprised of 7 tin coated wires 0.12 mm each in diameter, covered by very thin PVC plastic.

In the photograph to the right is pictured tin coated wire with a diameter of 0.32 mm. It is convenient to use for wiring components, jumper wiring etc. when you are building a circuit on a universal PWB. Pictured at the left is polyurethane wire, 0.4 mm in diameter. It is used for making coils. There are several kinds of coated wires. Tin coated wire colored silver, polyurethane enameled copper wire(UEW) which has a thin brown color, polyester enameled copper wire (PEW) which is also thin brown, and enameled wire with a burnt brown color. Coated wire is used for making coil components like a transformers. The PEW can not be soldered, because the polyester coating will not melt at the soldering temperature. So if you want to solder PEW wire, you need to scrape the enamel off the wire. 52

In case of the UEW, you do not need to scrape the insulation off the wire, because the polyurethane will melt at the soldering temperature.

In this photograph is a tool used for wiring. Copper wire can be drawn out from the tip like the core of a pencil. First, the wire is attached and solderd to the first lead of a given component. Next, the wire is drawn out from the tool and can be soldered at the desired lead of another component. The wire is polyurethane coated single wire of 0.2 mm thickness.

Soldering
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 400 C (800 F). 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 mentioned in the Bible and there is evidence that it was employed up to 5000 years ago in Mesopotamia. Applications One of 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 components are assembled and repaired by soldering. Small mechanical parts are often soldered as well. Soldering is 53

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 cooking vessel. Solders Soldering filler materials are available in many different alloys for differing applications. In electronics assembly, the eutectic alloy of 63% tin and 37% lead (or 60/40, which is almost identical in performance to the eutectic) has been the alloy of choice. Other alloys are used for plumbing, mechanical assembly, and other applications. A eutectic formulation has several advantages for soldering; chief among these is the coincidence of the liquidus and solidus temperatures, i.e. the absence of a plastic phase. This allows for quicker wetting out as the solder heats up, and quicker setup as the solder cools. A non-eutectic formulation must remain still as the temperature drops through the liquidus and solidus temperatures. Any differential movement during the plastic phase may result in cracks, giving an unreliable joint. Additionally, a eutectic formulation has the lowest possible melting point, which minimizes heat stress on electronic components during soldering. Lead-free solders are suggested anywhere children may come into contact (since children are likely to place things into their mouths), or for outdoor use where rain and other precipitation may wash the lead into the groundwater. Common solder alloys are mixtures of tin and lead, respectively:

63/37: melts at 183 C (361.4 F) (eutectic: the only mixture that melts at a point, instead of over a range) 60/40: melts between 183190 C (361374 F) 50/50: melts between 185215 C (365419 F)

Lead-free solder alloys melt around 250 C (482 F), depending on their composition. For environmental reasons, 'no-lead' solders are becoming more widely used. Unfortunately most 'no-lead' solders are not eutectic formulations, making it more difficult to create reliable joints with them. See complete discussion below; see also RoHS. Other common solders include low-temperature formulations (often containing bismuth), which are often used to join previously-soldered assemblies without un-soldering earlier connections, and high-temperature formulations (usually containing silver) which are used for high-temperature operation or for first assembly of items which must not become unsoldered during subsequent operations. Specialty alloys are available with

54

properties such as higher strength, better electrical conductivity and higher corrosion resistance. Flux In high-temperature metal joining processes (welding, brazing and soldering), the primary purpose of flux is to prevent oxidation of the base and filler materials. Tin-lead solder, for example, attaches very well to copper, but poorly to the various oxides of copper, which form quickly at soldering temperatures. Flux is a substance which is nearly inert at room temperature, but which becomes strongly reducing at elevated temperatures, preventing the formation of metal oxides. Secondarily, flux acts as a wetting agent in the soldering process, reducing the surface tension of the molten solder and causing it to better wet out the parts to be joined. Fluxes currently available include water-soluble fluxes (no VOC's required for removal) and 'no-clean' fluxes which are mild enough to not require removal at all. Performance of the flux needs to be carefully evaluated; a very mild 'no-clean' flux might be perfectly acceptable for production equipment, but not give adequate performance for a poorlycontrolled hand-soldering operation. Traditional rosin fluxes are available in non-activated (R), mildly activated (RMA) and activated (RA) formulations. RA and RMA fluxes contain rosin combined with an activating agent, typically an acid, which increases the wettability of metals to which it is applied by removing existing oxides. The residue resulting from the use of RA flux is corrosive and must be cleaned off the piece being soldered. RMA flux is formulated to result in a residue which is not significantly corrosive, with cleaning being preferred but optional. Basic soldering techniques 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, soldering gun, or a torch, or occasionally a hot-air pencil. Sheetmetal work was traditionally done with "soldering coppers" directly heated by a flame, with sufficient stored heat in the mass of the soldering copper to complete a joint; torches or electricallyheated soldering irons are more convenient. All soldered joints require the same elements of cleaning of the metal parts to be joined, fitting up the joint, heating the parts, applying flux, applying the filler, removing heat and holding the assembly still until the filler metal has completely solidified. Depending on the nature of flux material used, cleaning of the joints may be required after they have cooled. 55

The distinction between soldering and brazing is arbitrary, based on 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. Induction soldering is a process which is similar to brazing. The source of heat in induction soldering is induction heating by high-frequency AC current. Generally copper coils are used for the induction heating. This induces currents in the part being soldered. The coils are usually made of copper or a copper base alloy. The copper rings can be made to fit the part needed to be soldered for precision in the work piece. Induction soldering is a process in which a filler metal (solder) is placed between the faying surfaces of (to be joined) metals. The filler metal in this process is melted at a fairly low temperature. Fluxes are a common use in induction soldering. This is a process which is particularly suitable for soldering continuously. The process is usually done with coils that wrap around a cylinder/pipe that needs to be soldered. Some metals are easier to solder than others. Copper, silver, and gold are easy. Iron and nickel are found to be more difficult. Because of their thin, strong oxide films, stainless steel and aluminum are a little more difficult. Titanium, magnesium, cast irons, steels, ceramics, and graphites can be soldered but it involves a process similar to joining carbides. They are first plated with a suitable metallic element that induces interfacial bonding.

56

Desoldering and resoldering Used solder contains some of the dissolved base metals and is unsuitable for reuse in making new joints. Once the solder's capacity for the base metal has been achieved it will no longer properly bond with the base metal, usually resulting in a brittle cold solder joint with a crystalline appearance. It is good practice to remove solder from a joint prior to resolderingdesoldering braids or vacuum desoldering equipment (solder suckers) can be used. Desoldering wicks contain plenty of flux that will lift the contamination from the copper trace and any device leads that are present. This will leave a bright, shiny, clean junction to be resoldered. The lower melting point of solder means it can be melted away from the base metal, leaving it mostly intact though the outer layer will be "tinned" with solder. Flux will remain which can easily be removed by abrasive or chemical processes. This tinned layer will allow solder to flow into a new joint, resulting in a new joint, as well as making the new solder flow very quickly and easily. 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 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. Soldering torches are a type of soldering device that uses a flame rather than a soldering iron tip to heat solder. Soldering torches are often powered by butane[3] and are available in sizes ranging from very small butane/oxygen units suitable for very fine but hightemperature jewelry work, to full-size oxy-fuel torches suitable for much larger work such as copper piping. A soldering copper is a tool with a large copper head and a long handle, which is heated in a blacksmith's forge fire, and used to apply heat to sheet metal for soldering. Soldering coppers are sometimes used in auto bodywork, although body solder has been mostly superseded by non-metallic fillers. Toaster ovens and hand held infrared lights have been used to reproduce production processes on a much smaller scale.

57

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 brush, 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 fiberglass brush can also be used. For electronic work, solder wick and vacuum-operated "solder sucker" are used to undo solder connections. A heat sink, such as a crocodile clips, can also be used to prevent damaging heatsensitive components while soldering. Soldering Tools The only tools that are essential to solder are a soldering iron and some solder. There are, however, lots of soldering accessories available (see soldering accessories for more information). Different soldering jobs will need different tools, and different temperatures too. For circuit board work you will need a finer tip, a lower temperature and finer grade solder. You may also want to use a magnifying glass. Audio connectors such as XLR's will require a larger tip, higher temperature and thicker solder. Clamps and holders are also handy when soldering audio cables. Soldering Irons There are several things to consider when choosing a soldering iron.

Wattage adjustable or fixed temperature power source (electric or gas) portable or bench use I do not recommend soldering guns, as these have no temperature control and can get too hot. This can result in damage to circuit boards, melt cable insulation, and even damage connectors. 58

Wattage It is important to realise that higher wattage does not necessarily mean hotter soldering iron. Higher wattage irons just have more power available to cope with bigger joints. A low wattage iron may not keep its temperature on a big joint, as it can loose heat faster than it can reheat itself. Therefore, smaller joints such as circuit boards require a lesser wattage iron - around 15-30 watts will be fine. Audio connectors need something bigger I recommend 40 watts at least. Temperature There are a lot of cheap, low watt irons with no temperature control available. Most of these are fine for basic soldering, but if you are going to be doing a lot you may want to consider a variable temperature soldering iron. Some of these simply have a boost button on the handle, which is useful with larger joints, others have a thermostatic control so you can vary the heat of the tip. If you have a temperature controlled iron you should start at about 315-345C (600650F). You may want to increase this however - I prefer about 700-750F. Use a temperature that will allow you to complete a joint in 1 to 3 seconds. Power Most soldering irons are mains powered - either 110/230v AC, or benchtop soldering stations which transform down to low voltage DC. Also available are battery and gas powered. These are great for the toolbox, but you'll want a plug in one for your bench. Gas soldering irons loose their heat in windy outside conditions more easily that a good high wattage mains powered iron. Portability Most cheaper soldering irons will need to plug into the mains. This is fine a lot of the time, but if there is no mains socket around, you will need another solution. Gas and battery soldering irons are the answer here. They are totally portable and can be taken and used almost anywhere. They may not be as efficient at heating as a good high wattage iron, but they can get you out of a lot of hassle at times.

59

If you have a bench setup, you should consider using a soldering station. These usually have a soldering iron and desoldering iron with heatproof stands, variable heat, and a place for a cleaning pad. A good solder station will be reliable, accurate with its temperature, and with a range of tips handy it can perform any soldering task you attempt with it. Solder The most commonly used type of solder is rosin core. The rosin is flux, which cleans as you solder. The other type of solder is acid core and unless you are experienced at soldering, you should stick to rosin core solder. Acid core solder can be tricky, and better avoided for the beginner. Rosin core solder comes in three main types - 50/50, 60/40 and 63/37. These numbers represent the amount of tin and lead are present in the solder,as shown below.

Solder Type 50/50 60/40 63/37

% Tin % Lead 50 60 63 50 40 37

Melting Temp (F) 425 371 361

Any general purpose rosin core solder will be fine. Soldering Accessories Soldering Iron Tips Try to use the right size tip whenever you can. Smaller wires and circuit boards require small fine tips, and mic cable onto an XLR would need a larger tip. You can get pointed tips, or

60

flat tipped ones If you have a solder station with a desolderer, you will also want a range of desoldering tips and cleaners.

Soldering Iron Stands These are handy to use if you are doing several or more joints. It is a heat resistant cradle for your iron to sit in, so you don't have to lie it down on the bench while it is hot. It really is essential if you are planning to do a lot of bench soldering as it is only a matter of time before you burn something (probably your elbow resting on the hot tip) if you don't use one. Clamps I strongly recommend clamps of some sort. Trying to hold your soldering iron, the solder, and the wire is tricky enough, but when you have to hold the connector as well it is almost impossible. The are however, adjustable clamps that can be manipulated to hold both the connector and the wire in place so you still have two free hands to apply the heat and the solder. These are cheap items, and I know mine have paid for themselves many times over. Magnifying glass If you are doing work on PCBs (printed circuit boards) you may need to get a magnifying glass. This will help you see the tracks on the PCB, and unless you have exceptional sight, small chip resistors are pretty difficult to solder on well without a magnifying glass. Once again, they are not expensive, and some clamps come with one that can mount on the clamp stand. Solder Wick Solder wick is a mesh the you lie on a joint and heat. When it heats up it also melts the solder which is drawn out of the joint. It is usually used for cleaning up solder from tracks on a circuit board, but you will need a solder sucker to clean out the holes in the circuit board. Place the wick on the solder you want to remove then put your soldering iron on top of the wick. The wick will heat up, then the solder will melt and flow away from the joint and into wick. 61

Solder Suckers If you don't have a solder station with desolderer, and you work on PCB's, you are going to need one of these before too long. They are spring loaded and suck the melted solder out of the joint. They are a bit tricky to use, as you have to melt the solder with your iron, then quickly position the solder sucker over the melted solder and release the spring to suck up the solder. I find solder wick to be easier to use and more effective. Fume Extractors Solder fumes are poisonous. A fume extractor will suck the fumes (smoke) into itself and filter it. An absolute must for your health if you are setting up a soldering bench.

Preparation Step 1: Preparation If you are preparing the cable for a connector, I strongly suggest you put any connector parts on now (the screw on part of an XLR, or casing of a 1/4" jack for example). Get into the habit of sliding these on before you start on the cable, or else you can bet it won't be long before you finish soldering your connector only to discover you forgot to put the connector casing on, and have to start all over again. Once you have all the connector parts on that you need, you will need to strip your cable. This means removing the insulation from the end of the wire and exposing the copper core. You can either use a wire stripper, side cutters, or a knife to do this. The obvious tool to choose to strip a wire would be......a wire stripper. There are many types of wire stripper, and most of them work the same. You simply put the wire in, and squeeze it and pull the end bit off. It will cut to a preset depth, and if you have chosen the right depth it will cut the insulation off perfectly. It is possible to choose the wrong depth and cut too deeply, or too shallow, but they are very easy to use. 62

On the other hand, some people (myself included) prefer to use a knife or side cutters. I use side cutters for small cable and a Stanley knife for bigger cables...and although I have a couple of wire strippers, I haven't used them for years. This may seem odd, but I've got my side cutters and knife with me anyway, and they do the job fine. If you are using side cutters (as shown here), position them about 10mm (1/2 inch) from the end, and gently squeeze the cutters into the insulation to pierce it, but not far enough to cut the copper strands of the core. Open the cutters slightly so you can turn the wire and pierce the rest of the insulation. You may have to do this a few times to cut through all of the insulation, but it is better to cut too shallow and have to turn and cut again rather than cut the core and have to start again. Now you should be able to slide the insulation off with your cutters, or pull it off with your fingers. This may sound a tedious method, but in no time at all you will be able to do it in two cuts and a flick of the cutters. I won't explain how I use a knife to do larger cable, as I'd hate someone to slice a finger or thumb open following my instructions. Using a sharp blade like that certainly does have it's risks, so stick with wire cutters or side cutters if you are at all unsure. If your connector has been used before, make sure you remove any remnants of wire and solder from the contacts. Do this by putting the tip of your soldering iron into the hole and flicking the solder out when it has melted. Common Sense Alert! Please be careful when you flick melted solder...flick it away from you. Tinning Step 2: Tinning Whatever it is you are soldering, you should 'tin' both contacts before you attempt to solder them. This coats or fills the wires or connector contacts with solder so you can easily melt them together. To tin a wire, apply the tip of your iron to the wire for a second or two, then apply the solder to the wire.

63

The solder should flow freely onto the wire and coat it (if it's stranded wire the solder should flow into it, and fill the wire). You may need to snip the end off afterwards, particularly if you have put a little too much solder on and it has formed a little ball at the end of the wire. Be careful not to overheat the wire, as the insulation will start to melt. On cheaper cable the insulation can 'shrink back' if heated too much, and expose more copper core that you intended. You can cut the wire back after you have tinned it, but it's best simply not to over heat it.

The larger the copper core, the longer it will take to heat up enough to draw the solder in, so use a higher temperature soldering iron for larger cables if you can. To tin a contact on an audio XLR connector, hold the iron on the outside of the the contact for a second or two, then apply the solder into the cavity of the contact. Once again, the solder should flow freely and fill the contact. Connectors such as jacks have contacts that are just holes in a flat part of the connector. To tin these you put your iron on it, and apply the solder to where the iron is touching. The solder should flow and cover the hole. Once you have tinned both parts, you are ready to solder them together. Soldering Step 3: Soldering This step can often be the easiest when soldering audio cables. You simply need to place your soldering iron onto the contact to melt the solder. When the solder in the contact melts, slide the wire 64

into the contact.

Remove the iron and hold the wire still while the solder solidifies again. You will see the solder 'set' as it goes hard. This should all take around 1-3 seconds.

A good solder joint will be smooth and shiny. If the joint is dull and crinkly, the wire probably moved during soldering. If you have taken too long it will have have solder spikes. If it does not go so well, you may find the insulation has melted, or there is too much stripped wire showing. If this is the case, you should desolder the joint and start again. Cleaning Your Soldering Iron You should clean your tip after each use. There are many cleaning solutions and the cheapest (and some say best) is a damp sponge. Just rub the soldering iron tip on it after each solder. Another option is to use tip cleaner. This comes in a little pot that you push the tip into. This works well if your tip hasn't been cleaned for a while. It does create a lot of smoke, so it is better not to let the tip get so dirty that you need to use tip cleaner.

Some solder stations come with a little pad at the base of the holder. If you have one of these, you should get into the habit of wiping the tip on the pad each time you apply solder with it.

If you need to clean solder off a circuit board, solder wick is what you need. You place the wick on the joint or track you want to clean up, and apply your soldering iron on top. The solder melts and is drawn into the wick. If there is a lot of solder the wick will fill up, so gently pull the wick through the 65

joint and your iron, and the solder will flow into it as it passes.

Tips and Tricks 1. 2. 3. 4. 5. Melted solder flows towards heat. Most beginning solderers tend to use too much solder and heat the joint for too long. Don't move the joint until the solder has cooled. Keep your iron tip clean. Use the proper type of iron and tip size.

Troubleshooting If either of the parts you are soldering is dirty or greasy, the solder won't take (or 'stick') to it. Desolder the joint and clean the parts before trying again. Another reason the solder won't take is that it may not be the right sort of metal. For example you cannot solder aluminium with lead/tin solder. If the joint has been moved during soldering, it may look grainy or dull. It may also look like this if the joint was not heated properly while soldering. If the joint was overheated the solder will have formed a spike and there will be burnt flux residue.

66

KEIL SOFTWARE
1. Open Keil from the Start menu 2. The Figure below shows the basic names of the windows referred in this document

67

Starting a new Assembler Project 1. Select New Project from the Project Menu.

2. Name the project Toggle.a51 3. Click on the Save Button.

4. The device window will be displayed. 68

5. Select the part you will be using to test With. For now we will use the ATMEL Semiconductor part AT89C51. 6. Double Click on the ATMEL

7. Scroll down and select the AT89C51 Part 8. Click OK

69

Creating Source File

70

1. Click File Menu and select New.

71

2. A new window will open up in the Keil IDE.

3. Copy the example to the Right into the new window. This file will toggle Ports 1 and 2 with a delay.

72

4. Click on File menu and select Save As

5. Name the file Toggle.a51 6. Click the Save Button

73

Adding File to the Project 1. Expand Target 1 in the Tree Menu

2. Click on Project and select Targets, Groups, Files

74

3. Click on Groups/Add Files tab 4. Under Available Groups select Source Group 1 5. Click Add Files to Group button

75

6. Change file type to Asm Source file(*.a*; *.src) 7. Click on toggle.a51 8. Click Add button 9. Click Close Button 10. Click OK button when you return to Target, Groups, Files dialog box

11. the Source Group 1 in the Tree menu to ensure that the file was added to the project

Expand

76

Creating HEX for the Part 1. Click on Target 1 in Tree menu 2. Click on Project Menu and select Options for Target 1 3. Select Target Tab 4. Change Xtal (Mhz) from 50.0 to 11.0592

77

5. Select Output Tab 6. Click on Create Hex File check box 7. Click OK Button

78

8. Click on Project Menu and select Rebuild all Target Files 9. In the Build Window it should report 0 Errors (s), 0 Warnings 10. You are now ready to Program your Part

79

80

Potrebbero piacerti anche