555 timer PWM generator with a difference

Discussion in 'The Projects Forum' started by aquadog90, Jun 28, 2015.

  1. aquadog90

    Thread Starter New Member

    Jun 28, 2015
    4
    1
    Hi All

    I am currently trying to implement a day time running light (led strips) for my car. At the moment I have built a PWM generator using a 555 timer that switches on a MOSFET. Using a potentiometer I can vary PWM and vary the intensity of the light, that bit works fine.

    My next requirement is to modify the circuit so that with an input it will ramp up the duty cycle automatically and slowly increase the brightness of the lights. I have been thinking are trying different bits for 2 weeks now with no luck.

    I know that a micro controller would do the job but I want to stay away from them when it comes to a car.. prefer CMOS and etc solutions.

    A diagram has been uploaded and I am happy to modify the circuit or add extra components


    555 pwm.gif
     
  2. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    Take R2 away, and disconnect pin 7 of 555, and in series with a 100K pot between pin 6 of 555 and Vg of mosfet, also in parallel a 22uf ~47uf capacitor with Vgs.

    If you want the voltage going up slowly then the C1 should be increasing to 1uf or some more, it depends on how slow you want.

    If this way still can't match what you want then there is other way to do that is from pin 3 of 555 and Vg of mosfet.
     
  3. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,797
    1,103
    I don't see how ScottWang's mod will affect the PWM duty cycle :confused:.
    Do you also want the brightness to ramp down?
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    The TS want the fade in function, but he didn't say that he want the fade out, if he want to two functions as pwm and fade in then it should be have two pots to do the adjust.
     
  5. aquadog90

    Thread Starter New Member

    Jun 28, 2015
    4
    1
    Thanks for quick replay. Is this what you meant?

    555 pwm improved.jpg
     
  6. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    783
    There is nothing actually wrong with interchanging pin 3 & 7 in that application.

    Using pin 3 to drive the C/R network is common practice for a design intending accurate 50:50 mark space ratio, and it saves the current limiting resistor that would protect the discharge transistor on pin7.

    Since Vcc is stated to be 3 - 18V, there may in some situations not be enough voltage for the MOSFET gate - the open collector at pin 7 makes it possible to provide a pull up for adequate gate voltage (ie Vdd) regardless of how low Vcc is.
     
  7. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    You may change the C1 and C3 to suit what you want, two circuits will be as fade in and fade out, and some people will say that is a breathing light.
    The pin 6 output only V6=Vcc*(2/3)
    555pwm_aquadog90-01_ScottWang.gif

    You may change the C1 and C3 to suit what you want.
    V3=Vcc-1.4V
    555pwm_aquadog90-02_ScottWang.gif
     
  8. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    783
    You don't need two pots - just buffer the capacitor voltage, but since its driving a MOSFET gate that probably isn't necessary.

    I think some source degeneration (an un-bypassed resistor) might be needed to get anything resembling a ramp at the drain.

    The window comparator in a 555 switches the following bistable at 1/3 & 2/3 of Vcc, so you only have the 1/3 in between for the ramp voltage range.
     
  9. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    The TS want a fade in function, so it have to make the square wave to a triangle wave or sawtooth wave.
     
  10. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    I posted two circuits to let TS know why he wrong, there are some better solutions, but they need more parts.
     
  11. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    783
    There will be a sawtooth on the capacitor, which would be symmetrical if the TS replaced the diodes & pot with a single resistor. But feeding it to a MOSFET with no nfb (source degeneration) will likely result in abrupt switching. Might also need a small amount of level shifting, but I'd have to prototype it to see what it does.
     
  12. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    This was modified from your circuit without take the R1 away, I'm afraid of you might be a little confusing, so I didn't using that method, since ian field like that way, so I modified it.
    555pwm_aquadog90-03_ScottWang.gif
     
  13. crutschow

    Expert

    Mar 14, 2008
    13,006
    3,232
    Below is the LTspice simulation of a variation on the 555 circuit which actually reduces the PWM duty cycle at startup.

    Because the signal that needs to controlled is floating, I used a common type transistor output opto isolator to vary the duty cycle by momentarily bi-passing the side of the pot that controls the high side time of the PWM.

    I reduced the PWM frequency (by increasing C2) so the plot would readily show the change in PWM with time.
    This can be changed back to the desired value and PWM frequency for the real circuit.
    Increasing the value of C3 increases the time to reach full brightness.

    PWM.gif
     
    Last edited: Jun 28, 2015
  14. aquadog90

    Thread Starter New Member

    Jun 28, 2015
    4
    1
    WOW thanks for all the replays guys! I have made the circuit suggested by ScotWang and although it work the blinking really annoying.. I was looking for a circuit that would control current not voltage.

    I will attempt the circuit suggested by crutschow but don't expect a replay for couple of days as I need to order the opto and other bits.
     
  15. crutschow

    Expert

    Mar 14, 2008
    13,006
    3,232
    I should note that my scheme with the opto does cause the PWM frequency to increase significantly as well as have the duty-cycle reduced during the startup but I don't see that as a problem.
     
  16. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    783
    A fair proportion of anything with an SMPSU has an opto you can salvage out of a scrap one. Things like old set top boxes etc.

    They're used in the regulation feedback circuit - some TVs had an extra one for standby switching.

    Old dial up modems usually have at least one opto - a few had AC input opto - that is there are 2 IRLEDS in inverse parallel.
     
  17. aquadog90

    Thread Starter New Member

    Jun 28, 2015
    4
    1
    hi guys did the circuit suggested by crutschow and it work fine!! The opt response is not very linear but it doesn't matter as its only fading the led in and out!!! Thanks very much for you help guys!
     
    ebeowulf17 likes this.
Loading...