PDA

View Full Version : Electronics help needed, ....


phlogistician
10-16-08, 04:51 AM
... I want to slow start an LED, ie, I throw a switch, and it comes up to full brightness in a few seconds. I was thinking a simple capacitor/resistor, throttling the speed the capacitor charges with the resistor, and putting the LED across the capacitor.

LEDs being diodes though, I have a problem, in that it will 'switch' on a certain voltage, and I don't know what this is. I'm presuming it will be quite low, and the light output quite minimal, so the 'step' won't be too noticeable?

Has anyone done this? Got a circuit/component spec?

It needs to be small as well, and fit inside a diameter of about 3/4 an inch, and 1 inch long.

I know I could use an incandescent bulb to remove the 'step', but I'll need to vary the colour, and may use an UltraViolet LED yet, plus I want decent battery life, and fairly high brightness, so it has to be an LED.

voyager
10-30-08, 04:41 PM
LEDs being diodes though, I have a problem, in that it will 'switch' on a certain voltage, and I don't know what this is.
approximately 0.65 to 0.7 volts for silicon.
I'm presuming it will be quite low, and the light output quite minimal, so the 'step' won't be too noticeable?
actually the LED will come to full brightness once the breakover point is reached.
the characteristic curves for diodes suggest that what you want to do is possible but you would need to control the voltage in very minute steps at the breakover point. the slope of the forward biased diode is very steep.

here is a typical characteristic curve for a diode:
http://www.ese.upenn.edu/rca/software/Labview/diodetest/diodetest.html
as you can see the curve is very steep in the forward biased region.

phlogistician
10-31-08, 04:34 AM
Is that graph for an LED, or a regular diode? Because personal experience using LED torches does show a degradation of light output over time as batteries fade, and common sense says an LED given 0.7 volts isn't going to be as bright as one driven at it's maximum voltage. That graph implies a limit of 1volt, which I just don't buy.

voyager
10-31-08, 04:53 AM
That graph implies a limit of 1volt, which I just don't buy.
another, more detailed, source:
http://people.seas.harvard.edu/~jones/es154/lectures/lecture_2/diode_characteristics/diode_characteristics.html

detailed source for LEDs:
http://www.ecse.rpi.edu/~schubert/Light-Emitting-Diodes-dot-org/

another source:
http://www2.whidbey.net/opto/LEDFAQ/The%20LED%20FAQ%20Pages.html

Echo3Romeo
10-31-08, 09:45 PM
As voyager pointed out, using an RC circuit as a voltage source will not give you the linear current increase you need because of the LED's inherent barrier potential. An LED's brightness is a function of current across the junction. When batteries in an LED flashlight torch get low, the light gradually dims because their current capacity is diminished, not their voltage capacity (to be academic about it, the voltage does play a part, but it is small).

Therefore, you will probably have luck with a transistor set up as a current source. Then you can regulate the current through the LED to control its brightness, while at the same time keeping the voltage across its junction above barrier potential.

