Pages: [1]   Go Down
Author Topic: Using two photoelectic switches to measure speed.  (Read 282 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Tacoma, Washington, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: