Hi,
I have a requirement to measure the rotational position of a rotating cylinder and sync it to a processing program that is projecting on it.
The cylinder will be rotating at appromimately 30hz, and I need to know the time at which it completes a full rotation, so if the cyl is marker from 1 to 360 degrees, I need the draw routine to know at what point it has passed 0 degrees.
So far , i have tried using an old mouse, and took the ball out and used the IR / detecter emmiter to try to track a moving tab that passed between them, but this did not work, as the mouse used quaderature interference to tell which direction the mouse wheel moves and will only work with the small circular grating found in mice, and not with a simple blocking of the signal. The other problem, is that I think mice only interupt at about 125 hz, so this would probably not give an accurate position of the cylinder, as those 125 pulses would be spread over 30 rotations and only give a resolution of about 85 degrees.
My next idea is to use the minim library and record the noise of the cylinder hitting a small flexible tag on each rotation, and then use beat detection to tell how far appart the noises are which would also give the speed of the rotation.
Can anybody think of a better way??
Ideally an LED / Light detector shining through a hole in a disc would be best but can't think of a way of reading this into processing without custom hardware.
Thoughts?
Thanks.
1