CHAPTER 5

ELECTRONIC COMPONENTS
Electronics are the central nervous system of your robot and will be responsible for passing information to and from peripheral functions as well as processing inputs and turning them into the output functions the robot performs. Any given hobby robot project might contain a dozen or more electronic components of varying types, including resistors, capacitors, integrated circuits, and light-emitting diodes. In this chapter, you'll read about the components commonly found in hobby robot projects and their many specific varieties. You'll also learn their functions and how they are used.
Understanding basic electronics is a keystone to being able to design and build your own robots. The knowledge required is not all that difficult—in fact the basic theories with diagrams can fit on two sheets of paper (following) which you are encouraged to photocopy and hang up as a quick reference.
Electricity always travels in a circle, or circuit, like the one in Fig. 5-1. If the circuit is broken, or opened, then the electricity flow stops and the circuit stops working.
images
Electricity consists of electrons, which are easily moved from the atoms of metal conductors. There are two components of electricity that can be measured. Voltage is the pressure applied to the electrons to force them to move through the metal wires as well as the different components in the circuit. As the electrons pass through a component they lose some of the pressure, just as water loses pressure due to friction when it moves through a pipe. The initial voltage applied to the electrons is measured with a volt meter or a multimeter set to measure voltage and is equal to the voltage drops through components in the circuit. The label given to voltage is V.
The second measurement that can be applied to electricity is current, which is the number of electrons passing by a point in a given time. There are literally several billion, billion, billion, billion, billion, billion electrons flowing past a point at a given time. For convenience, the unit Coulomb (C) was specified, which is 6.25 × 1018 electrons and is the basis for the ampere (A), which is the number of electrons moving past a point every second. The label given to current is the nonintuitive i.
The voltage across a component and the current through it can be measured using a digital multimeter as shown in Fig. 5-2. It is important to remember that voltage is the pressure change across a component, so to measure it you have to put a test lead on either side of the component. Current is the volume of electrons moving past a certain point every second, and to measure it, the circuit must be broken and the tester put in line, or in series, with the component being measured.
images
The current flowing through a component can be calculated if the voltage change, or drop, is known along with the resistance of the component using Ohm’s law. This law states that the voltage drop across a resistance is equal to the product of the resistance value and the current flowing through it. Put mathematically, Ohm’s law is:
V = i × R
Where V is voltage across the component measured in volts, i is the current through the component measured in amperes or amps, and R is the resistance measured in ohms, which has the symbol Ω. Using algebra, when any two of the three values are known, the third can be calculated. If you are not comfortable using algebra to find the missing value, you can use Ohm’s law triangle (Fig. 5-3). This tool is quite simple to use. Just place your finger over the value you want to find, and the remaining two values along with how they are located relative to one another shows you the calculation that you must do to find the missing value. For the example in Fig. 5-3, to find the formula to calculate current, put your finger over i and the resulting two values V over R is the formula for finding i (divide the voltage drop by the resistance of the component).
images
Resistances can be combined, which changes the electrical parameters of the entire circuit. For example, in Fig. 5-4 resistances are shown placed in line or in series and the total resistance is the sum of the resistances. Along with this, the voltage drop across each resistor is proportional to the value of the individual resistors relative to the total resistance of the circuit.
images
The ratio of voltages in a series circuit can be used to produce a fractional value of the total voltage applied to a circuit. Fig. 5-5 shows a voltage divider, which is built from two series resistors and outputs a lower voltage than was input into the circuit. It is important to remember that this circuit cannot source (provide) any current—any current draw will increase the voltage drop through the top resistor and lower the voltage of the output.
images
Finally, resistances can be wired parallel to one another as in Fig. 5-6. In this case, the total resistance drops and the voltage stays constant across each resistor (increasing the total amount of current flowing through the circuit). It is important to remember that the equivalent resistance will always be less than the value of the lowest resistance. The general case formula given in Fig. 5-6 probably seems very cumbersome but is quite elegant when applied to two resistors in parallel. The equivalent resistance is calculated using:
images
Requivalent = (R1 × R2) / (R1 + R2)
Whew! This is all there is to it with regards to basic electronics. The diagrams have all been placed in the following to allow you to photocopy them, study while you have a free moment, and pin up over your workbench so you always have them handy.
The most basic component that you will be working with is the wire. There are essentially two types that you should be aware of: solid core and multi-stranded. Solid core wire is exactly what is implied: there is a single conductor within the insulation. Multi-strand wire consists of many small strands of wire, each carrying a fraction of the total current passed through the wire. Solid core wire is best for high current applications, while multi-stranded wire is best for situations where the wire will change shape because the thin strands bend more easily than one large one.

