Light effects have always been popular. Now that LEDs are available in all sorts of shapes, sizes and colors for reasonable prices, a whole gamut of possibilities has become feasible. Examples are case modding (embellishing PC cases with all kinds of lights, windows, etc.), adorning scooters, motorcycles and cars with various light ornaments, mood lighting in different colors and we could go on.
In Elektor Electronics we also regularly feature circuits with LEDs. One circuit flashes LEDs, another drives multicolored LEDs. On one occasion standard logic (counters, shift registers, etc.) is used to drive the LEDs, on another occasion a microcontroller is used. But there are also solutions that do not require additional driving electronics.
Ordinary flashing LEDs that require no more than a series resistor have been around for donkey’s ages. They are quite nice, but spectacular they are certainly not. The company I.C. Engineering offers something much nicer: a three color LED in a package with a diameter of 5 mm, which also contains all the control electronics.
This ‘LED’ only requires a power supply voltage of 3 V to give a continuous ‘light show’. The colors blend slowly from one to another. This effect is even nicer if the components are used next to each other. Because of small variations between LEDs, one LED will change colour a little faster than another, which results in a colorful play of lights. This ‘LED’ is eminently suitable to make a nice light ornament without too much effort.
Author: _
(Elektor Electronics Magazine – 2006)
| * Download this article. |
It is widely thought that light can be therapeutic for the human skin and soul. Light at the correct wavelength may also be effective against depression and allergies. There is a wide range of products on the market, at prices from a few tens of pounds to a hundred pounds or so, which are presented as universal remedies for dust allergies or hay fever. If we look at these devices in more detail, we find that their operation is relatively simple to explain.
Common to all the devices is that they emit intense red light with a wavelength of 660 nm. Some biophysicists claim that light of this wavelength can have a positive effect on the human body and can initiate healing processes. This so-called ‘phototherapy’ is a treatment which is claimed to have an effect against allergic reactions in the body, since it acts against free oxygen radicals and strengthens the immune system, reducing inflammation of the mucous membrane. Since this treatment does not take the form of a medicine, but rather the form of visible light, there is no risk of side effects. There has been scientific research showing that this therapy does not work in every case, but success rates as high as 72 % have been reported. Since it may not be possible to obtain these devices under the NHS or under private medical insurance, our thoughts naturally turn to do-it-yourself.
For the enclosure we decided to use an old nasal hair trimmer. These can be obtained new for a few pounds, or you may have an old one that can be recycled. The choice of enclosure also dictates the choice of battery: the unit contains a holder for an AA-size cell. The circuit must
therefore not only be very compact (there is little spare room in the enclosure), it must also be able to drive a high-brightness red LED from a voltage between 1 V and around 1.6 V. Here again we can indulge in a little recycling: we can re-use the circuit from a Mini Project by Burkhard Kainka for driving a white LED, published in Elektor Electronics in June 2002. In this circuit the inductive voltage pulse is limited by the LED itself, ensuring that the output voltage will automatically match the forward voltage of the LED. The circuit is suitable as it stands for driving a highbrightness 660 nm red LED to make a do-it-yourself phototherapy unit.
In view of the small number of components, the circuit can be assembled by soldering them together directly or by using a small piece of stripboard. The circuit can operate from a wide range of voltages, and so we can use either an alkaline AA cell or an AA-size NiMH rechargeable cell with a voltage of 1.2 V. The current consumption of the circuit is about 20 mA. Assuming the circuit has been built correctly, the red LED should light brightly as soon as power is applied. Five to ten minutes’ use in each nostril every day should be sufficient to
obtain noticeable benefit after two weeks of treatment.
Author: Jörg Trautmann
(Elektor Electronics Magazine – 2006)
| * Download this article. |
A Simple and Cheap Dark-Detecting LED Circuit
Here's a simple problem: "How do you make an LED turn on when it gets dark?" You might call it the "nightlight problem," but the same sort of question comes up in a lot of familiar situations-- emergency lights, street lights, silly computer keyboard backlights, and the list goes on.
Solutions? Lots. The time-honored tradition is to use a circuit with a CdS photoresistor, sometimes called a photocell or LDR, for "light-dependent resistor." (Circuit Example 1, Example 2.) Photoresistors are reliable and cost about $1 each, but are going away because they contain cadmium, a toxic heavy metal whose use is increasingly regulated. There are many other solutions as well. Look here for some op-amp based photodetector circuits with LED output, and check out some of the tricks used in well-designed solar garden lights, which include gems like using the solar cell itself as the sensor.
In this article we show how to build a very simple-- perhaps even the simplest-- darkness-activated LED circuit. To our LED and battery we add just three components, which cost less than thirty cents altogether (and much less if you buy in bulk). You can build it in less than five minutes or less (much less with practice).
What can you do with such an inexpensive light-controlled LED circuit? Almost anything really. But, one fun application is to make LED throwies that turn themselves off in the daytime to save power. Throwies normally can last up to two weeks. Adding a light-level switch like this can significantly extend their lifetime.
Here are our components: On top: a CR2032 lithium coin cell (3 V). On the bottom (L-R): the LED, an LTR-4206E phototransistor, a 2N3904 transistor, and a 1 k resistor. This LED is red, blindingly bright at 60 candela, in a 10 mm package. It casts a visible beam, visible for about twenty feet in a well-lit room. We got the LEDs and batteries on eBay, and the other parts are from Digi-Key, but Mouser has them as well. As we mentioned, the last three cost about $0.30 all together, and much less in bulk.
The LTR-4206E is a phototransistor in a 3mm black package. The black package blocks visible light, so it is only sensitive to infrared light-- it sees sunlight and incandescent lights, but not fluorescent or (most) discharge lamps-- it really will come on at night.
Our starting point is the simplest LED circuit: that of the LED throwie, which has an LED driven directly from a 3V lithium coin cell. (Funny looking example here.) From this, we add on the phototransistor, which senses the presence of light, and we use its output to control the transistor, which turns the LED on.
The circuit diagram looks like this; please ignore the messy handwriting.
When light falls on the phototransistor, it begins to conduct up to about 1.5 mA, which pulls down the voltage at the lower side of the resistor by 1.5 V, turning off the transistor, which turns off the LED. When it's dark, the transistor is able to conduct about 15 mA through the LED. So, the circuit uses only about 1/10 as much current while the LED is off. One thing to note about this circuit: We're using a red LED. That's because the voltage drop across the transistor allows less than the full 3 V across the LED. The full three volts is really only marginal for driving blue LEDs anyway, so two-point-something really doesn't cut it. (Might be able to work around that with a cheap FET-- haven't tried yet.)
And now, let's build it. You can certainly put this together on a breadboard, but there's something more satisfying about the compact and deployable build that we walk through here.
First get the transistor and the resistor. The pins of the 2N3904 are called (left-to-right) Emitter, Base, Collector, when viewing it from the front such that you can read the writing. We're going to solder the resistor between the leads of the Base and Collector of the transistor. Unusual part: hold the resistor with its leads at 90 degrees to those of the transistor while you solder.
Stay safe when you do this: Use Mr. Hands.
After soldering, clip off the excess resistor lead that is attached to the transistor base (middle pin), as well as the excess length of the collector pin.
Next, we add the phototransistor. Note that it has a flatted side, much like an LED does. This pin on that side is the collector of the phototransistor. Solder the collector (flatted side) to the middle pin (the base) of the transistor, again at 90 degrees. The other pin of the phototransistor, the emitter, is left unconnected for the moment. (Here is an alternate view of what that should look like when you're done.)
Finally, we need to add the LED. To do so, we need to know which side is the "positive," or anode side of the device. Regrettably markings of LEDs are not consistent, so the best way to be sure is to test it with the lithium coin cell-- put the LED across the terminals of the cell and, when it lights up, note which side is touching the (+) terminal. (Usually, it's the one with the longer lead.) Solder the "positive" lead of the LED to the emitter pin of the transistor-- it's the one on the left, which doesn't have anything soldered to it. Trim away the excess lead of the LED that goes past the solder joint. Solder the other pin of the LED (the "negative" pin, or cathode) to the emitter of the phototransistor, the pin on the non-flatted side, which does not have anything connected to it yet.
By this point, there are only two pins sticking down below the components: One that goes to the resistor and collector (rightmost pin) of the transistor, and one that goes to the emitter of the phototransistor and to the cathode of the LED.
To test the circuit, squeeze the coin cell between these two terminals, positive side goes to the lead touching the resistor. You can't see the LED on here because these photos were taken with incandescent lighting-- it wouldn't turn on.
Bending the leads to contact the lithium cell a little more reliably, you can try it out a little more easily. In the photo on the right, I cupped my hand over the circuit-- so the LED turned on.
To make this into an actual "throwie," you still need to add some tape and a magnet, but that's quite easily done. This one makes a pretty good nightlight attached to the top of a doorframe-- when the room lights are off, it shines a bright, bright spot on the ceiling.
Where to go from here? While this little circuit can do something on its own, it would probably also be happy as part of a larger circuit. At a minimum, note that if you work with batteries that have lower internal resistance than the lithium coin cells, you should place an appropriate resistor in series with the battery before trying to operate this circuit-- or else you may put too much current through the LED. Certainly, this is one of the easiest and least expensive ways to control an LED with a photosensor. (Unlike, say, this method?) You could also consider crossing it with some more extreme mods, like the Talkie Throwies that know Morse code, or for more extreme hackers, bagel throwies.
Contributed by Windell on 12/12/2007 , in EMSL Projects. Permalink
Source: Evil Mad Scientist Laboratories
Author: Tobias Flöry
This circuit is a good example of a microcontroller design using the absolute minimum of external components. The ATTiny15L microcontroller from Atmel has three of its outputs connected to an RGB LED (or three individual red green and blue LEDs) and produces changing colour patterns. There are of course multicolour LEDs with a controller already built-in on the market but where would be the fun in the ready-built version? You will certainly learn much more by building and programming the design yourself.
The brightness of each LED is controlled using Pulse Width Modulation (PWM). This is accomplished in software and the source code is available to download from www.elektor-electronics.co.uk free of charge as file no. 050027-11.zip. A pre-programmed controller (part no. 050027-41) can also be ordered from the online shop at the same address.
The Kingbright RGB LED used in this circuit actually contains one red, one green and two blue LEDs. This helps compensate for the poorer output from the blue LEDs and for the relative insensitivity of our eye to the blue end of the spectrum. The light output thus can produce a better white colour balance. The forward voltage drop of the blue LEDs (4.5 V) is also quite a bit higher than green (2.2 V) or red (2.0 V) so the value of the series resistor (R4) needs to be almost ten times smaller than the series resistors R2 and R3 used for the other LEDs to maintain a similar drive current.
Maximum current consumption of the circuit is approximately 35 mA but the average will be around 25 mA. More information on this design together with some other interesting designs can be found on the author’s website at www.floery.net and look for ‘tobi’s corner’.
(Elektor Electronics Magazine – 07/2006)
| Download this article (#050027.pdf) |
Author: Karel Walraven
It is not always immediately obvious whether a power-consuming appliance is switched on or not. Examples are the lamp in the attic or the shed, or electric heating in an awkward place. A nice solution would be to connect an LED directly in series with the appliance, unfortunately you’d better duck for cover if you tried…
The obvious solution would be to place a (power-) resistor in series with the load and connect an LED with series resistor across it. However, this solution has significant disadvantages, for instance, the power loss is relatively large (easily a few watts). In addition, the value of the resistor should be adjusted depending on the magnitude of the current.
It would be better to insert two anti-parallel diodes in the power lead. Unfortunately, the voltage drop is too low to power an LED. It does work with 6 diodes, for that matter, but the power loss is then also 3 times greater.
We therefore chose a solution with two diodes, followed by a 4 times voltage multiplier in the form of a cascade rectifier. That is an energy friendly solution. The current through the LED is automatically limited by the internal impedance of the cascade rectifier. The impedance isn’t that small, despite the large electrolytic capacitors. Use a low-current LED, otherwise the LED will probably not be bright enough. The 1N5404 used here can handle up to 3 A
(3 A × 230 V = 690 W).
If the power is less than 200 W, you could use two 1N4004s instead. The voltage across the diodes is a square wave with an amplitude of about 1.3 Vpp. The voltage multipliers are used to turn this into the LED voltage. This will only work if the voltage drop across the diodes in the multipliers isn’t too large. That is why these diodes are Schottky diodes. These only have about a 0.35 V voltage drop. Exactly which type of Schottky diode that you use is not too important.
You are free to experiment with the value of the electrolytic capacitors. The larger their value, the greater is the amount of current that can be delivered.
Keep in mind that working with mains voltage can be fatal. Build the circuit in such away that there is no risk that live parts can be touched and maintain isolation distances of 6 mm (also in air). For the same reason, use a 5 mm LED (not a 3 mm one!) and fit it as far into the enclosure as possible. Mount the PCB in the enclosure with nylon bolts.
| Capacitors: | Semiconductors: | Miscellaneous: |
(Elektor Electronics Magazine – 07/2006)
| Download this article (#044029-uk.pdf) |
Author: Uwe Reiser
The circuit described here is the digital and display section of a thermometer; the analogue circuitry and signal conditioning required to use an LM35 temperature sensor are described elsewhere in this issue (‘LM35 to ADC’). The analogue-to-digital converter used here is hidden inside a PIC16F873 microcontroller behind the RA5 port pin. It has a resolution of 10 bits (1024 steps), allowing a temperature range of 128 °C to be divided into steps of exactly 128 °C / 1024 = 0.125 °C. Displaying a range of 1024 steps of one eighth of a degree, or even just 128 steps of one degree, on a row of LEDs is hardly practical. A better plan is to specify a desired temperature value and allow the microcontroller to indicate deviations from that temperature over a small range; effectively moving a magnifying glass over the temperature scale.
The BCD-encoded switches are used to set the desired centre temperature. When the measured temperature is equal to this value the centre two-color LED D6 will light green. If the temperature deviates from this value, the LED will light yellow. LEDs D1 to D5 indicate positive deviations and LEDs D7 to D11 indicate negative deviations in steps of one degree. If the overall measurement range is from –24 °C to +84 °C we can therefore set the centre point between –19 °C and +79 °C. Half-degree steps are indicated by two neighbouring LEDs lighting simultaneously. For example, between 19.75 °C and 20.25 °C just one LED will light; between 20.25 °C and 20.75 °C the next LED will also light; and between 20.75 °C and 21.25 °C just the second LED will light. If just the top or bottom LED is lit, it means that the temperature is outside the displayable range. The BCD encoded switches (S1 for the tens digit and S2 for the units) used to set the centre value have the advantage that there is no need for mental acrobatics converting between decimal and hexadecimal when setting or checking the value. Since negative numbers cannot be set using the switches, the value is expressed as the offset from the bottom of the temperature range. The software updates the displayed value every second if JP2 is fitted; if, however, port RA4 is high (jumper not fitted) a 900 ms delay loop in the software is bypassed and the display is updated at full speed.
A printed circuit board layout is available for the digital section of the thermometer (see Figure 2). The two BCD switches are in 6-pin DIL packages and can easily be fitted in sockets so that they can protrude through the lid of an enclosure. If the microcontroller is also be fitted in a socket it may become necessary to stack two or more sockets for the switches. The LEDs are situated at the edge of the board so that their leads can be bent through 90 ° if desired. When the board is populated (not forgetting the wire links near the resonator!) and the soldering has been checked on both boards, JP2 can be fitted and the circuit can be tested. During initialisation the microcontroller will run a power-on self test: the row of LEDs is lit in sequence from bottom to top. Each of the 23 possible display patters is shown for 100 ms. Finally the two-color LED flashes yellow twice, and the unit starts to display the temperature. Now switch off the power supply, remove JP1 on the digital board and set the BCD switches to the zero position. On the analogue board connect the LM35’s ground to the amplifier input (JP1 in position 0). Apply power and adjust P1 until LED D11 lights; this corresponds to the lower limit of the temperature measurement range.
COMPONENTS LIST
| Resistors | Semiconductors |
| Capacitors | Miscellaneous |
(Elektor Electronics Magazine – 07-08/2006)
| Download this article (#030190-1uk.pdf) |
Author: Andreas Köhler
Most PC enclosures provide only a single LED to indicate hard disk access, with the LED being connected to the motherboard via a two-pin connector. However, this LED only works with IDE drives, and if a SCSI disk controller is fitted, its activity will not be visibly noticeable. This small circuit remedies that problem using a multicolour LED.
The activity LED for the IDE interface is usually driven by a connected device via one or more open-collector stages. It illuminates if either of the two possible IDE drives is activated. The shared series resistor limits the current and also provides short-circuit protection. Even if the LED is shorted out due to faulty wiring, the current is restricted to a safe level. An obvious solution would be to have the IDE and SCSI disks drive a shared dual LED, but unfortunately the current flows from the positive supply line through a series resistor, the LED and a transistor to ground. The dual LED would thus have to have a common anode, but no such device exists. All known multicolour LEDs have a common cathode lead. That means they cannot be connected directly, but we’re not that easily defeated. Only a small additional circuit is needed to allow the LED to be driven by the different interfaces.
In this circuit, each of the drive signals from the two controllers is fed to an optocoupler, which acts nearly the same as the original LED. The somewhat lower voltage drop of the infrared LED results in a somewhat greater current, but there’s hardly any need to worry about overloading. The optocouplers eliminate the problems with the different voltages. On the output side, a Darlington transistor consisting of the phototransistor and a BC547 drives the multicolour LED. The 10-kΩ resistor (whose value of is not critical) provides secure cut-off of the driver transistor. The base of the phototransistor in the CNY17 is left open.
The series resistors for the individual LED elements are dimensioned using the standard formula. It may be necessary to adjust their values slightly, depending on the relative brightness levels. The circuit can also operated from the +12-V line of the power supply if the values of the series resistors for the LEDs are suitably modified. If necessary, a third optocoupler stage can be added to allow a three-colour LED (red, green and blue) to be driven.
COMPONENTS LIST
| Resistors: Semiconductors: | Miscellaneous: |
(Elektor Electronics Magazine – 07-08/2006)
| Download this article #030117-uk.pdf >> or SkyDrive link Download PCB layout #030117-PCB.pdf |
Labels
- * Elektor 2005 (9)
- * Elektor 2006 (72)
- Adapters (1)
- ADC / DAC (1)
- AM / FM (2)
- Amplifiers (3)
- Antennae (2)
- Articles List (1)
- Audio (1)
- Automatic (2)
- Batteries (3)
- Bluetooth (1)
- Breakers / Contacts (1)
- Buzzers / Sirens (1)
- Clocks / Timers (2)
- Computer (2)
- Converters (2)
- Coolers / Fans (1)
- Counters (1)
- Datasheets (7)
- E-blocks (1)
- Energy (2)
- Flash / Light (8)
- Frequency (1)
- Fuse (1)
- Generators (2)
- High-voltage (1)
- Indicators (2)
- Infrared (IR) (4)
- LCDs (1)
- LEDs (7)
- Magazines (1)
- Meters (5)
- Microcontroller (9)
- Mobile Phone (1)
- Motors (1)
- OPAMP (3)
- PCB (1)
- Photosensors (1)
- Power Supply (2)
- Preamplifiers (1)
- Programming (3)
- Radio (1)
- Rectifiers (1)
- Regulators (1)
- Relays / Switches (10)
- Remote Control (7)
- RS232 (3)
- Security (4)
- Sensors (2)
- Servo (2)
- Simulators (1)
- Small Circuits (46)
- Telephones (2)
- TENS (1)
- Testers (3)
- Timebase (1)
- Tools (1)
- Transmitters (1)
- Trigger (1)
- USB (2)