13
ESE141 Circuit Board Instructions Board Version 2.1 Fall 2006 Washington University

ESE141 Circuit Board Instructions

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ESE141 Circuit Board Instructions

ESE141 Circuit Board

Instructions

Board Version 2.1 Fall 2006

Washington University

Page 2: ESE141 Circuit Board Instructions

Electrical Engineering Basics

Because this class assumes no prior knowledge or skills in electrical engineering, electronics design or micro-controller programming we present a short summary of the basic electrical concepts. It is beneficial to have at least a cursory understanding of the following topics to better understand your robot, however remember that there is no written work in this class and you will not be required to memorize anything! If you are already familiar with the basics feel free to skip ahead. Voltage Voltage is the electrical quantity representing potential energy. What this means is that when it is applied to a device (such as a TV or a computer), a higher voltage has the potential to provide more energy. This is one reason why our houses use 120 Volts. The robots in this class use 9 Volts, provided by 6 AA batteries. While Televisions need 120 Volts to operate, computer hardware is designed to capitalize on these lower voltages, which is why AA batteries work well for this application. Height is often used as a physical analogy for voltage. A higher voltage results in higher electrical potential energy just as standing on the “high diving board” at the pool gives you more physical potential energy than standing on the lower one. Going along with the height analogy, the positive (+) voltage point corresponds to the “high” point. The negative (-) denotes the lower potential. Often, but not always, this means zero (0) volts which is referred to as “ground” (gnd). Current Current refers to the flow of electrical charges. When there is a closed path from one terminal of a voltage source to the other (such as both sides of a battery) then electrons will flow through the circuit. The electrons themselves are what enables devices to operate—It doesn't matter how high your voltage is, with no current nothing will happen. Current is often compared to a river – just as water flows through a river, electrical charges flow through a wire. Current and Voltage together Often times people get confused about the physical meanings and applications of voltages and currents. Voltages are quantities that always exist across two points (assuming there is a source such as a battery or an outlet). Once you connect a device to the voltage source (such as a computer, a lamp, or this robot) then current will be able to flow through the device's wires.

Page 3: ESE141 Circuit Board Instructions

The key phrases to remember are “voltage across” and “current through.” If one accidentally sticks their finger in an outlet they might be prone to saying that they had “120 volts running through [their] body!” This is inaccurate. When you stuck your finger in the outlet, the 120 Volt potential manifested itself between your finger and the ground–it was across your body, so to speak. As soon as a path existed between your finger and the ground (provided by your body) electrical charges were able to flow through your body. This current is what you would feel. Now if you've never been accidentally electrocuted, don't worry. It is still good to know how to refer to electrical quantities properly – it makes you sound smart!

Page 4: ESE141 Circuit Board Instructions

Electrical Components Guide Some electrical devices are polarized, meaning they only work when “plugged in” a certain way. The wire lead that must be plugged into the positive voltage side is called the cathode and the negative side is the anode. A micro-controlled system such as this robot needs many parts to function properly. Below is a brief summary of the types of electrical components in the kit and what their basic purposes are (in no particular order). Micro Controller Each circuit board contains an Atmel ATMega16 AVR micro controller, already soldered on. This small chip performs all of the sensor data interpretation and calculations needed for the robot to function. It runs the code you write for it. All the inputs (sensors, PlayStation Controller) and outputs (Motors, LEDs, Buzzer) are processed or controlled by this chip. Resonator The resonator provides an external clock source to the ATMega16 chip. Inside the resonator is a quartz crystal that, when excited electrically, oscillates at a known frequency (about 16 Mhz in this case). The resulting electrical signal will have high points ( some times referred to as a “1”) and low points (a “0”).The micro-controller uses these oscillations to know when to do the next operation. Voltage Regulator The voltage regulator, a black and silver chip with three leads, serves to buffer the voltage from the batteries. It makes sure that the voltage does not exceed a critical limit (to avoid ruining the chips), and trys to keep a steady value. The aluminum serves as a heat sink to dissipate the heat that is inevitably created due to these devices' low efficiencies. Resistor A resistor is a two-terminal device that impedes current flow (see above for information about current). Think of it like a dam in a river. With a resistor in place less current than normal will flow to the rest of the circuit. Resistors are used in this project to reduce current flow to the LED's (described below) and help interface sensors and motors with the microcontroller. Capacitor Capacitors are devices with two surfaces (“plates”) separated by a very thin insulator (a “dielectric”). When the two terminals are connected to a

Page 5: ESE141 Circuit Board Instructions

