I am looking to detect the amount of light coming from a specific direction that lands in a specific area on a PCB. In my research, I have only found ambient light sensors and never any kind of directional light sensor. I want to confirm that there is no kind of existing IC package for sensing directional light.

My idea is therefore to take an ambient light sensor and shroud it to shrink the field of view. My sensor will be on a PCB. I am thinking about 3D printing a tube in matte black and attaching it to the PCB over the ambient light sensor IC. However, I'm not sure what the most durable way to attach the shroud around the sensor would be -- I'd like something better than glue. I was wondering if there is some kind of PCB component I could include in my design so that the shroud could be soldered or screwed on.

  1. Is there such a component as a directional light sensor?
  2. What are good methods for fabricating a shroud for an ambient light sensor?
  3. What are good methods for attaching the shroud around an ambient light sensor on a PCB?
  • \$\begingroup\$ Depending on your material you may consider PCB cut-out and mounting the shroud as a snap-in. If 7-segment displays I'm using can be mounted like this, the shroud can as well. \$\endgroup\$
    – jaskij
    Commented Jan 25, 2016 at 14:22
  • \$\begingroup\$ A directional light sensor is called a "camera". You need to be more specific about how much directionality you're looking for. A photosensor with a shroud can be thought of as a crude 1-pixel pinhole camera. \$\endgroup\$
    – Dave Tweed
    Commented Jan 25, 2016 at 14:27
  • 1
    \$\begingroup\$ How directional, i.e. how narrow an angle? Is it binary or do you need an analogue value? If it's an analogue value, how much precision and accuracy? Many 'analogue' devices would be used with a lens. How large an area of the PCB needs to be 'sensitive'? How much height is available? How much PCB area can you afford to use for supporting circuitry? \$\endgroup\$
    – gbulmer
    Commented Jan 25, 2016 at 14:30
  • 1
    \$\begingroup\$ Simple directionality can be achieved with a shroud as you say. High manner of directionality will invariably include optics such as lenses to get a tight focal beam. It depends on what exactly you want. \$\endgroup\$
    – Asmyldof
    Commented Jan 25, 2016 at 14:31
  • 1
    \$\begingroup\$ Check out narrow angle phototransistors such as Vishay BPW17N vishay.com/docs/81516/bpw17n.pdf \$\endgroup\$ Commented Jan 25, 2016 at 14:36

2 Answers 2


The custom shroud may be the easiest solution. There are a few variables that may change things depending on your application requirements such as, the light intensity, required sensor sensitivity, and resolution.

When directing light with LEDs, you can use a 'collimator' or a 'light pipe' both are available through digikey and other electronics suppliers.

collimator: http://www.digikey.com/product-search/en/optoelectronics/optics-leds-lamps-lenses/525154?k=collimator

light pipe: http://www.digikey.com/product-search/en/optoelectronics/optics-leds-light-pipes/524541

If you were doing a simple binary yes/no light is hitting here (maybe with a laser or focused high intensity light). I would use an LED and light pipe and used the LED as the photosensor. If you have incredibly low lighting, I would go with photoresistor and shroud.

If you can find a clear light pipe that matches the footprint of your sensor, you'd have the perfect solution.


Standard method (IMPE) is a blackened brass (it blackens well/easily with a nice non-reflective oxide) tube the PT or PD or even PR fits into the base of. A long tube gets VERY directional without any additional optics. If using any sort of plastic be careful of reflections ruining the selectivity of the tube. Lining something with black felt can work, but is usually impractical at a diameter suitable to small electronic sensors. The problem is effectively the same as a telescope tube but at a smaller diameter.

Glue is fine for the sensor to tube if you are not trying to hold the tube mechanically with the glue (put some leads on the sensor's wires, or arrange the case to mechanically hold the tube and the board in the right relationship.) i.e. hold the sensor in the tube, not the tube on the sensor. Some sensors may take soldering to a tube (where plastic would again be a problem), some will die from it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.