Chapter 7 Lights, LEDs, and Power Mandala Project by Justin Campaniello, 2012 Photocopied drawings, foamcore, light bulbs, Super Cricket microcontroller 1 Lights have many different uses in an Artbotics project: an illuminated light tells you whether your work is turned on; they can be used to illuminate a specific area; and they can function aesthetically as part of the piece. The context in which the lights are used gives them meaning, so it is important to reflect on how they are utilized within a piece. Lights convey information via color, brightness, and how they are turned on and off. Lights can blink, can vary their brightness while turned on, and can convey movement and animation through patterns. They can signify light itself or stand as a metaphor for something else. Lights can be programmed to be brighter or dimmer based on power usage; they can be indicators of scientific or electronic values, like whether or not another sensor has been activated or a connection has been closed; and they can serve purely decorative ends. This chapter will consider these properties and how to work with them in your piece. 7.1 What is a light bulb? What is an LED? A light bulb is a vacuum sealed glass globe with a wire in it that glows when heated up by electricity. It was invented in 1879 by Thomas Edison and is now being phased out as they cost more to run than LEDs and compact fluorescents. Light-Emitting Diodes, more commonly known as LEDs, were invented in 1962. LEDs use a semiconductor, a chunk of material that conducts electricity under some conditions but not others, that emits light when electricity is applied to it. The main difference between a light bulb and an LED is how they are powered: LEDs have a specific orientation in which they must be connected, while light bulbs do not. Light bulbs and LEDs need an electric source to light them up. They can be powered by batteries (also known as direct current power, or DC) or by “wall outlet” electrical power (alternating current, or AC). All electric power sources have a positive (power) and a negative (or ground) circuit orientation. In these early chapters, we will work only with batteries because direct current is safer for learning and experimentation. In Chapter 17, we will talk about how to work with plug-in wall power (AC) for powering parts of your piece by using relays and how to power your entire piece using wall power. Alternating current, which comes out of wall outlets, can electrocute a person when used incorrectly. A battery is a chemical source of electricity. On the battery, the positive side has a plus (+) on it and the negative side has a minus (-); it matters which way you orient these in the battery case. If you install a battery the wrong way, your project may not work. Worse, there is a chance that the battery could leak acid or “blow up,” which is less dramatic than it sounds, but creates a hazard and damages your electronics. Figure 7.1 shows a AA battery, 2 wires, and a light bulb in its accompanying socket. If one were to screw the bulb into the socket, connect one end of each wire to a tab on the socket, and press the other end of each wire against one side of the battery, the bulb would light up, regardless of the positive and negative orientation. For an LED, however, you must use the correct positive and negative orientation or the LED will not work. In figure 7.2 the long LED lead (both leads look like a pin coming out of the bulb) is called an anode. The anode must touch the positive side of the battery, while the short lead, called a cathode, must touch the negative side. Try this and watch the LED light up. However, if your battery had too much power for your LED, that may be the last time you see your LED light up. It is possible to burn out LEDs by using too high of a voltage. You should be sure to buy LEDs that match the voltage that your microcontroller outputs. (You can use other LEDs. See Chapter 17 for a discussion of how to use resistors to use lower power LEDs with your piece.) Most of the micro-controllers we will use in these projects are powered by 5 volts. Generally, the microcontrollers have enough extra power for a small light bulb or LED. However, if a light bulb needs more energy than what the microcontroller has available to share, we must use an external power source and a relay switch to power the light bulb. Relays will be covered later in Chapter 17. 2 7.2 Power: Volts, Watts, Ohms, and Amps Volts, watts and ohms are used for measuring electricity and are named after the scientists James Watt, Alessandro Volta, and Georg Ohm. A Volt (V) is a measure of “electromotive force” or pressure and it is what generates electron flow. It is more than we can go into here, but, simply put, a volt is the difference in electrostatic charge between two points. This imbalance between two points is what causes electrons to want to flow from one area to another, like the two different ends, or poles, of a battery. This electron flow we perceive as electricity. Visualize a shaken up soda bottle. The potential force of liquid that will spill out when you open the bottle is your voltage. An Ohm denotes the resistance to electric current an item has. All electric parts have some resistance and in a circuit you need to supply enough power to overcome the accumulated resistance of the parts. Even humans have some electrical resistance, about 1000 ohms () depending on body fat and moisture. Sensitive bits of electrical equipment in a circuit sometimes need to be sheltered from the available electricity coming in by other bits called resistors. These look like globs of silicone on a wire and they soak up electrons and so add resistance to the circuit. Power versus resistance comes into play for the typical non engineering consumer when you are hooking up stereo speakers: too much power will damage the speaker and too much resistance will prevent any sound from coming through. A Watt (W) is a measure of electricity and you see it on items that use electricity, like appliances, telling the consumer essentially how much it will cost in home power usage to run the appliance. A watt represents one ampere of energy per second. An Ampere (amp, denoted with an “I” below) measures electric current: one amp is the amount of current produced by a force of one volt acting through the resistance of one ohm. Here is the formula for it, called Ohm’s Law: I = V/R. Current (I) equals voltage (V) divided by resistance () . You might need it later to calculate whether you have enough power in your circuit to support a high number of light bulbs or speakers. How do you find out how much power your light needs? Read the technical specifications for the LED model you have, which can often be found online if you look up the part number. You can also test any electrical part with an electrical voltage tester. Read the section on how to use a multimeter at the end of this chapter. Please refer to the Manufacturer’s Manual for information on a specific microcontrollers output voltage. Figure 7.1 The relationship between positive and negative (the polarity) does not matter for powering a light bulb. 3 Figure 7.2 The longer lead, or the anode, must touch the positive, while the short lead, or the cathode, must touch the negative. If this relationship is reversed the LED will not power on and could potentially become damaged. 7.3 Example projects using lights Girl with Broken Heart (figure 7.3) by Alyssa McCann, 2011, uses colors emotively: red is the color of a heart, there are eyeballs with green pupils, and yellow is used to convey excitement. There is an eyeball light that animates the eye opening and closing (even though the actual eyelids, which are a printed magazine image, do not physically move) and the heart light turns on and off in a syncopated rhythm to imply a heart beat. The yellow light turns on very brightly and quickly after the eye and heart have run their sequence, emphasizing the explosive lines nearby. Here, the lights are used to aid a narrative by lighting up in a sequence. When the lights are on in a certain area, the viewer is drawn to look there, then when they turn off and another light comes on, the viewer’s focus shifts to the new area. The code used to sequence lights will be explored more in Chapter 8. Lights can also be used to emphasize form and pattern. See figure 7.4 for Geometric Cityscape by Samantha Weeden, 2011. The three cylinders that contain light bulbs light up at the same time, then slowly dim until they are all dark. The shape of paper tubes directs the light towards the surface openings, like a flashlight. Every other “building” is a rectangle tube. Unlike Girl with Broken Heart, here the lights are being used to highlight pattern and to metaphorically suggest city lights. Figure 7.3 Girl with Broken Heart by Alyssa McCann, 2011, collaged printed magazines, light bulbs, Super Cricket microcontroller. Photo by Adam Norton In this piece there are three lights: a green light in the top eyeball, a red light in the broken heart, and a yellow light at the explosion lines next to the girl’s head. 4 Figure 7.4 Geometric Cityscape by Samantha Weeden, 2011, paper, light bulbs, Super Cricket microcontroller. Photo by Adam Norton. In this piece there are three lights (red, green, and yellow) each placed in a cylinder shape. What is the message of a light bulb? What is the message of a light bulb? This question was considered by Marshall McLuhan in Understanding Media, 1964. McLuhan’s big idea was that technology milestones in themselves conveyed a social message and that had meaning in addition to whatever messages those technologies were being employed to accomplish. His first example is the electric light. We might think of the electric light as something that can be used to say things when, say, those messages are words lit up in electric lights, like “Eat Here” or “Now Showing”. We might even understand that an electric red light at an intersection is a sign for stop. This, McLuhan says, misses the point. The point of an electric light is all the stuff we can do now that we could never do before electric lights were invented. Think about how the electric light has made nighttime human activity possible, from night baseball to bedtime reading to industrial mining and third shift at the factory. These activities, and the extension of all human activities into dark spaces enabled by the electric light, is the message of the electric light. In contemporary media, light always signifies intelligence, ideas, clarity, cognition. The most famous light bulb belongs to the robot Hal from 2001, A Space Odyssey, directed in 1968 by Stanley Kubrick. Hal controls the space capsule the humans are taking for their quest to find intelligent life on other planets and it has decided that the human’s best interests are not necessarily its own. In the film he is signified by his voice and by a blinking red light. This red light reappears in WALL-E by Pixar in 2008 as Auto, the robot controlling the destiny of the Axiom and all surviving human life. What other famous robots can you think of use a light to indicate they are alive? 5 7.4 Soldering Soldering is the fusing of two metal objects with a low melting point metal alloy. The soldering iron supplies heat to the two metal parts and that heat melts the solder. Once the joint is cool, it creates a strong electrical connection, and is useful on circuit boards, wires, and many other electronic devices. When using a light bulb or LED in an Artbotics project one does not attach it directly to a battery; it must be soldered to its corresponding wires and/or appropriate connectors. The required tools and materials for soldering are: a soldering iron, solder, two or more wires (for our exercise, just two), heat shrink tubing (available any store selling these other things), and either a bulb & socket or an LED. About Solder Solder is made up of tin, lead, and sometimes silver, zinc, or antimony. Lead can leach through your skin, is toxic to breathe, and when eaten, is a neurotoxin that compromises brain functioning and development. It is toxic to fetuses and to small children when ingested. It hangs around in the body for a long time and so has a cumulative pathogenic effect. It is also great for soldering electrical parts together because it melts fast and makes strong joints. If you are pregnant, you must use a respirator when handling lead solder or working in the same room with others who are using it. You can switch to lead-free silver solder, which is a bit more expensive. It is more challenging to work with but the health benefits are worth it. Either way, wash your hands before you eat or touch your face or use the bathroom. Lead toxicity in the body can be mitigated through a high iron and high vitamin C diet. 7.4.1 How to solder two wires together: 1. Plug in and turn on your soldering iron. 2. The wires that are to be soldered must first be stripped about ⅓ of an inch to expose the conductive metal wires beneath the outer plastic casing. If using heat shrink tubing to encase the new joint, it must be placed over the stripped wires before soldering. 3. If using solder flux, apply it now. Some solder already has flux in it, check your package. Flux keeps the wires clean and free of oxidation so that they solder easier. 4. Pre-tin each bare wire: heat up the wire by holding the soldering iron to it and add a bit of solder to the wire. when the solder turns to liquid and coats the wire, remove the iron. If you have a third arm clip, put the wires in it while soldering to keep from burning your fingers. 5. Twist together the two bare connector wires. 6. Apply the soldering iron to the wires. The secret to soldering is that both wires need to be the same temperature, and as hot as the iron, to get the solder to flow. If one wire is too cold, it won’t work, so apply the heat evenly. Larger items need more heat than smaller items. 7. The molten solder will be shiny when liquid and dull when hardened. It hardens in a matter of seconds after you remove the heat. 8. Test your joint by gently tugging on it to see if it breaks. If not, you are done. 9. If using heat shrink tubing, slide the tubing over the exposed joint BEFORE you solder, and use a lighter or a heat gun to melt the tubing onto the joint. For soldering a light bulb and socket see figure 7.5. For soldering an LED see figure 7.6. 6 Figure 7.5 When soldering a light bulb strip one end of two wires. Wrap the stripped end through and around the tab on the socket. Solder over the connection until the entire tab is filled with solder. Heat shrink is not necessary for a light bulb as the two wires have no way of crossing. Remember, in a light bulb the power polarity does not matter. Figure 7.6 When soldering an LED strip one end of two wires. Take two pieces of heat shrink and place them over the wires. Make sure to note which end is positive (longer lead, anode) and which end is negative (shorter lead, cathode), then wrap the stripped wire around each lead. Cover the connected wires and leads in solder, then place the heat shrink over the connection. Apply heat using a heat gun until they shrink over the connection. 7.4.2 Extending Wires The manufactured pre-cut wires that are attached to lights and motors are often not long enough, especially for a larger project. For example, if a light bulb must be placed 18 inches from a microcontroller, but the supplied wire is only 6 inches, then the wires must be extended by adding more wire. To do so, one must cut the wires that are currently soldered on and add a length of wire in between. See figure 7.7. 7 Figure 7.7 The white wire is going to be extended with the length of the gray wire. Cut the white wire and strip each cut end. Also strip each end of the gray wire. Slide two pieces of heat shrink over the wires, then twist each stripped end of the white wire to one end of the gray wire. Cover the twisted wires in solder, then place the heat shrink over the connections. Apply heat using a heat gun until they shrink over the connections. 7.4.3 Non-solder connectors Some examples of non-solder connectors. There are many products in electronics that will make a good electrical connection without using solder. There are twist cap connectors, barrel connectors, push in connectors, crimps, male and female couplers. (see image above). The main thing to remember is that these connectors need to match your wire diameter size. A too large connector will not hold the wires together and a two small one may overheat and melt. 8 7.4.4 Connecting to your Microcontroller Now that your lights are soldered and ready to be used, they must be connected to your microcontroller. Electronic parts connect differently for each model of microcontroller; some use the two wires and connect directly into the microcontroller, while others have custom 2 pin connectors that the wires plug into before connecting to the microcontroller. Be sure to study the manual that comes with your microcontroller. For instance, the Super Cricket microcontroller has 4 ports, labelled A, B,C, and D, for connecting lights, LEDs, and motors. Each port has a sister port, allowing a second component to be plugged in and controlled using the same port letter. Each port has 2 prongs, which correspond to the 2 wires that are used to power a light or LED. There are also specially crimped wires that connect into small, plastic housings that plug into these ports. The other ends of these wires connect to the light or LED. One wire is the positive (power) and the other is the negative (ground), and as discussed earlier for a light bulb the orientation of these wires does not matter, but for an LED the anode must connect to the positive and the cathode must connect to the negative. Before soldering these wires to the LED, you will have to program your Cricket to turn on the port you are plugging into and test to see what orientation will work. Super Cricket connectors The Super Cricket microcontroller uses a 2-prong housing connector for lights and DC motors. It has other 3 and 4-prong connectors for sensors and expansion boards. Arduino microcontrollers have positive and negative digital pins for attaching components, and some have connectors similar to the Cricket. The Arduino LilyPad uses conductive thread to attach from the microcontroller to LEDs. The Lego Mindstorms NXT microcontroller uses connectors similar to a telephone plug. For a full detailed list with more information go to http://www.artbotics.org/ 7.5 Series vs. Parallel Circuits A set of components connected by wires is a circuit and the wires are the pathway the electricity travels on. If you need to power multiple lights with one power supply, then you will chain the lights together in a circuit like in a strand of Christmas lights. Many different components can be linked together to feed off of one power source: motors, speakers, and sensors. There are two types of circuits: parallel and series. A series circuit offers only one path for the electricity to follow from power supply to component and back again. Visually, it looks like a circle shaped train track. It’s called a series circuit because the electrons move to each element in the order they are wired. (See figure 7.8.) As more lights are added to the series chain the amount of electricity that flows through each one is diminished, making 9 all of the lights less bright. Each light bulb represents a load on the total available power, and that load adds up. A load is an item in an electrical circuit that draws or uses electricity: your dishwasher, television, and refrigerator all add up to a total load on your household circuit. If there are too many items demanding power, your circuit will overheat and shut down. In our diagram 7.3A, if one bulb is unscrewed from its socket then the rest of the lights will not work. This is because each light serves as a necessary bridge in the circuit. In a parallel circuit, the electricity has more than one path it can travel. In figure 7.9, four lights each have their own power and ground wires connected to the main power and ground wires. This disperses power to each light so if one light breaks or is removed the other lights are not affected. A parallel circuit needs to balance the voltage demands and resistance presented to the power supply. Each component offers resistance (Ohms) to the flow of electrons in the circuit. If one branch of the circuit has less resistance, the electrons will prefer that path and potentially burn out the component on that path. We use parallel circuits when we want redundancy in a system: to prevent failure of multiple components if one burns out. We use parallel when we are dividing up the resistance load of a set of speakers or lights on a system so as to feed each component an equivalent amount of power. And we use parallel circuits if there is only one power supply but there are multiple types of circuits to be powered: for example if you have a speaker and a light that are triggered by different events but share the same power supply. Figure 7.8 Soldering in series: As more lights are added to the chain, the available power for each light is reduced. Figure 7.9 Soldering in parallel The four light bulbs here share the same power (positive) and ground (negative) sources from the connector. Each light has an equally distributed amount of power, and they all shine at the same brightness. These wiring methods are very useful in an Artbotics project because the number of individual power output connections a microcontroller has is generally between 2 and 8, and some connections may need to be used for components other than lights. Each output port is individually controlled by the microcontroller. if four separate lights are plugged into four different ports on a microcontroller then they 10 can each be controlled uniquely. However, if a chain of four lights is plugged into one port on a microcontroller then it must be thought of as a single light. Power sent to that chain will turn all of the lights on or off simultaneously. In addition, a microcontroller can adjust the power made available to the light or output port and so cause the light to dim on command or lower the amount of power available to the object attached to the port. In Geometric Cityscape (figure 7.4), all three lights turn on and lower in brightness at the same time. All three lights can either be wired as a series circuit and controlled as a single light, or each light can be wired individually and controlled simultaneously. Girl with Broken Heart (figure 7.3) has its lights on different circuits. If all three lights were on a single chain, then the heart, eyes, and explosion light would have to turn on and off together. The piece would lose its complexity and dynamic narrative. For this piece to function properly each light must be individually controlled. A much larger project, City of Lights by Kristen Dubis, 2011, figure 7.10, uses more than 50 lights. There are 6 different chains of lights, each chain is soldered in parallel, and they are controlled via different output ports, and so highlight different windows in different buildings. Here, soldering in series would not have worked because the flow of power would diminish very quickly given the entire load of lights in each chain. Throughout the life of this piece some light bulbs did burn out or get damaged, but because they were soldered in parallel instead of series all of the other lights were unaffected. The piece is controlled by two Super Cricket microcontrollers which output 5 volts each. Even when soldered in parallel more than 50 lights could not be powered by only 5 volts, so an external power supply was brought in to generate an additional 12 volts of power. Figure 7.10 City of Lights by Kristen Dubis, 2011, wood, paint, light bulbs, Super Cricket microcontrollers Photos by Holly Yanco. This piece contains more than 50 lights. There are 6 different chains of lights, wired in parallel, which turn on and off. 11 2-D Artbotics Pattern Project - Part 2 Adding lights to your mandala collage. In this lab, you will add 3 lights to your 2-D art that you constructed for Chapter 6. By using a light sensor or a touch sensor (or both), you will make your project interactive. Materials needed: microcontroller, light bulbs, light sockets, light sensor, touch sensor, cricket display, your 2D art. 1. 2. 3. 4. 5. 6. 7. 8. Solder a wire to the tab on one side of the light socket and another wire to the other. Put the loose ends of the wire into the two-hole solderless white cricket connector. The wires should snap into the connector. If you can pull them out easily, turn the connector around 180 degrees and insert the wire again. Determine the location for your light socket in your artwork. Cut or drill the necessary hole and install the socket. Then screw in a light bulb. Repeat until you have three wired light sockets inserted in your artwork. Consider where you will mount your microcontroller. To the back of the art? To work it must be embedded in the art somewhere. How will it stay attached? Velcro? Nuts and bolts? Zip ties? Attach the wires from the lights to the correct output ports on your microcontroller. Are they long enough to reach? if not, extend them as described earlier in this chapter. Write a cricket logo program to create interesting light patterns (see Chapter 8). Example mandala collage projects Projects (top to bottom) by Jessica Tawczynski and Renee Lantz, 2012. Further Reading Getting Started in Electronics by Forrest M. Mims III (Paperback - Feb 2003), Master Publishing, Inc. Introduction to Electricity, NDT Resource Center. http://www.ndted.org/EducationResources/HighSchool/Electricity/electricityintro.htm Understanding Media by Marshall McLuhan, Magraw-Hill; 5th Printing edition (1966) Some electronics supply outlets Sparkfun: http://www.sparkfun.com/ Nelco: http://www.nelcoproducts.com/ Jameco: http://www.jameco.com/ElectronicComponents American Science and Surplus: http://www.sciplus.com/ Radioshack: http://www.radioshack.com/ 12 All Electronics: http://www.allelectronics.com/ 13
© Copyright 2026 Paperzz