TABLE 5-1   Single Conductor Wire Current-Carrying Capacity
table

Along with the size of the conductor and the amount of current it can carry, a plethora of different options are available when choosing wire for a specific application. There are a variety of ways of providing multiple conductors (each one separated from each other to allow multiple signals or voltage to pass through them) in a single wire; there are different insulations for different applications and different methods of molding the wires so they can be attached to different connectors easily.
Many books this size and larger detail the options regarding wiring for different applications. As you start out with your robot applications, try to use 20 AWG single conductor, multi-stranded wiring for everything (buy it in several colors, including black and red so you can easily determine what is the wire’s function). As you build larger robots and understand the electrical requirements of the different parts, you can start experimenting with wire sizes and connecting systems.
A fixed resistor supplies a predetermined resistance to a circuit. The standard unit of value of a resistor is the ohm (with units in volts per ampere, according to Ohm’s law), represented by the symbol Ω. The higher the ohm value, the more resistance the component provides to the circuit. The value on most fixed resistors is identified by color coding, as shown in Fig. 5-7. The color coding starts near the edge of the resistor and comprises four, five, and sometimes six bands of different colors. Most off-the-shelf resistors for hobby projects use standard four-band color coding. The values of each band are listed in Table 5-2, and the formula for determining the resistance from the bands is:
images
TABLE 5-2   Resistor Band Values
table

