Arduino timer with photoresistors

For a science project i need to be able to measure the velocity of an object, to do this i planned to use arduino to measure the time between the object breaking a laser pointers beam onto a photoresistor and it breaking a second similar beam/photoresistor a set distance away.

Alas ive had some trouble with the photoresistor side of things, can anyone describe how to properly implement a photoresistor? such as which ports i could connect it to and how to read when the beam would be broken.

mofoya5 years ago
I recently posted an ible about doing almost exactly this. I didn't use photoresistors though.

Quatch is right about the phototransistors. They would work better. I would put a pull-up resistor on each of the 2 external interrupt pins (INT0 and INT1), and then use a phototransistor to pull these pins low (as/until)  your target object breaks the beam. Then you can reset a timer with one interrupt and capture the timer's value with the other...

If you're stuck on using the photoresistor, you can make a voltage divider with it and a normal resistor.  Then apply the divider's output to a normal transistor, like a 2n3904 or similar, to pull your interrupt pins low.
quatch5 years ago
you might want a phototransistor, they respond faster.

You want to look at making a resistor voltage divider. Just search here for it.