How can I fade a LED in and out?

vonelab

Newly Enlightened
Joined
May 10, 2005
Messages
9
I want to fade a LED in and out taking about 1 min to fade completely in and 1 min to fade completely out, continually running on a 9v. How can I do this? I don't know what to use, but I can read schematics and I understand resistors and what not- I'm just not sure about the chips or how to rig it up. Please help.
 

WildRice

Flashlight Enthusiast
Joined
Nov 30, 2003
Messages
1,135
Location
SW Michigan
I built this awhile ago to light up a piece of art. It has a 1.5v step-up circuit, and drives multiple LEDs. It could easily be changed to operate 1 LED/ It dimms by way of PWM. you wouild have to play with the values to see if you can get the desired effect.
Jeff
IMAG0000.GIF
 

Minjin

Flashlight Enthusiast
Joined
Sep 21, 2002
Messages
1,237
Location
Central PA
If you just wanted the fade out function, wouldn't a large capacitor in parallel with the emitter work?

Mark
 

IsaacHayes

Flashlight Enthusiast
Joined
Jan 30, 2003
Messages
5,876
Location
Missouri
Minjin: it wouldn't fade out linerally though..
Jeff: how do you make the transformer you made there? wind it on a nail or do you have to have a torrid?
 

Minjin

Flashlight Enthusiast
Joined
Sep 21, 2002
Messages
1,237
Location
Central PA
[ QUOTE ]
IsaacHayes said:
Minjin: it wouldn't fade out linerally though..


[/ QUOTE ]

Hmmm....can someone with a benchtop luxeon setup try this and see what happens? I know the vf to I curve isn't linear but I'm thinking that the efficiency curve might help make up for it.

Mark
 

IsaacHayes

Flashlight Enthusiast
Joined
Jan 30, 2003
Messages
5,876
Location
Missouri
I'm not sure if vonelab is talknig about luxeons. I was assuming it was 5mm standard leds.
 

Minjin

Flashlight Enthusiast
Joined
Sep 21, 2002
Messages
1,237
Location
Central PA
Probably. But I figured the question was still related and valid for the thread... /ubbthreads/images/graemlins/blush.gif

Mark
 

vonelab

Newly Enlightened
Joined
May 10, 2005
Messages
9
Could ya make a list of the exact parts you used to make that piece of art with the RGB
 

WildRice

Flashlight Enthusiast
Joined
Nov 30, 2003
Messages
1,135
Location
SW Michigan
Isaac, the coil was wound on a small torrid.
Vonelab, this was built as part of my early experimentation with boosters. The diode was a 1N4001 diode, I now use shotichy (?) diodes (got a 50 lot from ebay) the transistor is a NPN switching jobbie. I just went through the ones I had and found the one that worked the best. Let me see if I can find a small pic of what it was for.
Jeff
OK this one had 6 leds, 3 like in the write up and 3 piggy backed but reversed and tied to ground. because of the PWM nature of the fader 1 would fade in as the other fades out. It runns on a 'C' battery in the back of the frame.
smallledart0gp.jpg

like I said, It may be able to be tweeked to have longer fading times.
 

vonelab

Newly Enlightened
Joined
May 10, 2005
Messages
9
Listen man, I'm barely understanding a word your saying. Could ya please take atleast a bit of time and help me with this...
I want 3 leds, RBG, to fade in and out. I can't understand your shematics.
 

WildRice

Flashlight Enthusiast
Joined
Nov 30, 2003
Messages
1,135
Location
SW Michigan
no prob. first off, how do you want them to fade? The circuit described above works like this. LED1 on, LED2 fades in, then LED1 fades out, then LED3 fades in, then LED2 fades out. Kinda like a rolling motion.
IMAG0014.GIF


Sorry if I got ahead of ya, just got on a roll. do you have a solder-less bread board? the kind of thing you can prototype elecrtonic circuits on? I would be happy to assist you in this venture.
Jeff
 

vonelab

Newly Enlightened
Joined
May 10, 2005
Messages
9
Well I need to make something for art class that creates ambient fading/shifting light. I need it done by next wednesday. I understand Resistors and Capacitors, but nothing else.
I know I'm going to need some kind of chip. Instead of simply making me some schematics and telling me the parts I'd also really dig it if you could explain it to me along the way. Do you have AOL Instant Messenger? You can message me SN: VoneLab if you do.

So like I said.
- Runs off a 9v battery.
- Contains 3 LED's RED GREEN BLUE
As the red dims I want the green to fade in.... then as the green dims I want the blue to fade in.

That's all I want it to do. I want it to fade pretty slow though, not too fast.

