1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

LED and wall adapters

Discussion in 'General Electronics Chat' started by airbrush, Jun 11, 2005.

  1. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,580
    Likes:
    950
    Location:
    Canada, of course!
    Hi Morgen,
    The datasheet for the LM117/317 shows a 240 ohm reference current setting resistor R1 on its 1st page, for the premium version LM117. The resistor's max value is determined by the IC's max idle current, that flows through its output. Without a load, the only thing holding the output voltage down is the current in the current-setting resistor and pot. If the resistor and pot aren't the required low enough value to carry the IC's idle current then the output voltage will rise and good-bye voltage regulation.

    The datasheet spec's the max idle current for the LM117 to be 5mA. Therefore the max value for R1 is 1.25V/5mA= 250 ohms. They use 240 ohms which is the nearest standard value.
    The datasheet spec's the max idle current for the cheaper LM317 to be 10mA. Therefore the max value for R1 is 1.25V/10mA= 125 ohms. You should use 120 ohms which is the nearest standard value.

    Using 120 ohms for R1, its current is 10.42mA and the voltage across a 1k pot is 10.42V. Therefore the circuit's regulated output voltage is 1.25V + 10.42V = 11.7V. A 2k pot would make the output voltage 22.1V if the IC's input voltage is high enough. A 500k pot is rediculous since the circuit's output voltage will be max over more than 99% of its adjustment. :lol:
     
  2. airbrush

    airbrush New Member

    Joined:
    Dec 29, 2004
    Messages:
    94
    Likes:
    0
    okay, so audioguru, you recommend a 120ohm resistor and use 1k pots then.

    Obviously i'm not understanding how different size pots work then?
    Here is what i got from previous postings:
    A 1M pot allows the circuit to dim 1000 to 1, which is OK but not fully off. A 100K pot would dim only 100 to 1, which is noticeably dim, but still fairly bright.
    I guess i assumed the current would be spread across the whole range of the pot...so a 500k would allow for more levels of adjustment over a 1k? From what your saying...thats not how it works...?

    Okay...just want to make sure this is all good. So that schematic looks good then? just change the resistor and pot?

    What about the slowblow fuse that you mentioned Morgen? is it necessary, where would this go in the given schematic.

    thx again. I'll post up pics when its all done
     
  3. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,580
    Likes:
    950
    Location:
    Canada, of course!
    Hi Airbrush,
    Your original circuit used a 555 oscillator and a 1M pot changing its resistance down to a 1k resistor for a pulse-width-modulation dimming ratio of 1000:1.
    An LM317 variable voltage regulator changes the brightness of the LEDs by changing its output voltage with its pot. Then you don't need the 555 circuit.

    The LM317 circuit needs a 1k pot to adjust the output voltage from 1.25V when it is turned down, to 11.7V when it is turned up, with a 120 ohm reference current setting resistor R1. Since 1.25V is way too low, a resistor should be in series with the pot so that the LEDs just turn off with the pot set to minimum. The added resistor will also increase the max output voltage by about the same amount. The value of the added resistor and the value of the current-limiting resistors for the LEDs is determined by the voltage of the LEDs and if they are in series.

    The LM317 needs an input voltage about 2V or more higher than its max adjusted output voltage.

    The pot should be logarithmic (audio taper) to match the response of your vision. :lol:
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. airbrush

    airbrush New Member

    Joined:
    Dec 29, 2004
    Messages:
    94
    Likes:
    0

    okay, great...thx for the explanation. My brain is fried....haha.

    So what do you think about the slowblow fuse that morgen had mentioned ..is this a good idea to add one??

    great, i can start ordering some parts...
     
  6. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,580
    Likes:
    950
    Location:
    Canada, of course!
    Hi Airbrush,
    I have never seen a fuse used with a circuit using a wall DC adapter. Besides, you can't put "a 1 amp slow-blow fuse on the primary of the transformer" since it already has its power cord and transformer molded into its case.
    If the LM317 is overloaded then it automatically limits the current or shuts-down if it gets too hot. :lol:
     
  7. airbrush

    airbrush New Member

    Joined:
    Dec 29, 2004
    Messages:
    94
    Likes:
    0
    alright..thx

    ordering the parts tomorrow
     
  8. Morgen

    Morgen New Member

    Joined:
    Jul 9, 2003
    Messages:
    42
    Likes:
    0
    All true, though I am confident a 240 ohm resistor will work for R1. I don't think no-load voltage regulation is a concern in this application.

    The "play" that I mentioned. And since there is a lower voltage limit of about 6.6V, there will be play at each end of the pot.

    We can get up to about 15V out of the LM317, so I don't understand why the upper V has been set at 11.7V.

    Many adapters have a fuse already built into the enclosure. But anyway, yes it -can- be done. The LM317 is fairly bullet-proof, so I only suggested adding a fuse for safety's sake.

    The resistor isn't needed. When the LEDs are off, it doesn't matter whether the voltage is 6V or 3V or 1.25V. It will remove the play at the end of the pot rotation, which is why I suggested it several posts ago.

    airbrush, you will want to replace the 500k pots. I figured you would realize this sooner or later. With R1=240, get a 2.5k pot. With R1=120, get a 1.5k pot. If you do choose a maximum output voltage of 11.7V then you will need different resistors for the LEDs. In that case, you'd want 200 ohm resistors.
     
  9. airbrush

    airbrush New Member

    Joined:
    Dec 29, 2004
    Messages:
    94
    Likes:
    0
    thanks again for all your help. It will be a while before i get er all together, but i'll post up pics when i'm done. :)
     
  10. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,580
    Likes:
    950
    Location:
    Canada, of course!
    I don't think the LM317 will obtain a 15V output from a 12VDC supply.
    I selected a 1k pot because it is a standard common value. A 1.5K or 2.5k pot isn't.

    Without the resistor, the dead zone at the lower adjustment range of the pot will be excessive. Half rotation for a linear pot, 3/4 rotation for a log pot. :lol:
     
  11. Morgen

    Morgen New Member

    Joined:
    Jul 9, 2003
    Messages:
    42
    Likes:
    0
    A 12VDC unregulated wall wart? I suggest you get one and measure it.

    Digi-key p/n CT2236-ND 2.5k log potentiometer without switch, for use with R1=240 ohms. Also available with linear taper.

    "Excessive" is a relative term defined by airbrush, not audioguru.

    airbrush, the resistors added to the potentiometer have been suggested to remove any "dead zone" in the pot action. Whether you want to include them is up to you. If you decide to use them, remember that you will need different values. One value for the row with 3.3V LEDs and another for the row with 1.7V LEDs.
    Also, I think I'd like to revise my suggestion for 360 ohm LED resistors. Use 330 ohms instead for the 3.3V LEDs and 470 ohms for the 1.7V LEDs.
    This would be easier if it were private email...
     
  12. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,580
    Likes:
    950
    Location:
    Canada, of course!
    A 500mA wall wart is nearly fully loaded when it is driving 20 LEDs at 23mA each. Its voltage will be about 12.5V. The max output from an LM317 will be about 11V.
     
  13. Morgen

    Morgen New Member

    Joined:
    Jul 9, 2003
    Messages:
    42
    Likes:
    0
    You should read the thread instead of pulling numbers out of the air. The design as it stands provides a maximum of about 27mA through 30 series-paired LEDs for a total of about 400mA.
     
  14. airbrush

    airbrush New Member

    Joined:
    Dec 29, 2004
    Messages:
    94
    Likes:
    0
    haha....okay you guys are confusing me now...well i cross my fingers and hope it works then...just kidding. Well it looks like the design is pretty much agreed upon ...just some variation on the resistor values that should be used, anyways it shouldnt make too big of difference if the resistors are a little higher or lower from what each of you says. There is room for play anyways in the LED as they're not at max V.
     
  15. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,580
    Likes:
    950
    Location:
    Canada, of course!
    Hi Airbrush,
    Build it with a 12V, 500mA wall-wart, a 240 ohm reference current setting resistor, a 2.5k pot in series with a 300 ohm resistor so the minimum voltage is 2.8V for two series-connected 1.7V LEDs to be dimmed. Then the max setting of the pot will try to force the LM317's output voltage to 15,8V. But the wall-wart's output voltage will be about only 13.5V with the 400mA load, and the max output of the LM317 will be about only 12V. The pot will have a wide dead zone near its maximum setting.

    Then try the 12V, 500mA wall-wart, a 150 ohm reference current setting resistor, a 1k pot in series with a 180 ohm resistor so the minimum voltage is 2.75V. Then the max setting of the pot will force the LM317's output voltage to 11.1V, and the LM317 will have adequate input voltage.
    Then there won't be any dead zone of the pot at its max setting. :lol:
     
  16. Morgen

    Morgen New Member

    Joined:
    Jul 9, 2003
    Messages:
    42
    Likes:
    0
    Of course I never suggested the 2.5k pot in series with a 300 ohm resistor, but something in Canadian water makes audioguru want you to assume that I did. Unbelievable....
     
  17. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,580
    Likes:
    950
    Location:
    Canada, of course!
    If you want a wide dead zone at both ends of the pot, then why use a pot? :?:
     
  18. airbrush

    airbrush New Member

    Joined:
    Dec 29, 2004
    Messages:
    94
    Likes:
    0
    Sorry i'm getting all confused now...the 150 ohm resistor would be the one coming off the Vout of the regulator...and the 180ohm is then used for the LED's???
     
  19. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,580
    Likes:
    950
    Location:
    Canada, of course!
    Like this:
     

    Attached Files:

  20. airbrush

    airbrush New Member

    Joined:
    Dec 29, 2004
    Messages:
    94
    Likes:
    0
    ahh..okay...i thought that one was still omitted from it...but i see what you are saying now...you are getting rid of that dead zone with that one in place. How you guys are calculating this unfortunately is beyond me at this point..i dont have enough knowledge of this stuff yet.

    appreciate everyones help.
     
  21. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,580
    Likes:
    950
    Location:
    Canada, of course!
    Hi Airbrush,
    The LM317 works by making 1.25V appear across the 150 ohm resistor between its output and its adjust terminal. Then 8.333mA flows. The 8.333mA also flows through the pot and resistor in series with it. So with the pot turned down, the 180 ohm resistor has a voltage of 1.5V across it due to the 8.333mA through it. Therefore the output voltage is the 1.25V in series with the 1.5V which is 2.75V. The 1.7V LEDs will be dim with 1.5V across each one and just about completely off with half of 2.75V across each one.

    With the 1k pot at max setting in series with the 180 ohm resistor, the resulting total resistance of 1180 ohms will have 9.83V across it due to the 8.333mA current through it. Therefore the output voltage is the 1.25V in series with the 9.83V which is 11.1V.

    The two LEDs in series have 1.7V across each one at 20mA and 3.4V across both. Therefore their 390 ohm current limiting resistor will have 11.1 - 3.4 = 7.7V across it and therefore have 19.7mA through it and the LEDs. Then the LEDs will be bright.

    Turn down the pot and the output voltage of the LM317 also comes down. So with less voltage across the 390 ohm current-limiting resistor its and the LEDs current is less and they are dimmed.

    Understand? :lol:
     

Share This Page