My objective here is to detect when light falls on any one photo sensor. Based on datasheets, the sensor uses 15uS rise if Rl (load?) is 1K and fall times for the lights themselves and the logic gate uses roughly 400nS for rise and fall time. The power supply is 4-5VDC fed through a regulator all powered by batteries.
This is my circuit
R4 is 10K. In my actual circuit I applied 10K as a SIP resistor unit across all P0 pins so each pin is pulled up by a 10K.
R1 is also 10K.
I chose R2 to be 1M because I want lots of sensitivity so that even room light can make the microcontroller detect it but that isn't working, I mean the hfe of this transistor is > 100 so 10K * 100=1000K=1M right or is my calculation bad?
I chose 2.2K for R3 but I might consider lowering that somewhat but not too much because I don't want to create a short-circuit with the microcontroller (which can happen if gate output is high and micro sets the pin low).
I also think that the number of phototransistors might affect the resistance required as well.
Anyone got a good equation I can use?
Also, for the purposes of calculating phototransistor response time, is the actual response time in this case 150uS instead of 15uS because R1 is 10K instead of 1K?
This is my circuit
R4 is 10K. In my actual circuit I applied 10K as a SIP resistor unit across all P0 pins so each pin is pulled up by a 10K.
R1 is also 10K.
I chose R2 to be 1M because I want lots of sensitivity so that even room light can make the microcontroller detect it but that isn't working, I mean the hfe of this transistor is > 100 so 10K * 100=1000K=1M right or is my calculation bad?
I chose 2.2K for R3 but I might consider lowering that somewhat but not too much because I don't want to create a short-circuit with the microcontroller (which can happen if gate output is high and micro sets the pin low).
I also think that the number of phototransistors might affect the resistance required as well.
Anyone got a good equation I can use?
Also, for the purposes of calculating phototransistor response time, is the actual response time in this case 150uS instead of 15uS because R1 is 10K instead of 1K?