This page (http://www.4qdtec.com/csm.html) is all I could find at the moment to give you an idea for a circuit. It kind of sucks but you should get the idea. For timing the on/off transition, couple your RC circuit to the BJT's base lead. Since the base current will be in microamps, it won't have a noticeable impact on the charge/discharge curves.

MetaKron
11-01-08, 12:12 AM
A thermistor might be just the thing. It exhibits negative resistance.

voyager
11-01-08, 07:25 AM
you could also go the digital route and use a binary counter with a R2R resistor ladder.
http://en.wikipedia.org/wiki/Resistor_Ladder

i believe the current limiting route suggested by echo3romero would be a better option.

MetaKron
11-01-08, 10:48 AM
you could also go the digital route and use a binary counter with a R2R resistor ladder.
http://en.wikipedia.org/wiki/Resistor_Ladder

i believe the current limiting route suggested by echo3romero would be a better option.

Some form of pulse width modulation would be a lot simpler if you are going to use a microcontroller. Then it would just take the microcontroller and one resister if the micro has a built in oscillator.

MacGyver1968
11-01-08, 10:52 AM
(rubs hands together) I love threads like this!!

Get's my electronic juices all flowing!

kevinalm
11-01-08, 02:42 PM
How about a couple of 555 timers, one as a vco triggering another as a one shot? Instant pwm.

MetaKron
11-01-08, 11:42 PM
Might be more bother than an 8 pin AVR microcontroller.

kevinalm
11-02-08, 01:24 AM
Yeah but it might be cheaper. And I like analog for simplicity and reliability. But that's just me. ;)

MetaKron
11-02-08, 11:38 AM
Yeah but it might be cheaper. And I like analog for simplicity and reliability. But that's just me. ;)

Programming is a pain anyway. A solution that uses fewer parts would be to use an op amp whose output can swing all the way to ground. Put a resistor and a capacitor with the RC constant that you want on the non-inverting input. Feed the output through the LED, and from the LED run a current-limiting resistor to ground. Tie the inverting input to the top of that resistor. Then the current through the LED will be exactly proportional to the voltage across the timing capacitor. The LED will immediately light up, dimly, then become brighter as it goes. This will work with a power transistor too.

I have single op amps that are suitable but they're the size of a small ant and making the circuit board takes some doing. I don't know of any eight pin op amps that swing down to the negative rail. The LM324 is available from Radio Shack and it fills the bill very nicely. It is the big package and has 14 pins.

voyager
11-02-08, 12:27 PM
don't forget that you'll only have about 0.2 to about 0.3 volts to play with.
a diode starts conducting at about 0.5 volts and can be considered "full on" at about 0.7 volts.
this is assuming silicon.

MetaKron
11-02-08, 01:21 PM
don't forget that you'll only have about 0.2 to about 0.3 volts to play with.
a diode starts conducting at about 0.5 volts and can be considered "full on" at about 0.7 volts.
this is assuming silicon.

The current-limiting resistor goes from ground to the LED. The top of the resistor is connected back to the inverting input of the op amp. The op amp is set up as a voltage follower. The voltage drop across the LED is compensated for. What you get is a current through the LED that is exactly proportional to the voltage applied to the non-inverting input of the op amp. I'll try to get a schematic up pretty soon.

Billy T
11-02-08, 07:03 PM
To Metakron:

Your suggestion is a good one. It has been a long time so I forget the details, but you probably know them. Something called an "emitter follower" circuit may be possible and only a single transistor instead of an op amp.

MetaKron
11-02-08, 08:00 PM
To Metakron:

Your suggestion is a good one. It has been a long time so I forget the details, but you probably know them. Something called an "emitter follower" circuit may be possible and only a single transistor instead of an op amp.

I know those circuits. The timing capacitor would have to reach at least 2.2 volts. It would start out dark and take at least a fourth of the time to start to light up. One transistor has a pretty low input impedance so it would have to be like a Darlington setup and then you have even more voltage drop. Sometimes that's just fine.

Billy T
11-03-08, 08:27 AM
I know those circuits. The timing capacitor would have to reach at least 2.2 volts. It would start out dark and take at least a fourth of the time to start to light up. One transistor has a pretty low input impedance so it would have to be like a Darlington setup and then you have even more voltage drop. Sometimes that's just fine.You are no doubt correct here, but there seems to be two "fixes."

(1) First and trivial is to see it an initial delay after closing the switch is of any concern. The OP told only the following requirements:

"... I want to slow start an LED, ie, I throw a switch, and it comes up to full brightness in a few seconds. ..."

I bet if the post switch closure was followed by 0.5 (or even 2) seconds of darkness that would be no problem. Also note that the voltage rise on the capacitor will be initially rapid compared to later - fortunately a non-linear increase in LED brightness does not seem to be a problem so long as it is smooth increase. Your Op Amp circuit would be more complex if a linear increase in brightness were required.

(2) Second I assume that a tiny hearing aid battery is to power the system. (Size does seem to be a concern.) Thus it should be possible to use two of these tiny batteries and "float" the system 2.2V higher (or lower?) as needed. Years ago there were op amps in (To5 ?) cans but I gather from your posts that now they are mainly in much larger DIPs etc.

MetaKron
11-03-08, 09:45 AM
Phlogistician didn't say if the room he had for the circuit had to include the battery. I actually own a few eight pin op amps that would fill the bill, but they are in surface mount packages, and the other style that I have some of is actually, like I said, extremely small. By the time you have to use two transistors and associated components you might as well be using an op amp, even a 14 pin DIP. I suppose a 741 or half of a 1458 would give the same performance as two transistors. I just don't know of any eight pin PDIP packages that include an op amp whose output swings all the way to the supply rail. The tiny ones that I am talking about I have actually used in time delay applications in the real world.

Echo3Romeo
11-03-08, 11:08 AM
(rubs hands together) I love threads like this!!

Get's my electronic juices all flowing!
This thread seems to have developed into a contest to design the most unnecessarily complicated circuit for a simple task, heh.

MetaKron
11-03-08, 12:10 PM
This thread seems to have developed into a contest to design the most unnecessarily complicated circuit for a simple task, heh.

These are actually straightforward circuits using commonly available components and we're trying to keep down the component count, the cost, and the need to order parts with exacting specifications. If the LM324 chip had a widely distributed single op amp version with eight legs a very good implementation would have only five or six parts and an on switch. There are also eight pin microcontroller chips for about a dollar each that would allow it to be done with only three parts but the chips have to be programmed, which is a pain. We also want to keep from having to build a special circuit board using photolithography.

Billy T
11-03-08, 01:01 PM
This thread seems to have developed into a contest to design the most unnecessarily complicated circuit for a simple task, heh.I became active here because whenever I see Metakron say something intelligent, I like to note that. - Ortherwise he would think I just notice his nonsense.

I did go back and open your link. It was pleasing to see that what I had remembered about emitter followers was correct - that is the first and called the simplest circuit shown in and by your link.

Echo3Romeo
11-03-08, 01:39 PM
Hey. I usually find myself appreciating the posts both of you (Billy T and MetaKron) make. This is one of those times. :)

