You don't have to know a lot about how your circiut works to get started. You can get very far with just being able to read a couple of simple recipes. You can learn to make a rote translation from the electronic diagram called a "schematic" to the actual attaching of wires and save yourself a big detour into electrical theory. The circuits are so simple they are unlikely to provoke a lot of curiosity anyway. They can be simple because computers does the work that used to be done by circuits. You only need to make enough circuitry to transduce the energy into a signal that can be heard at all by the microcontroller. Then you can substitute software in the microcontroller for circuitry to make adjustments to the signal and use it for triggering other events.
You first have to track down a schematic or diagram of a circuit that will fit your needs. You can get pretty far with the which are provided below on this page. The Physical Computing Quick Reference provides these same circuits along with other handy reference items for these brands of microctrollers Basic Stamp, BX24, Basic Atom, PIC. If you are using some sensor or device not in these circuits, you can usually find the appropriate circuit in the application notes or instructions for that device. You may also come across more complicated circuits for things like lie detectors or light organs in books or on the web. You should avoid these and stick to circuits that are designed to work with the luxury of software on the microcontroller. There will be transducers that will require additional circuitry that is just outside the scope of this site. For example, on the input side the amplification circuitry necessary for strain guages, and on the output side timing circuitry necessary for dimming ac power might require that you buydevice or get he help of an electrical engineer to build it. The Art of Electronics by Horowitz and Hill is a good book for learning more about circuitry.
Translating Schematic Symbols Although you don't have to know how to write a circuit, you do know how to read one. After you have a schematic to work with, learn the meaning of the symbols and to learn about the actual components represented by the symbols. Keep the package that your compenents come in because you may need it to decypher which lead is which.
(aka Vdd, Vin, Vcc, V+)All electronics is about exploiting the fact that electrons want to go from positive to ground. We put our work in between positive and ground the electrons are so keen to get there they will do our bidding in route to ground. To take advantage of this we need a supply of electrons. Voltage and amperage of are terms for describing the pressure and the volume of the flow. Because we are mostly in the electronic world (as opposed to electrical) we use teeny weeny power that is enough to signal but not move things. So as to be able to communicate with other devices, we will abide by the standard (TTL) that +5Volts is a yes (aka true, high, one, positive) and 0 Volts is a no (aka false, low, zero, negative). This one of the most popular destinations in your curcuits so we usually reserve a big long line of holes on your breadboard for it.
(aka VSS, VEE, Gnd)This is the simbol for the negative side of the power. It is the ambition of all good electrons to flow to ground. Ground one of the most popular destinations in your curcuits so we usually reserve a big long line of holes on your breadboard for it. An electron only seem to recognizes its own ground so in circuits with two power sources, you may have to connect the negative sides of different DC power sources to the same common ground.
Switches allow or interrupt the flow of current. Switches usually have two interchangable leads. In addition to the explicit switches that you buy in the switch section of Radio Shack or your hardware store, you may be interested in switches that your audience is not fully conscious of. The burgalar alarm You can also grow your own switches. Inside a switch are just two peices of metal that either touch or don't touch. Because the electricity that are going through our circuits won't hurt you (unlike the electricity that is going through wall switches) you can invent ways for two peices of metal to touch or not depending on what a person does.
Resistors give electricity something to do. Electicity without something to do is a short circuit and a bad thing so you will have to at least some resistance in every circuit. Resisitors usually have two leads with no polarity (no positive and negative side) so the leads are interchangable. You can identify different resistors by; 1) the package; 2) decoding the stripes from a chart; 3) check it with a multimeter. Resistors are also rated in Watts but even the tiny ones (1/4 watt) resistor are fine for these circuits.
They have two leads. Sometimes it doesn't matter which side you connect. If you are using a polorized capacitor, a + or - sign should be printed on the outside of the capacitor itself. Match the + side up with the + side in the schematic.
A diode is like a one way street that only allows electricity to flow in one direction. LED's emit light in the process. They have two leads, a Cathode and an Anode. You may have to consult the packaging or the outside of the diode itself to tell one lead from another. The longer leg being positive is one common convention for distinguishing the two leads on LEDs.
http://fargo.itp.tsoa.nyu.edu/~dano/physical/images/02-03R_var_resistors_photo.gifVariable Resistors discourage the flow of electricity to varying degrees. They have two or three leads. When they have two leads you can connect them any which way. With three leads use the middle lead and then one of the other two that works best.
When there is a dot at the joint in the diagram, then the two wires should touch each other.
When two lines skip over each other, the wires they represent should not touch. They cross only for convenience in making the diagram.
Transistors are like switches that can be thrown by a electricity instead of by your finger. Transistors usually have 3 leads, a Base, a Collector and an Emitter. When the base gets electricity, it connects the Collector with the Emitter (for an NPN transistor). You can't use a transistor for switching something which uses AC power (use a relay instead). Keep the packaging for your transistors because it may have a key for telling which leg is the Base, Collector and Emitter.
An experimentor board allows you to make and change circuits easily. You can stick wires into and out of the holes (a needlenose pliars helps) without soldering. After you perfect your circuit on the is easy to change prototyping board, you can solder all your connections in a very similar looking board. For convience, all the holes in a continuous line are connected to each other. For instance wires 1 and 2 would be connected as are wires 3 and 4. The order in which wires are placed within a given row does not matter, each row can be treated as a single hole. This allows you make a junction in a circuit where many leads are suposed to touch each other without having to twist a lot of wires together or jam them into a single hole. Because the middle ridge breaks up the line, 5 and 4 are not connected. Almost all your circuits have many wires connected to ground or +5V so the two long lines on the side are usually reserved for these. Different experimenter boards connect differently, so you might test for continuity between holes using your
If you have to solder you should; 1) be careful and get a friend to help you; 2) allow the iron to fully heat up; 3) heat the items you are soldering not the solder directly, allowing the heat to transfer from the iron to the wire and then from the wire to the solder; and 4) be sparing with the solder 5) Unplug the soldering iron.
Checking for continuity is even more useful. Continuity means that there is a good connection. If your multimeter doesn't have a thing called "continuity," you check for 0 resistance. First set the multimeter to one of resistance (ohms) scales. Continuity is more convenient because because it beeps and you don't have to look back at the multimeter's display. When you touch the probes of the meter together, the it should react by beeping (if you have a continuity setting) or showing 0 resistance. Now you can stick those probes at different points in the circuit that you expect to have good connections and see if they are in fact good. Don't leave your meter in the resistance mode because it uses up the battery.
You can use a transistor as a switch which is thrown when power is applied to its base. You only need to apply the microcontroller's 5 Volts and the transistor can switch far greater voltage. In this way the transistor is acting as an amplifier. THIS CIRCUIT WILL NOT WORK FOR AC POWER (LIKE THE POWER FROM A WALL SOCKET). You can only use this with DC circuits. You should also check the transistor's package to see that it meets your load's voltage and current requirements. A common mistake with this circuit is not comingling the ground of the stamp with the gound of your DC load. You need to combine these grounds for the circuit to work.
Finally if you want to turn something on that uses electicity from a wall socket AC power, you have to add a relay to the circuit. This adds another level of amplification and isolation from the microcontroller. transistor can switch the kind of power the relay needs and the relay can switch the kind of power your AC appliance needs. Check the package of the relay to see that it meets your AC load's voltage and current requirements. The LED and capacitor are only there to eat up the charge that the coil in the relay kicks back into the circuit when it turns off. There are 5V (TTL compatible) solid state relays that make all this easier. Please be very careful and fully test the circuit (you can hear the relays click) before you add the AC Power.
‘ declare a variable called X: dim x as byte sub main() do ‘ getPin command sets the I/O mode and reads ‘ the value of the pin into the variable X: X = getPin(12) Debug.print “X = “; cstr(X) Loop End sub