Go Down

Topic: Using two photoelectic switches to measure speed. (Read 288 times) previous topic - next topic

Kingroytenpin

Hi,

  I am new to arduino.  I have several photoelectric switches model we-m3d deill.  On them they have 12-30vdc.  I would like to use them to measure the time it takes to pass between the to light switches.  I have a arduino UNO. That I have purchased. Can they be utilised or is there an easier way?

Cheers.

rweber95

Can't offer anything specific without a schematic of your intended circuit, but one method would be to connect the output of the two photocells to two interrupt inputs.  Then when the first cell trips, read the time and when the second cell trips, read the time and subtract the two to get the elapsed time.  Time is read with the program command millis() or micros(), depending on the speed of the events.

Bob Weber

Go Up