Sunday, September 26, 2010

Chapter 1: Introduction



1.1 Introduction of Project


Since independence, India has been facing the problems of infiltration by the other countrymen. India is the most unsafe country in the world as far as infiltration is concerned.

Talk of any of the nearest neighbor, be it Pakistan, China or Bangladesh infiltration from all the three has achieved huge proportions.

Through this so called infiltration, not only persons with malicious interests who are directly or indirectly indulged in practices like smuggling but also the terrorists are gaining access & exploiting the nation’s resources. COMBET ROBO is the wireless controlled robotics device which is designed to fight with the increasing problem of terrorism.


Terror related activities are increasing day by day. For instance, we can take the case of serial bomb blasts in Delhi or Mumbai. In these cases, army and police personnel were unable to arrest all the terrorists involved and bring perpetrators of the crimes to justice.

Let us take the case of Mumbai 9/11. The terrorists had captured one of the famous hotels located in the heart of the city i.e. Taj hotel. The terrorists entered the building and captured the innocent civilians. Army personnel and the NSG commandos took approximately 60 hours to rescue the held hostages. In the meanwhile, it caused massacre as well as loss of money & 101 people including nine foreigners and 14 policemen have lost their lives while about 300 people were injured in the worst terror attack seen in the country in which desperate men fired indiscriminately at people.
The problem was that our commandos is not able to enter in this situation. The solution to this problem is automatic combet robo. This robot is radio operated; self powered, and has all the controls like a normal car. A pair of laser gun has been installed on it, so that it can fire on enemy remotely when required, this is not possible until a wireless camera is installed. Wireless camera will send real time video and audio signals which could be seen on a remote monitor and action can be taken accordingly. It can silently enter into enemy area and send us all the information through its’ tiny camera eyes. Thus enabling the army men to arrest the criminals.









1.2 Concept of the Project



It includes the use of microcontroller 8051 to accomplish this goal
The tiny camera & two laser guns are placed in this device, to detect the presence of the terrorist.

The camera captured and sends the real time video and gives the appropriate signal to the microcontroller to take the desired action

After the reception of the appropriate signal from the controller, the microcontroller gives command to the driver which is control the DC motor and stepper motor.
DC motor is control the motion of robo and stepper motor is control the movement of camera and laser guns and we have also control the trigger of the laser guns.



In a way, it is a very simplified solution to the biggest problem which our country is facing.



1.3 Block Diagram :


1.3.1 Transmitting Part :


1.3.2 Receiving Part :
















Chapter 2: HARDWARE DESCRIPTION


2.1 List of Components


S. No. Item Quantity

1. Microcontroller 8051 1

2. ULN 2803 1

3. H-Bridge 1

4. HT12E 1

5. HT12D 1

6. Stepper Motor 1

7. D.C. Motor 4



2.2 BLOCK DIAGRAM DESCRIPTION


Microcontroller:
To receive the signal, decode it and take appropriate action to ensure adequate security.

ULN2803:
The driver which is control the stepper motor.

H-Bridge:
To control the movement of D.C. motor.

HT12E:
For Encode the Signal.

HT12D:
For decode the Signal.





2.2 Microcontroller

2.2.1 Introduction

The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8Kbytes of in-system programmable Flash memory. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pin out. 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 one monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications.

The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset.8-bit Microcontroller with 8K Bytes In-System Programmable Flash AT89S52.


























2.2.2 Pin Configuration

2.2.2.1 Pin description :



VCC Supply voltage.

GND Ground.

Port 0
Port 0 is an 8-bit open drain bidirectional 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 bidirectional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups.

In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives the low-order address bytes during Flash programming and verification.



Port pin Alternate Functions
P 1.0 T2 (external count input to Timer/Counter 2), clock-out
P 1.1 T2EX (Timer/Counter 2 capture/reload trigger and direction control)
P 1.5 MOSI (used for In-System Programming)
P 1.6 MISO (used for In-System Programming)
P 1.7 SCK (used for In-System Programming)


Port 2
Port 2 is an 8-bit bidirectional 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 uses 8-bit addresses (MOVX @ RI), Port 2 emits 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 bidirectional 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 AT89S52, 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 AT89S52 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.

Special Function Registers
A map of the on-chip memory area called the Special Function Register (SFR) space is shown in Table 1. Note that not all of the addresses are occupied, and unoccupied addresses may not be implemented on the chip. Read accesses to these addresses will in general return random data, and write accesses will have an indeterminate effect. User software should not write 1s to these unlisted locations, since they may be used in future products to invoke new features. In that case, the reset or inactive values of the new bits will always be 0.

