Fading a light source in and out automatically.

I've got a low voltage PWM unit which is controlled by a DC voltage. Can be used for motor or light control etc.

In this case I want to use it to drive high power LEDs. Which it does just fine.

What I want to do is have it ramp up to max when a switch is made, and ramp down to minimum when it's opened. I've experimented with RC circuits which do sort of work - but don't give a linear fade in and fade out. Any clever ideas? Preferably using just one cheap IC that I'll have in my box...;-)

It would also be nice to arrange things so it takes no current when the switch is off. Although I can get round this.

Reply to
Dave Plowman (News)
Loading thread data ...

There are fairly simple methods using opamps. Eg set one to deliver a constant current, feed this to a cap on the output. Or set one to deliver a fixed b drop across an output R, which gives constant i, etc.

Or more basically, stay with a CR and just use a percentage of the v scale, making it somewhat more linear.

NT

Reply to
NT

In article , Dave Plowman (News) writes

An integrator is what you're looking for, here's an op-amp based circuit:

(Fixed width font reqd) ___ ___ | | | | | |R1 | | R3 || C1 | | | | ------||--------- | | | | | || | |_| |_| | | | | | |\ | | _______ | | | \ | ----_______|--|-----|-----|- \ | | | | \_____|________ Vcontrol | R2 | | / | |-----------|+ / | | | / | | |/ PB1 | | | R4 | o--| | | --| | | | o--| |_| | | | | _|_ _|_

The ramp time delay is R2*C1 seconds.

If you chose a single supply fet input op amp then R3,R4 can be 1M, R1 roughly R2/10 to avoid skewing the delay.

Off state current drain should be in the uA range.

Reply to
fred

Actually, for your non critical app, this may well do the job, values left as an exercise for the reader ;-)

___ ___ | | | | | |R1 | | | | | | | |_| | | | / TR1 (pnp) | _______ |< ----_______|--|--------| | | |\ | R2 | | \ | | || C1 | | ----||------| | || |___________ Vcontrol PB1 | | | o--| | | --| | | R3 | o--| | | | |_| | | _|_ _|_

Reply to
fred

Thanks Fred- I'll give that a try.

Reply to
Dave Plowman (News)

=A0 \_____|________ Vcontrol

Even simpler is a fet and resistor configured to deliver constant current, plus a capacitor.

NT

Reply to
NT

The solutions posted give you a linear voltage ramp, but I'd have thought that what you want is something that /looks/ linear given the eye's logarithmic response. But then, an RC circuit would give an exponential decay, so I'm confused.

Reply to
Jon Fairbairn

I tried something similar using an LM318 in 'soft start' configuration which gives a nice ramp in - but would need some sort of constant current load to give the same ramp out.

Reply to
Dave Plowman (News)

Reasonably linear to the eye is what I want. An RC circuit on discharge gives a steep fade at first followed by a long slow one. As it were.

Reply to
Dave Plowman (News)

for which an opamp delivering constant current is ideal

NT

Reply to
NT

and the LM324 possibly a good candidate. There's a P version if you need to save power.

NT

Reply to
NT

Not quite sure what this is, mathematically speaking. Is the * a symbol which has come out wrong on my browser?

Basically, I'm after a fairly slow fade - perhaps 3 seconds from min to max.

Reply to
Dave Plowman (News)

time constant is R times C

NT

Reply to
NT

In article , NT writes

Yep, times it is, most of the packages I use denote multiplication with an asterisk so I techno spake.

For 3s you could kick off with R1 = 10k, R3 = R4 = 100k, R2 = 330k, C1 =

10uF non polar or 2 x 22uF polar back to back to create a non polar cap.
Reply to
fred

Ah. Right. I've never seen it written like that.

I'll give that a go - the largest non polarized I had was 1µF and space only allowed two, so perhaps not an ideal ratio. Never thought of using electrolytics back to back. Although I do have some non polar ones.

Reply to
Dave Plowman (News)

HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.