Ir timer micros()

Hello

I just got my hands on a pile of IR assembly line detectors (they work like garage door sensors)

If you bolted two transmiter/receiver pairs together and attached the receiver sensor lead to an Arduino when you crossed the line both beams would break simultaneously.

-------------->

<--------------<

If the beam were split in the middle both sensors would stop receiving signal at the same tine. But if you broke the beam far to one side the sensor closest to where it was broken would shut off first.

Would it not be possible to determine the point the beam was broken by comparing shutoff times using an Arduino?

No. The timer isn’t that precise. For one thing (really bad napkin maths coming up!), an Arduino at 16MHz can process one instruction (assuming that instruction only takes one clock cycle which is pretty unlikely) in 62.5 nanoseconds. Light can travel 18.7 meters in that time. Your resolution would be terrible.

This completely ignores propagation delays in the wires going from the receivers to the processor, which would be significant.

what if you took a diaphragm and receiver of an ultra sonic sensor?

then you would be working off the speed of sound not light

would the arduino be able to handle that?? :slight_smile: :slight_smile:

tim.vrakas:
what if you took a diaphragm and receiver of an ultra sonic sensor?

then you would be working off the speed of sound not light

would the arduino be able to handle that?? :slight_smile: :slight_smile:

yes it can do it with ultrasonics Sparkfun has ultrasonic ranger finders

http://www.sparkfun.com/categories/84

Ultrasonic sensors can directly read range, so you’d be fine - and you’d only need one :slight_smile: