Poor man's rotation sensor
To those who have to manage more carefully their resources, we propose a simple but efficient rotation-sensor for low speed. The concept first was expressed in Ben Erwin's book Creative Projects with Lego Mindstorms page 201ff. We worked already with a similar encoder at the pure LEGO compass page.
The idea is quite simple:
The following paper-encoder is fixed to a 40 teeth-gear. A LEGO light-sensor is placed to look at it. That's all !! No glue, no soldering, no additional electronics. Here a 24-sectors encoder !
As revisitors of our pages know, we NEVER simply copy things from others, but we ALWAYS add creative new challenges and solutions or better develop new projects from scratch. So, we propose some improvements to Ben's issues:
Robolab 2.5 sub.vi: Boulette_rotation_sensor.vi with event monitoring, a datalogging test-program, a compute tools5 program and a light-sensor reset without display. DOWNLOAD files.
The parameters (33, 42) should be manually adjusted to your specific situation. Your application must provide the information about sense of rotation. By default the sub.vi increments the container by +1. The maximum speed may be deduced by the trigger-time 0.01sec. Each encoder-sector should appear at least 0.01sec in front of the light-sensor. This is equivalent for 24 sectors to a period of 0.24 sec per revolution. --> max angular speed: 60 * 1 / 0.24 = 250 RPM.
We count the peaks AND the wells.
With the 24-sectors encoder we have 8*60/24 = 20 RPM (revolutions per minute).