Shop OBEX P1 Docs P2 Docs Learn Events
LED questions : how to measure an unknown one and more — Parallax Forums

LED questions : how to measure an unknown one and more

IceFireProIceFirePro Posts: 86
edited 2010-07-13 00:26 in BASIC Stamp
Hello,

This is a specific question for LED's.

Let's say I find an unknown LED and want to use it with BS2 and it's 20 mA output pins. How can I measure it in order to determine what's the LED's drain?

And second related question : If a LED is rated 50 mA at 3 Volts, does this mean that I can run it at 1.5 volts and it will drain less "mA" (I am really hard with this stuff still) but want to be able to experiment with different leds... please help!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-06-17 03:57
    You have to read the datasheet to answer your first question.

    For your 2nd question, LEDs are non-linear (look that one up). Look at a datasheet for any LED and you'll see graphs of voltage across the LED vs. current through them. The voltage across an LED is approximately determined by the material and construction of the LED. Read the Wikipedia article on LEDs for more information and examples.
  • IceFireProIceFirePro Posts: 86
    edited 2010-06-17 04:44
    How can I read the data sheet, if I find an unknown led (take it from old unit)?

    So, there is no "safe" way to, for example, connect a 3V/50mA led directly to P0-P15, using some resistance?
  • IroneIrone Posts: 116
    edited 2010-06-17 07:04
    How Ya Doin'? Most of the red, green and yellow ones are powered by 1.7 thru 2.1 volts. You do not need the correct voltage if you have more like from the stamp. You must first subtract what you have from what you need ( I generally use 1.8 or 2.0 volts ). Then it is a problem for Ohm's Law!!! General LED's are not power hungry, 10 millivolts will light most of them. Now you have 5 volts starting but you only need·1.8 so you have 3.2 volts left over. Following Ohm's Law you divide 3.2 by .010 and get the resistor size of 320 ohm. If you take like you said and have a LED that needs 3 volts and only power it by 1.5 volts it would not light up.

    Mike is also a very smart man. Blue LED's and White ones need more power because of what they had to use to get those colors. If you are smart when you look at these forums and you see his name you will be better off if you read his helps than not.

    I have better than a junk box, I have a cubboard. Taped to the inside of the doors is Ohm's Law, Resistor values and Transistor variables. I suggest you get one too.

    Casey

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I fish, therefore I lie!
  • Mike GreenMike Green Posts: 23,101
    edited 2010-06-17 14:18
    If you find an unknown LED, you set up a "test jig". The idea is that you want to protect the LED from damage, yet begin to find out its properties. Currently, the highest forward voltage I've seen for a single LED (there are sometimes more than one LED in series in a package) is about 3.4V. You want to limit the current through the LED to something that will be safe yet produce a little light. 1mA to 5mA should be enough for that. Say you have a 5V supply. By Ohm's Law that would be what resistor value (pick something that would give you a current in that range)?

    You'd wire the LED in series with the resistor. Try it out. If the LED doesn't light, try reversing it (and make note of that fact).

    Measure the voltage across the LED and measure the voltage across the resistor. By Kirchoff's Law, the sum of the two voltages should be 5V (or whatever you're using).

    Use Ohm's Law to calculate the actual current through the resistor. By Kirchoff's Law, that should be the same as the current through the LED.

    You now have one data point. Try reducing the resistance and measuring everything again. That gives you a 2nd data point. When you have 3 or more, you should be able to plot a curve (and compare the data points to known LED datasheets).

    Let's say you have an LED that requires 50mA to produce the brightness you want. What does the PIC datasheet say about the absolute maximum current drain on an I/O pin? On a group of I/O pins?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-06-17 20:34
    If you have a DMM (Digital Multi-Meter) most have a diode checked on them these days. That can tell you not only the polarity of the LED, which can usually be determinded by a detent in the lens, but also the forward voltage. Given the forward voltage and the supply voltage it is then easy to determine the resistor value.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2010-06-18 01:28
    Most DMM will do what Chris has suggested, in fact that's a method I have used several times. I have however come across a cheap DMM (Model # DT-830B), that will 'error out' if it sees anything above 2 diodes (about 1.2V to 1.4V), so a regular LED won't work under the diode test.

    IceFirePro,

    You seem to have a lot of different things going on, and that's ok, that's great in fact. But you should sit back and absorb what you have and what people have been telling you before you proceed.

    "You can be a jack of all trades master of none" or you can focus on a particular trade or aspect of something and become the best in the field at it. It's your choice, we can help, but be prepared to dig into the books and datasheets. There is no way around that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-06-18 01:50
    nono.gif

    What I do is to use a adj able power supply and start at (0) volts·and (0) mill amps ·and very slowly turn up the voltage until the led get very bright until it just start to turn to another color then you know what the MAX voltage and what the MAX mill amp are

    ONE NOTE about this idea.gif·Do Not leave it more than·.25 second or less at this point you will burn out the LED this way and if you turn the knob to fast you can also do this as well be care full when doing this



    I have bought a lot surplus LED in the past and lot of time there are no speck when you buy them this way

    I can tell you that I·have burn out some LEDs doing it this way but I now know what the speck are

    I do this lot of time when·I buy China made LEDs not all LEDs are made the same way


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 6/18/2010 2:00:56 AM GMT
  • IceFireProIceFirePro Posts: 86
    edited 2010-06-18 04:18
    Thanks! And a few particular questions:

    Today I bought the following three LED's and I would like to know a simple way to make them just turn on/off thru P0-P15 in order to learn some basics (I am afraid to try before asking).

    So, the first says:
    FW current: 20mA
    FW supply: 3.5V (typical), 4.0V (max)

    Does it mean I can use it directly with the output pins, since they support up to 20mA and probably I need a 470 ohm resistor?

    The second is the same, but FW voltage is 3.2 to 3.8 V.

    And the third is interesting and more complicated : it says "7-Color Blinking LED" (I was interested what that is)

    On the back it reads

    Single color, color-changing or flashing modes

    FW current: 35mA
    FW supply: 3.2V (Typical), 3.5V (max)

    Does it mean that if I connect it at less volts, it will consume less mA? Or; can I connect it via a resistor?

    Thanks!
  • ercoerco Posts: 20,256
    edited 2010-06-18 04:54
    Parallax' WAM is an excellent free download and has an answer and explanation to almost all of the many questions you've asked. Start on page 1 and do every chapter, just like we all did. You need to learn to use Ohm's law and a multimeter.

    Or better yet, just try something for yourself. Worst case, you blow up a 5 cent LED. There is NO substitute for hands on experience. You'll learn far more faster by doing and failing than asking questions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • IceFireProIceFirePro Posts: 86
    edited 2010-06-18 05:09
    I am constantly trying stuff, I am just afraid to not burn down the PIC or any IO pins with those LED's.
  • FranklinFranklin Posts: 4,747
    edited 2010-06-18 22:05
    Read, study, learn. there are books that will give you the information you seek. Start with the downloads Parallax provides and if you follow the instructions therein you will not "burn down" anything

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • IroneIrone Posts: 116
    edited 2010-06-19 02:06
    How Ya Doin'? I am older than you I suppect but lets put your knowlege into some perspective. Up intil you bought your first BS2 you were riding a tricycle. Then you bought a microcontroller and all of a sudden you are driving a 400HP Corvette. You are missing a few lessons for your great upbringing. The first is a two wheeler. It teaches you balance. If you get the right wheel higher than the left on a Corvette it will be on its side and cause major dammage to fiberglass. It will be very expensive to repair. A two wheeler (bicycle)·will give you some balance. With a bicycle is easy to repair, just put it back on·the two wheels. You may have scuff marks but it still works. When you get real good on a bicycle you will need to go to a cheap vehicle. ( Mine was a 49 Chevrolet pickup with no bed). It was a three speed·manual with steering shift. Every now and then·you had to get out and move the levers on the steering wheel because it was worn out. ( If my Dad knew it wasn't worn out·I would never have been able to use it to drive on the back road to the stripping ). With little knowlege on my side I became marooned on·stripper piles and in ditches. I scraped a lot of rust and what I believe were unnessary parts on the bottom and sides of that old truck. I even had to replace the motor mounts and resolder the radiator·by slamming into what I thought was not but realized was enough of an apple tree. Gasoline was $.30 a gallon so I had to pick up pop bottles and sweep the bays at a gas station for enough money to go riding. I could not afford this if it had been a Corvette so I am·kinda glad it was a worthless truck. But now it brings us to your situation.

    The only way your BS2 is going to last is if you put it into a drawer, lock it and give your wife the keys. The only way she should give them back is if you go to Radio Shack and pick·up Getting Started in Electronics and read it thru (EVERY PAGE) three or four times. Read EVERY PAGE!!! Do not skip thru to the circuits in the back!!! Electricity is fun to learn and it is not rocket science till you get real technical. Learn and understand Ohm's Law.·Understand what resistors, capisitors and coils are used for. Get a better understanding of current and its relationship to volts. There are a lot of sites on the web that will give you·anything you need to know about electronics for free. You must start at the beginning and pay attention. With any self help·you may be a better electronics person than I may ever be, but first you must help yourself.

    Please excuse this, I know it should be·in the sandbox but I am an OLD Fart and got carried away.

    Casey

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I fish, therefore I lie!
  • LeonLeon Posts: 7,620
    edited 2010-06-19 03:51
    Just buy a new LED. You will then be able to find the characteristics from the data sheet.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • metron9metron9 Posts: 1,100
    edited 2010-06-19 05:32
    Just some thoughts.

    Buy (or build) a bench supply that has voltage and current displays.

    When testing unknown components start at 0V and dial it up watching the current display don't just throw the switch to full voltage. many times I avoid smoke. For example wiring an atmel chip on a breadboard and putting the power to something other than the VCC I see the current rise above a few millivolts and that tells me something is wrong. Throwing the switch would let the smoke out.


    I like to use a polyswitch on breadboards. If I know my circuit is suppose to stay under 100mA i use a 100mA polyswitch so I don't fry things if I wired it wrong or have a short.

    If you can turn the current up slowly on an led you will see the brightness stop getting brighter when you go too high, the heat is about to destroy the led but you can dial it back. That gives you a good idea wht the maximum current is.

    For example, the luxeon 3 watt and the luxeon 1 watt leds are 1000 mA and 350 mA. They look the same but you will see the three watt led get brighter all the way to over 700mA. The 1 watt will taper off well below that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-06-20 02:06
    Here is a link to where you can some· polyswitch

    I also use these when I·am·playing·with Lithium-ion Battery Packs


    http://www.allelectronics.com/make-a-store/item/RXE-065/RESETTABLE-CIRCUIT-PROTECTOR-0.65-1.3-AMP//1.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-06-20 02:11
    metron9



    Where do you get the· 100mA polyswitch from please post link

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • metron9metron9 Posts: 1,100
    edited 2010-06-21 06:12
    digikey part RXEF010-ND
    MFG NO RXEF010


    sam_sam_sam said...
    metron9



    Where do you get the 100mA polyswitch from please post link
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • Mary GMary G Posts: 4
    edited 2010-06-21 09:40
    sam_sam_sam said...
    Here is a link to where you can some· polyswitch

    I also use these when I·am·playing·with Lithium-ion Battery Packs


    http://www.allelectronics.com/make-a-store/item/RXE-065/RESETTABLE-CIRCUIT-PROTECTOR-0.65-1.3-AMP//1.html

    This is useful. Thanks.
  • alexisrqalexisrq Posts: 7
    edited 2010-07-11 18:06
    Why just not buy a 5v @ 10 ma LED and connected directly the output?, that way you do not need to worry abut the ohm law.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-11 18:26
    alexisrq,
    You need to be careful about what you consider to be a 5V 10mA LED. There are some that have a built-in current limiting resistor or a built-in current regulator. That would be ok to connect directly to a Stamp's I/O pin, but these are more expensive than an ordinary LED and a little harder to find.

    It's really basic electronics to learn how to use LEDs with something like a Stamp I/O pin. You need to understand Ohm's Law for lots of things and starting with LEDs is a good place.
  • alexisrqalexisrq Posts: 7
    edited 2010-07-12 00:03
    Agree. You need to understand ohm law but also you have to be able to design a circuit that will work, part of that process involves the selection of components to meet specifications. Here is and LED with 10 ma current rating.

    http://www.mouser.com/Search/ProductDetail.aspx?R=HLMP-3680virtualkey63050000virtualkey630-HLMP-3680
  • FranklinFranklin Posts: 4,747
    edited 2010-07-12 00:10
    That 10ma is the current the lamp needs but without a current limiting resistor it will take all that is available and burn out in the process if there is enough current available.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-12 00:11
    Yes, and, if you read the datasheet, you'll find that this is one of those that have a built-in resistor designed to take 5V at 10mA and dissipate any voltage between that required by the LED itself and the 5V that's specified.
  • alexisrqalexisrq Posts: 7
    edited 2010-07-12 00:54
    That 10ma is the current the lamp needs but without a current limiting resistor it will take all that is available and burn out in the process if there is enough current available.
    No, is like Mike said it has a limiting resistor build in it will not consume more than 10 ma.
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-07-12 15:31
    Except, Alexis, MOST LED's do NOT have "built-in current limiting resistors" -- in fact, a "normal" LED will NOT have a "built-in current limiting resistor". So, if you're teaching (or learning) about LED's, you first need to learn that you have to add a current limiting resistor to the circuit to keep from burning them out. Once you've learned that, THEN finding out it's possible to get an LED with an internal current-limiting resistor is helpful.

    Newbies tend to treat LED's as if they were a simple light-bulb as it is -- you're not doing them any favors by showing them this LED+resistor device, and CALLING it an "LED".
  • alexisrqalexisrq Posts: 7
    edited 2010-07-13 00:14
    Very interesting comment, but apparently you did not read the data sheet. The manufacturer of the product call it “integrated resistor LED lamp”. If the manufacturer of the product call it LED who I am to challenge it. Also this are the first 2 sentences in the Description paragraph:
    [font=Myriad Pro, Myriad Pro, sans-serif]The 5 volt and 12 volt series lamps contain an integral current limiting resistor in series with the LED. This allows the lamp to be driven from a 5 volt/12 volt source without an external current limiter.”[/font]
    [font=Times New Roman, serif]This LED will work with out an external limiting resistor because it was design that way. If you do not have the capacity to evaluate a product and adapt then you have a problem. In this case I was not referring to “most” LED'S it was referring to this specific LED and that is way I post the product. I was only trying to show the OP that there are other options, if after he evaluated the information he has more questions I will try to help because this is what the forums are for. [/font]
  • hover1hover1 Posts: 1,929
    edited 2010-07-13 00:26
    It think what Allen was trying to say is that ~99 percent of the LEDs you buy off the shelf do not have a current limiting resistor. Yes, you can specify that particular product, but the lack of the resistor is not apparent to someone new to electronics. The LED containing the resistor is not common.

    Jim
    alexisrq said...
    Very interesting comment, but apparently you did not read the data sheet. The manufacturer of the product call it “integrated resistor LED lamp”. If the manufacturer of the product call it LED who I am to challenge it. Also this are the first 2 sentences in the Description paragraph:
    The 5 volt and 12 volt series lamps contain an integral current limiting resistor in series with the LED. This allows the lamp to be driven from a 5 volt/12 volt source without an external current limiter.”</FONT>

    </FONT>
Sign In or Register to comment.