10 LED Projects for Geeks: Build Light-Up Costumes, Sci-Fi Gadgets, and Other Clever Inventions
into direct current DC a process called rectification Diodes were originally designed for use in AM radio receivers to rectify radio frequency signals but are now used in many different applications where electrical current must flow in only one direction For example diodes in many consumer electronics help protect the circuitry against batteries inserted backward Most of the time however the diode aspect of an LED is not important The rest of the name light-emitting simply means that this type of diode is designed to light up when electricity passes through How lEDs Work An LED is a semiconductor device built with crystalline metals like silicon and germanium plus small amounts of impurities that change the characteristics of the material These impurities are added to the semiconductor in a process called doping The added element called the dopant changes the base material into either a p-type or n-type semiconductor The distinction between p-type and n-type depends on whether the dopant adds excess free electrons or causes a deficit of free electrons The place where these two types of doped semiconductor meet is called the P-N junction and this is where light is created Electrical energy passing through the junction excites some of the charge carriers which emit light when they return to their nonexcited state in a process called electroluminescence The exact chemical composition of the semiconductor mate rial determines the band gap of the materials involved which in turn determines the color of light produced The first LEDs developed in the 1960s emitted light in the infrared end of the color spectrum which is invisible to the human eye but still useful for scientific experi ments Later developments of other semiconductors and dopants introduced new visible colors resulting in mass production of red LEDs in the late 1960s and yellow LEDs in the early 1970s A high-brightness blue LED was very difficult to develop and was considered the Holy Grail of the LED world until 1994 when three Japanese scientists finally figured out the secret to a blue LED They received the 2014 Nobel Prize in physics for this accomplishment 3 i n t rO d u c t i O n
A briEf History of ArtifiCiAl ligHting Throughout human history the development of artificial lighting has been incredibly important in the advancement of technology Without artificial lighting it’s almost impossible to do much produc tive work after sunset whether that involves crafting entertainment or education For a long time the only way to produce artificial light was to burn some sort of fuel such as wood beeswax oil coal gas or kerosene This changed with the development of electric ity distribution networks in the late 1800s when electric lighting became widespread Early electric lighting consisted of incandescent light bulbs which produce light by heating a thin filament wire until it glows white-hot typically in a bulb filled with inert gas to extend the fila ment life These bulbs convert only a small percentage of the input energy into light wasting the rest as heat Incandescent light bulbs eventually gave way to gas-discharge bulbs including fluorescent lights neon signs and high-intensity discharge HID lamps such as streetlights which pass an electric arc through a tube of sealed gas to produce light more efficiently Gas-discharge bulbs typically require a high voltage so they are inconvenient for portable and low-power applications With a light-emitting diode nothing gets white-hot and no gas arcs are involved just highly efficient light production lED Configurations LEDs are very popular for all types of artificial light and come in many configurations Let’s explore some of the most common types you’ll encounter single and bicolor lEDs The basic single LED configuration has two connections the anode and cathode If sufficient voltage is applied the LED lights up Pretty simple Single LEDs come in all different shapes sizes and colors and some such as the second and fourth ones shown in Figure 1 have extra plastic to help direct the generated light through an open ing in the side of an electronics case 4 i n t rO d u c t i O n
Figure 2 A bicolor LED has two LEDs connected anode-to cathode A bicolor LED contains two LEDs in the same two-lead package typically with the individual LEDs connected anode-to-cathode as shown in Figure 2 Usually the two LEDs have different colors enabling the circuit to display two different colors using only two leads For example if cur rent travels through the circuit from left to right the lower LED turns on If current travels through the circuit from right to left the upper LED turns on Another fun type is the candle flicker LED which contains a small computer chip that turns the LED on and off in a flickering pattern designed to emulate the natural flicker of a candle You’ve probably seen these LEDs at fancy restaurants or wedding receptions or anywhere you want to have the ambiance of a candle without the risk of fire red-green-blue lED The red-green-blue RGB LED packages three LEDs into one and actually allows you to create a whole spectrum of colors not just red green and blue For example you can combine red and green light to make yellow green and blue light to create cyan and red and blue light to make violet Mixing all three colors of light at the same intensity produces white light By combining these three colors of light at varying levels of brightness for each individual color you can make millions of colors this is the same method your TV and phone use to display full-color images Usually to vary the brightness each color is switched on and off very rapidly which tricks our eyes into seeing each color at a different level of intensity The simplest RGB LED has four connec tions one for each of the three colors plus one connection common to all three LEDs This common connection can be either a common anode CA or common cathode CC which describes the internal connections of a four-pin RGB LED Figure 3 shows a diagram of the connections of a common anode RGB LED 5 i n t rO d u c t i O n
Figure 3 A common anode RGB LED contains red green and blue LEDs and has four wire leads red cathode common anode blue cathode green cathode Another common type of RGB LED is the digitally controlled RGB LED which contains a tiny computer chip used to control the brightness of each color Your microcontroller communicates with the chip in each RGB LED and sets the desired color The chips in the RGB LEDs are often either the WS2812B or the SK6812 and soft ware libraries exist for almost any system you want to use with them including Arduino Raspberry Pi and many others The biggest benefit of using digitally controlled RGB LEDs is that you can set and forget them so your microcontroller can update the LED with the latest desired color then move on to other tasks instead of having to constantly update the LED brightness You can also chain RGB LEDs together to form large strings or arrays of full color RGB LEDs making them useful for art projects and outdoor displays These LEDs are available in a variety of form factors as shown in Figures 4 and 5 Figure 4 A variety of RGB LEDs tiny surface-mount chips four-pin through hole package LEDs preattached to small circuit boards Figure 5 A flexible grid of digitally controlled RGB LEDs 6 i n t rO d u c t i O n