Resistance = ((Band 1 Color Value × 10) + (Band 2 Color Value)) × 10Band 3 Color Value ohms
If you are not sure what the resistance is for a particular resistor, use a digital multimeter to check it. Position the test leads on either end of the resistor. If the meter is not autoranging, start at a high range and work down. Be sure you don’t touch the test leads or the leads of the resistor; if you do, you’ll add the natural resistance of your own body to the reading.
Resistors are also rated by their wattage. The wattage of a resistor indicates the amount of power it can safely dissipate. Resistors used in high-load applications, like motor control, require higher wattages than those used in low-current applications. The majority of resistors you’ll use for hobby electronics will be rated at or even of a watt. The wattage of a resistor is not marked on the body of the component; instead, you must infer it from the size of the resistor.
Variable resistors let you dial in a specific resistance. The actual range of resistance is determined by the upward value of the potentiometer. Potentiometers are thus marked with this upward value, such as 10K, 50K, 100K, 1M, and so forth. For example, a 50K potentiometer will let you dial in any resistance from 0 to 50,000 ohms. Note that the range is approximate only.
Potentiometers are of either the dial or slide type, as shown in Fig. 5-8. The dial type is the most familiar and is used in such applications as television volume controls and electric blanket thermostat controls. The rotation of the dial is nearly 360°, depending on which potentiometer you use. In one extreme, the resistance through the potentiometer (or pot) is zero; in the other extreme, the resistance is the maximum value of the component.
images
Some projects require precision potentiometers. These are referred to as multiturn pots or trimmers. Instead of turning the dial one complete rotation to change the resistance from, say, 0 to 10,000 ohms, a multiturn pot requires you to rotate the knob 3, 5, 10, even 15 times to span the same range. Most are designed to be mounted directly on the printed circuit board. If you have to adjust them, you will need a screwdriver or plastic tool.
After resistors, capacitors are the second most common component found in the average electronic project. Capacitors serve many purposes. They can be used to remove traces of transient (changing) current ripple in a power supply, to delay the action of some portion of the circuit, or to perform an integration or differentiation of a repeating signal. All these applications depend on the ability of the capacitor to hold an electrical charge for a predetermined time.
Capacitors come in many more sizes, shapes, and varieties than resistors, though only a small handful are truly common. However, most capacitors are made of the same basic stuff: a pair of conductive elements separated by an insulating dielectric (see Fig. 5-9). This dielectric can be composed of many materials, including air (in the case of a variable capacitor, as detailed in the next section), paper, epoxy, plastic, and even oil. Most capacitors actually have many layers of conducting elements and dielectric. When you select a capacitor for a particular job, you must generally also indicate the type, such as ceramic, mica, or Mylar.
images
Capacitors are rated by their capacitance, in farads, and by the breakdown voltage of their dielectric. The farad is a rather large unit of measurement, so the bulk of capacitors available today are rated in microfarads, or a millionth of a farad. An even smaller rating is the picofarad, or a millionth of a millionth of a farad. The micro in the term microfarad is most often represented by the Greek mu (μ) character, as in 10 μF. The picofarad is simply shortened to pF. The voltage rating is the highest voltage the capacitor can withstand before the dielectric layers in the component are damaged.
For the most part, capacitors are classified by the dielectric material they use. The most common dielectric materials are aluminum electrolytic, tantalum electrolytic, ceramic, mica, polypropylene, polyester (or Mylar), paper, and polystyrene. The dielectric material used in a capacitor partly determines which applications it should be used for. The larger electrolytic capacitors, which use an aluminum electrolyte, are suited for such chores as power supply filtering, where large values are needed. The values for many capacitors are printed directly on the component. This is especially true with the larger aluminum electrolytic, where the large size of the capacitor provides ample room for printing the capacitance and voltage. Smaller capacitors, such as 0.1 or 0.01 μF mica disc capacitors, use a common three-digit marking system to denote capacitance and tolerance. The numbering system is easy to use, if you remember it’s based on picofarads, not microfarads. A number such as 104 means 10, followed by four zeros, as in
100,000
or 100,000 picofarads. Values over 1000 picofarads are most often stated in microfarads. To make the conversion, move the decimal point to the left six spaces: 0.1 μF. Note that values under 1000 picofarads do not use this numbering system. Instead, the actual value, in picofarads, is listed, such as 10 (for 10 pF).
images
The diode is the simplest form of semiconductor. It is available in two basic flavors, germanium and silicon, which indicates the material used to manufacture the active junction within the diode. Diodes are used in a variety of applications, and there are numerous subtypes. Here is a list of the most common.
  • Rectifier. The average diode, it rectifies AC current to provide DC only.
  • Zener. It limits voltage to a predetermined level. Zeners are used for low-cost voltage regulation.
  • Light-emitting. These diodes emit infrared of visible light when current is applied.
  • Silicon-controlled rectifier (SCR). This is a type of high-power switch used to control AC or DC currents.
  • Bridge rectifier. This is a collection of four diodes strung together in sequence; it is used to rectify an incoming AC current.
Diodes carry two important ratings: peak inverse voltage (PIV) and current. The PIV rating roughly indicates the maximum working voltage for the diode. Similarly, the current rating is the maximum amount of current the diode can withstand. Assuming a diode is rated for 3 amps, it cannot safely conduct more than 3 amps without overheating and failing.
images
All diodes emit light when current passes through them. This light is generally only in the infrared region of the electromagnetic spectrum. The light-emitting diode (LED) is a special type of semiconductor that is expressly designed to emit light in human visible wavelengths. LEDs are available to produce any of the basic colors (red, yellow, green, blue, or white) of light as well as infrared. The infrared LEDs are especially useful in robots for a variety of different applications.
LEDs carry the same specifications as any other diode. The LED has a PIV rating of about 100 to 150 V, with a maximum current rating of under 40 mA (usually only 5 to 10 mA is applied to the LED). Most LEDs are used in low-power DC circuits and are powered with 12 V or less. Even though this voltage is far below the PIV rating of the LED, the component can still be ruthlessly damaged if you expose it to currents exceeding 40 or 50 mA. A resistor is used to limit the current to the LED.
Transistors were designed as an alternative to the old vacuum tube, and they are used in similar applications, either to amplify a signal by providing a current control or to switch a signal on and off. There are several thousand different transistors available. Besides amplifying or switching a current, transistors are divided into two broad categories:
  • Signal. These transistors are used with relatively low-current circuits, like radios, telephones, and most other hobby electronics projects.
  • Power. These transistors are used with high-current circuits, like motor drivers and power supplies.
