 Introduction to hardware hacking. Earlier today, Joe Grand gave a great talk about some advanced topics. I'm going to step back a little bit and talk about some introductory skills and introduction to hardware hacking if you want to start in on it. So why hardware hacking? For me anyway. Hardware hacking doesn't seem to get near the publicity as much as a computer or software hacking. I'd like to change that. I'd like to make hacking a more positive thing. I'll get more people introduced to it and more people doing it. So I always sort of start off with a definition. What is a hardware hack? This is a little bit long, but bear with me. To me, a hardware hack is a sometimes clever modification or fix made to a piece of equipment that improves its performance or makes the equipment do something for which it was not originally intended. The results of the hack need not be useful in the strict sense of the word. They can just be fun. You can use the word hack as a noun or verb. You can say, well, that hack you made to your toaster was great. Or as a verb, you can say, let's hack your brother's TV set tonight, so it can only tune to channel 13. Well, for me, hardware hacking has always been easier. Why is that? Well, when you buy a piece of hardware, let's say a toaster for example, you can open it up and you can see exactly what's inside. There's nothing obscured inside of it. Very often repair manuals are available for most equipment. And your girlfriend's significant other can benefit from your skills as a hacker. You can fix stuff around the house. When's the last time your girlfriend or significant other asked you to fix their copy of word? Okay. So software skills are useful too, but for me, you can fix electrical stuff. When you buy a piece of commercial software, you can't open it up and see how it works. Now, of course, the exception to this is open source and open source is a great thing. With most pieces of software, you're stuck with an executable file and no source code. You can't see how it works or change it. It's behavior is fixed usually and to which things the original programmer intended it to do. You can't examine it and change it. Again, open source is an exception to this and is a very good thing. A little bit about me. I graduated too many years ago from MIT with a couple of degrees. I've been hacking since I was a kid. When I was probably eight years old, my father bought me one of those 101 electronics kits from Radio Shack. It said ages 13 and above, but he didn't bother reading the recommended ages. So I just sort of put stuff together. At first, most of it didn't work, but as I got into it, I got more and more of the little circuits to work and just enjoyed that. I also enjoyed taking apart stuff around the house, old radios, toasters, stuff like that. I felt a bunch of different day jobs. I've been a toy designer many years ago. I designed digital cameras for Apple. I started a company a number of years ago called Pocket Science, and I'm a writer of the hardware hacking book of which it, as an example here, took me about two years to write. In it, I gather a number of hacks that I did and some other stuff I thought was cool and put it together. In this talk, we're going to cover a number of items. We're going to talk about some basic electrical engineering concepts. We're going to talk about some basic components, electronic components you'll see and what they do. We'll talk about cracking the case, how to open up electronics without really destroying it. Many times you want the piece of equipment to be cosmetically clean when you're done either for your own purposes or for purposes of not having it seen as being opened up. We'll talk a little bit about building circuits, how to read a schematic diagram, how to breadboard, which is a way to quickly prototype circuits without picking up a soldering iron. And then we'll talk a little bit about soldering irons, how to solder stuff together, how to connect to different integrated circuits. We'll talk a little bit about where to get parts, some places online and some places offline. And then we'll walk through a couple of projects, stuff that I've worked on. I'll describe some of the parts and some of the motivations behind it. Both some small-scale stuff. I've got a toaster I hacked up. I hacked up a self-cooling beer mug and an electronic flashlight where I've taken an incandescent flashlight and did a quick hack and changed it to use LEDs. And finally, I'll walk through a semi-famous hack by a group called the Chaos Computer Club over in Germany called Blinkenlites where they took an eight-story building and turned it into a giant display. So I'll talk about a few of the technical details behind that. Okay. There's sort of two basic classes of components that you can use when you build circuits. It's called passive and active. Passive parts are just that they don't do anything active to a signal or do anything active to electricity. And there's sort of four that I'll call out right now that we can talk about. Resistors, capacitors, inductors and transformers, which are actually a type of inductor. And then there's active parts. And that's sort of the pretty much everything else in which it's transistors, diodes and integrated circuits which are basically just a bunch of transistors. Okay. Resistors. What does a resistor do? It limits or resists the flow of electricity. A lot of times people like to think about the water pipe analogy when you think about electronics. Well, if you think about a pipe as a piece of wire with water flowing through it, a resistor would be a difference in diameter of that pipe that would either resist or allow more water to flow through it. Resistor values are measured in ohms. The equation that governs the flow of electricity through a resistor is V equals IR, where V is the voltage, I is the current, and resistance is measured is R. An example of how a resistor is used, a simple example, is that you can use it to limit current through a light emitting diode or LED. LEDs are, you can't just hook them to a battery and let them light up. You need to resist or limit the flow of current through them. If you don't limit this flow, the LED will typically blow up. So that's what you use a resistor for. What you do is you typically hook it in series. I'll cover this in another slide. Resistors themselves come in lots of different packages. These are through-hole components. These are probably maybe five, six millimeters long. They've got little metal leads coming out. This other one over here is a surface mount part. It's a little tiny chip, and they're getting smaller every day. Joe in an earlier talk mentioned that resistors are getting so small that you can actually inhale them and not know. They're actually getting that small. The schematic symbol for a resistor here is a line with a bunch of squiggly things. We'll get into schematics in a little bit, but next to every component in the schematic diagram is typically what's called a reference designator. That's that letter R, standing for resistor, and a number telling you which resistor and then a value. Right here it says resistor, which is a default for a schematic capture package I use. Capacitors. Capacitors store energy in the form of an electric field. They act basically like small batteries in a circuit. The value of a capacitor is measured in Faraday. Farads, which is named after Michael Faraday. Voltage current and capacitance follow a slightly different equation. You'll probably have to dig out your calculus books and your old math books to really work with this equation, but basically the current that flows through a resistor is equal to the capacitance, the capacitive value, times the change in voltage with respect to time. So basically what this means is if you put a slowly increasing voltage across a capacitor, you can get current to flow through it. But if you put a constant voltage, just like if you touch a battery to the terminals, current will flow through it for a short amount of time, and then it will charge up like a battery. Capacitors are sometimes polarized, and what this means is that it has a plus side and a minus side, and if you hook it up backwards, it will pop. It will actually explode. So you need to look at the capacitor you're using. Typically they have a little plus marked on one side. Capacitors are often used to filter noisy circuits. Most capacitors are used in power supplies. When you convert power in a battery to use from a laptop or power from the wall current, you usually filter it. So I'll get the point up here. So capacitors come in lots of different packages. This CAN here is a type of capacitor called an electrolytic capacitor. It basically refers to the chemistry used to build it. Electrolytic capacitors are almost always polarized. This capacitor over to the left of it, this little yellow blob, is called a tantalum capacitor. They use a small dot of a metal called tantalum placed onto one of the metal pins inside of it, and it actually stores quite a bit of energy for a small package, and then they encapsulate it. Tantalums are almost always polarized, and if you do run a tantalum capacitor backwards, you get a nice little bang on the board. So if you want to have an exploding circuit, you can put the capacitors in backwards and watch the fireworks. Capacitors also come in little tiny chip scale packages. Let me get the point here again, which is over here. These are called surface mount capacitors. The schematic symbol for capacitor is here. It looks like two lines, like two plates, and that actually represents sort of the structure inside the capacitor. There's no wires that short across the two terminals of a capacitor. They're used to store energy. The C1, C standing for capacitor, won the reference designator, and the value would be replaced with the word cap. Inductors. Inductors store energy in a slightly different manner. They store it in the form of a magnetic field. The value for inductors is measured in Henry's. The equation that governs the current and voltage and inductance of an inductor is given by the equation, the voltage equals the inductance times the change in current with respect to time. What that means is an inductor, if you just took a battery across it and wait some amount of time, it looks like a piece of wire, and you get lots of current to flow through it. But if you were to suddenly, after you've connected this inductor across a battery, if you were to suddenly disconnect it, the inductor, because of the way it's built, would want the current to keep flowing through it, and you can actually get a fairly large spark from one end of the inductor to the battery as it attempts to keep current flowing through it. A lot of the hand shockers and stun guns use inductors extensively in just this way. They switch the voltage up by using this principle. Inductors are often used to filter out what's called radio frequency interference. Lots of 8 to 211 radios and other pieces of radio frequency equipment emit energy that sometimes you don't want your circuit to pick up, so you can use these to filter inputs. Inductors are used extensively in power supplies, typically to convert energy from one voltage to another efficiently. Transformers are a type of inductor. It's an inductor wound in a different way. Let me get that in a moment. Basically what inductors do is they couple energy from one side of it to the other. You can see the diagram here, where you have two terminals going in and two terminals going out. So you can basically send energy across the transformer. And you say, well, why is this interesting? Well, you can use it to isolate signals. There are times when you have circuits where there's an area where there's a very high potential voltage, a very high voltage on one side, and you want to protect the other side of the circuit from that, so you can use a transformer. A lot of times when you get hum, when you connect a PC to, say, a sound card or an external sound device, you'll get a buzz or a hum that can sometimes couple through. They often use audio transformers to isolate that. Transformers are also used in step-up voltage converters, and I won't get into the details of that, but there's lots of resources you can look up for that. Okay, let's talk a little bit about active components. Transistors, sort of a very basic element of integrated circuit. Transistors basically act as a switch, and there's sort of two basic classes, and there's other types of transistors that we won't get into here that are related to these, but there's two basic types. One is called bipolar, and one is called a metal oxide semiconductor transistor. Diodes are another type of active device. They basically act as a one-way gate, and in that class of diodes, a number of physicists years ago found out that if you make a diode a certain way, you can get it to emit light, thus the emergence of the light emitting diode, and then integrated circuits, which are basically lots and lots of transistors on a small piece of silicon. Let's talk about transistors a little bit. As I said, they're electronic switches. Two basic types, bipolar, and this will be a little bit detailed here, but what bipolar transistors are, they're called what's called a current-controlled current source, and what that means is you actually use flowing current to switch it on and off. There's two flavors, if you will, of transistors. There's NPN and PNP, and these refer to how the transistors are made and how they can be used in the circuit. Transistors typically have three terminals, although some exotic types have more. They have what's called the emitter, the base, and the collector. The base is the input switch that controls current from the collector to the emitter. The other type of basic transistor is what's called a MOS transistor, a metal oxide semiconductor. These are voltage-controlled current sources. The reason that MOS transistors are used extensively in integrated circuits is because they take very little energy to turn them on. If you think about when you build a large integrated circuit, you want to minimize the amount of energy used in the circuit. With a bipolar transistor, you actually have to push energy into the base to make the transistor turn on. With an MOS transistor, you simply need to present a voltage. A very little current actually flows into the transistor to turn it on. So you can save a great deal of energy. In fact, all ICs are made using CMOS these days, the most highly integrated circuits. There's two basic flavors as there were for bipolar. There's P-channel and there's N-channel. They have three terminals as well, and they just call them different things. There's the drain, the source, and the gate. The gate is the switch that turns it off, and the drain and the source are where the current flows when you switch it on and off. There are actually diodes I believe were invented first, but they're basically a one-way gate for electricity. There's different flavors of them. Three common types. One is just a standard diode. Another type was called a Schottky diode. Another type was called a Zener diode. Diodes have a plus and minus side indicating which way current will flow through them. Diodes can often be used to protect a circuit. Let's say, for example, you want to keep someone from plugging in a circuit backwards where they apply power. You would actually be able to use a diode to keep current flowing only one direction and thus protect the circuit. Let's see. Diodes have what's called a drop. They actually lose a little bit of energy when you push current through them. Typically, it's 0.6 volts and above depending on the style. And then there's actually a little bit more interesting type of diode, the light emitting diode. When you put energy through it, it lights up. These have a little bit more of a forward voltage drop, but the good news today is they're available in all colors, including white, blue, red. The white is one of the newer types invented. In fact, most PDAs utilize white LEDs to backlight the screen. It's a very efficient light source. They're expensive, but the cost is dropping. A lot of people have been producing light emitting diode flashlights. They're also very popular. There's a lot of work going on in actually replacing incandescent bulbs with LEDs. And once the cost gets below a certain point, light bulbs in your house will run for tens and tens of years with a fraction of the energy expended of an incandescent or even a fluorescent bulb. On LEDs, the way you can tell the plus and minus side is there's typically a flat spot on the minus side, as you can see here in the, let's see, this one here. Okay, when you're taking apart a circuit to try to figure out how it works, or for curiosity or other reasons, you often want to know what the different integrated circuits do. So it's often useful to be able to read the package, the numbers on the package to determine what it is. One of the first things I do is you look for the logo of the manufacturer. They have a logo that's typically the first letter of their company. I'll show you a couple of examples in a moment. And you can look for that on the package. And that will sort of give you a starting point of where to look together more information. And then there'll be a string of numbers. Typically, the first part of the numbers, let's see here, indicate the actual part number. And the rest of the numbers are typically production dates, when it was built, maybe what batch it came from. And you can use this information to then go from the manufacturer's website. Once you've identified the logo, you can then go and look the part number up. And here's an example from, let's see the pointer up here. This is actually a Toshiba part number for a logic of buffer. And so Toshiba often uses the letters T-C in their part number. So you can see the T-C here, and that can give you a pointer. And then they have the part number here. And they often give the package type, and this is actually an order in your number. Here's just a few examples of some of the labels you'll see on the IC stamped on it. And again, there's hundreds of companies out there, even more now that Taiwan and China are actually opening up foundries. So there's lots and lots of different logos. But after a while, you'll get a feel for what the letter logos mean, which company they're referring to, and you'll be able to look it up yourself. Okay, cracking the case. Very often when you buy a piece of electronics that you want to hack, and you have an old piece of equipment that you'd like to repurpose by hacking, you want to open up the enclosure without destroying it. Okay, well, how do you do this? Well, first is to have the right tools. I like to have lots and lots of small screwdrivers. Very often these PDAs and laptops use tiny, tiny screwdrivers, both Phillips and Flathead. The other thing that's important is to know how most enclosures are fastened together. They're typically fastened together with screws, very small screws. Plastic snaps molded into the sides of the case are often very popular. Glue is used, and some cases, double-sided tape is often used. Okay, well, hacking the cases is sort of like surgery. You wouldn't want, well, for example, you wouldn't want your doctor to use a battle axe to perform an appendectomy. Get good tools. I prefer hardened steel tools. One of the most frustrating things is to use an inexpensive tool you bought for a dollar or two to have it only strip the heads of the screws, in your screwdriver. So I recommend that you get some really good tools. A lot of the different cases, the electronics cases are held together with some sort of obscure type of screwdriver or screw. And Joe mentioned this before. There's lots of different ones that are used out there. They call them security screws. And basically what they are is they're sort of security through obscurity. Most of these security screwdrivers are available through most internet stores. But the common ones you'll find out there that are a little obscure are Torx drivers, which are headed screws. And they're not so much a security reason, but they actually provide a way to provide more torque onto the screws. So you can crank it harder without stripping the screw head itself. Hex drivers are also popular with lots of equipment. They have a hexagonal shaped head. And again, the reason is because you can apply, you can crank down the screws harder without stripping it. I like to have a good pair of steel tweezers. And they're good for lots of different stuff. You can pop a screw into a case. You can use it to fish the screw out of the bottom of the case. The flat end can also be used as a very good pry bar if you need to pop the case open. I carry a set of dental picks with me from time to time. These are very often useful for opening up the seams on the side of a case when you crack it. I carry some razor blades as well. I prefer the exacto style. These are often very useful again for if you need to cut a small piece of plastic open, pick open a small cover that's placed over screws very often. Collecting good tools can be an obsession. By having the better tools, you can often show off that perhaps you're a little bit better than someone else. You know what you're doing. I love the latest German hardened steel stuff. It's also very good to have. So common fasteners, screws, plastic snaps, glue, double-sided tape. The Palm 5 was actually completely held together. The case was held together with double-sided tape. And the way you would open it up is either you stick it in the oven for 20 minutes and then the glue would soften and peel away. That's how you put it back together again. A lot of people who upgraded memory or tried to replace their batteries, spent days cracking the case, pulling on it would bend the metal. Now, just stick it in the oven for 20 minutes. The screws are often placed in obscure places. Not so much for security reasons, but to make the product cosmetically attractive. They're often placed on the bottom of a product, under labels, under the little feet of the product. Those little round circles you see that look like they're the same color as the plastic of the case, but maybe a little bit different texture. You'll often find a screw behind those. So good ways to open up a case. I'm going to switch over to a video here. I can show you some of the techniques I use. Clear a nice big tabletop. The screws on the small electronics are actually very easy to lose. I often place sheets of white paper on the table first, simply because the screws are more easy to lose than a piece of white paper. Obviously, you want to power down whatever you're taking apart. You want to unplug it and remove the batteries lest you get a shocking surprise. The first step I take is you carefully remove all the screws you can find. Make sure you look under all the labels and feet. One of the techniques I found if you intend to put it back together again is to take a piece of paper and sketch out a crude outline of the product and tape the screws to the relative location from which you put them and that way you know where they're going to go when you put it back. Excuse me for just a moment, I'll bring up a web camera and show you what I mean here. The picture is often worth a thousand words. Let's see if I can show you this. No, but there was no stand for it. So I had some black tape and I black taped it to the microphone stand, creating a hacked up camera stand for just this purpose. So this is actually from a digital camera I took apart a little while ago. I drew just a crude outline of the camera itself and I started... Sorry? It's not showing up? Uh-oh. Uh-oh. Yeah, okay. Oh well, I tried. Let's get back to this then. Well, you can come up afterwards and I'll show what I mean, but basically I took a sheet of white paper, I drew an outline of the product and I started taping the screws as I took them out one by one and these things can have 10, 20, 30 screws and if you get even halfway through it you forget where things go. One of the things is once you pull all the screws out the case still may be stuck together. So what I do is you look for the seams and the key phrase is you gently pull at them. If you force it you're likely to break something. I use tweezers or a pick to open up the seams sometimes. Once you pull all the screws out that you've found there's probably one or two you didn't. The way I generally approach the problem is you pull at the two halves of the product and feel for resistance. If you see it coming from one corner you know there's either a screw there or a snap of some sort. And then you can go in with more detail with either a pair of tweezers or your dental picks and push and pull until it's released. Once you've released the electronics from inside the assembly it's careful that you don't damage the safety. Now there's a number of ways you can prevent this as one is you can use what's called static wrist strap which is basically a elasticized band that sits around your wrist with a metal plate that touches your skin somewhere and then it runs a wire to a grounding point. This grounding point is often just a three-prong plug assembly that plugs into the wall. Well if you don't have one of those around and you want to be a little bit dangerous what you can do is you can take a probably three four-foot piece of wire you can strip about eight inches from the end and you can take the other side, strip maybe three four inches and go to the wall plate and just pull the center screw out a little bit. That center screw, if the plug plate was wired to code will be connected to actual neutral ground which is in theory plugged into the ground of the earth. Screw it back in such that the wire at that one end touches the wire and you've got a nice hacked up wrist strap that'll keep you from damaging the circuit with static electricity. Do not, I repeat, do not plug the wire to any one of the three sockets. You might think that neutral plug on the third one is grounded and it typically is but it's safer to use that screw on the case on the outside of the wall plate. Okay, building circuits. Well, there's a couple of skills involved that you need to build circuits. The first one would be if you want to build stuff that other people have designed is how to read a schematic diagram. Another skill that's often useful for quick prototyping is what's called breadboarding. This allows you to quickly assemble circuits without actually soldering. It has some limitations that we'll talk about. And the third is once you want to build a circuit that's semi-permanent or permanent, you need to use solder to connect the different wires and ICs together. We'll touch on different types of irons, bench style portable cordless, there's some great cordless soldering that's out there that are powered off of butane gas. Don't require any plug-ins. We'll talk a little bit about solder and we'll talk about another type of material called a perf board, which is another prototyping tool and we'll talk about some of the tools you can use to work with these items. I hope you can see this up here. This is a simple schematic diagram for a little pick-based project I worked on. Let's walk through a couple items in the schematic diagram. Down here is typically what's called the title block. This has the guy who designed it, his name, the project name, the revision number when it was drawn. Around the outside you'll see a set of numbers and letters and what this allows you to do is call out coordinates of an object within the diagram if you want to find it. Along the top I think there are numbers along the side of letters. You can say A3 might be this area right here. If you're communicating with someone else on a problem or change the circuit they don't have a piece of paper in front of them. You can use these coordinates to tell them where to look. Let's look at a couple things in the schematic diagram. Every part will have what's called a part reference. Here on this integrated circuit it says, a little hard to read, but U2. The letter U is universally used to refer to any type of integrated circuit. And the number 2 means it's the second integrated circuit that was probably placed when it was drawn. Let's see where's the pointer again. Oops. Okay. Along the sides of the IC will be the pins that actually provide connectivity to the outside world. They have numbers and they have names inside the box that describes the IC. One of the connections that you need to give to almost every IC is power. And you could see here and I apologize for it's a little hard to read but it indicates a voltage connected to this pin. It's a number, usually 3.3, 5, 1.2, 12 and a letter V for volts and a line connecting it to the IC. This is the power supply. Typically every package will also have a ground to allow the current to flow through it and back out again. Now, not every schematic will have ground because some assume that the schematics are communicated within the company, often in electronic form. So they often hide that ground connection. So you won't always find up on every schematic diagram you encounter. Let's see and get the pointer back here. There we go. Sometimes you'll see words or letters attached to wires just floating in space. These are what are called net names. And basically if you see two of the same word on different wires, that means those two wires are connected. It just keeps a schematic diagram from getting cluttered. The lines that connect two points indicate a wire. A dot at a connection indicates that those three wires should be connected. If there's two wires that cross without a dot, it means they should not be connected. So those are some basics on reading a diagram. These are different types of gates. Sometimes in the name of the integrated circuit there'll be a letter A, B, C, D. What this indicates is a part, it's one of the logic elements of our integrated circuit elements within one package. For example, these all will have the same U7, I believe. I'm sorry, U1, but they're labeled U1, A, B, C, and D. Well, these are all in the same electronic package, but they're independently connected. Here's an example of a diode a transistor. These pieces, these blocks over here typically will be connectors and these lie to get signals on and off the board. Okay, building circuits. A quick and dirty way to build circuits is use what's called a breadboard. What breadboard is, is basically it's a piece of plastic with a bunch of holes in it and underneath the holes are little metal trays that connect series of these holes together. What it allows you to do is take dip style or dual inline packets using the integrated circuits that are large packages with big pins. You can plug them in directly and then use just solid core wire to make jumpers between connections. These holes will actually hold the wire within a few minutes. You can breadboard simple circuits. Now it's not particularly useful for high frequency circuits, radios and so forth, but you can build microprocessor based stuff and simple audio circuits as long as they're not too high frequency. The reason is because these wires are hanging out in space and when you get to high frequency circuits, those wires actually look like circuit elements and can alter the way the circuit works. These days a lot of integrated circuits don't come in dip packages anymore, so breadboarding is not so popular anymore. There are a number of companies that make adapters, so you can take that big flat part that has, you know, 150 pins around the edges and you can actually convert it to some sort of package that has lots of pins and you can then use breadboarding. Well, if you want to make something a little bit more permanent, you're going to want to solder the elements together. Well, what do you need? Well, you need a soldering iron, you need solder flux, and then it's not required but it's very helpful to have what's called some sort of solder remover system. Soldering. Well, there's two basic types. There's electric and there's gas or butane irons. Electric irons obviously plug into the wall and butane or gas powered irons are like basically souped up cigarette lighters. So here's a couple examples of these. These are very useful to have when you know you're not going to be near an electrical power outlet or where it's difficult to get the cord. You don't want the cord in the way. Lots of different types of solder. I'll touch on a few types. The most traditional type is a tin-lead mix. The lead gives it the low melting point. The tin gives it some electrical characteristics that are desirable. It obviously has lead so it's not being used as much these days. There's lead-free solder that uses other materials. There's silver-based solder that some people use. When you do solder off and use what's called a tip cleaner, when you solder you'll get solder blobs onto the end of the iron and the iron will actually oxidize a little bit because it's so hot and has all these chemicals on it. So you can either use a sponge. You can take a kitchen sponge cut it in half, put a little bit of water and you can quickly wipe the tip on it. Or you can use a copper sponge which is basically a scrunched up copper and you can dip the tip in that and that will clean the tip. Before you solder two things together you can often you want to make the surfaces clean. What you use that for is flux. It's a slightly acidic material that essentially cleans off any oils on the surface of the two things you want to solder together. Lots of different types. There's the traditional rosin core but there's a newer types of ones called water soluble. Basically you can wash it away with deionized water. You don't want to use regular water to clean circuits because it has impurities and it can actually interfere with the circuit once you've cleaned it. So if you use water soluble, water soluble and no clean are often used in conjunction. What no clean means basically is you can use the flux to clean the circuit when you're the surfaces before you solder them and you don't need to wipe it away when you're done. If you use a rosin core or acid based solder you need to use a flux remover which comes in a spray can. Very often you'll make a mistake in the circuit. You'll solder two things. You didn't mean to solder together and you need to remove that solder. Well there's two basic ways to do that. There's a material called solder wick which is basically a braided piece of copper that acts like a sponge and what they have is what's called a solder sucker. A solder sucker is a spring or electrically powered pump that you cock. You put next to the two items in question that you wish to remove the solder, keep the joint, hit the button and it sucks the solder away. A solder wick can be more precision because you can place it at the exact point you want. You heat it and again it acts like a sponge but solder suckers will often remove more solder and bulk. Well, if you're soldering things together you can't obviously use the proto boards. You need to use something called perf board. What perf board is basically it's a blank circuit board that you can solder to. It's made out of fiberglass typically and it's soldered to different holes that are plated through on both sides. So you can insert your components and then solder to the plated holes and use wires to connect to your different integrated circuits. It holds it in place and makes it a clean and even layout. Tools. Well, you typically want a set of wire strippers if you'll be connecting circuits together. There's lots of different types out there, expensive, inexpensive. You'll need wire of some sort, various gauges, and instead of wire cutters are useful as well. Wire strippers often include the cutters with them but it's nice to have a small pair that's a little bit more precision to clip away leads. You notice the resistors had two metal wires coming out the sides. Well, once you solder them to a circuit board those wires are hanging out in space. You want to clip those away. And I like a set of needle nose pliers again to bend things around, to move them around once they've been soldered down. Okay, where to go to get parts? I have a couple favorite places online that I go to. I place a company called Digikey. There's the website. They have tens of thousands of different components most available for shipment within 24 hours. Another company I like to use is Mouser. They also have a large stock of products. A smaller company called Jameco. They have a large stock of electronic components. A little bit more on the surplus side is a company called American Science and Surplus. They often sell, not just components, but they'll sell the circuit board from an old toy that didn't make it or old video camera components. So they're kind of fun to pick up pieces that you can use to hack yourself. And then there's a company called Halted. They have a website called HSA. They also have a real world store in Santa Clara, California. And it's almost like a museum. They've got computer equipment, circuit boards, back to probably the 70s. They buy out surplus equipment from companies that are either going out of business or want to liquidate inventory. In California, in parts, I think out here, they have a big store called Fries. They actually carry electronic components. Although it's shrinking, they still have a pretty good selection of parts. And, of course, Radio Shack. We all know about Radio Shack and the quality of their stuff. But they're everywhere, and they can often be used to do the job. We'll do a couple of project walkthroughs. A little while ago, I hacked up a toaster. A little while ago, several years ago, there was a little buzz about in the UK a design student who put together a weather toaster and basically would toast a picture of a cloud or the sunshine on a piece of bread. And he got a lot of press for it. It was pretty complicated. All kinds of motors and gears. It was a Java-based system, so it would go out and grab weather from some website. I thought this was kind of complicated, and there might be an easier way to do it. So I made sort of design trade-offs and I hacked something together in a weekend. And basically what I did is I opened up a toaster and I clipped the toasting elements inside it. This is an example here of the sort of toasting walls inside your toaster. If you look inside when it's going, you'll see these wires glow red hot. Well, this is an example of how they're wired inside your toaster. So what I did is I cut it such that you would either be able to switch on the top elements or the bottom elements. I used a high-voltage relay so it could switch the wall currents through it and rewired it slightly so that you would either select the top or the bottom to toast onto. And I put a switch and then I also put a computer-controlled relay to control it so you could actually toast in different patterns. And the other part of the trick was I created what's called a toast mask. And what this toast mask would do is it would sit in front of the toasting elements here and prevent the bread from being toasted along the lines of whatever your mask looked like. So you'd have a piece of bread that would be mostly brown with a word hot or cool toasted onto it. And then you basically use wires that you hold on the inside of the toaster. This is in my book, so there's some more details about this, but this was sort of a fun hack I put together. I've also been reading about overclocking and the use of these solid-state coolers. They're called Peltier junctions. And I thought, well, it's a little miniature solid-state refrigerator. What could you do with that? Well, I did a little more searching and I found a website of a German fellow or a Danish fellow who had put together a beer glass that ran with one of these. And he basically sort of mounted it on the bottom and didn't make real good contact with the glass. And I thought there's a better way to do this. So what I did is I had one of these extra cooling systems available. And I knew that metal conducted heat better than glass did. So I mounted the cooler to the bottom of a pewter beer stein. And I created the self-chilling beer mug. And here's how it's connected. So you've got your... Oops. Your beer mug here. Mounted to the bottom of the beer mug is a layer of thermally conductive grease or thermally conductive adhesive. There's a heat pipe, which is basically a block of metal. And then there's what's called the Peltier junction cooler, which is the device that... It's actually a heat pump. It moves heat from one side to the other to cool from one side to the other. So you stack these up. This device is connected to the block, which is glued to the bottom of the mug. And then there's a heat sink to pull the... Basically the bottom of the Peltier junction gets hot and the top gets cool. So you put a heat sink on this because you've got to remove the heat sunlight or else it won't work. And then a fan on the bottom. And the whole thing is powered from a 12-volt cigarette lighter adapter or an old PC power supply. And you come up and look at it afterwards. But here it is. It'll keep your beer very cold. And if you're in your car, it'll keep your beer cool and you're driving along. Or other beverages. So here are some other views of it. You can see the large fan on the bottom. I just used an extra PC fan I had. And you can see that it's completely metal on the inside. And again, this was to allow it to get the maximum cooling capacity for the mug. A little while ago, I had an extra flashlight. And someone asked me if I could convert it to use an LED instead of an incandescent bulb. And I said, sure you can. It's a real quick easy hack. Basically, you replace the bulb. What I did is I took the bulb out of the flashlight. I covered the glass part of the bulb with a towel and took a pair of pliers and crushed the glass. And then used some dental picks and needle nose pliers and I removed all the glass, hollowed it out. And you can see here's the bottom of the light bulb. And then I simply added an ultra bright white LED in series with a resistor. And I wired it into the metal parts of the can here. And you can see the resistors here. I actually did a cluster to get it a little bit brighter. I then mounted the whole system back into the flashlight bulb holder. So I wouldn't have to modify any more of the flashlight itself. And, oops. And voila. You have a flashlight that's been converted. This is actually a 4.5 volt flashlight. For this hack, I actually used a 3-cell flashlight to make it bright. There's been some articles published recently on a couple of websites. To use a 2-cell or 1-cell flashlight, you have to use what's called a DC-DC converter. The reason is because the LEDs need a certain threshold voltage to turn on. And that threshold voltage is about 1.72 volts. So that's why a lot of people use multi-cell flashlights this or a DC-DC converter. But this is just a quick and dirty hack. So again, this is about as bright as the bulb was before. It's not as directional because the flashlight reflector was not designed to use LEDs. It was designed to use an incandescent bulb. But it was quick and dirty hack. And there's obviously more room for me to play with this. Let's see. So what quickly the last project I walked through was the Blinken lights project. And I just thought this was fun and interesting. It sort of captured my imagination. Basically, a group of hackers took an eight-story building and turned it into a giant display. They did it over a couple of weekends. They used about 5,000 meters of CAT 5 cable to wire every single light in the front of the building. There's basically a halogen lamp in front of an individually controlled halogen lamp in front of each window. The whole system was controlled by a Linux PC with a 192-channel parallel IOCard. So here's sort of their basic setup. They had sort of a master computer down here. And they ran cable to every single one of these lights to a little relay. And the relay would switch on or off one of these halogen lamps. So lots and lots of wiring went into this project. And you can see some of the pieces here. They used these wooden trees to hold the lamps in place. They had to use relay amplifier drivers because the CAT 5 wire dropped too much voltage across that length. Here's the PC that ran it. Here's the rat's nest of wires. Here's another example. You can see the lights sitting in front of each of the windows. So I'd like to establish or I'd like to inspire renaissance and hacking. Hardware hacking is actually pretty easy and it's a lot of fun. It's actually really akin to recycling. You take old equipment that maybe doesn't have a use anymore and you give it new life. You can learn a lot what you're doing. And I find the process of deconstruction to be highly educational. But be careful when you do. Make sure stuff's unplugged. High voltages are bad for your heart. So go home and hack something today. Thank you.