MetaKron
11-03-08, 10:11 PM
Thank you, Echo3Romeo.

phlogistician
11-04-08, 04:36 AM
This thread seems to have developed into a contest to design the most unnecessarily complicated circuit for a simple task, heh.

Yeah, I'm not bothered about perfection, I just want a small, simple circuit that will fit inside the dimensions 1" long x 3/4" diameter, including batts (button cells).

I don't really have room for ICs!

Billy T
11-04-08, 06:19 AM
Yeah, I'm not bothered about perfection, I just want a small, simple circuit that will fit inside the dimensions 1" long x 3/4" diameter, including batts (button cells). I don't really have room for ICs!Can you tolerate nearly a second delay from switch closure until LED is visible? If yes the RC charging and emitter follower idea I suggested with single transitor and about 4 or less resistors will easily fit and only need one battery. -If that delay is not tolerable, the idea of using two batteries and "floating" the circuit for almost immediate turn on will also fit and work, but I will defer to Echo3Romeo & MetaKron for the component values and precise circuit. There will probably be a couple more resistors and less battery life by nearly a factor of 3 if you can not tollerate the delay. (Both batteries will be smaller (< half as large) is main reason for less life, but some power will be wasted in a divider string also, but it can be open circuit except when needed if the switch has two poles as many do.)- I have not done any of this for 40 years. (I am an old tube man - for me the emitter follower is the "new version" of a cathode follower circuit!)

Also if the light is only for a human to see the approach of increasing duty cycle in an greater than 30 Hz oscillator drive is a viable solution with even less volume and cost and probably more efficient as LED is either on or off. Some sort of "self-blocking" oscillator as you do not need stable frequency so long as higher than perferial vision flicker detected.

MetaKron
11-04-08, 07:52 AM
I can do something with a Darlington set of three transistors, five or six resistors, and a capacitor. It would start with current through the LED and gradually grow brighter. The negative side of the capacitor can itself be raised by adding diodes between it and the negative power supply, so it starts at .6, 1.2, whatever. It takes an entire microamp to get 40 milliamps from a pair used in a Darlington arrangement if both transistors have a current gain of 200. That's too much loading on the timing capacitor, so it has to be three.

