Help understanding IR LED and IR Receiver Diodes - Page 1
Forum section: electronics / beginners

author: IslandDon
author_rank: Newbie
timestamp: June 18, 2020, 03:11:39 am
content: Hi, all!tl;dr:In a really simply USB-powered red LED circuit, I put the swapped out a jumper for what I'm pretty sure is a photodiode so that the long lead of the photodiode is connected to the long lead of the LED, and now the red LED lights dimly until I introduce an IR source, in which case in lights up brightly. Does that sound right?Questions: What does "reverse bias" mean in the context of photodiodes? Is it just a semantic difference how long the leads are cut, or is there actually something "backwards" in the package?It seems how much "oomph" photodiodes let through depends on how much light they get. Is the "oomph" permitting more current as they get more light or creating less resistance? Is that the same thing? Or is it something else?Is the reason the red LED is always lit (when it's button is on) is that there's never zero infrared?What exactly makes an LED dim? What makes an LED light at al? I read thatcurrent-driven devices. Does that mean it doesn't matter what the voltage is (within reason), so long as the current across the LED is high enough to light it but not so high it destroys it?I also really have no idea what I'm doing, so please correct any misuse of technical language!Thanks!All the background, what exactly I did, why I'm doing this, etc.:I put together silly IR emitter and detector circuit, and I'm not 100% sure I set everything up "right" or even understand what "right" means.Just for context, I'd like to build one of those DIY Wii "sensor" bars. (They're just two sets of two IR LEDs, hence the quotes around sensor.)I bought some IR LEDs and IR receiver diodes as well as one of those Arduino starter kits that comes with everything but an Arduino. I already had a bunch of micro USB sockets-to-pin things (I'd put the cart before the horse "fixing" something I realized I don't have the know-how to fix), so I decided I'd use one of those for power.I figured it'd be best to start making a little "detector" to check that the IR LEDs were actually emitting anything. I started with just a red LED with a jumper that I would later replace with an IR photodiode. I used an online LED resistor calculator based on the 5.2v output of the USB wall plug to determine I needed a130Ωresistor for the red LED. I added a momentary button. It worked! (I used a 220Ω and a 330Ω resistor in parallel for a calculated 132Ω, which is pretty close to what my Big Box Hardware Store multimeter said they were in parallel. I at first was using a single resister that was too big, and then out of a mix of mild curiosity and mild frustration directly connected a red LED to the power supply, letting out the magic invisible but odiferous smoke that makes LEDs work. Fortunately, I have a bunch.)I then built a nearly identical circuit on the other side of the breadboard, except using an IR LED (the clear thing in the IR set) and a 1000Ω resistor in place of the 330Ω resistor for a calculated resistance of 180.33Ω -- pretty close to the180Ωthe IR LED needs at 5.2v.I then swapped out the jumper for an IR photodiode (the translucent black think from the IR set) with the short lead connected to the long lead of the red LED and got nothing when I pressed both buttons. I tried with a TV remote. I tried with a lighter. Nothing.I switched the IR LED and IR photodiode, thinking I maybe got them mixed up -- I find those boxes with the cardboard inserts saying what's where a little confusing. Still nothing.I put them back and reversed the IR photodiode -- the short lead of the photodiode is connected to the positive end of the power supply and the long lead of the photodiode is connected to the long lead of the red LED. And it seems to work!Now the red LED is on when I pushed the button on that side, and less dim when I push both. So I cupped my hand around the photodiode and noticed the red got significantly brighter when the current was provided to the IR LED. I tried with a TV remote and got a similar result -- the red LED alternated between bright and dim (which makes sense, since that's what TV remotes transmit). I also tried putting some rolled up paper over the IR LED and photodiode, and that was the brightest the red LED got apart from having the jumper in place.I'm thinking I may try to solder up the IR detector to a perfboard with a button cell (and therefore different resistors) to practice working with perfboard and to be able to take something more manageable than a breadboard plugged into a USB cable around.I know photos of breadboards aren't the greatest, but I don't have the tools to make a circuit diagram. Fortunately, the site is telling me the maximum is 5000 KB, even though I'm trying to attach three 850 KB photos, so you don't have to see my breadboard mess! edit: Now with attachments?

author: Ian.M
author_rank: Super Contributor
timestamp: June 18, 2020, 04:08:01 am
content: A circuit diagram is worth at least a thousand words, often many times that, so please try to provide one. The minimum tools to make a circuit diagram are a sheet of *white* paper and a pen or a 2B pencil! (Don't use a harder than 2B pencil as light lines don't photograph well.) If you want to get fancy, add a ruler and a pencil eraser.To post it here, you've then got to either scan it (the easiest option if you've got access to a scanner) or photograph it square on, preferably illuminated by direct sunlight, or at least several bright lights from the sides, with the paper attached to a rigid surface and the camera rigidly held with its lens square on to and in line with the center of the paper. Make sure its in focus!When photographing breadboards and other circuits, use plenty of lighting from several directions to minimise shadows and glare, put them on a sheet of white paper to reduce background clutter to minimise the image filesize, and get the camera as close as you can without loosing focus so the image fills the frame. If you can, post-process in a photo editor program to crop anything irrelevant, improve contrast and/or colour balance, and if the resolution is excessive reduce it to reduce the file size.Now to your queries:A photodiode passes a very small current when reverse biassed, increasing with the illumination level. Its never enough to directly drive any practical load. Alternatively, in photovoltaic mode they output a voltage, but due to the very small active area, its a very high impedance source so needs a high impedance buffer amplifier to do anything useful with it.If the sensor device can directly switch a LED when illuminates its a phototransistor, not a photodiode. They are often packaged in LED style packages with no base connection.Most digital cameras can 'see' the infrared light from an IR LED if its in their field of view. Take a known working TV remote, point it at whatever webcams or other digital cameras you have while watching their output video, and press a button. You'll soon find which of your cameras 'see' IR well enough to check your IR LEDs for infrared light output.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: June 18, 2020, 04:40:37 am
content: My cellphone's cameras see TV etc. remote control IR LEDs very brilliantly.Also, in my experience the type of phototransistor or photodiode used in the OP's project is pretty directional and would probably work better if it was pointed at the emitter rather than just sitting next to it. Maybe.

author: IslandDon
author_rank: Newbie
timestamp: June 18, 2020, 08:09:53 pm
content: Thank you for the replies. If I can ask more LED questions, I'm looking atElectronic Hub's articleSimple LED Circuits, and they use the "next available resistor" rather than trying to get closer like I did (like using a 47Ω resistor when they calculated they needed a 40Ω resistor).Is it accurate that as long as (Vsupply- VLED)/Rseries resistor< ILED, the LED will be at full brightness because the LED is the limiting factor on current and not the resistor?Since P=I2•R, and I is constant because of the LED, does choosing the bigger resister simply result in more heat being dissipated by the resistor (since I is constant)? I'm guessing it's a negligible increase when you're just powering an LED, but is that conceptually correct?Also, if the resistor starts being the limiting factor on the current (i.e. I=V/R "takes over" and that inequality flips), will the brightness will start dropping off? (Not that that's agood way to dim an LED, but is that conceptually what would happen?)No more questions for the rest of this post! Just chit chat about your responses.Quote from: Ian.M on June 18, 2020, 04:08:01 amI'm guessing it's possible to use a photodiode in a similar way by making a circuit that will switch based on some threshold voltage. That may even be advantageous in that you could adjust the threshold. Actuallydesigningsuch a thing iswayover my head for now, but a little searching makes that seem possible.Quote from: Ian.M on June 18, 2020, 04:08:01 amThat doesn't sound like something I'd need to do in any project I have in mind, but that's also good to know. There seem to be a lot of audio applications based on search results I'm seeing.Quote from: alsetalokin4017 on June 18, 2020, 04:40:37 amQuote from: Ian.M on June 18, 2020, 04:08:01 amI had already found out thatnoneof my digital cameras can see IR light! Or at least that they all have IR filters. These IR LEDs I have actually emit red light in addition to infrared light looking at the head on, which is not ideal for this application, but I'm sure it'll be fine.Quote from: alsetalokin4017 on June 18, 2020, 04:40:37 amThat definitely is the case with the photodiodes I have. Anything I put over the IR LED to redirect it toward the photodiode dramatically increases the brightness of the LED.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: June 19, 2020, 04:40:26 am
content: QuoteAh... no, I don't think so. The only way that an LED is a limiting factor on current is when it blows out and stops conducting! It is the series resistor that is the limiting factor on the current, for a given supply voltage.Do you have a variable voltage DC power supply? Connect a sacrificial LED in series with a resistor to the power supply and start raising the voltage while you monitor the current with an inline ammeter. How does the LED behave?The LED spec will have a brightness value at a rated current. Less current, less brightness. More current, more brightness until the LED pops and won't pass current any more.So if you want the LED to shine at its rated brightness, you look up that spec in the data sheet, and then solve the LED equation. You have as given the current through the LED, and you want to solve for either the supply voltage or the resistor value, depending on which one of those you already know.Example: Say you have a 12 volt supply source, and a LED that is specified as 2000 mCd at 20 mA, and has a Vf (forward voltage drop, what you are calling VLEDcan be measured with most multimeters) of 1.2 V. So you know everything except the resistor value in the LED equation. If you use a larger resistor you will have less current through the circuit which includes the resistor and the LED. Less current means less power dissipation means less heat in the resistor and less brightness in the LED.Many modern LEDs will be very very bright at 20 mA, so for most purposes you can derate them (use a larger resistor for less current and less brightness for a given supply voltage.) The human eye isn't really very good at discriminating brightness levels, which is why you can just use the "closest common value" resistor instead of trying to get absolute accurate brightness from the LED.Seriously? Your cellphone cameras don't see your IR LEDs?