Perhaps you could draw some detailed schematics (put all the resistor, capitor, and whatever values in. Show me how to rig the chip up as well..... and you could number each part and explain it. This is for my final project in art.
 

WildRice

Flashlight Enthusiast
Joined
Nov 30, 2003
Messages
1,135
Location
SW Michigan
The little gif image is pretty much real time. All the parts can be had at rat shack. (i think, haven't bought parts there in ages)
1. a 5 pack of 2 Meg Ohm (or close) resistors (1/8 watt I believe, but dosent matter at all)
2. 3x 1uF (or micro farad electrolytic capasitors
3. a 5 pack of 330 Ohm resistors (to keep the LED from frying on 9v)
4. 1 IC (get 2 just to be safe) several different types.
A. probably the easiest if RS has it is 4049 HEX INVERTING BUFFER.
B. next would be a 7404 (may be letter inbetween ie 74LS04 or 74HC04)
5. 1x solder IC board (your choice) they sell 1 style thas has a place for an IC in the middle and places around it for other components.
6. MISC 9v battery clip, switch (optional), LED's, bits of wire, solder, iron.....etc

If you can get the 4049 IC, that would make it a bit easier as it can run off of 9v directly. If you can only get the 7404 you may also need ..
A. zener diode 3.6v to 4.2v (anywhere in that range)
or
b. A pack of 1N4001 Switching diodes, at least 5pcs. These would be used to drop the voltage a bit before the IC.

It sounds like alot, but if you have a steady hand and can do basic soldering it could be made in an hour or so.
Jeff
 

vonelab

Newly Enlightened
Joined
May 10, 2005
Messages
9
Okay, so after the parts how do I rig this up.... shematics.
And would it just be easier to run this thing off say a AA or D battery because of the voltage? (because you say I need drop the voltage before the IC)
 

WildRice

Flashlight Enthusiast
Joined
Nov 30, 2003
Messages
1,135
Location
SW Michigan
there are 2 kind of chips TTL = transistor transistor logic, and these run off a supply voltage of 5V (3xAA batteries would work if you can only get the 7404) and there is CMOS = ???, these draw less current, are more static sensitive, but can run off of 3-15V. I just breadboarded a 4049 running direct off of 9V direct. 3 resistors of 1 MEG OHM and 3 capasitors or 10uF (micro farad) gove a nice slow walking fade about 1 minute full cycle. depending on what breadboard you put this on will make assembly a bit different. Honestly, if you soldering is fairly good you could just solder the parts right to the chip, but I woulden't recomment this unless you are GOOD at soldering. I can take some picture and/or draw some assembly pics. Pretty straight forward.
Jeff

Man, I really need to proof read my stuff. Ehh, mabyee later
 

rgbphil

Enlightened
Joined
Feb 3, 2005
Messages
210
Location
Sydney, Australia
Hi Vonelab,

Firtly....what level electronics experience have you got, that might help in us targeting the right sort of help. Here goes an explanation assuming a little knowledge of soldering, basic components, caps, inductors etc.

Pretty cool cct though Wildrice....and nice layout. I've been doing LED 'picture frames' for a while, but never thought to layout the cct on the actual frame!

I'll attempt to explain it for vonelab, and hopefully you can add the bits I'm missing out.....I'm keen for a full explanation too....explaining it to you helps me understand it myself.

Firstly the pwr supply looks like its works by simply using the transformer(wound on a toroid) to jack up the AA voltage. The transistor and 390ohm resistor form an oscillator. With an oscillating signal on one side of the toroid, you'll get the same signal on the other, but at a higher voltage....the increase in voltage depends on the ratio of turns from input to output. Because there are more turns on the output, the voltage is higher. The capacitor and diode on the output (labelled V+) smoothes the oscillating voltage to DC. Here's my take on the operation.

When the cct is first switched on, current will flow thru the 5T part of the transformer but will take a short amount of time to go thru all the whirly bits of the coil...it acts as an inductor, which delays current flow. Think of it like a coil of hose, and the water takes a bit of time to get to the end. As it is flowing though it generates a magnetic field, that is coupled via the toroid to the 20T part. This induces a higher voltage on the 20T coil...the dotted part of the 20T part of the coil goes higher than the battery voltage. This voltage is saved in the capacitor and the charge in the cap can be used by the rest of the cct. After a short time the current builds up enough and turns on the transistor, which then drags that point low. The diode prevents this low voltage being noticed at the capacitor....if it doesn't block fast enough, current flows back into the cct and is disappated as heat.

Please correct me if I'm wrong, but it's now the 20T part of the coil that is now drawing current from the battery (because the transistor is turned on). This induces a voltage on the 5T part like the first part of the cycle . The induced voltage on the 5T part means the base of the transistor is now too low to keep the transistor going....and it switches off......then the process repeats..giving an oscillator, where one part (V+) is higher than the battery voltage.

Incidentally Wildrice.....do you have any references to more of these cool little voltage step up ccts?

The reference to schottkey, is for special diodes that react quicker than your average diode....meaning better efficiency.

As for the PWM cct.....now that's pretty neat. I've used the old two inverter cct to make clock signals before....but this configuration is interesting....and cheap as well. Wildrice, what sort of pattern do you get....random or some sort of sequence....how sensitive is it to component tolerences? Can you give a quicky description of this part of the cct as well...I know you'll have to get deep and dirty with descriptions of hysteresis....?

hope this helps...any corrections welcome
phil
 

sunspot

Flashlight Enthusiast
Joined
Aug 22, 2001
Messages
2,707
Location
Graham, NC
I've wanted a LED fader for a couple of years. Any place I can buy one? I want to use two banks of 5-7 5mm with about a ten second fade.
 

WildRice

Flashlight Enthusiast
Joined
Nov 30, 2003
Messages
1,135
Location
SW Michigan
Phil, as far as the PWM circuit works....MAGIC... I got it online awhile ago, mabyee from oddones site. Durring the transition (in the grey area) secondary oscilations are set up. If you put this close to a radio you can hear it chirp the the middle of each change. Tolorences are pretty open, 1MOhm and 10uF run about 1min full cycle, 810KOhm and 1uF are about 15-18secs full cycle. I have also used this chip (with the addition of a few diodes and a pot) to make a ~2 - ~98% controllable PWM dimmer ckt.
For what it looks like Vone needs, the step-up is not needed, and if he can get the CMOS, right off the battery. I'll try and dig up some of the step-up prints I have and send them to ya.
Jeff
 

vonelab

Newly Enlightened
Joined
May 10, 2005
Messages
9
It'd be really good if you could draw out some assembly pics, because my skill in electronics isn't very high. I can solder really good.
 
Top