Изменить стиль страницы

Figure 1-4: Cars are full of useful stuff!

Of course, removing the parts from a car out in the open is risky. Have all the tools you need with you and work quickly. If you break into a car, the alarm may sound. It’s much better to use a car whose doors are already open.

An alternative to taking things off a car is to just visit an auto parts store or auto mechanic. In fact, if you are trying out some of these projects preapocalypse, then visiting a junkyard or auto shop is your best option.

BRICK-AND-MORTAR PARTS STORES

Your hometown probably has a Fry’s or some other store from which it is possible to buy (or postapocalypse, take) electronics components. In the UK, Maplin fills a similar niche. While you won’t build much from scratch in this book—instead, you’ll learn to reuse everyday household items whenever possible—you can get a few really useful things at such stores:

• Walkie-talkies

• Batteries

• Solar panels

• Tools

• Prototyping platforms, such as Arduino and Raspberry Pi controllers (See “Electronic Modules” on page 17.)

Of course, preapocalypse, you could also just order most materials on the Internet. (Then, you’ll even be prepared with a stockpile; imagine the bartering possibilities!) See Appendix A for a detailed breakdown of the electronic parts you’ll need for this book and where to buy them.

PROJECT CONSTRUCTION

The projects in this book are mostly concerned with the use of electronics in some way. They’re all described step-by-step, and no electronics expertise is required. You’ll find detailed lists of the supplies you need to make a project within the project itself, and you’ll need just a few basic tools, including a soldering iron.

SOLDERING

You use a soldering iron to melt solder, which is used to join wires together or attach components to a circuit board. The basic principal is that you touch the hot tip of the iron to the solder, without burning yourself. During the apocalypse, burn medication will be hard to come by, so take care.

There is, of course, the problem that we might not have a supply of electricity to power the soldering iron. Fortunately, several types of cordless soldering irons are available. There are butane gas–powered irons, as well as irons that are battery powered. You can even repurpose a hot plate or a toaster oven to solder components to circuit boards.

In Appendix B, you will find a beginner’s guide to soldering. Trust me: if you can use a knife and fork, you can solder.

MECHANICAL CONSTRUCTION

You’ll want to put the contraptions you make in this book into boxes or affix them to walls, so it will be helpful to get hold of a drill as well as screws, nuts, bolts, and metal brackets. General construction tools such as a hacksaw, files, and a vise will come in very handy for fashioning supports and fixings from scrap metal or lumber. The more tools you can lay your hands on, the better. They can always double as weapons.

ELECTRONIC MODULES

Wherever possible, the projects in this book use ready-made modules to simplify the build. Two such modules are the Arduino (Figure 1-5) and Raspberry Pi (Figure 1-6). You will find a guide to the Raspberry Pi in Chapter 5 and an Arduino primer in Appendix C.

Maker's Guide to the Zombie Apocalypse: Defend Your Base with Simple Circuits, Arduino, and Raspberry Pi _12.jpg

Figure 1-5: An Arduino microcontroller board

Maker's Guide to the Zombie Apocalypse: Defend Your Base with Simple Circuits, Arduino, and Raspberry Pi _13.jpg

Figure 1-6: A Raspberry Pi single-board computer

The Arduino is a microcontroller board widely used by makers and artists. It’s simple to use and can be programmed to read sensors and control outputs. For example, in Chapter 2, you will use it to make a battery monitor, and in Chapter 9, you’ll use it to control an LED flashlight to make an automatic Morse code beacon.

The Raspberry Pi is a much more sophisticated device. It is a low-power computer running the Linux operating system. You can connect a keyboard, mouse, and a TV to it and turn it into a control center for your base. Being low power, it is much more suitable to run on batteries than a laptop computer would be.

If you are new to programming, don’t worry: all the program code for the projects that use Raspberry Pi and Arduino is available for download from http://nostarch.com/zombies/. You may want to download the code to a pen drive now, just in case.

In the next chapter, I will start with the basics of sorting out the electrical power that you will need for most projects. Having electricity available will make life easier in other ways, too, such as by providing lighting, so let’s get started!

2

GENERATING ELECTRICITY

Maker's Guide to the Zombie Apocalypse: Defend Your Base with Simple Circuits, Arduino, and Raspberry Pi _5.jpg

In the aftermath of a zombie apocalypse, the national power grid is likely to continue working for only a day or two at most. The system of power generation and distribution is finely balanced and fantastically complex, and the people who run it are likely to be busy either being eaten by zombies or being zombies (Figure 2-1), so you won’t be able to rely on them.

Let’s face it, though: you’re not going to need to have a whole lot to power, anyway. There won’t be any TV to watch, and you won’t have the Internet, either. You’ll only need a fairly small amount of electricity, and fortunately, you can generate that much yourself, either by using the sun’s energy or by converting movement into electricity.

Maker's Guide to the Zombie Apocalypse: Defend Your Base with Simple Circuits, Arduino, and Raspberry Pi _14.jpg

Figure 2-1: Zombie workers

POWER AND ENERGY

The words energy and power are often used interchangeably, but they’re actually different. Power is the amount of energy used per unit time, usually per second. Energy is measured in units called joules (after James Joule, the English scientist and brewer). You could represent power in units of joules per second, but power is more commonly measured in watts (named for James Watt, the Scottish inventor). One watt is actually exactly one joule per second.

Think of a battery as holding a certain number of joules of energy. How fast the battery empties depends on how much power you draw from it. If you attach a very low-power device, the battery will take a long time to go dead, but if you attach something high power, the battery won’t last long at all.

Table 2-1 lists some electrical appliances and indicates just how much power they use.

Table 2-1: POWER CONSUMPTION OF EVERYDAY ITEMS

APPLIANCE

POWER (W)

WOULD DRAIN A CAR BATTERY IN:

Portable FM radio

2

300 hours

LED light bulb

5

120 hours

Soldering iron

30

20 hours

Laptop

50

12 hours

Monitor (27 inch)

80

7.5 hours

Hair dryer

1,500

24 minutes

Electric room heater

3,000

12 minutes

Electric shower (the type that both pumps and heats the water)

10,000

3.6 minutes

Cooking and heating require a lot of power. In fact, if you want hot water or hot food, you should look at burning fuel rather than using electricity.

FLAVORS OF ELECTRICITY

Although Table 2-1 lists a portable radio and an electric shower, these things need different types of electricity. Fortunately, that doesn’t have to be a problem! With some constraints, it is possible to convert between these types. Note that zombies will be unable to manage this task (Figure 2-2).