Timer 2 Registers:
Control and status bits are contained in registers T2CON (shown in Table 2) and T2MOD (shown in Table 6) for Timer 2. The register pair (RCAP2H, RCAP2L) are the Capture/Reload registers for Timer 2 in 16-bit capture mode or 16-bit auto-reload mode.


Interrupt Registers:
The individual interrupt enable bits are in the IE register. Two priorities can be set for each of the six interrupt sources in the IP register.


Symbol Function

TF2 Timer 2 overflow flag set by a Timer 2 overflow and must be cleared by software.
TF2 will not be set when either RCLK = 1 or TCLK = 1.
EXF2 Timer 2 external flag set when either a capture or reload is caused by a negative transition on T2EX and EXEN2 = 1. When Timer 2 interrupt is enabled, EXF2 = 1 will cause the CPU to vector to the Timer 2 interrupt routine. EXF2 must be cleared by software. EXF2 does not cause an interrupt in up/down counter mode (DCEN = 1).

RCLK Receive clock enable. When set, causes the serial port to use Timer 2 overflow pulses for it’s receive clock in serial port Modes 1 and 3. RCLK = 0 causes Timer 1 overflow to be used for the receive clock.

TCLK Transmit clock enable. When set, causes the serial port to use Timer 2 overflow pulses for it’s transmit clock in serial port Modes 1 and 3. TCLK = 0 causes Timer 1 overflows to be used for the transmit clock.
EXEN2 Timer 2 external enables. When set, allows a capture or reload to occur as a result of a negative transition on T2EX if Timer 2 is not being used to clock the serial port. EXEN2 = 0 causes Timer 2 to ignore events at T2EX.
TR2 Start/Stop control for Timer 2. TR2 = 1 starts the timer.
C/T2 Timer or counter select for Timer 2. C/T2 = 0 for timer function. C/T2 = 1 for external event counter (falling edge triggered).
CP/RL2 Capture/Reload select. CP/RL2 = 1 causes captures to occur on negative transitions at T2EX if EXEN2 = 1. CP/RL2 = 0 causes automatic reloads to occur when Timer 2 overflows or

Memory Organization MCS-51 devices have a separate address space for Program and Data Memory. Up to 64K bytes each of external Program and Data Memory can be addressed.

Program Memory If the EA pin is connected to GND, all program fetches are directed to external memory. On the AT89S52, if EA is connected to VCC, program fetches to addresses 0000H through 1FFFH are directed to internal memory and fetches to addresses 2000H through FFFFH are to external memory.

Data Memory The AT89S52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy a parallel address space to the Special Function Registers. This means that the upper 128 bytes have the same addresses as the SFR space but are physically separate from SFR space.
When an instruction accesses an internal location above address 7FH, the address mode used in the instruction specifies whether the CPU accesses the upper 128 bytes of RAM or the SFR space. Instructions which use direct addressing access the SFR space. For example, the following direct addressing instruction accesses the SFR at location 0A0H (which is P2).

MOV 0A0H, #data

Instructions that use indirect addressing access the upper 128 bytes of RAM. For example, the following indirect addressing instruction, where R0 contains 0A0H, accesses the data byte at address 0A0H, rather than P2 (whose address is 0A0H).
MOV @R0, #data Note that stack operations are examples of indirect addressing, so the upper 128 bytes of data RAM are available as stack space.

