A different and subtle LED decorative lighting option, without needing to dedicate an Arduino.
BUILD TIME: 3 HOURS
DIFFICULTY RATING: BEGINNER
There are many ways to create eye-catching displays or attention-grabbing indicator lights. The breathing LED is one of those options, but this month, we use it to create a decorative light that will blend in rather than steal attention. Giving an LED a breathing effect allows its light to create rhythm and atmosphere without being blatantly obvious. It is designed so you won't really notice it, until you take it away.
Breathing LEDs are often made with the use of a microcontroller such as Arduino. This is perfectly valid, especially where a microcontroller is already in use to do a more complex job. In that case, breathing LEDs make a great indicator light, catching attention more effectively than a steady light but with less assault on the senses than a flashing light. Microcontrollers also work well if you want to get fancy, like making the LED 'breathe in' and 'exhale' at different rates.
However, for this particular application, a microcontroller is a bit of overkill given that you can build a circuit for around $20 less. On top of that, you get to practise the skills used in building a circuit from scratch. While microcontrollers are often the best choice, there is still plenty of value in knowing how to build an analogue, or even digital, circuit from discrete (individual) components.
The circuit we have this month is based on the NE555 timer, an Integrated Circuit (IC) that we've used many times in Kids' Basics. Besides the IC, we need just a handful of components and four high-brightness LEDs. It's a simple and cheap circuit that can be adapted if need be to run more LEDs or a brighter array. It does only one job, but it does it well.
The Electronics Build:
We encourage you to read all the way to the end of the article before you build. Not only will you then have a better feel for the overall picture as you build, but we sometimes discuss options or alternatives that you will need to have decided on. You will need some basic hand tools for most builds. Small long-nosed pliers and flush-cut side cutters meant for electronics are the main ones.
Materials like tape or glue are mentioned in the steps, too. We always produce a tools and materials list if you have to go shopping, but anything that is lying around in most homes is just stated in the steps.
As always with Kids' Basics, we're building on a solderless breadboard. We avoid soldering to make Kids' Basics accessible to more people, but having an adult around can still be helpful. You won't need any particular skills besides being able to identify components at a basic level, and even then, we help as you go along. If, for example, you don't already know what a resistor is, you'll probably be able to work it out from the photos and description in each step.
We do provide a schematic or circuit diagram but this is just helpful if you already know how to read one. Don’t stress if you have never learned, but take the chance to compare the digital image of the breadboard layout (which we call a 'Fritzing' after the company that makes the software) to the schematic and see if you can work some things out. You can make this project from the Fritzing and photos alone. You might also like to check out our Breadboarding Basics from Issue 15.
In terms of component choices, some are fixed but others flexible. For example, we use a BC337 transistor, but any NPN transistor with the same specifications will do. The BC337 has an 800mA continuous current rating. The often-used BC547 handles only 100mA continuously, while our four-LED load may draw 120mA. So if you have an NPN transistor that handles 400mA and has the same lead arrangement (collector, base, emitter when viewed from the front face) as the BC337, you can use it.
On the other hand, we specify a 33μF electrolytic capacitor, and these are what they are. The only other polarised capacitor with a value over 1.5μF that you're likely to ever find is a Tantalum capacitor, and they're reasonably expensive in comparison. The value also works best with the circuit. This confuses some people, especially those with little experience. Our advice is this: If you don't know how to find and compare the specifications of, say, a transistor, then just buy the parts we used.
The other main thing you have choice with is the LEDs. We used medium brightness tinted blue ones from Core Electronics for the photography so they are easily visible, but the ones in the parts list from Jaycar and Altronics are water clear high-brightness varieties. They will emit more light than tinted ones and thus make a better lamp. The colour choice is also up to you but the parts list numbers are for blue, except for Core Electronics, whose product is a medium-brightness multicolour pack and still works just fine.
|TOOLS & MATERIALS (See Text for details)|
|Clear Sticky Tape|
|Hot Melt Glue Gun|
|Tracing Paper, A4|
|Small Cardboard Box|
|Coloured or Patterned Paper|
TOOLS & MATERIALS (See Text for details)
|Parts Required:||Schematic Id||Jaycar||Altronics||CORE ELECTRONICS|
|1 x Solderless Breadboard||PB8820||P1002||CE05102|
|1 x Pack of Breadboard Wire Links||PB8850||P1014A||CE05631|
|4 x 150Ω Resistors*||R5, R6, R7, R8||RR0552||R7538||COM-05091|
|1 x 10kΩ Resistor*||R1||RR0596||R7582||COM-05091|
|1 x 100kΩ Resistor*||R2||RR0620||R7606||COM-05091|
|1 x 220kΩ Resistor*||R3||RR0628||R7614||COM-05091|
|1 x 470kΩ Resistor*||R4||RR0636||R7622||COM-05091|
|1 x 100nF Capacitor||C2||RM7125||R3025B||CE05188|
|1 x 33μF Electrolytic Capacitor||C1||RE6095||R5094||CE0510*|
|1 x 100μF Electrolytic Capacitor||C3||RE6130||R5123||FIT0118*|
|1 x NE555 Timer IC||IC1||ZL3555||Z2755||002-512-LM555CN|
|1 x BC337 or Equivalent NPN 800mA Transistor||Q1||ZT2115||Z1035||COM-13689|
|1 x 1N4148 or 1N914 Diode*||D1||ZR1100||Z0101||CE05129|
|4 x High Brightness LEDs||LED 1 to 4||ZD0183||Z0806A||CE05103#|
|4 x AA Batteries||SB2425||S4955B||CE04629|
|1 x 4AA Battery Holder||PH9200||S5043||FIT0079|
* Quantity shown, may be sold in packs. # Not really bright enough for the lamp version of this project but great if directly visible and very good LEDs to have.
Place the breadboard in front of you with the outer red (+) rail away from you and the outer blue (-) rail closest to you. Install the NE555 IC with its dot or notch facing your left. Also, add the wire links which join the matching supply rails.
Install the three wire links which join pin 2 of the 555 to pin 6. Also install another link, from pin 7 toward the left of the board. Notice that this one ends two rows to the left of the set that wraps around the IC.
Add a wire link from the upper red (+) rail to pin 8 of the 555. Add another from pin 1 to the lower blue (-) rail and one more from pin 4 to the lower red (+) rail.
Install a 10kΩ (brown-black-black-red--brown) resistor between the upper red (+) rail and pin 7 of the 555. Install a 100kΩ (brown-black-black-orange--brown) resistor between pin 6 and the wire link to the left of the IC.
Add a 100nF capacitor (104J100 or 0.1J100 for an MKT) between the upper blue (-) rail and pin 5 of the IC. We used an MKT capacitor but a greencap or ceramic will do too. These will likely be marked 104 but the other letters and numbers (which are tolerance and voltage ratings) will differ if they're there at all.
Insert a 33μF electrolytic capacitor with its positive leg to pin 2 of the 555. Its negative leg, marked with a stripe, goes to the lower blue (-) rail. Values for electrolytic capacitors are printed on the heatshrink sleeve over the case, usually directly in μF along with a voltage and temperature rating.
Install a 1N4148 or 1N914 diode from pin 3 of the 555 to a spot beside the IC. The striped end, the cathode, is furthest from the IC. Install a 220kΩ (red-red-black-orange--brown) resistor from the end of the diode to a spot to the right on the board.
Add a BC337 or similar transistor with its middle leg (the base) in the same row as the end of the resistor, and its flat face away from you. Many transistors have their legs formed straight down from the package, and you will need to carefully bend the outer ones slightly sideways to get them into the right rows.
Place a 470kΩ (yellow-red-black-orange--brown) resistor between the middle leg of the transistor, and a row to the right. Install a wire link between that row and the lower blue (-) rail. The middle leg when the transistor is inserted in the board correctly is the 'base'.
Insert a wire link between the lower blue (-) rail and the left-hand leg of the transistor, which should be the emitter. Also add a 100μF electrolytic capacitor with its positive leg to the base (middle leg) of the transistor and the wire link to the right. This capacitor should connect in the same rows as the resistor next to it.
Install a wire link from the right-hand leg of the transistor across the gap in the breadboard. Add four 150Ω (brown-green-black-black--brown) resistors in the same row as the wire link, each one stretching one row further than the one before it. Install one more wire link in the row next to the longest resistor to the upper red (+) rail.
Place four LEDs of choice, each one with its shorter negative leg in the same row as a resistor leg, but all the longer positive legs in the same row as the wire link. This means all the LEDs will have their legs bent a little differently.
Now all that remains is to apply power and test out your circuit. Install four AA batteries in a holder and plug the red wire into one of the red (+) rails and the black wire into one of the blue (-) rails. At first nothing will happen, but after around two seconds as the capacitors initially charge (they never fully discharge during operation so things happen quicker), you should see the four LEDs gradually increase in brightness up to a point, where they will stay momentarily before the brightness fades away to nothing.
If this does not happen, pull out the power, being careful not to let the wires touch, and remove one battery from the holder. Now using the photos and Fritzing, check all of your connections. Check that all the wire links and components line up in the right rows, check where the stripes are on diodes and electrolytic capacitors, and check the LEDs to make sure that their legs are in the right rows and the right way around. Also check that the transistor faces the right way and the legs line up with the right components.
How Does It Work?
At its heart, the circuit is one we have built before. We have used the NE555 in the Siren project, the Star Struck Starry Sky, the Emergency Lights, Delightful Decorations, Clap Activated Switch, Flickering Campfire, Sound Drawing, Decision Maker, Metal Detector, Bedroom Door Alarm, and the Bedroom Doorbell. That's just under half of all our Kids' Basics issues, and while the article continues to evolve, the 555 will likely be in quite a few more.
Part of the reason it is so useful is that it is versatile. It can be run in monostable (once-only), astable (repeating on and off), and flip flop (triggered on, triggered off) modes, all of which have variations. This time, we're running it in astable mode, which means we choose timing components and arrange them so that the output turns on at a certain point and then off at a certain point. Astable operation is also known as a multivibrator.
We try to avoid really deep explanations in Kids' Basics. We have this as one of our criteria, because columns like The Classroom are for really deep treatments. We have covered the 555 in depth before if you want more information. The point of Kids' Basics is to show you how to make something, and give you enough understanding to modify it or experiment a bit. For the same reason, we also avoid the maths that goes along with the explanation, unless absolutely necessary.
For those who don't want the deep version, here is a summary of what's happening around the 555 in this circuit. The timing period is controlled by resistors R1, R2, and C1. When power is first applied, the output pin 3 is high, or on. Current flows through both resistors to charge the capacitor, which is also connected to the trigger pin 2. The trigger pin has a threshold, in most set-ups, of ⅓ of the supply voltage for off, or low; and ⅔ of the supply voltage for on, or high.
When the capacitor is charged to ⅔ Vcc (we use Vcc to represent the supply voltage), the output is turned off. This now turns on an internal transistor network which connects the discharge pin 7 to ground, allowing the capacitor to discharge via resistor R2. When the voltage across the capacitor c1 falls to ⅓ Vcc, the trigger pin 2 senses this and the output goes high again. This cycle repeats for as long as power is applied. Timing is set by the values of C1, R1, and R2 for the low phase, and C1 and R2 for the high phase. Using a value for R2 that is much, much bigger than R1 helps get the on and off times almost the same. The amount of on time compared to the total time (one on and off cycle) is called the duty cycle and is stated as a percentage.
When the output pin 3 is high, current flows via diode D1 and resistor R3 to the base of transistor Q1, a BC337 NPN transistor. NPN transistors amplify current by a small current flowing from base to ground via the emitter. This is why we don't normally use an NPN transistor between Vcc and a load, as the load may affect flow of current from the emitter to ground. When this current flows, a proportionally larger amount of current can flow from the collector to the emitter.
The NE555 can handle 200mA on its output pin, and even with four high-brightness LEDs in total, that would still be only a load of 120mA for most LED types. Why the transistor? We're not actually using it to amplify current here. Resistor R3 would always be present in some value to stop too much current flowing through the base and damaging it. By choosing a large value, we allow only a small current to flow, but there is a capacitor C3 connected to the base too. This begins to charge, and that means there is not enough current to turn on the base of Q1.
As the voltage on capacitor C3 rises, more current is able to flow through the base of Q1, which gradually turns on more and more. This gives the breathing in effect. At around the time that C3 has charged enough and Q1 has fully turned on, the output of the NE555 has gone low, so there is no more current flowing to C3 and the base of Q1. Now C3 begins to discharge, keeping current flowing through Q1's base. This gradually reduces as the charge stored in C3 leaves. Some of it leaves via resistor R4, which helps make sure C3 discharges fast enough. This gives the slow breathing out effect.
Integrated circuit markings can be confusing. On the subject of the NE555, different manufacturers have different letters and sometimes numbers before and after the main device code. The most common in the over-the-counter DIP8 package used for breadboards are the NE555 and LM555. Many manufacturers are using the LM designation for updated designs, including Texas Instruments, which make both NE555s and LM555s.
There are different letters after the 555 for different manufacturers which mean different things, like the temperature ratings, plastic or ceramic case, things like that. Any different letters or numbers before the 555 mean things too. There are space and aviation rated options, often called an SA555 or similar. These are expensive and you are very unlikely to come across them in retail stores.
Sometimes you will find an LM7555, which is a CMOS version of the same IC and should be avoided because it is static sensitive. Our examples were a mix of Texas Instruments NE555P (the P meaning plastic case) and LM555CN, and STMicroelectronics NE555N. So if you see writing on your IC that does not match our text or photos, you probably still have the right thing if you bought it from a reputable supplier.
The Craft Build:
Some LEDs on a board changing brightness are somewhat cool, but what to do with them? You could leave them as-is and use them to wash a wall or something with light, the board hidden from view. However, making a lamp that can sit on a table or shelf is probably a better option.
Recently we featured an illuminated artwork build, and to make it, you needed tracing paper. Most people will have had to buy a whole pad of this, and while we hope you got that from a dollar shop, we still think you can use some more of it on this project to make the purchase more worthwhile. That's if you didn't realise how much fun tracing paper can be and have already used the whole pad! If so, or if you never made the Illuminated Artwork from issue 40, baking paper will work quite happily in this case. Just use regular A4 copy paper as a size guide to cut it.
You'll need a cardboard box for the lamp base. The idea is to find one that just fits the breadboard and battery box, and is not much taller than most of the components so that the LEDs stick out of a hole in the top. However, this will be purely chance. You may not have the right size lying around, or you may not have any boxes at all. For this reason, we chose a box that was too big. However, it is a standard small sized post box, and you can buy them individually from post offices if you don't already have online shopping arriving in them. If you can find a smaller one for yourself, great, but using the post box is a worst-case scenario and everyone can access one in some way.
We use cardboard in this build, but you don't have to buy whole poster-sized sheets. Most dollar shops have coloured or plain card in the craft section in A4 sheets. This is what we used. The same goes for the coloured paper used to cover the cardboard box base. This can be plain coloured copy paper, or patterned, foil, or wrapping paper. Anything you can think of, really. Again, if you don't have something suitable already, dollar shops generally have you covered.
Mark a circle on the lid of your cardboard box, no bigger than 6 cm across. Any round object the right size will do. We used a spray glue can. You can also use a drawing compass, which will probably be with your school maths stuff if you're in year 4 or upwards.
Cut out the circle from the lid. You may be able to do this with scissors, but have an adult watch you. Start by making a hole in the middle with a pencil for the scissors to start from. You could also have your adult use a sharp knife to make the cutout.
Cover your cardboard box with something decorative. We suggested some things above, but don't use contact: It's too easy to mess up. We used a glue stick and coloured paper for ours. Cut out the circle again after you're done.
Cut a strip of cardboard 2cm wide from the long side of an A4 piece of card or 2cm x 30cm from a bigger sheet. Mark a line at the 27cm mark from one end.
Glue the cardboard in a circle so that the overlap stops at the mine from the step above. You should have a ring a bit under 9cm across.
Use hot melt glue to attach the ring to the top of your box, evenly around the hole you cut earlier. Make sure you glue on the inside.
Wrap an A4 sheet of tracing paper around the cardboard ring. Tape at the bottom, straighten the edges, then tape all the way up.
Slide the tracing paper tube off the ring, and open the lid. After placing the battery holder and breadboard inside, you might need to bulk up the space with scraps of foam, cardboard, old muesli bars, anything, so that the LEDs go through the hole in the lid.
Adjust the LEDs carefully so that they face different directions around the circle, evenly spaced if you can. Be careful not to let the legs touch. A pair of small pliers will help here. Face them on a bit of an angle so they point at the lower half of where your tube of tracing paper will be.
Open the lid, connect the battery, and close it again. If your lights come on, you can gently slide the tracing paper tube back over the ring, taking care that the join faces away from the direction the lamp will be viewed the most. Turning the lamp on or off is by opening the lid with the tube still attached and plugging in or unplugging the battery wires.
WHERE TO FROM HERE?
You could explore different values of resistor and capacitor for R1, R2, and C1, as well as C3 and R4. These will vary the breathing rate and the amount of breathing in and out for a given rate. There isn't too much else to do electronically besides choosing different LED brightnesses and colours.
The lamp we have constructed is just one option, but really your imagination can run wild here. You can mount the LEDs any way you like in anything you like. Not the bottom of a fish tank of course, because the electronics won't like the water and the fish won't be happy either. Besides that kind of thing, it's really up to you. Now that you've seen our build, even if you haven't built it, you can get an idea of what the requirements are.
You might mount a tealight holder like the metal lace ones available from Dusk, IKEA, and other outlets, to the top of a box to hide the breadboard. You'll need an adult to drill through the metal though, to let the LEDs through. Drilling metal is not the safest thing if you're inexperienced.
You could also mount the LEDs on wires, like plug-to-socket jumper wires, and hide the board entirely. This changes your LED mounting options, and means you can have them taped to the side of the lamp or pointed at it differently. You may also not need the diffusing effect of the tracing paper in your design. Search the Internet, with your adult with you, for 'breathing LED lamp' for some amazing and very varied ideas.
Further to all of this, you could substitute the coloured LEDs for high-brightness white ones and draw on your tracing paper. We found it easier to do this before we rolled in into a tube!