# Assistance on values and components, photo-transistor switch for LED array

Yet another photo-switch question. Have done my homework, and searches but most non-specific circuits are beyond my learning curve, time to learn, and available wet-ram.

Have a 15 LED array being driven by a LM317 regulator set up for current regulation (shown below). Schematic has been breadboarded and works as advertised. Supply voltage 12-15Vdc, Vf of LEDs 3V, current 20mA ea. LM317 output with 12 ohm resistor.. 20.8 mA.

Need to add (optional) photo-switch to this circuit (on at dark, off at dawn). Simplest I have found has been posted in these forums already.

Problem is, this circuit, components and values, were designed for a 3V coin cell, and my requirements are based around available 12-15Vdc power. Additional constraints due to space for components (very small) and power consumption (least is best) require a solid state solution. This solution looks good if someone can help specify the proper value for the (now) 1K resistor in a circuit such as below. Spec sheet for the 2N3904 shows a max current of 200mA so (I think) it should suffice.

As I said earlier, my knowledge of EE is extremely limited, and I am putting this together on the fly. I can read a schematic, and do a decent job of soldering but my theoretical knowledge is sadly lacking. I may need to build several hundred of these little suckers, so any input or pointers to a better path, or a solution to my specific questions are appreciated.

• You're doing a high-side drive. Use a 2N3906 instead. – Ignacio Vazquez-Abrams Oct 19 '13 at 0:57
• Assuming the change to a 2N3906, the circuit should work? Any input as to the value of the resistor in question? – cap'couillon Oct 19 '13 at 1:47
• Unfortunately you'll also need to switch to a PNP phototransistor, and tie the emitter to 12V and have the resistor pull it down instead. Or you can put an inverter stage in between the photo and the transistor. – Ignacio Vazquez-Abrams Oct 19 '13 at 1:53
• Also you can't use 2N3904 as it is limited to "Absolute Maximum Collector Current" of 200ma collector current depending on the device and manufacturer! – Chetan Bhargava Oct 19 '13 at 2:25
• @Ignacio How about we just move the switch portion of the circuit to the low-side of the leds? – cap'couillon Oct 19 '13 at 11:21