How to can I use photo transistor to count an object ?

MisterBill2

Joined Jan 23, 2018
28,065
Really, to functionally de-bounce the light detector signal as the car is breaking the beam, a one second triggered one-shot, such as CD4528 would work better. Each car will take at least a second to pass, and so if each oneshot is wired as non-retriggerable then the count would be accurate. The problem is that breaking a beam is a slow process compared to electronics speeds. So the pulse stretcher might even need to be two seconds.
 
Top