Timer 0 and 1
Timer 0 and Timer 1 in the AT89S52 operate the same way as Timer 0 and Timer 1 in the AT89C51 and AT89C52. For further information on the timers” operation, refer to the ATMEL Web site (http://www.atmel.com). From the home page, select “Products”, then “8051-Architecture Flash Microcontroller”, then “Product Overview”.

Timer 2
Timer 2 is a 16-bit Timer/Counter that can operate as either a timer or an event counter. The type of operation is selected by bit C/T2 in the SFR T2CON (shown in Table 2). Timer 2 has three operating modes: capture, auto-reload (up or down counting), and baud rate generator. The modes are selected by bits in T2CON.Timer 2 consists of two 8-bit registers, TH2 and TL2. In the Timer function, the TL2 register is incremented every machine cycle. Since a machine cycle consists of 12 oscillator periods, the count rate is 1/12 of the oscillator frequency.


Interrupts

The AT89S52 has a total of six interrupt vectors: two external interrupts (INT0 and INT1), three timer interrupts (Timers 0, 1, and 2), and the serial port interrupt. These interrupts are all shown in Figure 6.Each of these interrupt sources can be individually enabled or disabled by setting or clearing a bit in Special Function Register IE. IE also contains a global disable bit, EA, which disables all interrupts at once. Note that Table 5 shows that bit position IE.6 is unimplemented. User software should not write a 1 to this bit position, since it may be used in future AT89 products. Timer 2 interrupt is generated by the logical OR of bits TF2 and EXF2 in register T2CON.

Neither of these flags is cleared by hardware when the service routine is vectored to. In fact, the service routine may have to determine whether it was TF2 or EXF2 that generated the interrupt, and that bit will have to be cleared in software. The Timer 0 and Timer 1 flags, TF0 and TF1, are set at S5P2 of the cycle in which the timers overflow. The values are then polled by the circuitry in the next cycle. However, the Timer 2 flag, TF2, is set at S2P2 and is polled in the same cycle in which the timer overflows.







2.2.3 Instruction of 89c51 :
1. ACALL: Absolute Call
2. ADD, ADDC: Add Accumulator (With Carry)
3. AJMP: Absolute Jump
4. ANL: Bitwise AND
5. CJNE: Compare and Jump if Not Equal
6. CLR: Clear Register
7. CPL: Complement Register
8. DA: Decimal Adjust
9. DEC: Decrement Register
10. DIV: Divide Accumulator by B
11. DJNZ: Decrement Register and Jump if Not Zero
12. INC: Increment Register
13. JB: Jump if Bit Set
14. JBC: Jump if Bit Set and Clear Bit
15. JC: Jump if Carry Set
16. JMP: Jump to Address
17. JNB: Jump if Bit Not Set
18. JNC: Jump if Carry Not Set
19. JNZ: Jump if Accumulator Not Zero
20. JZ: Jump if Accumulator Zero
21. LCALL: Long Call
22. LJMP: Long Jump
23. MOV: Move Memory
24. MOVC: Move Code Memory
25. MOVX: Move Extended Memory
26. MUL: Multiply Accumulator by B
27. NOP: No Operation
28. ORL: Bitwise OR
29. POP: Pop Value From Stack
30. PUSH: Push Value Onto Stack
31. RET: Return From Subroutine
32. RETI: Return From Interrupt
33. RL: Rotate Accumulator Left
34. RLC: Rotate Accumulator Left through Carry
35. RR: Rotate Accumulator Right
36. RRC: Rotate Accumulator Right through Carry
37. SETB: Set Bit
38. SJMP: Short Jump
39. SUBB: Subtract From Accumulator With Borrow
40. SWAP: Swap Accumulator Nibbles
41. XCH: Exchange Bytes
42. XCHD: Exchange Digits
43. XRL: Bitwise Exclusive OR


2.3 Stepper motor

2.3.1 Introduction
A stepper motor is a special type of electric motor that moves in increments, or steps, rather than turning smoothly as a conventional motor does. The size of the increment is measured in degrees and can vary depending on the application. Typical increments are 0.9 or 1.8 degrees, with 400 or 200 increments thus representing a full circle. The speed of the motor is determined by the time delay between each incremental movement.
Inside the device, sets of coils produce magnetic fields that interact with the fields of permanent magnets. The coils are switched on and off in a specific sequence to cause the motor shaft to turn through the desired angle. The motor can operate in either direction (clockwise or counterclockwise). When the coils of a stepper motor receive current , the rotor shaft turns to a certain position and then stays there unless or until different coils are energized. Unlike a conventional motor, the stepper motor resists external torque applied to the shaft once the shaft has come to rest with current applied. This resistance is called holding torque.
Stepper motors have been used in computer hard drive s, because they can be moved and positioned with precision. They have also been used in various robot ic devices and as antenna rotators.

2.3.2 How Stepper Motors Work :
Stepper motors consist of a permanent magnet rotating shaft, called the rotor, and electromagnets on the stationary portion that surrounds the motor, called the stator. Figure 1 illustrates one complete rotation of a stepper motor. At position 1, we can see that the rotor is beginning at the upper electromagnet, which is currently active (has voltage applied to it). To move the rotor clockwise (CW), the upper electromagnet is deactivated and the right electromagnet is activated, causing the rotor to move 90 degrees CW, aligning itself with the active magnet. This process is repeated in the same manner at the south and west electromagnets until we once again reach the starting position.


In the above example, we used a motor with a resolution of 90 degrees or demonstration purposes. In reality, this would not be a very practical motor for most applications. The average stepper motor's resolution -- the amount of degrees rotated per pulse -- is much higher than this. For example, a motor with a resolution of 5 degrees would move its rotor 5 degrees per step, thereby requiring 72 pulses (steps) to complete a full 360 degree rotation.
You may double the resolution of some motors by a process known as "half-stepping". Instead of switching the next electromagnet in the rotation on one at a time, with half stepping you turn on both electromagnets, causing an equal attraction between, thereby doubling the resolution. As you can see in Figure 2, in the first position only the upper electromagnet is active, and the rotor is drawn completely to it. In position 2, both the top and right electromagnets are active, causing the rotor to position itself between the two active poles. Finally, in position 3, the top magnet is deactivated and the rotor is drawn all the way right. This process can then be repeated for the entire rotation.

There are several types of stepper motors. 4-wire stepper motors contain only two electromagnets, however the operation is more complicated than those with three or four magnets, because the driving circuit must be able to reverse the current after each step. For our purposes, we will be using a 6-wire motor.Unlike our example motors which rotated 90 degrees per step, real-world motors employ a series of mini-poles on the stator and rotor to increase resolution. Although this may seem to add more complexity to the process of driving the motors, the operation is identical to the simple 90 degree motor we used in our example. An example of a multipole motor can be seen in Figure 3. In position 1, the north pole of the rotor's perminant magnet is aligned with the south pole of the stator's electromagnet. Note that multiple positions are aligned at once. In position 2, the upper electromagnet is deactivated and the next one to its immediate left is activated, causing the rotor to rotate a precise amount of degrees. In this example, after eight steps the sequence repeats.






The specific stepper motor we are using for our experiments (ST-02: 5VDC, 5 degrees per step) has 6 wires coming out of the casing. If we follow Figure 5, the electrical equivalent of the stepper motor, we can see that 3 wires go to each half of the coils, and that the coil windings are connected in pairs. This is true for all four-phase stepper motors.


However, if you do not have an equivalent diagram for the motor you want to use, you can make a resistance chart to decipher the mystery connections. There is a 13 ohm resistance between the center-tap wire and each end lead, and 26 ohms between the two end leads. Wires originating from separate coils are not connected, and therefore would not read on the ohm meter.

2.4 ULN2803:
2.4.1 Introduction:
Featuring continuous load current ratings to 500 mA for each of the drivers, the Series ULN28xxA/LW and ULQ28xxA/LW high voltage, high-current Darlington arrays are ideally suited for interfacing between low-level logic circuitry and multiple peripheral power loads. Typical power loads totaling over 260 W (350 mA x 8, 95 V) can be controlled at an appropriate duty cycle depending on ambient temperature and number of drivers turned on simultaneously. Typical loads include relays, solenoids, stepping motors, magnetic print hammers, multiplexed LED and incandescent displays, and heaters. All devices feature open-collector outputs with integral clamp diodes.
The ULx2803A, ULx2803LW, ULx2823A, and ULN2823LW have series input resistors selected for operation directly with 5 V TTL or CMOS. These devices will handle numerous interface needs particularly those beyond the capabilities of standard logic buffers.
The ULx2804A, ULx2804LW, ULx2824A, and ULN2824LW have series input resistors for operation directly from 6 V to 15 V CMOS or PMOS logic outputs.

The ULx2803A/LW and ULx2804A/LW are the standard Darlington arrays. The outputs are capable of sinking 500 mA and will withstand at least 50 V in the off state. Outputs may be paralleled for higher load current capability. The ULx2823A/LW and ULx2824A/
LW will withstand 95 V in the off state.
These Darlington arrays are furnished in 18-pin dual in-line plastic packages (suffix ‘A’) or 18-lead small-outline plastic packages (suffix ‘LW’). All devices are pinned with outputs opposite inputs to facilitate ease of circuit board layout. Prefix ‘ULN’ devices are rated for operation over the temperature range of -20°C to +85°C; prefix.
‘ULQ’ devices are rated for operation to -40°C.
2.4.2 Block Diagram :





2.4.3 Feature :





2.5 HT12E:

2.5.1 Introduction :



Block Diagram of HT12E






2.5.2 PIN DISCRIPTION :















2.6 H-BRIDGE:





2.7 Remote Controller:

2.7.1 Abstract :
This ASK based remote control using very popular encoder-decoder chips HT12E & HT12D. This chips are widely used for remote control applications. Special ASK transmitter and receiver modules are used to transmit and receive digital code. It has carrier frequency of 433.92 MHz and operating range of around 100-150 mts.
2.7.2 Transmitter:
The figure given below shows schematic diagram of transmitter using IC HT12E (click here for datasheet).



2.7.2.1 Connections :
As shown in figure all the address lines A0-A7 are connected to ground. You can either connect all the lines to Vcc or to ground but keep in mind that on the receiver side you have to do same. This is to set same address both the sides. Resistor R1(1.1M?) is connected between oscillator pins (Osc1 & Osc2) to set transmitter frequency = 50×Receiver Frequency. Data lines D0-D3 are connected with switches S1-S4 through diodes D1-D4 respectively. The other terminal of all the switches is connected with ground. The TE pin (transmission enable) is also connected to all the switches through four different diodes D5-D8. The Dout pin of HT12E is connected to Din pin of 433.92MHz serial data transmitter. 9V standard battery supplies power to the circuit.
2.7.2.2 Operation :
Whenever you press any key TE pin will be grounded through that diode, at the same time particular data line is also grounded.
So we can set the data at the same time we can pull the TE pin low by pressing single key
Now we know when TE pin is low the address and data are transmitted serially through Dout pin.
So 8-bit address and 4-bit of data are together transmitted over 433.92MHz carrier frequency.
2.7.3 Receiver:
Receiver circuit using IC HT12D (click here for datasheet) is as shown below.

2.7.3.1 Connections :
All the address lines are connected to ground to set same address. Resistor R2 (51K?) is connected between Oscillator pins. All the data line D0-D3 are connected to different LEDs L1-L4 respectively. LED L5 is connected to VT (valid transmission) pin through transistor Q1 to indicate valid transmission. The Dout pin of 433.92 MHz serial data receiver is connected with Din pin of IC HT12D.

2.7.3.2 Operation :
When 5V supply is given to circuit all the data lines are low so LEDs will not glow.
Whenever you press any switch from Tx address & data are transmitted together
The 433.92MHz serial data receiver will demodulate the carrier and gives this address & data to IC HT12D
IC HT12D first compares the address three times and if it matches it gives high pulse on VT pin (so LED L5 will blink) and latch the data.
Suppose you pressed 'S4'. So the data transmitted will be 1110 and address will be of course 00000000.
HT12D receives the signals compares address thrice, gives high pulse on pin VT and then latch the data. Because data is 1110 LED L1 will not glow and rest all the LEDs will glow.
Same way if you press 'S2' data will be 1011. So now LED L3 will be off and rests are on.
Simply you can see which ever switch is pressed on Tx side that particular data line is low on Rx side.

2.8 Basic Component :

2.8.1 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.
Generally, it's safe to choose a resistor which has a power rating of about twice the power consumption needed.

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.




2.8.1.1 Fixed Resistors :

A fixed resistor is one in which the value of its resistance cannot change.

2.8.1.2 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 are as follows.


From the top of the photograph
1/8W
1/4W
1/2W

Rough size
Rating power
(W) Thickness
(mm) Length
(mm)
1/8 2 3
1/4 2 6
1/2 3 9


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.
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.



2.8.1.3 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.


From the top of the photograph
1/8W (tolerance ±1%)
1/4W (tolerance ±1%)
1W (tolerance ±5%)
2W (tolerance ±5%)

Rough size
Rating power
(W) Thickness
(mm) Length
(mm)
1/8 2 3
1/4 2 6
1 3.5 12
2 5 15



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 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.

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.

2.8.1.4 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.

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.






2.8.1.5 Resistor color code :






Color Value Multiplier Tolerance
(%)
Black 0 0 -
Brown 1 1 ±1
Red 2 2 ±2
Orange 3 3 ±0.05
Yellow 4 4 -
Green 5 5 ±0.5
Blue 6 6 ±0.25
Violet 7 7 ±0.1
Gray 8 8 -
White 9 9 -
Gold - -1 ±5
Silver - -2 ±10
None - - ±20

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



Example 2
(Yellow=4),(Violet=7),(Black=0),(Red=2)
470 x 102 = 47k ohm
Tolerance(Brown) = ±1%

















2.8.2 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.
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, 25°C is used.
The unit with the temperature is the absolute temperature(Value of which 0 was -273°C) in K(Kelvin).
25°C are the 298 kelvins.



2.8.3 Capacitors :


2.8.3.1 Introduction :

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 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.22µF.
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.

2.8.3.2 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.


I will introduce the different types of capacitors below.


2.8.3.3 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 1µF to thousands of µF. Mainly
this type of capacitor is used as a ripple filter in a power supply circuit, or as a filter to bypass low frequency signals, etc. Because this type of capacitor is comparatively similar to the nature of a coil in construction, it isn't possible to use for high-frequency circuits. (It is said that the frequency characteristic is bad.)
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:
1µF (50V) [diameter 5 mm, high 12 mm]
47µF (16V) [diameter 6 mm, high 5 mm]100µF (25V) [diameter 5 mm, high 11 mm]
220µF (25V) [diameter 8 mm, high 12 mm]
1000µF (50V) [diameter 18 mm, high 40 mm]
The size of the capacitor sometimes depends on the manufacturer. So the
sizes shown here on this page are just examples.

2.8.3.4 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.
Multilayer Ceramic Capacitors :


The multilayer ceramic capacitor has a many-layered 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.










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.






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.



2.8.3.5 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 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.

2.8.3.6 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. It combines three independent capacitors.
For each one, the capacitance changed 2pF - 18pF. When the adjustment axis is turned, the capacitance of all 3 capacitors change simultaneously.
Physically, the device has a depth of 29 mm, and 17 mm width and height. (Not including the adjustment rod.)
2.8.4 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.


2.8.4.1 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.

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.
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 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.

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.



\
2.8.4.2 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 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.

2.8.5 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.













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 2SC1815 2SD880
VCEO(V) 50 60
IC(mA) 150 3A
PC(mW) 400 30W
hFE 70 - 700 60 - 300
fT(MHz) 80 3



VCEO : 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)
IC : The maximum collector(C) current.
PC : Maximum collector(C) loss that continuously can cause it consumed
at surroundings temperature (Ta)=25°C
(no radiator)
hFE : The current gain to DC at the emitter(E).
(IC/IB)
fT : The maximum DC switching frequency. (the transision frequency)


2.8.6 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 controlled 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 cannot 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.


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. It has 2 contacts.

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.





2.8.7 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 connect 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.



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.

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 soldered 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.

2.9 Soldering
2.9.1 Introduction :
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 water-tightness 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.
2.9.2 Applications :
One of the most frequent applications 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 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.
2.9.3 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 183–190 °C (361–374 °F)
50/50: melts between 185–215 °C (365–419 °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 properties such as higher strength, better electrical conductivity and higher corrosion resistance.
2.9.3.1 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 poorly-controlled 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.
2.9.3.2 Basic soldering techniques :
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 electrically-heated 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.
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 processes—brazing 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
2.9.4 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 high-temperature 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.
Bristle brushes are usually used to apply plumbing paste flux. For electronic work, flux-core 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 heat-sensitive components while soldering.
2.9.4.1 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.
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-345°C (600-650°F). You may want to increase this however - I prefer about 700-750°F. 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.
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 % Tin % Lead Melting Temp (°F)
50/50 50 50 425
60/40 60 40 371
63/37 63 37 361
Any general purpose rosin core solder will be fine.
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 flat tipped ones (sometimes called 'spade tips'). 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.
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.
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.
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.
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. 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.
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 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 joint and your iron, and the solder will flow into it as it passes.
Tips and Tricks
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.


2.10 Printed Circuit Board Etching:-
2.10.1 Introduction
Etching is where the excess copper is removed to leave the individual tracks or traces as they are sometimes called. Buckets, bubble tanks, and spray machines lots of different ways to etch, but most firms currently use high pressure conveyerised spray equipment. Spray etching is fast, ammoniacal etching solutions when sprayed can etch 55 microns of copper a minute. Less than 40 seconds to etch a standard 1 oz, 35 micron circuit board.
Many different chemical solutions can be used to etch circuit boards. Ranging from slow controlled speed etches used for surface preparation to the faster etches used for etching the tracks. Some are best used in horizontal spray process equipment while others are best used in tanks. Etchents for PTH work have to be selective and be non aggressive to tin / tin lead plating, which is used as the etch resist. Copper etching is normally exothermic, where high speed etching is carried out solution cooling is normally required. This is normally done by placing titanium water cooling coils into the etchent. Almost all etching solutions liberate toxic corrosive fumes, extraction is highly recommended. All etchents are corrosive and toxic, mainly due to the high metal content. P.P.E. Personal Protection Equipment must always be used, spent solutions should always be disposed of properly and not down local drains, where they pollute local sewage works and rivers.
Ferric Chloride.

An old favorite, also very good at staining fingers, clothing, etc brown. Etch rate can be very high but is dependant on solution movement over the surface of the board and temperature. At 70C using Spray etching 1oz copper is removed in a little under a minute, normal etching temperature is more likely to be 45C. When etching circuits if up to 5% of HCL is added it, increases etch rate, helps to stop staining, and reduces the risk of the solution sludging. Ferric especially with extra HCL makes a very good stainless steel etchent.

When Ferric crystals are mixed with water some free HCL produced through hydrolysis.

FeCl3 + 3H2O > Fe(OH)3 + 3HCL

The basic etching reaction takes place in 3 stages. First the ferric ion oxidizes copper to cuprous chloride, which is then further oxidized to cupric chloride.

FeCl3 + Cu > FeCl2 + CuCl
FeCl3 + CuCl > FeCl2 + CuCl2

As the cupric chloride builds up at further reaction takes place,

CuCl2 + Cu > 2CuCl

2.10.2 PCB Etching
Since the introduction of laser printers making your own PCBs (Printed Circuit Boards) has become fairly easy. The method described here assumes you want to make a PCB from an electronics magazine PCB layout - so you can copy it with a copier - or you are able to print your own PCB layouts from a PCB design package or have them available in electronic format and you can print them with a laser printer.
I am using the described method below successfully since 1996. I was forced to find an etching method to be used at home after the company I worked for dumped their prototype PCB production tools. A short version of the `greasy' etching method has been published August 2000 in the newsletter `Vijgeblaadje' from the Dutch FIG (HCC Forth gebruikersgroep).
PCB Layout
PCB Preparation
PCB UV Exposure
PCB Development
PCB Etching
Trouble shooting
More Examples
2.10.2.1PCB Layout :
The PCB layout is a mirrored positive one - black on white. Mirrored as viewed from the silkscreen top (component) side. The PCB layout is printed 1:1 on paper by means of a laser printer or copier machine. The laser printer or copier toner will not run out when it gets wet or oily. The ink of an inkjet paper print does run out and inkjet printers are therefore useless with the described method.
I have used several types of HP laser printers (LaserJet Series II, 5L, 4000 and 1100). These printers work fine. It might be possible that the toner texture on the layout prints from your used laser printer is not dense enough and passes too much light. However, results might be improved by setting the toner density to maximum. Generally printer driver properties allow to set the toner density.


Positive mirrored (top view) layout
Component (top view) layout
2.10.2.2 PCB Preparation
The PCB layout paper is drenched with sunflower-seed oil. Sunflower-seed oil is common available from your local grocery or wall market. Superfluous oil should be removed carefully with tissue paper. The sunflower-seed oil is used to make the white part of the layout paper transparent for light.
If you prefer to use the PCB layout more than once let the drenched PCB layout paper dry at least 48 hours. The layout paper should be carefully dried on forehand as much as possible with tissue paper. Sunflower-seed oil is a `drying' oil. Exposed to the air over a number of hours, the layout paper becomes rigid again. A kind of polymerization takes place. You will get a lot less or no greasy fingers anymore afterwards.
Other mineral or vegetable oils might work as well to obtain light transparency. However, they might not be `drying' oils. When I started experimenting, sunflower-seed oil was the first oil I used and it worked fine. So I didn't try any other oils. Using water does not work. The layout paper crumples up a bit.


Drench layout with sunflower-seed oil
Layout fully drenched

Greasy layout



2.10.2.3 PCB UV Exposure :
The protective plastic layer is removed - peeled back - from the photosensitive PCB. The toner side of the greased layout is placed on the copper of the PCB. Captured air-bubbles are gently pressed away from underneath the layout. The PCB with the layout is now covered with an appropriate sized windowpane and placed on a piece of plain polished tile or marble. The tile or marble absorbs the heat coming from the UV bulb, which is significant. Three to four minutes 300W bulb UV exposure from a distance of 30-40 cm will do the photo process. Take care when finished and removing the PCB, it gets hot!


Home-built UV exposure box with 300W UV bulb, polished tile and window pane
PCB with partly peeled back protective plastic layer and `dried' layout

Place layout with toner side on copper of the PCB
Cover PCB and layout with window-pane

Exposure
2.10.2.4 PCB Development :
The PCB is developed with a 1% solution of sodium hydroxide NaOH. You can make this solvent by adding 10 gram of sodium hydroxide pellets to 1 liter of water and mix it until everything is dissolved. Use a brush to speed up the developing and clean the PCB during this process if the PCB is still greasy due to the applied sunflower-seed oil. The developing process takes about 1 minute. It is sometimes difficult to guess when the developing is finished. The traces should become clear and the exposed photosensitive layer has dissolved (during the brushing you see darker `cloud' coming off the PCB surface).


Gently brush the PCB
Almost developed, some traces are not clear yet
2.10.2.5 PCB Etching :
The developed PCB is etched with a 220 g/l solution of ammonium peroxydisulfate (NH4)2S2O8 a.k.a. ammonium persulfate, 220 gram added to 1 liter of water and mix it until everything is dissolved. Theoretically it should be possible to etch slightly more than 60 grams of copper with 1 liter etching solution. Assume an 50% efficiency, about 30 grams of copper. With a thickness of 35 µm copper on your PCB this covers a copper area of about 1000 cm2. Unfortunately the efficiency of the etching solution degrades, dissolved ammonium peroxydisulfate decomposes slowly. You better make just enough etching solution you need to etch. For an etching tray of about 20 x 25 cm a minimum practical amount is 200-250 ml solution. So you dissolve about 44 grams ammonium peroxydisulfate into 200 ml or 55 grams into 250 ml water.
Etching at ambient temperature might take over an hour, it is better to heat up the etching solvent to about 35-45 degrees Celcius. The etching solution heating up could be done in a magnetron, this takes about 40 to 60 seconds in a 850W magnetron depending on the initial temperature of the etching solution (hint: first try this with just water to determine the timer setting of the magnetron). The etching - rocking the etching tray - takes about 15-30 minutes at this temperature. If you have a heated, air-bubble circulated etching fluid tank available, this is probably the fastest way to etch. At higher temperatures the etching performance decreases. The etching process is an exothermic reaction, it generates heat. Take care, cool your etching tray when necessary! You should minimize the amount of copper to etch by creating copper area in your PCB layout as much as possible. When starting the etching process and little to etch it is difficult to keep the etching solution at 35-45 degrees Celcius. It helps to fill for example the kitchen sink with warm water and rock the etching tray in the filled kitchen sink.
When the ammonium peroxydisulfate is dissolved it is a clear liquid. After an etching procedure it gradually becomes blue and more deeper blue - the chemical reaction creates dissolved copper sulfate CuSO4. Compared to other etching chemicals like hydrated iron (III) chloride FeCl3.6H2O a.k.a. ferric chloride or the combination of hydrochloric acid HCL and hydrogen peroxide H2O2, using ammonium peroxydisulfate is a clean and safe method. Did you ever spilled dissolved iron chloride on your clothes or your assumed stainless steel kitchen sink? Do you really want to keep concentrated hydrochloric acid and hydrogen peroxide at home? So, without doubt ammonium peroxydisulfate is the best choice for etching at home. However, copper sulfate is a poisonous substance and should be treated as chemical waste.


Rock the etching tray
The epoxy of the PCB becomes visible

Almost finished
The etching solution colors slighty blue

Finished



Trouble shooting :
The above mentioned exposure timing should be determined experimentally. But even when the exposure timing is correct PCB etching failures could happen because of low quality or too old photosensitive PCB, the photosensitive layer has aged despite the protective plastic layer. Other possible causes are too high concentration of development solution causing the photosensitive part not exposed to light to be dissolved by the sodium hydroxide solution as well. When developing too short not all of the copper of the PCB will be etched. Developing might take some experimenting to get used to it and know what to expect. Furthermore set the toner density of your laser printer driver always to maximum.
More examples


Exposure
Development

Etching
Finished

Chapter No.3: Softwere Description :
Programme for Microcontroller :
org 00h
mov p2,#000h
mov p0,#0ffh
setb p3.7
start: mov a,p1
cjne a,#00000001b,ved1 ;1
cpl p3.7
ved1: cjne a,#00000010b,ved2 ;2
mov p2,#005h
mov p2,#000h
ved2: cjne a,#00000011b,ved3
mov p0,#0cch ;;;;; FF
call delay
mov p0,#066h
call delay
mov p0,#033h
call delay
mov p0,#099h
call delay
mov p0,#0cch ;;;;; FF
call delay
mov p0,#066h
call delay
mov p0,#033h
call delay
mov p0,#099h
call delay
mov p0,#0cch ;;;;; FF
call delay
mov p0,#066h
call delay
mov p0,#033h
call delay
mov p0,#099h
call delay
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov p0,#099h
call delay
mov p0,#033h
call delay
mov p0,#066h
call delay
mov p0,#0cch
call delay
mov p0,#099h
call delay
mov p0,#033h
call delay
mov p0,#066h
call delay
mov p0,#0cch
call delay
mov p0,#099h
call delay
mov p0,#033h
call delay
mov p0,#066h
call delay
mov p0,#0cch
call delay
mov p0,#000h
ved3: cjne a,#00000100b,ved4 ;4
mov p2,#006h
call delay
mov p2,#000h
call delay1
ved4: cjne a,#00000101b,ved5 ;5
setb p3.0
call delay
ved5: cjne a,#00000110b,ved6 ;6
mov p2,#009h
call delay
mov p2,#000h
CALL DELAY1
ved6: cjne a,#00000111b,ved7 ;7
mov p0,#0cch ;;;;; FF
call delay
mov p0,#066h
call delay
mov p0,#033h
call delay
mov p0,#099h
call delay
mov p0,#000h
ved7: cjne a,#00001000b,ved8 ;8
mov p2,#00ah
mov p2,#000h
ved8: cjne a,#00001001b,ved9 ;9
mov p0,#099h
call delay
mov p0,#033h
call delay
mov p0,#066h
call delay
mov p0,#0cch
call delay
mov p0,#000h
ved9: jmp start
delay:
h1: mov r4,#1
h2: mov r3, #100
h3: djnz r3, h3
djnz r4, h2
djnz r5, h1
ret
delay1:
h11: mov r2,#5
h21: mov r1, #100
h31: djnz r1, h31
djnz r2, h21
djnz r0, h11
ret
end



Cost Estimation :

Components Rs.
1. Microcontroller 50
2. Relays 50
3. DC Motor 1600
4. Stepper Motor 200
5. Wireless Web Camera 4000
6. Transistors 60
7. PCBs 150
8. Box 600
9. Modules 6000
10.Miscellaneous 1000

TOTAL 13,710





References :
1. www.wikipedia.org
2. www.atmel.com
3. www.google.com
4. Mazidi & Mazidi, The 8051 Microcontrollers and Embedded Systems
5. www.semiconductors.com