Shop OBEX P1 Docs P2 Docs Learn Events
circuit question (bs2) — Parallax Forums

circuit question (bs2)

rrrr Posts: 63
edited 2005-04-14 03:37 in BASIC Stamp
i am working on a project and i want to get some feedback please. i am trying to light up six individual light boxes with leds inside and i also want to be able to·vary the light output with a soid state pot so the light boxes can glow brighter and less brighter allmost like they are breathing... each box will contain 4 super bright leds that take· about 3volts and 30 ma. i figured that there are too many leds to run in serial so i think i should use a combination of serial and paralle. if i run 4 leds in serial and the group of six in parallel it will consume 12volts at 180ma. is this correct??? also is there an easy·way to determin how much resistence to put betwwen the digi pot and the transistor... this is just one part of the project so i will probably have more questions in the future. thanks for the help it is greatly appreciated.
ps. there is an attachment of my circuit (sorry its hand written i am quicker at hand written design)
also i dont know if it makes a difference but there will be 4 circuits like this one in the project(each circuit is a different color led, white, red, yellow, blue)
2550 x 3510 - 424K

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2005-04-13 20:01
    1. You need a single resistor per 4-LED string, to limit the MAX current through the string. There's nothing intrinsic about an LED that limits its current, you have to do that with a resistor. The specification usually tells you the max you should allow through, it is not something the LED does by itself.

    2. It looks like the transistor can give you a variable 'added' resistance, to vary the brightness.

    3. LED's are a current activated device, and quite non-linear. Thus 5 mA probably won't light at all, 10 mA lights dim, 15 mA lights almost full, and 20 mA full on. The 30 mA is probably a max current before it burns out. You'll need to experiment a little to find out how to control them.
  • StarManStarMan Posts: 306
    edited 2005-04-13 21:15
    Each group of four LEDs should have a separate resistor.· Otherwise, a slight variation of forward voltage may yield uneven brightness, or too much current in a given group.

    Also, you need to know the forward voltage and rated current of your LEDs to specify the correct resistor.· Typically you want to control the current to something less than the rated current.· Say the rated current is 20mA, you'll want to choose a resistor that will limit the current to maybe 15 to 18 mA.· R = (Vin - Vf)/I· (for series LEDs Vf is the sum of the individuals)

    Different LEDs have different forward voltages.· Read the specs.· Typically reds, yellows and cheap LEDs Have a Vf of 1.5 to 2.0 volts.· High brightness whites, blues, and greens run in the 3.3 to 3.8 volt range (in which case your 12 volts won't be enough).

    A fellow by the name of Don Klipstein maintains an informational web site (for his own personal enjoyment) which has a wealth of information about LEDs.· Google Don Klipstein LED.



    Chris Isaacson
  • rrrr Posts: 63
    edited 2005-04-14 00:00
    i thought that the resistors placed before the transistor would limit the current to the leds. the resistors limit the current that can pass through the transistor??? should i put no resistors before the transistor and instead limit the current before each string of leds??? also is it posssible to allow more current to run through the leds if i use less voltage.
  • KenMKenM Posts: 657
    edited 2005-04-14 01:29
    As others stated, you must install a series resistor with each series set of LEDs.

    Using this scheme will make it difficult to control the brightness of the LEDs.

    My suggestion is to use a MAX7219. Parallax has example code, and I also have example code.

    With the 7219 you dont need only one resistor for all the LEDs and you control the brightness by writing a brightness value to the IC. The 7219 spec sheet is a little intimidating, but as mentioned I have example code that should get you running quickly. The example code has clear explanations of how to use and manipulate the LED brightness.

    http://forums.parallax.com/showthread.php?p=464329

    Write back if you have questions.


    rr said...
    i thought that the resistors placed before the transistor would limit the current to the leds. the resistors limit the current that can pass through the transistor??? should i put no resistors before the transistor and instead limit the current before each string of leds??? also is it posssible to allow more current to run through the leds if i use less voltage.
    373 x 531 - 14K
    led.jpg 14.1K
  • rrrr Posts: 63
    edited 2005-04-14 02:21
    i dont need to control individual leds. i only need to control the brightness of 24 leds together. is there a way to do this without the max7219 ic? i am new to this game and i have no idea what all that code means or does. what if i keep all the leds in parallel does this change things. the problem i see with the max7219 ic is the control of brightness it is important to have the the leds change brightness in a smoth motion the ad5220 has 128 positions how smooth will the max7219 ic be?
  • KenMKenM Posts: 657
    edited 2005-04-14 03:17
    The AD5220 is probably not a good choice because of the values of resistance are too large after a point and the LEDs will be off.

    As Bean posted, PWM might be the way to go.

    Can you give an indication of the range of brightness and over what period.

    For example, you might want to go from completely off to full bright over 3 seconds.

    Knowing the above will help to come up with a solution.
  • rrrr Posts: 63
    edited 2005-04-14 03:35
    i would like to have the speed change at different points in the program at the fastest it would be about 3 seconds at the slowest about ten seconds.
  • rrrr Posts: 63
    edited 2005-04-14 03:37
    3 seconds from compleatly off to full bright to ten seconds from compleatly off to full bright.
Sign In or Register to comment.