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

Thread Starter

vtc

Joined Apr 3, 2018
37
Hi,

I need to count objects using cd4510 counter.

I read I can use photo transistor to clock the counter when object pass.

I have BPW77NA phototransistor.
How can I use it with my project ?

Regard
 

ericgibbs

Joined Jan 29, 2010
18,848
hi,
So you want to count cars as they go In and Out of a Car Parking Gate.?
As well as a Photo Transistor detector you need a Photo Emitter.
Is this a Homework problem.?

E
 

ericgibbs

Joined Jan 29, 2010
18,848
hi,
Do you have a block diagram/sketch showing how you would solve the problem.?
We can then give you hints on how to do the assignment.
E
 

ericgibbs

Joined Jan 29, 2010
18,848
hi,
The signal coming from the photo detector needs to be debounced and and the signal edges sharpened.
You can do this by using a logic IC that has a Schmitt input, look up the CD40106 datasheet as an example..
E
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,848
hi vtc,
As it is Homework I will not give you the answer to the problem, only hints
Look at this diagram, it should give you an idea how to make the counters, count up and down and the logic circuit required.
E
 

Attachments

Thread Starter

vtc

Joined Apr 3, 2018
37
Dose the bouncing occure with photosensor not only from mechanical switches ?


So I just connect the output from the Photo transistor to shmitt inverter?

Also can I use 4093 short instead of 40106?

Regards
 

Thread Starter

vtc

Joined Apr 3, 2018
37
hi vtc,
As it is Homework I will not give you the answer to the problem, only hints
Look at this diagram, it should give you an idea how to make the counters, count up and down and the logic circuit required.
E

Putting one detector before and the other one after the gate is a must ?

Or can I put the two detector before the gate or after the gate?
 

ericgibbs

Joined Jan 29, 2010
18,848
hi,
You could do it either way.
The way I have drawn it, would be possible , if it were a real car park, the logic could open the gate [ lift the barrier], to let the car in or out.
 
Last edited:

Thread Starter

vtc

Joined Apr 3, 2018
37
What I think . I will connect one of the detectors to up/down pin to determine if the car in or out.and the other one to clk pin.

If the car in it will pass the up/down detector first and put the counter in up mode then it will pass the clk detector while the car still interrupt the up/down detector.

If the car out it will pass the clk pin first and the counter will be in the down mode.

Any comment 0.0
 

ericgibbs

Joined Jan 29, 2010
18,848
Yes, the first detector activated, determines if the 4510 counts Up or Down.
Hint: place the detectors so that the length of the car is covered by both beams/detectors.
 

Thread Starter

vtc

Joined Apr 3, 2018
37
Thank you Eric:)

Here is the Photo detector circuit after adding 4093 ?

Is this enough to denounce the signal ?

20180403_190146.jpg
 

ericgibbs

Joined Jan 29, 2010
18,848
I would add a 4k7 resistor in series from the 10k to the first 4093 and a 47n capacitor from the input of the first 4093 to 0v.
 
Top