The easy way is to find a supercapacitor. Electronic Goldmine has a 22,000 microfarad unit for $1.29 and $7 shipping with no minimum order. www.goldmine-elec.com 470 ohms times 22,000 microfarads equals an RC constant of 10 seconds. You can raise the bottom of the capacitor with a string of diodes. The capacitor can only do 5.5 volts and your supply is likely to be 4.5 volts or about 5.3, whatever two lithium batteries add up to. Three diodes should do it for red or green and four is about right for blue or white LEDs. Cheap 1N4001 types are good. It should be safe to use a pair of small lithium batteries. Take your pick from Electronic Goldmine's selection or salvage them from cheap keychain lights. You'll want a resistor between the supercap and the LED or use an emitter follower circuit with just one transistor.

Some Radio Shack stores may still carry supercapacitors either individually or in their assortments.

An emitter follower isn't the best. Common emitter is better. I will draw up a circuit and upload it later.

MetaKron
11-05-08, 05:07 PM
http://img128.imageshack.us/img128/593/schematic4cg4.th.gif (http://img128.imageshack.us/my.php?image=schematic4cg4.gif)

Click on the thumbnail for a larger version.

C is the capacitor. It is best to use one of the supercapacitors in the .022 to .047 Farad range. These take up less space than a lot of regular electrolytics. Mouser, All Electronics, and Electronics Goldmine all have them for $1 to $2, and if you go with Mouser for some reason the .047 Farad parts are priced the best. Make sure it's the 5.5 volt type. Anything below you don't want, anything with a higher voltage gets horribly expensive and so not worth it.

The switch is arranged to give a rise and a fall effect,and it also serves to drain the capacitor so that it starts out dark. The diode below the capacitor lets it start at the same voltage as the base of the transistor, so the LED starts dim and works its way up. R1 should be around 100 to 470 ohms depending on the size of C and how many seconds you want it to take to reach full brightness. R2 limits current to the base of the transistor and it should be around 2.2 k to 4.7 k. R3 gives some feedback so that the current through the LED is directly proportional to the voltage across C1. You don't want R3 to have much more than a volt across it at full LED current, so that's about 33 ohms for 30 milliamps. This leaves about a 3.5 volts for the LED/R4 combination and keep in mind that the transistor is in current mode. A tiny bit of voltage across C1 equals a tiny bit of current to the LED. The rise time will be at the beginning of the charging cycle and the fall time will be at the end of the discharge cycle.

R4 limits the maximum current through the LED. You want to look at 47 ohms to 180 ohms, all things considered.

The battery can be three button cells, two lithium cells, or three or four Nicad or NiMH batteries. A six volt source is pushing your luck. Some of the batteries you can find these days are extremely tiny. One good source of lithium batteries is the cheap little LED flashlights you find at the supermarket.

This I think is the easiest thing short of a preprogrammed microcontroller, not counting having to program the crazy thing. Using smaller capacitors means more transistors, more having to deal with voltage drops, and so on.

Billy T
11-05-08, 05:18 PM
Very nice design, suggestions and good clear text MetaKron. I did not check your values but bet they are reasonalble. Congratulations.

PS - Are you a Ham? I was W8IJM. I got a WAS certificate (easier back when only 48 states) and 25 wpm certificate too from ARRL.

MetaKron
11-05-08, 05:45 PM
Sorry, not a ham. Never got around to it. Thank you for the compliments.

MacGyver1968
11-05-08, 06:16 PM
It's been since '94 since I was in electronics school...whats a supercapacitor?

MetaKron
11-05-08, 06:32 PM
It's been since '94 since I was in electronics school...whats a supercapacitor?

In this case it's a capacitor that is about the size of three to five American or Canadian nickels stacked one on top of another. It's capacitance ranges from about .22 Farad to 1 or more Farads. It's a different process, something like a porous anode or cathode treated electrolytically. They're pretty handy for some odd applications and they're good for memory backup. You can look them up on the websites I mentioned.

kevinalm
11-06-08, 12:18 AM
Amorphous carbon iirc. Like activated charcoal. Tremendous surface area in contact with the electrolyte (but separated from it by a plated insulation).

Echo3Romeo
11-06-08, 10:19 AM
http://img399.imageshack.us/img399/1759/schematic1th8.th.gif (http://img399.imageshack.us/my.php?image=schematic1th8.gif)

Click on the thumbnail for a larger version.
I tried plugging this circuit into Multisim (I have a copy; I used to have a bigger electronics hobby) and it appears to work exactly as required.

MetaKron wins the thread. Well done. Interesting that you put the anodes facing down in your schematic. Any particular reason?

