Computers are versatile machines which can be programmed to perform tasks quickly and accurately. These tasks, or applications, run the range from games and word processing to financial modeling or controlling the lights and heat in your home.
     Most computer applications, at some point in the process, involve a program which processes data, or information. A video arcade game is a good example. Here, the data is entered by the player through a joystick-the processing the program performs is the motion of the character on the screen. Another example, word processing, lets you enter text (the data) and process it (by formatting it properly and printing it out). These kinds of applications are certainly useful, but they aren't the end of your computer's capabilities.
     A vast majority of computer applications are limited to acting only on data entered by the user, either from the keyboard or the joystick. Yet some of the most interesting applications result when computers interact with the outside world. A computer which can examine its surroundings can then use this information to perform a useful function. Imagine your computer, sensing that it's now dark outside, turning on your outside lights before you arrive home from work.
     Computers have made possible systems which can control extremely complex operations. The software, or programs which instruct a computer to do a specific task, is in fact a form of intelligence-if written correctly, the programs can react to different conditions in predetermined ways.
     This book will show ways you can use your computer to relate and react to the outside world. This is done through sensors and actuators. Sensors gather information from the outside world for the computer to process. Actuators allow the computer to influence outside events. Several of the projects put sensors and actuators together so that the computer can perform a given task.
     To help you get started, the first few projects in this book are relatively easy to complete. As your experience increases, so does the difficulty of the projects. If you're new to electronics, then, start with the first projects in the book, developing your skills as you progress toward the later, more difficult, projects. But even though the projects increase in difficulty, you won't need any exotic equipment or advanced skills to complete them.
     Almost all the projects contain less than a half-dozen components. You'll have little difficulty with any of the projects, but you should have some understanding of electronics troubleshooting procedures.

