Electronic – a typical response time for a photodiode/phototransistor

microcontrollerphotodiodephototransistor

I'm trying to get an ATtiny26l MCU to detect a very short signal produced by a IR led + detector couple (I don't know if it's a photodiode or a phototransistor buit i think it's a diode) and the setup works if i let something fall through the couple or block it by hand but when i try to detect a fast moving object (a flying airsoft BB) i'm not getting any response. The time the IR detector is obscured is around 78μs. I'm not sure if the response failure is caused by the detector not having fast enough response time or the MCU not detecting the produced signal, but since the MCU is detecting it using a edge triggered interrupt and i also tried to check for the signal state on it's each cycle at 1 MHz i'd say it's the first option. Also is it possible for the detector to increase it's reaction time let's say in case of overload or damage?

EDIT: I also have a BJT PNP transistor invering the sensor's output (which is high at negative result and low at positive result). Could this be the problem?

Best Answer

If you cannot test as arielCo suggests, (or even if you can) you should look at the specs for your device. If you search digikey for optical sensors - transistor output the candidates will have response times listed from 20 nsec to 1 msec. If you search for optical sensors - photodiodes the listed response times range from 30 psec to 2 msec.

Turn off when you block the light will be slower than turn on, and won't really start until the light is completely blocked.