author: alsetalokin4017
author_rank: Super Contributor
timestamp: June 19, 2020, 05:02:49 am
content: A fun thing to play with in this context is the LDR, light dependent resistor, also known as the CdS photocell or photoresistor.

author: IslandDon
author_rank: Newbie
timestamp: June 19, 2020, 11:56:00 pm
content: Cool. Thank you taking the time to clarify my misunderstanding! I don't have agoodvariable voltage DC power supply -- just a few old model train transformers in the bottom of a box! For the purposes of burning out an LED, I'm sure it would work fine. The meter I have only does resistivity, continuity, and voltage, but I figured I'll need one with a few more features if I'm going to get much further than burning out some LEDs, so one of those is on order. It's not a nice one at all, but some online video reviews make it look like it'll be sufficient for me for now.Another lesson learned is to only buy LEDs that come with spec sheets! These did not.As for my cell phone cameras, it turns out the outward-facing camera filters out IR, but the selfie camera does not. I didn't even think to check that one!

author: Ian.M
author_rank: Super Contributor
timestamp: June 20, 2020, 12:10:59 am
content: Although very important, datasheets aren't *essential* for commodity indicator LEDs for hobby use. The seller should have some idea of the rated If, so note that when you order and write it on the packet when they arrive. You can measure Vf for yourself.For generic visible light wire leaded 5mm and 3mm LEDs, 30mA abs.max. If is a fairly safe assumption. For generic wire leaded 5mm and 3mm IR LEDs abs.max. If is likely to be up around 100mA, but pulsed, not continuous. Derate approx 20% for reliability so don't run generic visible LEDs 'hotter' than 25mA If.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: June 20, 2020, 12:15:54 am
content: Heh... great minds think alike, I was about to post much the same thing.But for a specific or critical application, for example a commercial product using an LED, IR or visible, one should use a product that is well-specified, so that one can optimize such things as power consumption, heat dissipation, etc.Try the common 5mm "superbright" white LEDs at 5 mA.... they are still surprisingly bright at that current, even if specced at 20 mA.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: June 20, 2020, 12:32:40 am
content: The older "freebee" LED flashlights from a certain low cost tool source have 27 superbright white LEDs in them. They have short leads but some careful soldering can fix that. The newer model replaces the 24 discrete LEDs with a couple of strips. Haven't taken one of those apart yet. But they are free!

author: alsetalokin4017
author_rank: Super Contributor
timestamp: June 20, 2020, 12:36:08 am
content: I found a data sheet for a 940 nanometer IR LED that will probably be close.http://www.lucidscience.com/projects/Night%20Vision%20Viewer/12.jpg

author: Ian.M
author_rank: Super Contributor
timestamp: June 20, 2020, 02:14:49 am
content: Interesting - it alleges its good for 100mA If continuous (and 1A pulse), but its actually dissipation limited at 100mW which from its Vf vs If graph will be somewhat less, depending on its efficiency.