CEIA Schools Robot Competition 2013 Light Emitting Diode (LED) Circuit

CEIA Schools Robot Competition 2013 Light Emitting Diode (LED) Circuit As well as the main robot competition, a special prize will be awarded for the ...
Author: Kory Hood
4 downloads 2 Views 680KB Size
CEIA Schools Robot Competition 2013 Light Emitting Diode (LED) Circuit As well as the main robot competition, a special prize will be awarded for the most creative electronic Beacon design. Each team will design and assemble an electronic Beacon display using Light Emitting Diodes (LEDs). A basic kit of components is provided to help teams to get started but teams are not restricted to this kit. Additional components (electronic or otherwise) may be used to create displays. LEDs are semiconductors that produce light when electricity passes through them. They are considerably more energy efficient than ordinary lightbulbs. LEDs are used for a variety of applications. These applications fall into three categories: indicators and signs, illumination, and measuring and interacting.

Indicators and Signs LEDs are commonly used as status indicators on electronic displays. LEDs are found in everything from television remote controls, CD players and watches to traffic lights, exit signs and scrolling marquees.

Illumination LEDs are gaining popularity as a form of lighting. LEDs can glow brightly without much power. They are used in street lights, light bulbs and automotive lights and as the back-lighting for laptop, mobile phone and television screens.

Measuring and Interacting LEDs can be used to emit light in applications where the light is used to measure instead of to signal or illuminate. For example, remote controls and optical computer mice use infrared LEDs. LEDs can be used to sterilize water with UV light, in printers to determine toner placement and to transmit broadband data. Eamon Connolly October 2012 [email protected]

1

Fig 1: LED circuit symbols showing positive and negative side of device

To build a simple LED circuit, you'll need: • •

• •

A 9V battery connector (a plastic snap with wires that connect to the battery). A resistor, 470 ohm is ideal. Because LEDs are semiconductor devices, a small change in voltage can produce a huge change in current. We need to place a resistor in series with the LED to limit the current to a safe value (and avoid blowing the LED!). An LED A breadboard (see explanation of breadboards at end)

Figure 2: A simple LED circuit implemented on a solderless breadboard and the circuit diagram of the same circuit. IMPORTANT! You must make sure that the positive side of the LED is connected to the positive side of the battery.

Eamon Connolly October 2012 [email protected]

2

Look at the holes on the prototyping breadboard in the photo in figure 2. Connect the wires and component leads to the same locations on your breadboard. If your LED doesn't light up: •

Make sure the battery is fresh. Use a digital multimeter to measure the battery voltage if you're not sure.



Check that the color bands on the resistor match yellow, violet, brown (can also have gold or silver on the end). Use a digital multimeter to measure the resistor's resistance if you're not sure. 450-500 ohms is fine.



Try flipping the LED around. Maybe it is in backwards?



Push the wires all the way down into the holes.

Flashing Lights For teams who would like to introduce more complexity into their LED displays, a circuit using transistors to make the lights flash is one option that can be used. Transistors are used in several different ways in a circuit but for this circuit we will just consider the use of the transistor as a switch.

1 2

3

Fig 3: Circuit symbol of transistor and image of typical transistor package

Transistors come in all shapes and sizes. The most common package for individual general-purpose transistors is a plastic case with three pins. These Eamon Connolly October 2012 [email protected]

3

three pins allow us to connect to the emitter, base and collector of the transistor. In very advanced computer circuits many millions of transistors are required to process data and to carry out complicated tasks. Modern integrated circuits have become so advanced that millions (and recently billions!) of transistors can be incorporated into a single Integrated Circuit (IC) or “chip”.

470 +

Note the negative side of the electrolytic capacitors in the circuit and picture. The negative side is indicated by the silver strip.

+

to maze or 9V battery

L1, L2: R1-R4: C1,C2:

LEDs Resistors Electrolytic Capacitors TR1, TR2: Transistors (BC548)

When the transistor is positioned like this in the circuit, the base is the centre pin, the emitter is the pin on the left and the collector is the pin on the right

Figure 3: Circuit diagram and picture of Flashing Lights circuit – see also Figure 5 for connecting to a 9V battery Eamon Connolly October 2012 [email protected]

4

