B

BASIC PRACTICAL ELECTRONICS

Image

In this appendix, I briefly cover some basic terminology, components, and tools related to building electronic circuits. Electronics is a branch of engineering that deals with the design and construction of electrical circuits that use active and passive electrical components.

This topic is vast, so I am barely going to scratch the surface.1 But from a hobbyist or DIY (do-it-yourself) perspective, you don’t need to know a whole lot to get started with electronics. You can learn as you build, and from my own experience, I can tell you that this is a fun and addictive hobby. I hope a quick tour through the following topics will inspire you to start reading up on the subject and put you on the path to designing and building your own circuits.

Common Components

Most electronic components use materials that fall into the semiconductor category. Semiconductors have special electrical properties that make them an ideal choice for the construction of electronic devices.

In this section, we look at some of the most common components used in circuits. Figure B-1 shows these components alongside the symbols used to represent them in circuit diagrams.

Image

Figure B-1: Common electronic components and their corresponding symbols

Breadboard

A breadboard is a perforated block used for prototyping electronic circuits. The holes in a breadboard have spring-loaded clips in them and are interconnected in a simple way, allowing for easy experimentation. Instead of having to solder each connection, you plug in the components to the breadboard and use wires to connect them.

Light-Dependent Resistor (LDR)

An LDR is a type of resistor whose resistance decreases with the intensity of light falling on it. It is used as a light sensor in electronic circuits.

Integrated Circuit (IC)

An IC is a device that contains a complete electronic circuit. ICs are quite small and can contain billions of transistors in a square centimeter. Each IC usually has a specific application in mind, and the data sheet from the manufacturer provides the necessary schematics, electrical and physical characteristics, and sample applications to aid the user. A common IC that you may encounter is the 555, which is used mostly as a timer.

Printed Circuit Board (PCB)

To make an electronic circuit, you need a place to assemble the components. You typically do this on a PCB, a board consisting of an insulator with one or more layers of a conductive material (typically copper) on top of it. The conductive layer is shaped in such a way that it forms the wiring of the circuit.

The components are mounted onto the PCB either as through-hole components or surface-mounted components and soldered to form an electrical connection with the conducting layer.

Wires

Not very high-tech, but you can’t make circuits without wires. You’ll use copper wires insulated by plastic.

Resistor

A resistor is one of the most common components found in a circuit. A resistor is used to decrease current or voltage in a circuit and is specified in terms of its resistance, which is measured in ohms. For example, a 2.7k resistor has a resistance of 2.7 kilohms, or 2,700 ohms. A resistor has color-coded bands that indicate its resistance value, and two leads that are interchangeable because it has no polarity.

Light-Emitting Diode (LED)

LEDs are the little blinking lights you see in many circuits. An LED is a special type of diode, however, so it also has polarity and needs to be connected accordingly. It is often used in conjunction with a resistor, which limits the current flowing through it so it doesn’t get damaged. LEDs of different colors have different minimum “turn-on” voltages.

Capacitor

A capacitor is a device with two leads that is used to store an electrical charge. It is measured in terms of capacitance, which has units of farads. A typical capacitor has a capacitance measured in microfarads (μF). Capacitors come in polarized and unpolarized versions.

Diode

A diode is an electronic device that lets a current pass only in one direction. Diodes are commonly used as rectifiers—devices that convert AC current to DC. A diode has two leads: an anode and a cathode. That means it has polarity, so the two leads need to be matched up correctly with the rest of the circuit.

Transistor

A transistor can be thought of as an electronic switch. A transistor can also act as an amplifier of current or voltage. As a basic building block of integrated circuits, it is one of the most important electronic components. Transistors come in several types, but the most common ones are the bipolar junction transistor (BJT) and the metal-oxide-semiconductor field-effect transistor (MOSFET). A transistor usually has three leads. For the BJT, they are named base, collector, and emitter, whereas for a MOSFET, they are named gate, source, and drain. When the transistor is used as a switch, the current to the base for the BJT—or voltage to the gate in the case of MOSFET—is what enables the flow of current through the collector and emitter, thus acting as an on/off switch for an external load like an LED or a relay.

Battery/Power Supply

Most electronics work on small voltages ranging from 3 to 9 Volts, and this voltage can be supplied using batteries or power adapters that plug in to a wall AC outlet.

Essential Tools

In addition to the components just described, you also need some basic tools to get started with electronic circuits. Figure B-2 shows what you would typically find on the workbench of a hobbyist. Some of these essential tools are described next.

Image

Figure B-2: A typical electronics workbench, with a multimeter, a task lamp, clamps, a wire stripper, a screwdriver, needle-nose pliers, a loupe, solder, flux, an oscilloscope, and a soldering station.

Multimeter

