How Much Current for Line-Following Sensor QRD1114?

So I ordered a bunch of QRD1114’s for a line-following robot to use as black/white sensors.

Most schematics I’ve ever seen put a 270 ohm or 330 ohm current limiting resistor in a (regulated) 5-volt setup. So my math would be:

I = E / R = 5v / 270 ohms = 18.5 ma
and
I = E / R = 5v / 330 ohms = 15.1 ma

…and the data sheet for the QED1114 says the max current for this device is 50 ma, so it looks like I’m seriously underpowering the LED.

I = E / R = 5v / 100 = 50 ma
and I verified that a 100 ohm resistor gives me the full 50 milliamps.

The problem: I probably don’t want to run these LEDs maxed out. Don’t want to waste power - might burn out the LED faster, etc. So I want to reduce the power until I do NOT loose sensor sensitivity. I plan to run experiments at 50 ma, and down in increments until I see some change or some degradation of my results. I also see a problem that if I get it “just right”, I could be low enough to get blown out by higher than expected ambient lighting if my light shielding isn’t perfect.

The question: How would you conduct the experiment I mention above? What am I looking for to tell me I have the right LED current?

Sounds like a cool experiment, you could try different resistors (or one variable reistor) under the same lighting conditions, and see how far above a black/white line you can detect the change (i.e. the phototransistor reliably trips the input on whatever device you want to use the sensor on). You probably want to be well on the working side (a few milliamps) of when you start missing lines at the height your line-following robot is going to use.

By the way, a quick note on data sheet terminology. 50mA is the current listed in the “Absolute Maximum Ratings” table. These are not normal operational values, these are the maximum values at which the manufacturer guarantees the device won’t instantly die (like: oops I hooked it up wrong-POOF), but you’re also not guaranteed any significant runtime at those values: “stressing the parts to these levels is not recommended”. If you notice, most of the ratings in the normal table are computed with 20mA, which is probably just fine for normal operation (but that’s what you’re going to figure out!).

I guess what I’m saying is you probably don’t want to start at 50mA, or maybe start at the lowest current and work your way up, so you know your later results aren’t being affected by any damage from your initial tests.

Also, when calculating the current an LED will draw (or rather, what current a resistor will limit it to), the source voltage is generally not the voltage drop across the inline resistor. The diode also has a voltage drop across it, and just to make the math super-complicated, that voltage varies with current (Fig 1, Page 3 of the data sheet, it’s not even a nice straight line)! Typically you take the average value of VF (the diode’s forward voltage drop) at the expected current, in this case 1.7V at 20mA, from the top of the Electrical/Optical characteristics table.

So, I=(Vs-VF)/R =(5V-1.7V)/100ohm=33ma

Which means 270 and 330 ohm resistors are underpowering the LED by even more! Then again, maybe that’s just fine. If you really wanted to you could measure the current during your experiments, but this standard formula is probably sufficient, since you’re interested in relating performance to resistor value, not trying to precisely reach a particular current. Anyway, good luck with your experiments (and your line follower), and please post your results!

-Adam