PDA

View Full Version : Correct resistor for IR LED?



DigitalMan
09-03-2006, 04:15 AM
Normally, finding the right resistor for an LED is easy. I start with a large value, and decrease it until the thing lights up well enough to see, but not as much as when straight power is applied. Not precise or professional, but it's been working fine with no blown chips or LED's.

But now I need to set up an infra-red emitter and detector for use in a needlessly complicated mouse trap. The first issue is that I'm using 12 volts, when·I normally deal with 5. But probably the biggest issue is that I can't see into the infra-red spectrum. I can use the detector to know when it's on, but that's not a value of "dimness" I can see.·So what's the fastest way to go about testing this without frying something?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I think I shall assemble a circuit to run various·calculations, and control peripherals accordingly. I will give it some user input device, and perhaps a display screen to show data. But what would I call this device...

PJ Allen
09-03-2006, 04:46 AM
(Vsource ─ VLED) / 20 mA = R

(12V ─ 1.5V) / 20mA = R

10.5V / 20mA = R

525·ohms = R

nearest standard value =·560 ohms (green-blue-brown)

10.5V / 560ohms = 18mA· [close enough]

DigitalMan
09-03-2006, 06:27 AM
Thank you! I can never remember those formulas. So with these annoying five-band resistors, I need a green-blue-black-black, I think... Or can I attach a 5-volt, 500ma regulator to a 12-volt, 500ma wall transformer, then use two 100-ohm (brown-black-black-black) in series, to get 17.5mA?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I think I shall assemble a circuit to run various·calculations, and control peripherals accordingly. I will give it some user input device, and perhaps a display screen to show data. But what would I call this device...

bulkhead
09-03-2006, 06:55 AM
DigitalMan said...
Or can I attach a 5-volt, 500ma regulator to a 12-volt, 500ma wall transformer, then use two 100-ohm (brown-black-black-black) in series, to get 17.5mA?


Why don't you just add 2 or 3 more LED's in series to take the voltage down? It is certainly the simplest and least expensive way.


DigitalMan said...
So what's the fastest way to go about testing this without frying something?


Use a digital camera or camcorder, most should be able to pick up the IR wavelength. You can test your camera with a TV remote.

DigitalMan
09-03-2006, 12:46 PM
Dood, I totally forgot about that! My camera can indeed sense IR light... and it tells me that I'll get optimal performance from these LED's with a resistor of 0 ohms. That's not good... maybe the detectors are ridiculously sensitive?

Actually the detector seems to have a pretty big problem. With no IR light on it, it has a resistance of exactly 2 ohms. That's less than any LED or diode, it's about as much as plain wire, and yet it's supposed to open and close circuits. Am I not hooking these up right? Are they sensitive to normal light? Or is it just broken?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I think I shall assemble a circuit to run various·calculations, and control peripherals accordingly. I will give it some user input device, and perhaps a display screen to show data. But what would I call this device...

bulkhead
09-03-2006, 01:18 PM
I assume you are using a standard phototransistor as the "detector"? If you are using a photoresistor then it should have a resistance of a few thousand ohms in the dark.

Phototransistors are to be used as switches. You wire them just like a switch: put a pull up/down resistor on one of your I/O lines, one leg of the phototransistor to that I/O line. the other to a pull down/up resistor (opposite of the other one).

They are sensitive to ambient also. The easiest way to test this is to write a simple program that prints the measured value (0 or 1) of your phototransistor. You should notice that in bright environments, the reading wont change if it gets any brighter.

I see that you are using this for a mouse trap...is there any difference with using an IR LED and a regular one? Some animals can see IR light, I am not sure if mice fall into this category.

DigitalMan
09-03-2006, 02:07 PM
Well, these are specifically IR phototransistors... or at least, Radio Shack claims they are. Even in the dark it's still straight current. But I guess that one is just toasted; I found another one, and it has a few thousand ohms resistance, even in the light.

Why infra-red? 'Cuz it's what I got http://forums.parallax.com/images/smilies/tongue.gif Plus it's quite dim, most of my visible·LED's were bought because of the blinding light emitted. That wouldn't be pleasant for poor Irvine, plus it'd bounce around the plastic container so much it might not register when the mouse steps through the beam.

On a side note, can a 555 in monostable mode be wired to only go on once, even with the trigger held low, and not go on until the trigger goes high and then low again? Or have I once again reached that point where I must replace the little black rectangle with the larger black rectangle known as an SX chip or PIC?

Edit: Um, okay... how do those pull-up/-down resistors work again? Trying to find the threshold of this transistor's base has only informed me that I need a resistor greater than 67K, but less than 1 Megaohm, to turn it on (and thusly switch the bistable latch, etc). Another method sounds nice.

So, if I have a 1.2K·phototransistor and·the 1K·resistor in series that prevents it from frying hooked up to the base of the transistor, how do I make whatever voltage gets through the 2.2K go straight to ground and avoid the transistor, while not stopping any voltage getting through when the resistance is about 2k?

Edit 2:·Heheh, nevermind that... Apparently, out of the several·IR emitter and detector sets I've gotten from Radio Shack, one works. And it works exactly the way it should. With no IR present, it has a resistance of 1 Megaohm, more than enough to turn the transistor off alone. With the IR LED up to about three inches away, it has probably a couple thousand ohms, tops. All that's left now is to make sure the motor can only pulse once, or else the whole power supply will fry...

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I think I shall assemble a circuit to run various·calculations, and control peripherals accordingly. I will give it some user input device, and perhaps a display screen to show data. But what would I call this device...

Post Edited (DigitalMan) : 9/3/2006 9:09:55 AM GMT

Loopy Byteloose
09-03-2006, 07:35 PM
BTW, Not all IR phototransistors, IR LEDs, or IR sensors have the same spectrum.
Without proper labeling and documentation, you can easily get off into the weeds with a mismatch.

Buying from Radio Shack really ends up hiding these facts from you.
If you really want to use IR properly, shop Mouser or Digikey with the vendor PDFs.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········


···················· Tropical regards,····· G. Herzog [·黃鶴 ]·in Taiwan

PJ Allen
09-03-2006, 08:35 PM
DigitalMan said...
My camera can indeed sense IR light... and it tells me that I'll get optimal performance from these LED's with a resistor of 0 ohms

If your camera is telling you that then it's mis-informing you -- don't listen to it.
Have a good day.·

(Man, oh man -- did this one go off the rails fast.)

DigitalMan
09-04-2006, 05:41 AM
I think my best bet is eBay. I've got 100 IR LED's coming in that even have a part number and PDF datasheet. The trick then is finding a detector of the same wavelength.

0 ohms ended up almost frying the LED and the supply as it tried to drain all 500mA available. But I am having to use lower values, 47 ohms in front of both emitter and detector. Any more and three inches away is too much, any less and they start to get hot. Not that it matters too much, I'll sacrifice a couple components to get my mouse back http://forums.parallax.com/images/smilies/tongue.gif

And by replacing the 555 timer with a couple transistors and a capacitor, I solved the motor pulse problem. The capacitor charges when the trap is in the "ready" state, and then discharges, and stays discharged, when the trap is triggered, making sure the motor only has a fraction of a second of power.

Now my only concern is that the 78M05 regulator is getting hot. I'm sure it's supposed to get hot, but how hot is too hot? Can I trust the thermal overload·protection?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I think I shall assemble a circuit to run various·calculations, and control peripherals accordingly. I will give it some user input device, and perhaps a display screen to show data. But what would I call this device...

PJ Allen
09-04-2006, 06:23 AM
DigitalMan said...
·...but how hot is too hot? Can I trust the thermal overload·protection?
Well, I'll go for broke...· What does the camera tell you?

DigitalMan
09-04-2006, 06:34 AM
The camera tells me... that any energy radiating from the heatsink and regulator is not intense enough and/or not within the spectrum visible to my camera. If I had the time I'd bring·this to my dad's workplace and use the thermal camera, they use it for this exact reason.

I think I'll just test it up here, keeping it on for a few hours straight. If nothing fries or melts, then I'll just put it into use. And in the meantime, I'll look on eBay for one of those IR remote·thermometers...

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I think I shall assemble a circuit to run various·calculations, and control peripherals accordingly. I will give it some user input device, and perhaps a display screen to show data. But what would I call this device...

metron9
09-07-2006, 12:26 AM
why dont you use a meter to measure the current

If you don't have a current meter how about measure the voltage across the resistor you select and convert that to current?

Perhaps these links will help.


http://www.the12volt.com/ohm/ohmslaw.asp

http://ourworld.compuserve.com/homepages/Bill_Bowden/led.htm

http://led.linear1.org/1led.wiz


Google has over 3 million hits searching the text -->> "led series resistor"

Try it.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think outside the BOX!

StarMan
09-08-2006, 04:31 AM
I have a bench power supply from Circuit Specialists, Model CSI1800X, that costs around $50.· Voltage is adjustable from 0 - 18VDC, and current is adjustable from 0 - 2A.

I assume that LEDs have a specified max operating current of 20mA (not always true).· To find the forward voltage at that current,·I·connect the LED directly to the supply (no resistor) and slowly increase the voltage from zero until the current reads 20mA.· I usually start with the current knob set at about one fourth of its range and, of course, voltage set to zero.

If you reach 4 volts and there is still no current, you either haven't turned up the current or you've hooked up the LED incorrectly.· If you mistakenly turn on the power with the voltage too high, you will immediately fry the LED.· And they smell bad when they're fried.


Chris I.