A multimeter is an instrument used to measure the electrical characteristics of a circuit, such as voltage, current, capacitance, and resistance. It is also often used to measure continuity in a circuit, which indicates a continuous flow of current. A multimeter is quite useful when you’re trying to debug your circuit.

Soldering Iron and Accessories

Once you are satisfied that your circuit works on a breadboard, the next step is to transfer it to a PCB, and this requires soldering. Soldering is the processing of joining two metals using a heated filler metal. The filler, or solder, used to contain lead, but these days lead-free solder alloy is typically used, which is more environmentally sound. To solder a component, place it on the PCB, apply flux (a chemical that makes the soldering process easier), and apply the hot solder with the iron. When the solder cools, it forms a physical bond and an electrical connection between the component and the copper layer.

Oscilloscope

An oscilloscope is an instrument used to measure and display voltages from electronic circuits. It is a useful tool for analyzing electrical waveforms. For example, you could use it to debug digital data coming out of a sensor or measure analog voltage coming out of an audio amplifier. It also has other specialized measurement functions like fast Fourier transform (FFT) and root mean square (RMS).

Figure B-2 shows some other useful items for building circuits: a multibit screwdriver, needle-nose pliers, wire stripper, clamps to hold your PCBs while soldering, a good table lamp for a well-lit work area, a magnifier that will help you inspect small components and solder joints, and a cleaner for your soldering iron tip.

Building Circuits

When building a circuit, start with a circuit diagram or schematic, which tells you how the components are connected to each other. Typically, you then construct this circuit on a breadboard, plugging in components and connecting them using wires. Once you have tested the circuit to your satisfaction, you might consider moving it to a PCB. Although the breadboard is convenient, it looks a bit like a rat’s nest, and all those loose wires can make it unreliable for deployment.

You can either use a general-purpose PCB, which has fixed patterns of copper laid out in the bottom, or design your own PCB. The former works fine for small circuits. Typically, you solder in your components, use the copper connections that are already present, and then hack the rest by soldering additional wires as needed. Figure B-3 shows a schematic, the breadboard prototype, and the PCB construction for a simple circuit.

Image

Figure B-3: Going from a schematic to a breadboard prototype to a PCB circuit

If you want a really nice-looking PCB, you can design one yourself and have it manufactured inexpensively. Several software packages are available for designing your PCB, but the most common (free) ones include EAGLE2 and KiCad.3 EAGLE software has a Light edition that is free as long you use it only for nonprofit applications. It has certain restrictions (for instance, only two copper layers, a maximum PCB size of 4×3.2 inches, and one schematic per project), but these shouldn’t be too problematic for a hobbyist. EAGLE has a steep learning curve, however, and a somewhat confusing interface in my opinion. Before you get started, I recommend that you first watch some video tutorials.4

A typical work flow in EAGLE is as follows. First, you create a circuit diagram in the schematic editor. For this, you need to add components used in your circuit and then wire them. A huge number of component libraries are available for EAGLE, and chances are that your components are already listed in one of those libraries. (EAGLE also lets you create your own custom components.) Once you are done with your schematic, EAGLE can generate a PCB from it, which brings up a physical representation of your components. You then need to place and route your circuit to design the connection paths of the copper layer on the PCB. A typical EAGLE design is shown in Figure B-4. To the left is the schematic, and to the right is the corresponding board. Using EAGLE takes a bit of practice, but the YouTube tutorial will get you started.

Image

Figure B-4: A circuit schematic and the matching PCB design created with EAGLE

Once you have designed the PCB, you need to manufacture it. Some techniques for making PCBs can be done at home,5 which can be fun, but a more professional technique is to send your design to a PCB manufacturer. These companies typically accept a design format called Gerber, and you can generate these files right from EAGLE with a little setup.6 Many companies make PCBs. One that I have used with good results is OSH Park.7

Once you have your PCB built and components soldered, consider an enclosure for your project. Current manufacturing technologies allow you to design and build professional-looking enclosures using techniques like laser printing and 3D printing. You can use a combination of 2D8 and 3D9 software to design your creations. A nice project by Rich Decibels illustrates the whole build process discussed here.10

Going Further

You can approach practical electronics from two angles. The first is from the ground up, where you learn to put together simple circuits, learn about analog and digital circuits, and eventually go on to learn about microcontrollers and interfacing circuits with computers. The other approach is from the programming angle, where you start with hardware-friendly boards like the Arduino and the Raspberry Pi and then learn about circuits by building sensors and actuators for these boards. Both approaches are fine, and most of the time you will likely find yourself somewhere in between.

I wish you grand success with your electronics projects, and once you build something, I hope you will take the time to document it and share it with the world. On websites like Instructables (http://www.instructables.com/), you can share your projects or find inspiration from projects by other DIYers around the globe.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset