// MeltPoint       Design and Emotion, the experience of everyday!



公告

我的分类(专题)

日志更新

最新评论

留言板

链接
 
 

我听过的歌:

www.flickr.com
This is a Flickr badge showing public photos from liquid2006. Make your own badge here.


Blog信息

 





 



Physical computer的读书笔记(part 1) 
liquid 发表于 2006-5-22 22:30:00

Physical computer的读书笔记
Study Notes from "physical computer"
By Liquid 2006-5-17

蓝色为我的注释部分(不是翻译)
看书时理的一些摘要,没时间翻译了.(第一次看,摘的部分比较多)
======================================================================"Interactive" is a fuzzy term, and often misused for all kinds of ridiculous purposes. Author and game programmer Chris Crawford has a great definition for it: interaction is "an iterative process f listening, thinking, and speaking between two or more actors."

"互动"这个感念确实是比较模糊的,经常有人问我什么是互动设计或艺术,我只能举个简单的例子说明,例如你按墙上的按纽,按了之后灯就会亮或者灭。这就是一个典型的互动过程。打游戏,用取款机取款等等都是。上面的解释比较清晰。

Most physical computing projects (and most computer applications in general) can be broken down into these same three stages: listening, thinking, and speaking-or, in computer terms: input, processing, and output.
三个大的方面:听,想,说---------对于电脑来说是:输入,输出,数据处理过程

Input is usually easier than output because it takes less energy to sense activity than to move things. In general, physical output can be more difficult than input because it often requires electrical (as opposed to electronic) and often mechanical skills.
输入相比较输出而言要简单,因为输出需要更多的电子和机械方面的技术,其实我觉得差不多,输入也在很多情况下需要这些的。

Processing
Input and output are the physical parts of physical computing. The third part requires a computer to read the input, make decisions based on the changes it reads, and activate outputs or send messages to other computers. This is where programming comes in.
这个不用说了,会用电脑的都应该懂的,但是input有问题的话,output也会出错的。

Transduction
One of the main principles behind physical computing is transduction, or the conversion of one form of energy into another. A microphone is a classic transducer because it changes sound pressure waves in the air to a changing electrical voltage. Speakers convert the same energy in the opposite direction. Transducers are the eyes, ears, hands, legs, and mouth of any physical computing system. Input transducers (sensors), such as switches and variable resistors, convert heat, light, motion, and sound into electrical energy. Output transducers (actuators), such as motors and buzzers, convert electrical energy into the various forms of energy that the body can sense.
转换:我怎么觉得那么象能量首衡定律呢,呵呵。麦克风,就是一个典型的传感器,传感器就是电脑的鼻子,眼睛,腿,手,等等。
When two states will suffice, we'll call it digital. When a continuous range of multiple states is considered, we'll call it analog. In general, digital input and output (I/O) are easier than analog I/O because computers use a two-state, or binary system, but analog I/O can be more fun and interesting.
数字和模拟,数字相对于模拟要简单,但是模拟的更加有趣。更专业的去google查询
The language you use to describe the project will tip you off to whether your I/O requirements are analog or digital. For example, if you can use the words "whether or not," or the word "either," in describing the input or output, then you're probably talking about a digital input or output. If you can use words like "how much" for input or superlative adjectives like "stronger," "faster," "brighter," then you're probably talking about an analog input or output. For example, a digital output would work to either turn a light on or off; an analog output would be required to determine whether the light is brighter or dimmer.
这段话形容的不错,用语言来描述的话:"是或者否 "就是数字的,只有两个关键字哦,但是如果你要形容为"多大,是强一些,还是快一些,亮一些的话 "那么你可能就是在说模拟的输入和输出了。如果这么说的话,那很多的的作品看来都是使用的模拟的。后面有例子

Parallel and Serial (串联和并联)
We also need to be clear about how we're speaking or listening. For example, a symphony's power comes from the experience of hearing many instruments playing different harmonies all at once; each individual instrument's melody line is important, but the combined effect of all of them presented at once is what we take away from the experience. To describe the order in which events happen, we can talk about them happening either one after another in time or all at once, simultaneously. For our purposes, we'll refer to events that happen one at a time as serial events, and when several events happen simultaneously, we'll refer to them as parallel events. While we're using these terms in a broad sense, to talk about how events are organized in time, we'll also use them to refer to more technical aspects of the work as well. You'll see how electrical energy can flow through components serially (one after another) or in parallel (through several components at the same time), and we'll talk about how computers can exchange bits of information serially or in parallel as well.
另外我们需要注意的是,如何来听和说。所有的部件一起运做在同一时间就是串联
 
Getting Started: Describing What Happens
The first step in a physical computing project is to describe what you want to happen. If you can't first describe what happens in plain language, it will be difficult to write the programs and build the circuits to make it happen. Describe the whole environment of the project from the point of view of the person experiencing what you're making. Describe what she sees, hears, and feels and what she can do to change the environment. Describe the experience as it unfolds, what changes as the person takes various actions, and how her attention and actions are focused by the changes. Describe why this is engaging to the person and how the sequence of events should work to keep her engaged. You'll revise this description several times as you realize the project, so don't worry if some details are missing. On the other hand, don't let the process of implementation distract you from filling in the missing details as you go. Avoid describing the specific technologies involved or the tools used to make things happen. These details will prejudice your thinking and possibly cripple your concept. Frequently, we've had students skip to the technology, coming to ask how to implement some esoteric and difficult-to-use sensor. Our first question is always, "What are you using this to do?" Quite often, once they describe what they want to happen without describing the technology, a simpler solution can be found.
第一步就是要先描述出来你想要达到一个什么效果,其实做其它的东西也一样,做一个三D的人物出来,首先要把它画出来,编写一个程序,也最好用语言把它描述出来。如果你不事先描述出来的话,对后面的工作是非常困难的。描述一下整个作品是处在什么样的一个环境当中的,然后在描述一下参观者和作品之间会产生一个什么样的互动状态,比如他/她听到了什么,看到了什么,怎么看的,又会带给他什么样的感觉。他做能够怎样改变这个环境等。
然后在描述什么样的连续的事件会让你的观众产生持续的互动作用。最好还是画出来对于这个部分,能够做一些动画来展示是最好的,比如人走过的地方,灯会亮,有音乐之类的。这个过程要反复很多次才可以。而且重要是不要上来就想技术方面的东西,很容易限制住的。
For example, say you want to announce guests at a party in a big way. When a person walks into the room, a theatrical curtain opens, a bright spotlight hits the person, and loud applause is heard. This description tells you nothing about the technologies that makeit work, but it gives you enough description to start to plan how to make it a reality. You know you need a curtain, a spotlight, and applause, and you know you need to be able to sense when a person enters the room. After you've described the project and iterated your concept a few times in plain language, without thinking about the technology, you should break the project down into the stages of input, output, and processing. For example, the input in the example above would be the person walking into the room, the output would be the spotlight and the applause, and the
processing would be turning on the light and playing the applause if a person walks in. Next, identify your input and output as digital or analog and begin your search for the perfect transducers. Again, in the example above, if you wanted the volume of the applause Introduction
to depend on howfar the person walked into the room, you would need an analog input and output. If you wanted the applause to either be on or off, depending on whether or not the person was in the room, you would need digital input and output. It will help you to focus in on the most relevant parts of this book if you can break your project description into parts that fit into the categories shown in Figure I.2. Use this or a similar worksheet to fill in the input/output needs of your project.
In addition, you should describe the sequence of events. Does the light happen before theapplause? Or do they happen at the same time? In the former case, they'd be serial events, and in the latter, they'd be parallel events.
这个例子举的十分的清楚,我觉得用mindmapping来表示最合适了

Level of Abstraction (and Distraction)
With any technical practice, you inevitably have to make strategic decisions about the level of abstraction between you and your tools. Higher-level tools place you at a higher level of abstraction from the details of the technology (This way of thinking of high levels and low levels may seem counterintuitive if you're used to thinking of "higher level" meaning more advanced technologically. Instead, think of "lower level" meaning a lower level of padding between you and the metal of the computer. We think a little padding goes a long way.)

With high-level tools, you can quickly
try a new idea, and if it doesn't work, you can move on before you get too invested technically and emotionally. In technology, tools change rapidly enough that a high-level approach works in your favor: tomorrow's high-level tool will have the power of today's low-level tool.
这个,呵呵,还是那个问题,好作品不一定非要使用higher-tool,但是higer-tool能够让你尝试新的想法,而且新的技术更新的非常的快。
Circuits
You will have to build a little circuitry as the glue between the transducers you use to sense and control the world and the computers you use to interpret what's going on.
电路,必须要有这个,不用说了
Microcontrollers
The main computer we'll use in physical computing is the microcontroller. This is a very small, very simple computer that's good at three things: receiving information from sensors, controlling basic motors and other devices that create physical change, and sending information to computers and other devices. They act as gateways between the physical world and the computing world. Microcontrollers are found in everything from washing machines to light switches. You benefit from this ubiquity, as it has brought down the cost and improved the ease of use of microcontrollers.
微控制器,哪都有这东西,洗衣机,灯,象个桥梁,其实和internet的gateway一

Programming
In fact, physical computing is an excellent environment to learn computer programming. Abstract programming concepts like bits and bytes are embodied by tangible things like switches. In addition, the programs for microcontrollers tend to be very small and simple. There are only a few things you might want to do on a microcontroller: read sensors, turn things on or off, and send messages to other computers. Often it only takes a few lines of code, and much of that code can be borrowed from others and modified to suit your purposes.
Director/Lingo, Max/MSP, Processing, or Java
程序,读传感器,关/开,送消息到其它的电脑,不需要很多的编写,常见的语言有,Lingo,max/msp/ processing,java,pd,不知道python可不可以。
The technical skills you develop along the way will inform and change the concept. After you develop some fluency with the tools, ideas often come concurrently with the making of the project, not necessarily before. But if this is your first experience with these technologies, it's easy to lose your way.
There are two big traps along the journey into physical computing. The first and more pleasant of the two traps is technological seduction.

There are four things that can keep you focused as you implement your ideas. First, keep a journal of the journey. Write down your ideas as you go, as well as the questions you have, the problems you encounter, and the solutions you come up with.

Second, work fast and at a high level. Third, don't become paralyzed by planning. Unless you're psychic, it's better to just try something and see how it works out. Fourth, collaborate with other people. Explaining yourself, particularly to people who do not think like you, will keep you honest. Finally, take frequent showers and work on many parts of the projects at once. A lot of solutions will appear in your peripheral vision, so taking frequent breaks or switching tasks will help.

最好从high level开始,也就是别去用什么特复杂的东西,或者语言,比如汇编,当然你要是大牛的话就没问题

Transduction: Electrical Basics
Transduction, the conversion of one form of energy into another, is an important part of physical computing. All electrical and electronic devices exploit the fact that electrons have a tendency to go from a point of greater electrical energy to a point of lesser electrical energy.
Electrical energy always follows the path of least resistance to ground. The better the conductor, the easier it is for the electrons to flow. The point of lowest electrical energy is the earth itself, which is where we get the term "ground." If you build up enough electrical energy, electrons will flow through any conductor, even air. Lightning is just electrical energy that's built up in the clouds flowing through air to the ground.
A circuit is a closed loop containing a source of electrical energy (a battery) and a load (a light bulb). Every component you put into your circuit has certain electrical characteristics. The battery can provide a certain amount of electrical energy, and the light bulb can resist a certain amount of electrical energy. If you don't provide enough energy, the wire inside the light bulb won't heat up and provide light. If you provide too much electrical energy, the wire inside the light bulb will melt, breaking the circuit.
In order to prevent this, you need to know how much energy the light bulb needs to light up, how much energy it can take before it breaks, and how much the battery can provide.

There are three basic electrical characteristics that come into play in every circuit. The relative level of electrical energy between any two points in the circuit (for example, between power and ground) is called the voltage. Voltage is measured in volts. The amount of electrical energy passing through any point in the circuit is the current.Current is measured in amperes, or amps for short. The amount that any component in the circuit resists the flow of current is called the resistance of the component. Resistance is measured in ohms. Voltage, current, and resistance are all related, and they all affect each other in a circuit (see sidebar).
As previously mentioned, a circuit is a closed loop, so all the energy that comes in from the battery has to get used up somehow by the resistance of your load. If your circuit does not use enough energy, it will just go right back into the battery, heating it up, and eventually blowing it up. Any time you find a component in your circuit heating up, you know it's getting electrical energy. Most electrical components can handle a certain amount of abuse, taking a little more voltage or current than they're rated for. However, if a component feels drastically hotter than usual or it starts to smell like it is burning, it's getting too much electrical energy and you have a problem. Initially, you will be working with small DC voltages, so you don't have to worry too much about things heating up. But even when you use AC voltage, there will be fuses to protect against burning down the house.

The combination of current and voltage is called electrical power, or wattage. It's measured in watts. The relationship is straightforward: watts = volts × amps (likewise, amps = watts/volts or volts =watts/amps). For example, a 120-watt light bulb would need 1 amp at 120 volts.

There are two ways in which electrical power is usually supplied: direct current and alternating current. A direct current (DC) source supplies current on one wire and ground on another, and the voltage between them is constant with the supply wire always at a higher voltage. An alternating current (AC) source alternates the voltage on the two wires. It's easier to supply electrical energy over very long wires using AC, which is why commercial electrical power is AC. The power coming out of your electrical socket is typically 120 volts AC in the United States and 220 volts AC in Europe and Asia. A 9-volt battery is an ideal source of power for many physical computing projects. We don't recommend using batteries while you're debugging your systems, however, because having them run out is just one more thing for you to worry about.

Electricity always favors the path of least resistance to ground.
This means that anytime electricity has two possible paths to take, it'll take the one that offers less resistance. In other words, if you connect power and ground with a wire (which offers very little resistance), electricity will follow that path instead of through the rest of your circuit; thus it will create the dreaded short circuit.All the electrical energy in a circuit must be used.This means that the components in your circuit have to consume all of the energy that you put into the circuit. Any extra energy will get converted to heat by your components. If there's too much energy, the components will overheat and stop working. This is a slightly less dangerous version of the dreaded short circuit. It won't kill you, but it will kill your components.
What you need to buy
Solderless Breadboard

The breadboard will be the foundation of all your circuits. These are also called experimenter's boards or prototyping boards. A breadboard is a tool for holding the components of your circuit and connecting them together. It's got holes that are a good size for hookup wires and the pins of most components, so you can push wires and components in and pull them out without much trouble. When you need to change something, you just pull the wire out.We recommend the more standard 6" models that will give you room to grow. Breadboards typically have long lines of holes on the sides that are used to provide power and ground to your circuit. Breadboards with two long lines on each side are a great convenience because you can have both power and ground on both sides. These lines are sometimes referred to as bus rows.

Microcontrollers
Microcontrollers will be at the heart of most of your projects and at the center of the work in this book. Microcontrollers are available at many different levels. We recommend that you start with mid-level microcontroller modules, such as the Basic Stamp, BX-24, or Basic Atom Pro24.

Microcontroller Features(in Order of Priority)
There are several features to consider when picking which microcontroller you plan to use. We're recommending several microcontrollers, but you'll have to make your own choices. These notes will help you to decide, based on your own personality and capabilities.

Programming Environment
If your time and sanity are worth anything, then a simple and easy programming environment should be your first priority. What programming language (or languages) is used to program the microcontroller? All
of the ones we recommend can be programmed in a variant of the BASIC programming language. However, the BasicX BASIC (for the BX-24) is both more complex and at times more powerful than the other BASICs used here. In addition, the PIC microcontroller can also be programmed in C, a lower-level and more complex and powerful language. Everything we are doing can be done in all the versions of BASIC used below. However, if you're already comfortable in C, you could consider the PIC and C, or if you're comfortable with Microsoft Visual Basic, you will find the BasicX BASIC very familiar. Do you need extra hardware to program the microcontroller? The PIC is the only microcontroller recommended here that needs a hardware programmer. Can you change the program while the chip is in your circuit? This is possible for all of our microcontrollers, but is a little more difficult with the PIC.

Analog Input
Does your microcontroller have analog-to-digital converters for reading analog voltages in? How many does it have? The Basic Stamp 2 is the only microcontroller we're Microcontrollers
recommending that has no analog inputs, but you can fake it as long as all your sensors are variable resistors. The Basic Atom Pro24 has only four analog inputs. The BX-24 and the PIC 18F452 have eight analog inputs each.

Digital Input and Output
How many digital input and output pins does your microcontroller have? All of the microcontrollers we're recommending have sixteen digital I/O pins, except for the PIC 18F452, which has 33.

Analog Output
Can your microcontroller provide dedicated pulse width modulation (which will be explained in Chapter 6, "The Big Four: Schematics, Programs, and Transducers"), so that it can provide continuous analog output without interrupting the rest of your program? The PIC 18F452 is the only microcontroller we're recommending that can truly do this, though the BX-24 and the Basic Atom Pro24 can come very close.

Speed of Execution
How many instructions per second can your microcontroller execute? Is the program interpreted, as on the Basic Stamp 2, or compiled before running, as on all of the other microcontrollers we're recommending? For our purposes, it's less important to know the actual number of instructions per second than to know that the PIC is the fastest of the four recommended, the Basic Atom Pro24 is second, the BX-24 is third, and the Basic Stamp 2 is the slowest. All of them will operate fast enough to do the tasks explained in this book, faster than human perception. Another speed factor to consider is the maximum baud rate the chip can use for serial communication. If you need to communicate with a device that has a particular baud rate (for example, MIDI devices communicate at 31,250 bits per second), then you need to make sure your microprocessor can operate at that speed.

Price
Of the microprocessors recommended, the PIC 18F452 is the cheapest (about one quarter the price of the others), but its development environment is the most expensive (the others are all free). This means that you need to use a number of PICs for a number of projects before you've paid off thecost of the development environment relative to the others. On the other hand, once you've done a few dozen projects, you save money using PICs.

Power
How much power does your microcontroller consume? Can it run on batteries? For how long? Of the microcontrollers we're recommending, the PIC is the most power-efficient, but the difference is negligible when you add in external devices like motors and sound devices.

High-Level Microcontroller Modules
Examples: Making Things' Teleo system, Infusion Systems' I- Cubed, Electrovoce's MIDITools, Ezio
You can buy boxes that can do the most popular physical computing tasks, such as digital and analog I/O and serial communication, but hide most of the wiring and electrical components from you. They have simple connectors for everything from power and serial ports to switches, potentiometers, and motors. They are much more expensive than lower-level solutions, but they will save you a lot of time if you know that your needs are clear and simple. We don't usually recommend beginning at this level

Mid-Level Microcontroller Modules
Examples: Parallax's Basic Stamp 2, NetMedia's BX-24, Basic Micro's Basic Atom Pro 24.The Basic Stamp, and later the Basic Stamp 2 (BS-2), made by Parallax, was one of the first to fill the need for cheap mid-level microcontrollers. Other brands have since come along with improved features and more speed or memory. Because the Basic Stamp 2 is so popular, many of the later competitors have copied the BS-2's physical pin layout in order to make their products compatible. Circuits designed for the Basic Stamp 2 will generally work with the competitors' modules as well. We will refer to all of these as "stamp-like" modules. The modules themselves are more expensive than lower-level processors
because they contain all the extra wiring necessary to turn on the microcontroller. Often these modules run slower than the lower-level processors because the programming languages for them sacrifice efficiency for ease of use. The software environments for programming mid-level modules are simple and can usually be downloaded for free. You can program and reprogram the chips in a friendly language like BASIC, and you get feedback very quickly.

The companies who make mid-level modules will sell you a development environment that usually consists of the manual and the programming software on a CD. They're nice if you have the money and are in a hurry, but they mostly just save you from doing a little wiring that you're better off learning to do for yourself. With the carrier board and the manual, an average mid-level module will cost around $100. If you buy the module alone, it's usually $50 or less. We recommend the latter option.

Low-Level Solutions
Examples: PIC chips, SX chips, Atmel (AVR) chips
At the heart of the high-level and mid-level modules are the microprocessors themselves. It is possible to work with them directly and assemble all of the circuitry on the module yourself. The tradeoff is that once you've mastered the skills and bought the tools, the processors themselves are much cheaper (as low as $1 per chip) than the high- and mid-level modules. There are compilers that will convert programs written in friendly languages like BASIC
(or C, which is more friendly to experienced programmers) into instructions the chip can understand, but you won't find all the tools in one piece of software. You'll have to cobble together a few different software packages in order to write your programs and download them to the processor. While there are free programming tools available, the more useful ones are not free. The one we recommend is about $250; they range in price from $100 to more than $1000.

Common Components

The following are a handful of common components and their schematic symbols. This covers the components you will use in most circuits. Switches pass or interrupt the flow of electricity. A simple switch, like those shown in
Figure 2.1, has two interchangeable leads. The leads are attached to two contacts inside the switch that can put them in contact with each other or be separated by the action of the switch. Many switches are simple mechanical devices that move the contacts, but there are some interesting variants. Magnetic switches, for example, usually have two very thin metal leaves inside, and when a magnet is brought near the body of the switch, the leaves touch and conduct current. Ball switches or tilt switches have a metal ball that is brought into contact with the two leads by tilting the switch. Switches are rated by the maximum voltage and current that they can conduct. A switch can generally be used to control any voltage or current less than the maximum, so a switch rated for 120 volts, for example, will work fine in a 5-volt circuit. If you're using a switch as an input to a microcontroller, you'll be passing a very small amount of current through it, so you should feel free to make your own switches from any mechanical devices that cause metal things to either touch or not. There are a large variety of switches available, and it's useful to have a few in your toolbox
at all times for various purposes. There are a few characteristics of switches to know about: Switches are either normally open (N.O.) or normally closed (N.C.). A normally open switch will conduct only when you activate it, and a normally closed switch will conduct only when not activated. Switches can be momentary or toggle switches. Momentary switches (or pushbuttons) spring back to their normal position after you release them. Toggle switches stay in the last position to which they were set. Remote control buttons and keyboard keys are momentary switches, whereas household light switches are toggle switches.

Resistors give electricity something to do: they convert electrical energy to heat. Thus, they prevent the dreaded short circuit. Resistors have two leads with no polarity (no positive and negative side) so the leads are interchangeable

Resistors are rated in
ohms, indicating how much resistance they offer in a circuit, and in watts, indicating the
maximum power that they can take. The value of a resistor will be written right next to its
schematic symbol. The value of an actual resistor can be identified by
1.  The package
2.  Decoding the stripes from a chart (see Appendix C)
3.  Checking it using a multimeter set to measure resistance.

For most of the circuits you'll be building, you'll put very little power through the resistors, so a low power rating (1/4 watt or 1/8 watt, for example) will be fine. You'll need a variety of different values of resistors. One-quarter watt or 1/8 watt resistors will work for most electronic applications. Resistance values of 220 ohms, 1000 ohms (1K ohm), 10K ohms, and 22K ohms are the ones you'll need the most for the applications in this book.

Variable Resistors
Variable resistors resist the flow of electricity to varying degrees. Photocellsor photoresistors change their resistance in response to changing light levels. Force-sensitive resistors respond to a changing force exerted on them. Flex sensors change their resistance when they are bent to varying angles. All of these are variable resistors. Like fixed resistors, all of these will have two non-polarized (interchangeable) leads. The most common of all variable resistors is called a potentiometer, or pot for short. This is what is behind every volume knob.

Variable resistors are great fun to use in physical computing projects, so buy any that you find interesting. Definitely buy the most common variable resistor, a potentiometer. A 1/2-watt potentiometer that ranges from 0-10K ohms will be sufficient. Try to get a "linear taper," which gives you an even distribution of resistance instead of an "audio taper," which has a logarithmic curve to its distribution of resistance and is used specifically for sound volume. Photocells (light-sensitive resistors) and thermistors are easy to find and find unique applications for.

Capacitors
A capacitor is a bit like a savings account. When times are good and electricity is flowing into a capacitor, it stores up the charge. When the current is removed, the capacitor releases its charge until it's got no charge left. Just like a bank, there is a delay between the time the charge is put into a capacitor and when it's released. Unlike a bank, you can use this to your advantage. For example, capacitors can serve to smooth out erratic electrical flow, releasing charge when the current dips, and store excess charge when the current spikes. Capacitors are rated by how much charge they store, which is called their capacitance. Capacitance is measured in farads (F). A farad is really a lot of charge, so most of the capacitors you'll use will be measured in microfarads (mF or μF), picofarads (pF), or nanofarads (nF). Capacitors all have two leads. Some capacitors are unpolarized, meaning that it doesn't matter which side you connect to where. Figure 2.4 shows a variety of capacitors, both polarized and unpolarized. If you are using a polarized capacitor, a + or - sign should be printed on the outside of the capacitor itself. The + side of the capacitor goes toward the higher voltage in your circuit, and the - side goes toward lower voltage.

Capacitors come in lots of different shapes and are made of different materials (for example, ceramic, tantalum, or electrolytic), but they all do pretty much the same thing. Tantalum and electrolytic capacitors are higher quality and last longer. Pay attention to your schematic diagrams; if a polarized capacitor is called for, make sure to use one. The most common values you'll need for this book are 22pF, 0.01μF, and 0.1 μF ceramic or electrolytic capacitors, and 1μF and 10μF electrolytic capacitors.

Diode
A diode is like a one-way street: it only allows electricity to flow in one direction and not the other. This means that by definition diodes are polarized, meaning that they can only be placed in a circuit in one direction. Figure 2.5 shows two different types of diodes. the burly-looking ones on the right can carry more current. The two sides are called the cathode (-) and the anode (+). You may have to consult the packaging or look for + or signs on the outside of the diode itself to tell one lead from another. Diodes have a band on one end that indicates the cathode and the forward current direction. Current will pass when it's flowing toward the band from the other end of the diode and will block current in the other direction. You'll use two types of diodes in this book: general-purpose diodes, such as the 1N4002, shown in Figure 2.5, and light-emitting diodes. An LED (Light-Emitting Diode) is a diode that also emits light in the process. Figure 2.6 shows a number of LEDs in different colors. The shorter leg is the cathode (-), and the longer leg is the anode (+).

LED
LEDs are the most common form of output from most microcontrollers because they take very little power to turn on. The first program you will write on a microcontroller will light an LED. The cheapest LEDs are not very bright, but it's possible to get LEDs bright enough to read by. They're used in outdoor video displays, stoplights, and many other places because they can offer a lot of light for relatively little power. There are also infrared LEDs that are invisible to human eyes, but work very well for wireless signaling. These are the main component in most remote controls. Though it's tempting to get super bright LEDs for every application, the cost can add up. It's best to keep a handful of the cheapest LED's in your toolbox to use whenever you need an indicator light. LEDs rated at or below 5 volts and 20 milliamps or with a forward voltage rating between 2.5 and 5 volts will work for most microcontroller applications. Avoid the flashing LEDs.

Transistors and Relays
Transistors and relays are switching devices. Normal switches can be thrown by your finger, but these can be thrown by an electronic signal from your microcontroller. Think of them as small switches that activate larger switches. When you put a small amount of current through the small switch (the base in a transistor, or the coil in a relay), it activates the large switch, letting a large amount of current flow through it. Transistors are actually capable of more than that, but you'll start by using them as electronic switches. We'll explain them in more depth in later chapters.

There are two types of transistors you'll use in the examples in this book. The first type you will use is the very common 2N2222 transistor. In the advanced section, you will use a TIP120 Darlington transistor, which you'll use for switching devices that use a Wires large amount of current. The best relay to start with is a 5-volt reed relay. It can be switched with 5 volts at 20 milliamps (coil power), which is just right for the output of a typical microcontroller, and can then turn on a 120 volt, 0.5 amp load such as a 60-watt light bulb

Wires
The wire used to connect components comes in a wide range of sizes and types, but there are a few rules of thumb you need to remember. Thicker wire can carry more current. The American Wire Gauge (AWG) rating is the system we use. In that system, the bigger the number, the thinner the wire. The number indicates fractions of an inch, for example, 22-guage wire is 1/22 of an inch in diameter. Most household wiring is 12- or 14-gauge, for example, but since you won't need to carry that much current, you'll typically use 22-gauge wire. Wire comes in two varieties, solid core and stranded. Solid hook-up wire gets unwieldy when you need to run multiple wires over longer distances. Stranded wire has many fine strands of wire inside the insulator and is more flexible and better for longer runs.

Power supply
All of the circuits in this book will use DC power (like a battery) as opposed to AC power (like a wall socket). You could use a 9-volt battery for all of your projects, but exhausting it while you're building the project will just add to the list of things that could go wrong. You are better off with an AC/DC converter. The projects in this book will mostly need +5 DC volt power.
However, you should use a power supply that's between 8 and 15 DC volts because most of the microcontrollers have a built in voltage regulator, which can convert that higher voltage into 5 volts. When considering the amperage of your supply, the more amperage the better. You will need about 300 milliamps for most projects, but when you start adding motors and other actuators that create heat or motion, you'll need more amperage. It's best to get a power supply that can supply one amp (1000 milliamps).

Power Connector
Voltage Regulator
\Voltage regulators are components that convert a varying range of voltages to a fixed voltage. You'll use them to convert the 8 to 15 volts coming from our AC/DC power converter to the 5 volts you'll need for your projects. Most stamp-like modules have a voltage regulator built in, but they tend to be cheap. We usually recommend adding an external voltage regulator in case you destroy the one on the chip.
RC Servomotor
RC servomotors (servo, for short) are easy to control from a microcontroller and offer a wide range of possibilities for controlled movement. Radio Shack does not sell servomotors, but most hobby shops do, and our online suppliers do as well. The bigger ones might be too much for your power supply, but if you buy the cheapest one they sell, you'll be fine. The Hobbico cs-61 is a common small servo that's readily available and relatively inexpensive. It's functionally identical to the Hitec HS-300 model shown in Figure 2.12

Serial Connector
Serial connectors like the one in Figure 2.13 are the connectors that allow you to connect your serial cable to your breadboard. The ones needed for the projects in this book are DB9 female connectors with solder terminals (also called solder lugs) on the back. You'll need a serial connector for downloading your programs to the microcontroller and for communication between the microcontroller and the multimedia computer, so it's good to have two connectors for the sake of convenience.

Serial Cable
Serial cables are used to communicate between multimedia computers and microcontrollers. They're used both to download new programs into the microcontroller and to send messages between the microcontroller's program and the multimedia computer's program. Look for a DB9 male to DB9 female cable like the one shown in Figure 2.14. Don't get a null modem serial cable, as those have two important wires crossed inside the cable. Although you could use one cable and switch it between the programming and communication, it is worthwhile to buy two dedicated cables.

Clock Crystals
These are the timekeepers for low-level processors. You'll only need clock crystals if you are planning to use a low-level processor instead of a mid-level module. If you're using a BX-24, Basic Stamp, or Basic Atom 24, then you can skip this component. They come at a variety of speeds, but 4 MHz is the best place to start for the processors we'll reference.

Headers
Headers are small metal posts to which you can solder the wires of various components in order to make a good, stiff connection to the breadboard. Figure 2.15 shows a typical row of headers. They come in rows attached together on 0.1-inch spacings, and are easy to break apart for individual use. You'll use a lot of these, and they're cheap, so get at least 100 to start. Radio Shack does not carry these, but you can improvise with stiff wire.
Project Box
Cable Ties
These are useful for strapping your wires down so they don't escape your breadboard. Once you get started with cable ties, it's easy to become addicted to them as a general construction tool. Figure 2.16 shows the type that we use all the time.

USB-to-Serial Adaptor
The microcontrollers you'll be using communicate with multimedia computers via serial communication. If your computer only has a USB port, you'll need a USB-to-serial adaptor. Though USB is a serial communications protocol, it's much more complicated than the form of serial communication you'll be using. Apple computers and some new laptop PCs have abandoned the old type of 9-pin RS-232 serial ports in favor of USB ports. Check the back of your computer for a connection with 9 pins, usually with markings like 0|0|0| or "COM1." That's a 9-pin serial port. If you don't have it, you'll need one of these adaptors. On Windows PCs, just about any USB-to-serial adaptor will do the job; if you'rea Macintosh user, you'll need to get one that's got software drivers that work with your machine. We recommend the Keyspan USA19HS because it's compatible with every Macintosh1 operating system through OSX 10.3, and it's got a DB-9-style serial connector like most PCs. It also works on PCs. It's the model shown in Figure 2.17.

Tools
Soldering Iron
Solder
Needle-Nose Pliers
Wire Strippers
Wire Cutter
Mini-Vise or Helping Hands
Small Screwdrivers
Drill and Drill Bits  A few common bit sizes you might use are 7/64", 1/8", 5/16", and 1/4".
Multimeter
Hot Glue Gun
A hot glue gun like the one in Figure 2.21 comes in handy for a multitude of reasons in physical computing. Hot glue makes a decent insulator on some wires, and it holds the universe together.
后面基本讲的一些必备的电子元件和工具,最好去书店找本看就知道了,放到这里,平时自己看一下,有个基本的印象


阅读全文 | 回复(2) | 引用通告 | 编辑
 

liquid

2006-5-22 22:30:00



  • 标签:Physical computer 互动 
  • Re:Physical computer的读书笔记(part 1)
    shenid发表评论于2006-5-24 15:23:00
    大哥,英语不要那么强好不好

    个人主页 | 引用 | 返回 | 删除 | 回复
     

    shenid

    2006-5-24 15:23:00



    Re:Physical computer的读书笔记(part 1)
    design发表评论于2006-5-22 23:07:00
    等,先搬个板凳占个位置先,等一下再用扩大镜慢慢欣赏~~

    个人主页 | 引用 | 返回 | 删除 | 回复
     

    design

    2006-5-22 23:07:00



    发表评论:

      大名:
      密码: (游客无须输入密码)
      主页:
      标题:



    Powered by Oblog.