You can usually tell the difference between the two merely by size. The signal transistor is rarely larger than a pea and uses slender wire leads. The power transistor uses a large metal case to help dissipate heat, and heavy spokelike leads.
Transistors are identified by a unique code, such as 2N2222 or MPS6519. Refer to a data book to ascertain the characteristics and ratings of the particular transistor you are interested in. Transistors are rated by a number of criteria, which are far too extensive for the scope of this book. These ratings include collector-to-base voltage, collector-toe-mitter voltage, maximum collector current, maximum device dissipation, and maximum operating frequency. None of these ratings are printed directly on the transistor.
Signal transistors are available in either plastic or metal cases. The plastic kind is suitable for most uses, but some precision applications require the metal variety. Transistors that use metal cases (or cans) are less susceptible to stray radio frequency interference and they also dissipate heat more readily.
You will probably be using NPN (Fig. 5-12) and PNP (Fig. 5-13) bipolar transistors. These transistors are turned on and off by a control current passing through the base. The current that can pass through the collector is the product of the base current and the constant hFE, which is unique to each transistor.
images

images
Bipolar transistors can control the operation and direction of DC motors using fairly simple circuits. Fig. 5-14 shows a simple circuit that will turn a motor on and off using a single NPN bipolar transistor and a diode. When the current passing through coils of a magnetic device changes, the voltage across the device also changes, often in the form of a large spike called kickback. These spikes can be a hundred volts or so and can very easily damage the electronic devices they are connected to. By placing a diode across the motor as shown in Fig. 5-15, the spikes produced when the motor is shut off will be shunted through the diode and will not pass along high voltages to the rest of the electronics in the circuit.
images

images
The circuit shown in Fig. 5-15 is known as an H-bridge because without the shunt diodes the circuit looks like the letter H. This circuit allows current to pass in either direction through a motor, allowing it to turn in either direction. The motor turns when one of the two connections is made to +V. Both connections can never be connected to +V as this will turn on all the transistors, providing a very low resistance path for current from +V, potentially burning out the driver transistors.
Along with bipolar transistors, which are controlled by current, there are a number of other transistors, some of which are controlled by voltage. For example, the MOSFET (for metal-oxide semiconductor field-effect transistor) is often used in circuits that demand high current and high tolerance. MOSFET transistors don’t use the standard base-emitter collector connections. Instead, they call them gate, drain, and source. The operational differences among the different transistors will become clearer as you become more experienced in creating electronic circuits.
images
Positive voltages are normally indicated with an arrow pointing upward and the label of the positive voltage to be used. These conventions will be used throughout this book.
The integrated circuit forms the backbone of the electronics revolution. The typical integrated circuit comprises many transistors, diodes, resistors, and even capacitors. As its name implies, the integrated circuit, or IC, is a discrete and wholly functioning circuit in its own right. ICs are the building blocks of larger circuits. By merely stringing them together you can form just about any project you envision.
Integrated circuits are most often enclosed in dual in-line packages (DIPs), like the one shown in Fig. 5-17. This type of component has a number of pins that can be inserted into holes of a printed circuit board and is also known as a pin through hole (PTH) component. There are numerous types of packages and methods of attaching chips to PCBs but beginners should be working with just PTH DIPs.
images
As with transistors, ICs are identified by a unique code, such as 7400 or 4017. This code indicates the type of device. You can use this code to look up the specifications and parameters of the IC in a reference book. Many ICs also contain other written information, including manufacturer catalog number and date code. Do not confuse the date code or catalog number with the code used to identify the device.
Electronics use a specialized road map to indicate what components are in a device and how they are connected together. This pictorial road map is the schematic, a kind of blueprint of everything you need to know to build an electronic circuit. Schematics are composed of special symbols that are connected with intersecting lines. The symbols represent individual components, and the lines represent the wires that connect these components together. The language of schematics, while far from universal, is intended to enable most anyone to duplicate the construction of a circuit with little more information than a picture.
images