Shop OBEX P1 Docs P2 Docs Learn Events
leds and bs2 follow up — Parallax Forums

leds and bs2 follow up

rrrr Posts: 63
edited 2005-01-03 14:40 in BASIC Stamp
can i power 2 leds through one pin if they in parallel...
i am trying to power them through a 100k solid state pot that i will pulse through another pin.
i am using the leds for back lighting and it makes more even light with at least two leds
any help or suggestions???

Comments

  • KenMKenM Posts: 657
    edited 2005-01-02 15:43
    To power LEDs connected in Parallel, each LED should be connected in series with a resistor.

    What is it exactly you are trying to do? It sounds like you are trying to vary LED brightness via your stamp, is this correct?

    Ken
  • agentileagentile Posts: 101
    edited 2005-01-02 19:26
    The LEDs will draw twice the current if they are in parallel.· If they are in series, they will draw the same current as would one, but both LED's will be 1/2 as bright.· I assume that you are trying to increase the brightness of the LED(s).· I would recomment that you use either use a small NPN transistor, like a 2N2222 to drive the LEDs through the transistor's emitter.· This way your BS2 will only need to supply a very small amount of current to provide the results you require.· A method I have used in the past is to wire several LCDs to the outputs of an inverter gate (7404).· I usually wire them in reverse bias (the 7404 can sink 40mA), in series with a 330 ohm resistor.· Then I tie the inputs of the 7404 to a single output of the BS2 (or any ttl gate).· In this way, the 7404 will be doing all the work, and the BS2 is simply there to send low current commands.· If you are interested in wiring your circuit this way, and you would like a drawing, please let me know and I will draw one up for you.



    AG
  • lrohnlrohn Posts: 33
    edited 2005-01-02 20:03
    Hello AG,

    I am also interested in wiring a circuit this way! Would you draw up the circuit and post it here so I can view it as well.

    Thanks and Happy New Year!
    Luke
    jumpin.gif
  • agentileagentile Posts: 101
    edited 2005-01-02 21:41
    The attachment I have included shows a drawing of one pin of the BS2 being used to drive one gate of a 7404 inverter.· The 7404 then drives the LED which is biased such that when the BS2 pin outputs a high signal, the output of the 7404 goes low, thereby allowing current to flow from the 5V source, through the LED, and into the output gate of the 7404.· I like to wire it this way because, 1. the logic doen't not need to be inverted, and 2. the 7404· can sink a lot more current than it can source.· This design·could easily be implemented using all six gates from one 7404 chip, where all 6 inputs would be tied to the same BS2 pin.· This will provide plenty of light.· You can use a smaller resistor to make the LEDs brighters, as long as you don't surpass the LED current rating (usually about 15mA).· I don't recall exactly how much the 7404 draws, but it is very small, about 40 microamps per input, so the BS2 will have no problem driving all six gates at once.· If you need more information on the 7404, you will need to find a datasheet.· I use·www.digikey.com·for most of my datasheets.· Good luck.



    AG·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-02 22:44
    You may want to change your attachment type -- using GIF of JPG will allow users to see the attachment in their browser.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • agentileagentile Posts: 101
    edited 2005-01-03 01:38
    Here's the new attachment in JPG form.· Thanks Jon.



    AG
    497 x 266 - 22K
  • rrrr Posts: 63
    edited 2005-01-03 02:29
    thanks for the info that chip seems interesting.

    i am new to this stuff so let me get this straight.

    do i want to hook up the stamp pin to the input side of one of the gates(A)

    and the led circuit should be coming off the other side of the gate (output,Y)

    i am gathering that i hook up the vss to the ground, but do i also hook up the vdd to the vcc???

    thanks...
  • rrrr Posts: 63
    edited 2005-01-03 03:04
    disregaurd the fist two questions, i see that you have the chip wired reverse so it sink more ma.

    but i would like to know about vcc voltage supply
  • rrrr Posts: 63
    edited 2005-01-03 03:10
    i am starting to understand...

    i dont need to worry about vcc because i only need a ground to compleat the led circuit???

    or do i need 5v to power the chip in some way
  • agentileagentile Posts: 101
    edited 2005-01-03 03:13
    rr,
    · Here's how it works.··The input pins of the 7404 are labeled "A"; the outputs are labeled "Y".· So, the way a 7404 (an inverter) works is that it for any input at "A", the corresponding "Y" output will be·"A-not."· So, if·"A1" = 5V (or a logic of 1), then "Y1" will equal 0V.·
    · The source of the LED is the 5V source from either Vdd, or any other 5V source available.· The Vcc for the·7404 is also 5V.· The·BS2 pin sends a signal, either logic 1 or 0 to·A1 of the 7404.· If·the BS2 sends a·0 (0V) to A1, then Y1 will have logic 1 (5V).··For this state, no current will flow through the LED.· If the BS2 sends a logic 1 (5V) to A1, then 0V will be present at Y1, thereby allowing current to flow from the 5V source, through the 330 ohm resistor, and through the LED.·
    · Just a note about TTL chips, before running any current into·them, they need to be powered by 5V at Vcc and grounded.· Otherwise you will probably fry the chip.· Also, if you have never used them, they are very inexpensive, about 30 cents each.· Good luck.· Feel free to ask if you have any more questions.

    AG
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-01-03 14:40
    Yes, the 7404 needs to have +5 (VDD or VCC) put on pin 14, and GND (VSS) put on pin 7 for it to work.
Sign In or Register to comment.