How do I control an led array with a phototransistor?

Discussion in 'The Projects Forum' started by thache, Dec 6, 2010.

  1. thache

    Thread Starter New Member

    Dec 6, 2010
    I'm planning on hooking up 3x6 LED array to a USB port that only turns on at night, but I have no idea how to do that last part. I'm just dabbling in electronics and have barely even wet my feet. SO, I have a 5v DC source, 18 IR LEDs(1.5 forward voltage, 140 mA), and 6 3.9 ohms 1/4 Watt resistors.
    My diagram so far:
    Will this work? What do I need to get/do to have this only run at night?
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    IR leds?

    For remote controls? If so, you will not see the light as it is not in the "typical" human spectrum.

    Post a link to the datasheet regarding the LEDs.

    If you were using visible light LEDs, this task is pretty easy.

    Bill_Marsdens' LED Information Extravaganza

    and for the "Dark-Detecting" circuit:

    If your phototransistor can "see" the LED light and stays off, because of it, you will want to aim it away from them.

    If you post links to the parts you have, it will take a lot of the "goose chase" out of this.
    Last edited: Dec 6, 2010
  3. SgtWookie


    Jul 17, 2007
    Instead of using 6 strings of 3 LEDs with a 3.9 Ohm resistor, use 9 strings of 2 LEDs with 91 Ohm resistors. The LED "wizard" you used was poorly written; leaving no margin for variances in LED Vf due to manufacturing tolerances or over temperature.

    You'll use more power this way (198mA current * 5v instead of 140mA * 5v) but your LEDs will last much longer, and have more even brightness over their lifetime.

    For the light/dark thing, you might use a LDR (light dependent resistor), another resistor, and a couple of transistors.

    The EvilMadScientist schematic won't work for this many LEDs; the transistor will need more base current to saturate.

    This will do the job:
    Last edited: Dec 6, 2010
  4. tyblu

    Active Member

    Nov 29, 2010
    I think the OP meant each transistor could support 140mA, so multiple 2n2222s are in order.