<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFCC" text="#3333FF">
    <div class="moz-cite-prefix">On 05/15/2014 04:57 PM, Grawburg wrote:<br>
    </div>
    <blockquote cite="mid:d77eb27a5d6d00477a78995ad6d02dd1@myglnc.com"
      type="cite">
      <pre wrap="">I mentioned Monday that the infrared LED & phototransistor are not powered by the Raspberry Pi but from an external 3.3 VDC supply.  I'm using 220 ohm resistors on the emitter and 10k on the detector. If they were being powered directly from the Pi I'd use 470s on the emitter.

I have two pair now, but could have 4 pair later, I think I will continue to use external power for them. Am I 
correct in my thinking that under these circumstances 220 ohm resistors are sufficient for the emitters?
</pre>
    </blockquote>
    <br>
    Ohm's Law to the rescue....<br>
    <br>
    In general, red, green and yellow LEDs, 2.1 volts, 20mA; blue,
    white, violet and "bright" LEDs, 3.2 volts, 25 or 30mA.<br>
    <br>
    So to drive an LED from directly:<br>
    <br>
        3.3 volts - 2.1 volts = 1.2 volts across the resister.<br>
    <br>
        1.2 volts / .020 amps = 60 ohms full brightness.  (25 mW)<br>
    <br>
    A 220 ohm resister gives you:<br>
    <br>
        1.2 volts / 220 ohms = 5.5mA, 7 mW or 25% power, ~= 25%
    brightness.<br>
    <br>
    A 470 ohm resister from a R-Pi pin of 3.2 volts (drop from output
    pin) will give you about 3% power & brightness.<br>
    <br>
    <pre class="moz-signature" cols="80">-- 
Scott G. Hall
Raleigh, NC, USA
<a class="moz-txt-link-abbreviated" href="mailto:ScottGHall1@GMail.Com">ScottGHall1@GMail.Com</a>
</pre>
  </body>
</html>