Use of the opto switch or opto interrupter as a ro...

The opto switch or interrupter is a small U shaped black plastic package with a infra red LED on one side of the U and a light sensitive transistor on the other. This is shown in figure 1.

Open in new window

This figure also shows a circuit for connection to the Motorvator Timed Input Port. The LED side of the interrupter is sometimes marked with an E and a +. The + should be connected to the +5V on the Motorvator via a current limiting resistor. These opto switches vary but I have found a 1K resistor usually works well. The E should be connected to the Gnd on the Motorvator timed input and also to the diagonally opposite pin on the opto switch which may be marked with an D. The other pin on the transistor side of the opto switch is connected to the signal pin on the Timed Input of the Motorvator. (See Motorvator Manual) via a current limiting resistor. Again I have found a 1k resistor works well on the various opto switches I have tried.

Open in new window

Figure 2 shows the components assembled on a small piece of copper strip board which is drilled with Meccano compatible holes for easy attachment to the model. I have taken the connections to three small pins which can connect to a servo type plug and hence to a Motorvator plug. Take care at the Motorvator plug that the connections are as described above and shown in figure 1. The Motorvator sends a small current through the LED side of the unit which transmits a tiny infra red beam to the transistor side of the unit. If this beam is interrupted the signal on the signal pin will change and a count will be made. A segment of code is shown below (Code)which shows how these signals can be used to control the motor.

Open in new window

Open in new window

Figure 3 shows the rotation counter incorporated into a model. In this case the Motorvator Rotation sensor plastic wheel has been drilled with 2mm holes to act as the interrupter but a Meccano bush wheel or sprocket could also be used depending on the resolution required. The resolution may also be increased by gearing up the counter say 3 to 1. Experiment to obtain the best arrangement.