Electronic Circuits and Projects Forum



LED fade in/fade out

« First 123456 Last »
  1. #11
    alec_t alec_t is offline
    Ok. This should do it.
    U1b/R2/C3 form a ~23kHz oscillator whose output is integrated by R3/C4 to give an approximation of a triangle wave. When the switch is closed C5 charges via the pot to generate a rising voltage ramp. The wave and ramp are summed, at the input of U1c, by R5/R6, to give a PWM output which switches Q1 and Q2 to drive NMOS FET M1 and hence the load (your string of LEDs plus current-limiting resistors). The PWM signal has a duty cycle which increases over the ramp period (settable with the pot) to fade-in the LEDs.
    When the switch is opened the ramp voltage falls and hence the PWM duty cycle decreases over the same set period to fade-out the LEDs.
    N.b C5 should be 220μF in practice, but to make the simulation run faster it is 22nF.
    Attached Images
    Attached Files
    0
    My circuit designs should be regarded as experimental. Although they work in simulation, their component values may need altering or additional components may occasionally be necessary when the circuit is built. Due safety precautions should be taken with any circuit involving mains voltage or electrostatic-sensitive components.
    Alec's First Law:-
    Every problem has a solution (given the right information and resources).

  2. Thread Starter #12
    1-3-2-4 1-3-2-4 is offline
    hmm I don't have a schmitt trigger but I will try this on the breadboard and see what I get.
    0

  3. #13
    ljcox ljcox is offline
    Here is a circuit that I designed for someone else some time ago.

    It does not do exactly what you want but it could be adapted.
    Attached Images
    0
    Len

  4. #14
    colin55 colin55 is offline
    How do you get 30mA for the LED with 150R current-limiting resistor???
    0

  5. #15
    colin55 colin55 is offline
    If you just want fade-on fade-off this is all you need:
    UpDownFadingLED-2.gif
    0

  6. #16
    ljcox ljcox is offline
    Quote Originally Posted by colin55 View Post
    How do you get 30mA for the LED with 150R current-limiting resistor???
    Try Ohm's Law.
    0
    Len

  7. #17
    colin55 colin55 is offline
    Try Ohm's Law.
    How did you use Ohm's Law.
    0

  8. #18
    alec_t alec_t is offline
    @colin55
    The circuit in post #15 will need adapting to get a 30 sec fade period. It currently gives a 3-4 sec period.
    Re Ohm's law, take a look at the stated voltage at point X in the schematic and work things from there.
    0
    My circuit designs should be regarded as experimental. Although they work in simulation, their component values may need altering or additional components may occasionally be necessary when the circuit is built. Due safety precautions should be taken with any circuit involving mains voltage or electrostatic-sensitive components.
    Alec's First Law:-
    Every problem has a solution (given the right information and resources).

  9. Thread Starter #19
    1-3-2-4 1-3-2-4 is offline
    Is it possible to make it adjustable? not a huge deal if it requires a whole change.

    also for post #15 mine is a LED strip so I don't know how much that has in common with the luxeon LED's
    0
    Last edited by 1-3-2-4; 2nd April 2012 at 02:48 PM.

  10. #20
    alec_t alec_t is offline
    Is it possible to make it adjustable?
    If you mean the post #11 circuit it is already adjustable, using the pot labelled 'Set time'.
    0
    My circuit designs should be regarded as experimental. Although they work in simulation, their component values may need altering or additional components may occasionally be necessary when the circuit is built. Due safety precautions should be taken with any circuit involving mains voltage or electrostatic-sensitive components.
    Alec's First Law:-
    Every problem has a solution (given the right information and resources).

« First 123456 Last »
Tags
Similar Threads
Thread Starter Forum Replies Last Post
Fade-in, fade-out LED circuit - for car interior lighting. Midnightcarving Electronic Projects Design/Ideas/Reviews 13 8th November 2010, 11:07 AM
Need multi-LED fade circuit diagam 100fold Electronic Projects Design/Ideas/Reviews 3 30th August 2006, 06:19 PM
Led Fade in/out walnut Electronic Projects Design/Ideas/Reviews 1 14th October 2004, 11:46 AM
PWM - LED fade out!! Beth Microcontrollers 5 22nd February 2004, 07:45 PM
simple LED fade on / off mofotron Electronic Projects Design/Ideas/Reviews 8 6th May 2003, 02:22 AM
Electronic Circuits  |  Learning Electronics

Join our community with over 100,000 Members! It's free, easy and when you're logged in you have many more features! Click to register.
Page Time: 0.11426 seconds      Memory: 7,744 KB      Queries: 17      Templates: 0