PWM regulation problem

Discussion in 'General Electronics Chat' started by Zanac-X, Jul 18, 2013.

  1. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    hey guys :)

    im trying to make a PWM using 555 timer and my problem is that the regulation of my circuit is wrong. when i turn my potentiometer the led will barely light until i reach about 98% of the value, the led starts to give bright color and varies very good from 98% to 100% value of my potentiometer

    so what should i do to make the led respond smoothly with the potentiometer from zero to max value

    thank you for your help

    p.s : the value of the potentiometer is 100 kΩ
     
  2. crutschow

    Expert

    Mar 14, 2008
    13,016
    3,235
    Try a smaller value pot, such as a 10k ohm.
     
  3. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    thank you 20k was good enough :)

    is there any better schematic diagram to have a good PWM as im trying to control an RGB led
     
  4. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hello,

    For safety I would put a resistor of about 100 Ohms from the wiper to the pin 3 of the 555.
    Without the resistor, the current could become to high and strain the 555.

    Bertus
     
    Zanac-X likes this.
  5. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    The *REAL* 555 PWM uses 2 timers with one as a monostable.

    As you're using a pot, its easier to put up/down diodes on the ends of the pot and stick it in the charge/discharge path.

    A similar method works with the CMOS inverter rigged to oscillate - plenty of examples online.
     
  6. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,013
    1,531
    Another thing to consider is whether your using a linear or logarithmic pot. You don't say, but if your like many, if you salvaged a pot from another source, say a volume control in a radio, it may be a logarithmic pot.
     
  7. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hello,

    An other posibility is using the 555 as an oscillator and a comparator to create the pwm signal.

    Here is an example that Bill_Marsden created some time ago:

    [​IMG]

    You can use multiple comparators on one oscillator to create the PWM signals for the RGB led.

    Bertus
     
    Zanac-X likes this.
  8. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    bertus : thank you very much.......but can you tell me what is the use of U2b ?
     
  9. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    That is actually a drawing from one of my articles, LEDs, 555s, Flashers, and Light Chasers. It is a spare gate, not used. Many comparators come in multiples in packages. Just because they are there does not mean you have to use them, though if a use comes up...

    You want to tie a spare gate inputs to ground to prevent unwanted effects such as oscillation. Since the output is a open collector I grounded it too, which is the exception. Most gates will blow if you do this.

    A LM393 is a dual comparator, a LM339 is a quad. Their use is identical, though not the pinouts.
     
    Zanac-X likes this.
  10. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    Bill_Marsden : thank you sir,and thanks for pointing out the article, will be reading it :)
     
  11. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    Bill_Marsden :thank you very much. this is the first time when i actually enjoy simulating a circuit :)

    may i ask some very.....ahm......basic electronic Qs because im really just beginning to advance a little bit here so.........

    1st : i've always seen schematics with electrolytic capacitors to smooth out the output
    but ive never seen it with another capacitor at the same point (Vcc of the U2b) what is going on here ?

    2nd : what is the use of R8(10K) between Vcc and output of U2a ?

    3rd : why did you Decide to put two resistors between the potentiometer R5(10K) ?

    4th : can i use different values of potentiometer say 100K ? how will this effect the circuit ?
     
  12. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
     
    Zanac-X likes this.
  13. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    The caps are for filtering the power supply. See the sticky Decoupling or Bypass Capacitors, Why?. Generally there is nothing wrong with using electrolytics, since values that large are usually used for DC voltage separation. With high frequencies small caps are much better, their characteristics are closer to ideal.

    You will need to google open collector. A open collector gate only has a transistor going to ground, to go positive it must have a pull up resistor. This is R8 in that circuit. It also turns Q1 off hard when it goes positive.

    A 555 switches between 1/3 Vcc and 2/3 Vcc. The resistors shown (R4 & R6) elimate dead space. The entire pot is used to make 0% to 100% PWM. A voltage could replace the pot, as this is a voltage controlled PWM circuit.

    100KΩ will work just fine. Just adjust R4 and R6 to 100KΩ also to keep the voltages the same.
     
    Zanac-X likes this.
Loading...