Building a Circuit
The basic idea when building a circuit is to wire together the components' leads correctly. Occasionally, even experienced builders make mistakes in wiring circuits. It's an excellent idea to completely read through each section describing the circuit's construction before starting. Color-coded wires can help in tracing circuits. Examine the drawing of the breadboard layout included in the book, and study the schematic diagram. When you feel you understand what the circuit requires, go ahead and wire your test circuit.
     Several methods of wiring, or breadboarding, circuits are available and suitable for the projects in this book. One method involves mounting the components on a perforated board. The components are positioned on one side of the board so that their leads extend through the perforations to the opposite side. The leads on the bottom are then connected by wires soldered between them.
     A similar method, called wire wrapping, requires that each component be mounted in a socket before being placed on the perf board. Each socket has metal posts which make contact with the leads of the component. The posts extend through the holes. Wire connections are made by wrapping one end of a wire around one post and the other end of the same wire around a second post. This is done with a wire wrap tool.
     Most commercial electronic circuits, however, are constructed using printed circuit boards. Printed circuit boards are copper plated on one or both sides. When making a circuit using printed circuit boards, you must first determine the location of components on the board. Then, the interconnections between the components' leads are marked on the board with an indelible felt-tip marker. The board is submersed in a chemical solution which dissolves all copper from the board except that along the traces you've marked. The copper traces which remain form the connections between the components. Commercial manufacturers prefer this technique because boards can be produced in large quantities quickly and cheaply with photographic techniques.
     Your best bet is to use solderless breadboards, like those available from Radio Shack. (Radio Shack's Experimenter Socket, part number 276-174, was used to construct all the projects in this book.)
     A solderless breadboard is a plastic board with a grid of "holes" called plug points (see Figure 1). The plug points are internally wired so that the columns of points on each half of the board are connected. A row of plug points on each half of the board are connected as well. To hook up a circuit, components are just plugged into the solderless breadboard. A connection between two component leads can be made simply by inserting each lead into plug points that are internally connected. No soldering is required. Alternatively, jumper wires can be used to bridge one set of connected plug points with another to complete a connection. Jumper wires should be #22 gauge, as larger wires tend to spread the contacts of a plug point too far apart, eventually ruining the breadboard. These solderless boards may be reused for different experiments without removing solder from connections. Most wiring explanations in this book refer to coordinates on the solderless breadboard.

Figure 1. solderless breadboard

Heat the Iron
Even if you use a solderless breadboard when constructing the circuits in this book, you'll still have to do a little soldering. While you won't have to do intricate soldering, wires still must be attached to switches, the connectors which plug into your computer, and other components that cannot be directly plugged into a solderless breadboard. Soldering is the only reliable method of making these connections.
     To make solder connections, you need a pencil soldering iron (approximately 25 watts) and some electronic resin core solder. Make sure the solder you use is suitable for electronic work-some types of solder used in other applications use a corrosive resin. The steps to make a solder connection are listed below. Try soldering some practice connections with scraps of wire before soldering on one of the projects.

  1. Make sure the joint you're going to solder is free of dirt and grease. The solder will not bond properly if it's not clean.
  2. Try to make the joint as firm as possible before soldering. If you're joining two wires, twist them together. When connecting to a terminal, like that of a switch, twist the wire around it. Doing this makes the connection more reliaible, as a dab of solder by itself will not hold a connection together for long. If you're using stranded wire, twist the strands together before making the connection. This will prevent stray strands from shorting out nearby connections.
  3. When you're soldering an electronic component such as a transistor or IC (integrated circuit) chip, attach an alligator clip to the lead of the component just above the point where you're going to make the connection. The metal alligator clip acts as a heat sink, drawing heat away from the component, preventing damage.
  4. Plug in the soldering iron and wait until its tip is hot enough to melt solder.
  5. Touch the tip of the soldering iron to the joint and wait a couple of seconds for it to heat up.
  6. Touch the solder to the joint, not the tip of the soldering iron. Remember always to heat the work surface, not the solder. Some solder should flow onto the joint. Remove the remaining solder from the joint and then remove the soldering iron. A minimum amount of solder should be used when making a connection. Excess solder not only looks sloppy, but can cause short circuits.
  7. A good solder connection is bright and shiny. If it's a dull gray, you have what's called a cold joint. If this happens, remake the connection. A poor solder joint can cause an otherwise perfect circuit to fail.
  8. Sometimes it will be necessary for you to tin, or coat, the leads to a component with a thin coating of solder before establishing a connection. Tinning helps remove oxidation and cleans the service, providing a better electrical and mechanical connection.
  9. When you're finished soldering, wipe the tip of your soldering iron on a damp sponge to remove any excess solder and resin. The tip should be a silver color, without any trace of dirt or foreign objects. This practice will increase the useful life of the tip. Be sure to unplug the soldering iron as well-an unattended hot iron is a fire hazard.
In Your Toolbox
Besides a soldering iron, there are a few other tools you'll need. A pair of small wire cutters and a wire stripper are handy, but you can strip insulation from a wire with a knife if you're careful not to nick the conductor. Needle-nose pliers are useful for twisting and untwisting wire, and for reaching tight spots too small for your fingers. A drill and a screwdriver are required for some of the projects to mount the circuits in a case.
     Since you'll be working with integrated circuits (ICs), an IC extractor will be handy for removing the IC chip from the circuit board. You'll find that the pins of the ICs are very easy to bend.
     If the circuit doesn't give the results you expect after you've carefully built it, compare your circuit to the diagram in the book. Are all the pins properly connected? Is the IC inserted correctly? Have you entered the program designed to use the circuit properly? Most programs included with this book are short, so you should have little trouble entering them correctly. To make this part of the job even easier, use "The Automatic Proofreader" found in Appendix A-it's an error-checking program which insures that you type in the program correctly the first time.
     Each circuit described in this book has been thoroughly tested. The circuits and the demonstration programs will work as explained in the text, providing you follow the instructions carefully.
     All projects are designed to operate with the Commodore 64, Commodore 128 (in 64 mode), and VIC-20, and with the Atari 400, 800, 600XL, 800XL, and 130XE personal computers. The electronics involved is virtually identical for all these computers, but the programs differ. Be sure to use the correct program for your computer.
     Have fun building the projects. Experiment with your own ideas. By the time you've finished the last project, you should understand how to interface your computer to almost anything. At that point, your own imagination will take control.

Help's on the Way
To make it easier for you to use this book, you'll see small graphic devices, called icons, throughout the book. These cues will alert you to specific sections of each chapter:

parts list
shows you where the parts list for each project is located. The number of components, their names, and their Radio Shack part numbers are provided.
points out where the step-by-step instructions for building each project begin. Steps are numbered and are self-explanatory for the most part.
testing procedure
indicates that a testing procedure is described, or that a program will follow. After you've finished a project, you'll almost always be shown ways to test it under working conditions to insure that it operates as advertised.
calls your attention to various warnings and/or notes on a project.

Return to Table of Contents | Previous Chapter | Next Chapter