voltage source the device begins storing electric charge between the plates. Capacitors are one of only two devices that can store electricity for later use (the other being batteries). Capacitors can charge in hundredths of seconds or can take days to charge. The rate at which it charges, and how much electric charge it can hold, is described by its capacitance (measured in farads). Because they store electric charges capacitors are some times used to smooth out unsteady voltage sources. We use capacitors in the robot board as a buffer between the distance and floor sensors and the micro-controller, and between the motor control circuitry and the motors themselves. In both cases it enables a bumpy wave form to be smoothed out into something more useful. Diode Diodes are unique because they are like one-way doors. They are placed in line to make sure that current can only flow in one direction. They accomplish this due to feats of physics (see Physics 118 for more info). We use one here to help ensure that the batteries provide current to the circuit and don't take any back. Diodes have a line on them designating the cathode. (see above). This side of the diode must go to the negative (ground) voltage terminal. The line should be marked on the robot board circuit board. Light Emitting Diode (LED) LED's are a unique form of diode. The semiconductors used in their construction emit light when current travels in the proper direction (remember that diodes only work with one direction of current flow). Just like regular diodes, LED's are polarized. If you look at the LED, the leads are two different lengths. The longer lead is positive. Servo In robotics, a servo is a motor that can be precisely controlled to rotate a certain amount. These are useful for controlling robotic arms and legs, for instance. In our case we remove the servo-specific components to make it function like a standard motor, meaning it can rotate fully 360 degrees. Distance Sensor The robot “sees” its prey by utilizing distance sensors mounted on the front of the chassis. These sensors examine light values and attempt to roughly triangulate the distance to an object in its “sight.” It condenses this information into a discrete voltage, read by the micro-controller as a number. The software you write will be used to interpret the numbers from the sensors to determine what's going on.

Page 6: ESE141 Circuit Board Instructions

Floor Sensor The robot is also equipped with floor sensors that enable it to “see” the color of the floor. It does this using reflectivity so it can really only see shades of black and white. We use this in conjunction with the sumo rings (which are black with a white outline) so that the robot has the ability to react to the edge of the ring and be able to stay inside. Buzzer A feature new to the ESE 141 Sumo Robot, we have added a buzzer which can be controlled by the program code. This is an optional feature not strictly required to compete however it enables your robot to “taunt” the opponents should the need arise.

Page 7: ESE141 Circuit Board Instructions

Circuit Board Assembly

Resistors: Orientation doesn’t matter, but be sure to make it pretty. HINT: Put the 1K and 10K resistors next to each other to see the difference between red and orange. 1K -- 2 BROWN, BLACK, RED 680 -- 7 BLUE, WHITE, BROWN 33K -- 3 ORANGE, ORANGE, ORANGE 10K -- 4 BROWN, BLACK. ORANGE Isn't soldering fun? Resistors are done, way to go!

Small Capacitors: There are four small capacitors, each .1 uF (“micro-farad”). These may be tan or blue-colored. Almost done!! (with the capacitors, that is... there are a few more coming later).

Page 8: ESE141 Circuit Board Instructions

Diode: D1 Match up the white line printed on the diode with the one printed on the board. Match up the white line printed on the diode with the one printed on the board. Thanks for your cooperation, the current will thank you.

DIP switch: This switch will enable you to load different programs on the robot.

Page 9: ESE141 Circuit Board Instructions

LED’s: You have four LEDs to put on the board: one red, and three others. Make sure one of the reds go to the spot marked “batt”. The rest are up to you. IMPORTANT: This part is polarized and one lead is longer than the other. MAKE SURE THE LONGER LEAD IS TO THE POSITIVE SIDE, Or the LED won’t light up! Note that the three LED's in a row and the battery LED have different orientations.

Regulator: Insert the 3-prong chip into the board, then bend it so that the hole lines up with the board. Then solder one lead, verify that the hole still lines up, and solder the remaining 2 leads. Since we are putting a screw through the hole, it really has to line up.

Page 10: ESE141 Circuit Board Instructions

IC Socket: This will eventually hold the motor driver chip. When soldering parts with many pins, it is best to solder one edge, verify the part is flat against the board, and then solder the opposite corner. This will guarantee that the part stay flat against the board during soldering. Be careful to match up the indentation in one end of the sockets with the one printed on the board!

Power Switch: SW1 Orientation doesn’t matter, again try to mount the part flush against the board.

Page 11: ESE141 Circuit Board Instructions

Button! This button will let you do crazy things like enable a taunting sound when pressed. It is at the bottom next to the battery LED

Resonator: This is a pale orange part with three leads, the only one in the kit. It looks sort of like a sweet tart.

Page 12: ESE141 Circuit Board Instructions

Headers (a.k.a long-strip-of-prongs): The short end goes into the board. Use the cutters (and goggles) to break each grouping apart and then solder them as described below: Solder one end, verify that it’s flat, and then do the next connection, like with the IC sockets. If it’s not flat, just heat it up (called reflowing the solder) and press it flat. Be careful not to press on the pin you just heated, as contents may be hot!

Buzzer: Big circle on the right side of the board. The buzzer is polarized, so make sure the “plus” on the buzzer corresponds with the “plus” on the board.

Page 13: ESE141 Circuit Board Instructions

Shrouded header (right angle): Make sure it is oriented such that it goes off the back of the board. This is where you attach the programming cable. Check after you solder the first pin that the orientation is correct!

Electrolytic Capacitors: C1, C2, C4 These are the larger deep blue/black cans marked 47uF on them. Watch the polarity again! The longer lead is the + lead and goes next to the little + printed on the board, plus the white line on the capacitor goes to the minus.