Выбрать главу

MEASURING DC VOLTAGE

Multimeters are most commonly used to measure DC voltage. This is what we would do to, say, check the voltage of a battery (Figure B-11).

Figure B-11: Measuring DC voltage with a multimeter

If the battery says on the case that it’s a 9V battery, but when you measure the voltage across its terminals you get a reading of 4V, then there is something wrong with the battery. The 9V battery in Figure B-11 measures 8.53V, which is perfectly normal. If it’s under 8V, you should probably toss it.

To measure the voltage of a battery, follow these steps:

1. Set the range knob of the multimeter to DC volts and pick a range that is higher than the highest voltage you are expecting. For a 9V battery, for example, the 20V range is a good choice. (Multimeters also have an AC voltage range. The AC ranges have a wavy line next to them, and the DC ranges have one horizontal line above another.)

2. Make sure that the test leads are in the sockets for voltage measurement and not for current measurement. The black lead should be plugged into the COM socket, and the red lead should be plugged into the socket marked with a V. This is important because when measuring current, the multimeter leads are almost a short circuit and using a currentconfigured meter to measure voltage would cause a short circuit across the battery. This is likely to blow a fuse in the multimeter.

3. Connect the black COM lead to the negative end of the battery and the red positive lead to the positive terminal of the battery. The multimeter’s display will tell you the voltage.

In addition to measuring the voltage of a battery to find out whether it’s good, you may want to measure the voltage across a component, say an LED or resistor. In that case, just touch the probe leads to either side of the component.

MEASURING DC CURRENT

When you need to maximize the life of your battery, which will be important when the apocalypse is on, it’s often useful to see how much current a device is using. As an example, we could test how much current will be drawn by an Arduino.

Figure B-12 shows a multimeter set up to test the current consumption of an Arduino powered from a 9V PP3 battery. A barrel jack lead is used to connect the 9V battery. The multimeter sits in the circuit, measuring the current flowing through it (in this case 32.6 mA). The positive terminal of the battery is connected to the positive lead of the multimeter, and the rest of the circuit (or in this case the Arduino) receives its power through the negative lead of the multimeter.

Figure B-12: Measuring DC current with a multimeter

Follow these steps to measure current:

1. Set the range knob of the multimeter to a DC Amps range. On its own, an Arduino only uses about 30mA of current, so select the 200mA range. If in doubt, start with the maximum range (often 10A) and work down if you need more precision.

2. Make sure that the positive test lead is in the correct current measuring socket on the multimeter. For low currents (about 200mA or less), this is often the same connection that’s used to measure volts. The multimeter shown here has a separate socket for currents up to 10A, but since we shouldn’t see more than 30mA, the voltage socket is being used.

3. Connect the positive test lead of the meter to the positive side of the battery and the negative test lead to the positive voltage connection of the lead to the Arduino.

As shown, the multimeter is effectively intercepting the current flowing through the test leads in order to measure the current.

MEASURING RESISTANCE

“Resistor Color Codes” on page 225 includes a guide to identifying the values of resistors from their color stripes. Another way to find the value of a resistor is to measure it using a multimeter. Just set the meter to one of its resistance ranges and then touch the two test leads to either side of the resistor (Figure B-13).

Figure B-13: Measuring resistance with a multimeter

In this case, the resistor is measured as 118.2 Ω. The resistor’s nominal value, according to the stripes, is 120 Ω. This slight discrepancy is perfectly normal. Neither the multimeter nor the resistor itself will be completely accurate.

NOTE

Some meters also have one or more capacitance ranges, which you can use to measure the value of capacitors in the same way.

CONTINUITY TESTING

Most multimeters have a Continuity or Buzzer mode, selectable from the range knob. When the multimeter is set to continuity, a buzzer on the multimeter sounds if the two test leads are touched together. The buzzer should also sound when the leads are connected by something with low resistance, like a wire, PCB track, or dubious solder joint.

This function may not sound very useful, but it is actually invaluable. It allows you to test fuses as well as suspect wires that look okay but may have a break beneath the insulation. It is also good for testing switches. Just touch the leads the switch contacts, and if the multimeter buzzes when you flip the switch, then all is well. Similarly, to test a fuse, first touch the test leads together to hear the beep and make sure the multimeter is working and then touch the leads to either end of the fuse. If the meter doesn’t work, then the fuse has blown.

BELLS AND WHISTLES

The multimeter features I’ve already described will cover pretty much any test you might need to perform on a circuit in this book. However, even a cheap multimeter, like the one shown here, has some other useful settings:

AC voltage and current A separate set of ranges are needed for AC because it swings both positive and negative, making its average value zero, so the meter will convert the AC to DC internally before giving a reading if one of these ranges is selected.

HFE This range will measure the gain (current amplification factor) of a transistor plugged into the special transistor socket. This is also a quick way to see whether a transistor is dead.

If you buy a more expensive multimeter, you will find it has even more bells and whistles:

Frequency measurement Measures the frequency of a signal. You could, for example, use this to find the frequency of the buzzer on the smoke alarm in “Project 11: Quiet Fire Alarm” on page 120.

Temperature This function requires a special thermocouple probe. It’s useful as a general thermometer and is especially valuable as a way to see if components are getting dangerously hot.

Capacitance This setting is useful for comparing the capacitance written on the side of a capacitor with its actual capacitance. Electrolytic capacitors are notoriously unreliable as they get older. They often degrade into a zombie-like state, causing problems in many kinds of electronic equipment.

Backlight Lights the screen on your multimeter, which is useful if you are trying to use the multimeter to work out why the lights in your base have gone out!

Auto power off Very handy if, like me, you tend to forget to switch things off. You never know when you’ll find more batteries, after all.

Your multimeter will be one of your most useful tools, so get familiar with it. That way, should you have to use it under pressure as the zombies close in, you won’t have to waste valuable time consulting the manual.

C

ARDUINO PRIMER

Arduino microcontroller boards are perfectly suited to a postapocalyptic world. They’re robust, they’re reliable, and they use very little power. If you’re new to Arduino, this appendix will get you started with this great little board so you can begin to make your end-of-the-world preparations now and greatly enhance your chances of survival.