MetaKron
11-06-08, 10:50 AM
I tried plugging this circuit into Multisim (I have a copy; I used to have a bigger electronics hobby) and it appears to work exactly as required.

MetaKron wins the thread. Well done. Interesting that you put the anodes facing down in your schematic. Any particular reason?

I looked up "diode" in Wikipedia and as I thought, it says that the flat bar is the cathode. The arrow points towards the cathode. The diodes are forward biased and the transistor is NPN. This is a depiction of how the catswhisker makes a P type region when it makes contact with the bit of germanium or a piece of galena.

Looking around, I seem to have the battery symbol upside down, which is why it should be marked. I always think of the narrow end as positive because the little button on AA batteries is the positive contact. I just changed the schematic so the battery is the right way.

cato
11-07-08, 08:47 PM
looks like I came into this threat a little late. I am actually in the process of making one of these:
http://www.youtube.com/watch?v=_zfykEmBCn0
except mine will be 9x9x9 so that it has a true center. it makes the programming much harder, but I think it will look cooler.

anyway, when I saw this threat, I was like "haHA! I can put electrical engineering degree to use!:cool:" however, the space limitations prevent most really novel solutions, and if you don't want to use an AtTiny (microcontroller you can get in a 4mmX4mm package) then you probably want to go with MetaKron's suggestion.

I am curious though, why do you want a 2 second start? also, if you don't mind, what are you making?

p.s. keep in mind that the average LED is high luminance and low luminosity. in short, LEDs have a very high light output per unit area of the source, but total "number of photon" or Luminous Flux is actually pretty low. this effect is clear when an LED is "bright" enough to hurt your eyes, but cannot illuminate a room. therefore, you should be careful when picking your LEDs.

MetaKron
11-07-08, 11:13 PM
That's an amazing LED effect, Cato. I doubt if I will ever do anything like that unless someone finds a way to project a 3D image from a 2D screen, which may be possible.

leopold99
11-10-08, 07:53 PM
It takes an entire microamp to get 40 milliamps from a pair used in a Darlington arrangement if both transistors have a current gain of 200.
the beta (gain) of a darlington pair is the gain of one multiplied by the gain of the other.
we can easily assume a gain of 50 for a single stage. for a darlington pair it can easily be over 2000, not 200.

after rereading i noticed the part that each transistor has a gain of 200.
this gain is squared in a darlington configuration giving 40000

MetaKron
11-13-08, 02:29 AM
the beta (gain) of a darlington pair is the gain of one multiplied by the gain of the other.
we can easily assume a gain of 50 for a single stage. for a darlington pair it can easily be over 2000, not 200.

after rereading i noticed the part that each transistor has a gain of 200.
this gain is squared in a darlington configuration giving 40000

And that gets you from 1 microamp to 40 milliamps. Even using 1 microamp of current means that you have to use a resistor no larger than about 1 megohm in the RC timing circuit. The capacitor then needs to be a microfarad per second of RC time constant. You have to hand pick the transistors for that high a gain.

Billy T
11-13-08, 06:35 AM
...you have to use a resistor no larger than about 1 megohm in the RC timing circuit. The capacitor then needs to be a microfarad per second of RC time constant. You have to hand pick the transistors for that high a gain.I do not know, but suspect that it may be possible to simply use the capactance of the diode (IN4001, in your drawing or another?). A microFarad is not much. I.e. not have any discrete / separate capacitor. What do you think?

Possibly, even the switch can be eliminated too,* if continuous cycling is acceptible. I.e. as the diode's capacitance is charging the LED is growing progressively brighter. When the voltage across the diode makes it switch into forward (avalaunch) conduction, it discharges its self and then shuts down as free cariers die away to begin charging again. -New diode getting brighter cycle.

Output like:

.../|/|/|/|/... but no gaps as they just come from the typed characters I used to illustrate.
----------------
*Remove battery to turn off (or even this could be the "switch.")

MetaKron
11-13-08, 12:53 PM
The capacitance of the diode is about a million times less than what is needed for the timing. The diode just "raises the bottom" so the capacitor starts at 0.7 volts instead of zero. If a Darlington pair is used for the transistor you need two diodes. The parts count just keeps going up.