Go Down

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



  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?



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

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131