The flashing lights circuit, Fig. 3, is an example of using transistors as simple on/off switches. When the transistor is “off”, it acts like an open switch and no current can pass through it. However, when the transistor is “on”, it acts like a closed switch and current can easily flow through the device. In the flashing lights circuit, when one of the transistors, let’s say TR1, is “on” and acting like a closed switch, current will flow down from the +9V line on top, through the LED indicator L1, through R1 and through TR1 to the bottom, i.e. from the + terminal around to the - terminal of the 9V battery. As current flows through L1, this indicator lights up. R1 is used to limit the current flowing so as to control the brightness of L1. During this time, the other transistor, TR2 will be “off” and acting like an open switch. Therefore no current will flow down through the L2, R4, TR2 path, and so the LED indicator L2 will not light up. After a while TR2 will switch on and TR1 will switch off causing L2 to light up and L1 to extinguish. The action repeats continuously, giving a flashing pattern on the two lights. In fact, this is how transistors are used in nearly all modern digital computer circuits. They are used in this way to represent the two binary digits zero and one, the numbers used in modern computers. When the transistor is off, it represents the digit zero, and when the transistor is on it represents the digit one.

How it works The rate at which the lights flash is controlled by how long each transistor stays switched on. This is determined by a component called a capacitor, which is a device that stores electric charge. In this circuit two large-value electrolytic capacitors, C1 and C2, are used in conjunction with two resistors, R2 and R3. When a voltage is applied to a capacitor, current flows into it and it charges up. However, if a resistor is connected in series with the capacitor, it reduces the current flowing, and the capacitor charges up more slowly. The larger the values of the resistor and capacitor, the longer it takes for the Eamon Connolly October 2012 [email protected]

5

capacitor to charge up. This combination is often called a “delay circuit”, in fact a C-R delay circuit. In the flashing lights circuit, there are two C-R delay circuits - C1, R2 controlling TR2, and C2, R3 controlling TR1. The action goes as follows: let’s assume TR2 has just switched on. At this instant the voltage on the collector of TR2 (and on the right-hand plate of C2) falls from around +7V to 0V. This causes the voltage on the lefthand plate of C2 to fall by the same amount – in its case from about +0.7V to about -6.3V. This of course is the same voltage that’s on the base of TR1, and since the base has now got a negative voltage applied, TR1 switches off. Capacitor C2 will now start to charge up with current flowing into it through R3 and the voltage on its lefthand plate will rise slowly towards +9V. However, it never gets anywhere near +9V, because when it reaches +0.7V, TR1 base becomes forward biased and switches on. This causes TR2 to switch off, and the very same sequence of activity then occurs to TR2 and its CR delay circuit, C1, R2. This sequence is repeated over and over again causing the lights to flash on and off. Each delay circuit keeps its associated transistor in the ‘off state’ for a certain period of time. This time is can be predicted fairly accurately using the formula:

T= 0.7CR seconds

where C and R are the values of the capacitor and resistor in the delay circuit. Obviously, if different values of C and R were used, the delay periods would be different, and the flashing rate would be faster or slower.

Eamon Connolly October 2012 [email protected]

6

How breadboards work A breadboard is a rectangular plastic box filled with holes, which have contacts in which you can insert electronic components and wires. A breadboard is what you use to build a temporary version of your circuit. You don't have to solder wires or anything else; instead, you insert your components and wires into the little contact holes arranged in rows and connected by lines of metal; then you can connect your components together with wires to form your circuit.

Figure 4: Left: Picture of holes on breadboard on left. Right: How holes are connected The yellow lines on the image on the right show how the sockets are connected. You can see that the vertical columns of holes labelled with a "+" are connected to each other, as are the columns of holes labelled with a "-." The columns labelled with a "+" are called the power bus, and you will connect one of them to a positive input voltage, such as the positive terminal of a 9-V battery. One of the columns labelled with a "-" (the ground bus) will Eamon Connolly October 2012 [email protected]

7

be attached to the negative terminal of the battery. Note that in each row (numbered 1 through 30) sockets "a" to "e" are connected to each other. And "f" to "j" are also connected to each other. Note: Smaller breadboards may not have a seperate area for a Power or Ground bus. In this case, you can simply use the two different rows on the main board to insert the +positive and –negative sides of the battery and they become the Power and Ground bus respectively. The nice thing about breadboards is that you can change your mind and replace or rearrange components as you like. You create electronics projects on a breadboard to make sure that everything works. When you are happy that your circuit is working, you can create a more permanent version by soldering the components to a printed circuit board. A picture of the LED flashing lights circuit with components soldered in place is shown in Figure 5. This circuit will have much more reliable and permanent connections between components.

Figure 5: Picture of Flashing Lights circuit with components soldered in place. Connecting the circuit to the maze is the same as connecting to a 9V battery. Eamon Connolly October 2012 [email protected]

8

Suggest Documents