Correct resistor for IR LED?
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...
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...
Comments
(12V ─ 1.5V) / 20mA = R
10.5V / 20mA = R
525·ohms = R
nearest standard value =·560 ohms (green-blue-brown)
10.5V / 560ohms = 18mA· [noparse][[/noparse]close enough]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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...
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.
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.
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...
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.
Why infra-red? 'Cuz it's what I got
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
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."········
Have a good day.·
(Man, oh man -- did this one go off the rails fast.)
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
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...
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...
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!
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.