LEDs schematics


Closed Thread
Results 1 to 12 of 12

Thread: LEDs schematics

  1. #1
    Join Date
    Sep 2005
    Location
    Malaysia
    Posts
    42

    Default LEDs schematics

    hi guys, was just wondering if it were possible to tie a few LED's together onto one resistor? have a small project that i am working on for a friend but the space for the circuitry is limited. feedbacks welcome..
    -·=»‡«=·- saturnX -·=»‡«=·-

  2. #2
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Post

    You certainly can, as long as you keep in mind the current limitations of the micro. Double check with Ohm's law, and the data sheets. Are the LED's turning on at the same time? What about a resistor network IC? One example I can think of is using one current limiting resistor for a couple leds, but the resistor is between ground and the leds. In my example, only one led is on at a time. Not the safest way to do things, but it will work. Proceed with caution.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    I've done this without problems. Just make sure you don't overdrive the I/O. The other thing is that if only one LED is on there shouldn't be a problem. However if more than one is on then the LEDs will dim when you start turning more of them on.

  4. #4
    Join Date
    Sep 2005
    Location
    Malaysia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    thanks for the suggestions. the led that i bought is not the normal red ones. its the one that has two colors (red and blue) and it alternates flashes when power is applied and there is like 12 of them. what do you call these kinds of LED's? i might just play safe and go with a resistor each. My other question is power supply, the leds are going into this gift box and at first i was thinking of using watch batteries. How long do you reckon it would last? the LED's won't be on all the time except when its turned on. would this be a better choice of power supply or using AAA batteries. Remember space is limited.

    oh ya can some one recommend a particular IC that i could use for this project. I'm still quite new to PIC's and have only used 16f84 chips for my recent projects. will post up my schematics later on for everyone to check.
    -·=»‡«=·- saturnX -·=»‡«=·-

  5. #5


    Did you find this post helpful? Yes | No

    Default

    I believe these type of leds are referred to as bi-color. Just be sure to limit the current to around 20mA max per I/O.

    If the choice is between the AAA and watch batteries go with the AAA. They should provide more power thereby increasing your running time.

    I would get away from the 16F84 and look at the 16F628A or 16F648A. There chips are cheaper, have at least double the capacity and I believe they even have an internal oscillator so you can use those extra I/O pins for some other function.

  6. #6
    Join Date
    Sep 2005
    Location
    Malaysia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    @CocaColaKid: Thanks for the reply. Yeah i was thinking of AAA batteries as well. Not only that the watch batteries cost a bit as well plus getting the holders for it ain't easy. I will sit down this weekend and draw out the schematics and upload it here soon for you guys to check it out. Considering the IC's you mentioned only prob is that my programmer needs a ZIF adapter to program that particular chip. Have already sourced it out from MeLabs so shouldn't be a problem.
    -·=»‡«=·- saturnX -·=»‡«=·-

  7. #7
    Join Date
    Sep 2005
    Location
    Malaysia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    i just realised that i never updated the post here. sorry my bad have been busy doin everything else for people. part time programmer anyways will post my schematics soon for everyone to check out.
    -·=»‡«=·- saturnX -·=»‡«=·-

  8. #8
    arthurok's Avatar
    arthurok Guest


    Did you find this post helpful? Yes | No

    Default 5 vlt led

    there are leds that have the current limiting resistor built into the led
    "hp invented them" they are nice and come in 5 and 12 vlt versions
    flashing leds are nice too and reduce the need for computing power
    a 2 terminal bi color led can be wired between 2 outputs "you will still need a resistor "off , red , green . you can connect an led between an output and vcc/vdd so it will light when the port is low
    "sometimes it dosent work with ttl because the output dosent go high enough shut off the led cmos swings all the way up
    and the piv of most leds will withstand 5 vlts
    an led cant withstand much reverse voltage

  9. #9
    forgie's Avatar
    forgie Guest


    Did you find this post helpful? Yes | No

    Default

    One thing to watch out for: if your LEDs have different Forward Voltages (Vf) then some of your LEDs might not turn on, since the LED with the lowest Vf will get all the current. I made up a batch of PCBs with two LEDs (one red, one green) that shared a resistor.... they can't both be on at the same time since they have different Vfs.

    Does that make sense?

  10. #10
    Join Date
    Oct 2004
    Location
    Porto - Portugal
    Posts
    28


    Did you find this post helpful? Yes | No

    Default

    Hi all

    Maybe a look at www.linear.com would be of use. They have some nice IC's suitable to drive leds in different situations using lithium ion battery-powered applications and providing large amounts of constant current.
    Take a look for instance on LT3486
    nomada

  11. #11
    Join Date
    May 2004
    Posts
    81


    Did you find this post helpful? Yes | No

    Default

    Well, I was looking for an answer to my question and its touched on breifly here so here goes:


    I have a bi-colored LED bargraph array (10 led's). The way the chip is made the green has one common anode, the red has one common anode, and the 10 seperate cathodes are tied together for red and green. (i hope that makes sense).

    Anywho, here is my problem:

    Testing with just one single led pair I have the cathode at ground, a 100 ohm resistor on the green anode and 180 ohm on the red anode. So the theory is: turn on green, you get green, turn on red, you get red, turn on both, you get yellow.

    So I hook up the resistors through a switch: one switch for red, one for gree.

    I press the green switch, I get green
    I press the red switch, I get red
    I press them both, I get yellow(ish)

    So far so good. Now since this is going to be a bargraph that has a seperate pattern depending on the color selected, I want to control the color via the pic (16f818).

    So I write the following code:


    Start:
    High Green ' turn on green LED (porta.0)
    pause 1000 ' 1 second delay
    Low Green ' Turn off Green LED
    High Red ' Turn on Red LED (porta.1)
    pause 1000 ' 1 second delay
    high green ' Turn on Green LED (Red is already on, Red+green = yellow)
    pause 1000 ' 1 second delay
    low red ' Turn LED's OFF
    low green '
    pause 1000 ' 1 second delay
    goto start


    So in theory this code should be working... but when I run it this is what I get:


    Green is on for 1 second (so green IS working)
    Red is on for 2 seconds (so red is working but for some reason green won't come on with red)

    LED's are off for 1 second.

    Ive tried every possibly thing I can think of: I tried running the LED's direct off the 5V rail via transistors... tried puting resistors on the colector, nogo: tried them on the base: nogo, tried them on the emitter: no go... its the same thing every time. For some reason the pic refuses to turn them both on at the same time. Even if I remove the resitors on the anode all together and throw it down to the ground rail instead...

    Please help... this is driving me nuts.



    {Update}

    Ok, I started thinking: Port a has all kinds of funky things that can be done with it... so for fun I changed green to portb.0 and red to portb.1. It now works as expected... so what is wrong with port A? I actually need port A to control the anodes as port B will be sending out the signals for the cathode end of things. Additionaly Im probably going to also need the A/D converter from porta as well.

  12. #12
    Join Date
    Jun 2005
    Posts
    20


    Did you find this post helpful? Yes | No

    Default

    Hi bearpawz--

    I think your problem is probably that your F818 is powering up with the default of having Port A in analog mode. Try inserting this near the beginning of the program:

    ADCON1 = 7

    and see if that doesn't make Port A behave exactly as Port B does for you.

    Best--

    --Alan
    aka "scubabear"

Similar Threads

  1. Run a string of LEDs from the mains
    By The Master in forum Off Topic
    Replies: 30
    Last Post: - 1st October 2009, 19:55
  2. output port issues driving LEDs
    By p15218 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th August 2008, 22:42
  3. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 23:19
  4. controlling leds with the switches
    By ilteris in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th October 2005, 22:02
  5. Replies: 5
    Last Post: - 16th February 2005, 12:57

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts