Need help in a project

Thread Starter

Ali Inam

Joined Aug 7, 2011
Hi, I am making up a Velocity Counter using a photo diode. I have planned it to be in the following way:

I will be having two ends, on both of those ends I will be having photo diodes on one side and laser lights falling on the diodes from exactly opposite sides. Now I will make a toy car move, once the toy car intercepts the first light beam, I want my counter to start the time immediately and as soon as it intercepts the other beam, I want it to stop.

Can anyone guide me please.



Joined Oct 23, 2010
Not exactly what you mean by that. I do not think that velocity is something you can count.

Maybe what you mean is that you want to determine the velocity by measuring the time lapse from start to finish then calculate velocity as V= dist/time. Is that right?

If so, you need to count time pulses and divide that into the distance between the two sensors.


Joined Aug 15, 2007
A microcontroller with the right set of interrupt pins seems ideal. Do you have any one at hand?
I'm not convinced interrupts are needed with so simple a project. Polling the pins should do the trick, probably down to microseconds!

Of course, using an S-R latch to control a 555's pulses into a counter could also do, tho' binary to decimal might be problematic, so the micro would b e better.



Joined Sep 9, 2010
There are many ways to accomplish this, and the choice partly depends on what the OP wants to use for the timing and display of results.

One way to capture the start and stop would be to use two 555 timers configured as missing pulse detectors. Pulse the light source and throw the trigger when a pulse is missed. This is a simple circuit for DIY. This would generate a signal at each interruption of the two beams. Then you need to measure the time between those two and get the result. Could be as simple as starting and stopping a third timer attached to a counter. Could be as elaborate as a computer-controlled data acquisition device, which would allow calculating velocity and displaying the results graphically or remotely. Just depends what you want.