You are on page 1of 4

Experiment No.

Study of Switches

Objective

1. To study the behavior of the Micro switch, Push button and Optical switch.
2. To study the high frequency response of Micro switch and Push button.
Equipments Required

1. QNET-MECHKIT
2. Jumper

1. To study the behavior of the Micro switch, Push button and Optical switch.

Different applications call for different types of switches. For example, a micro switch may be
used to detect mobile robot hitting a wall whereas an optical switch could be used to detect an
edge. The push button is the most common type of switch mechanism. A switch that is active
high means the output is high, e.g. 5.0V, when the switch is triggered. Active low means the
signal is high, e.g. 5.0V, when the switch is not engaged. Here the micro switch is an active low
device. The optical switch is a photo-micro sensor that includes transmissive and reflective
components. As opposed to the push button and micro switch, this is a non-contact triggering
solution. It is triggered when the reflective sensor does not detect any light, i.e. when an object is
placed between the components. It goes low when no object is detected.
A light emitting diode, or LED, is a low-energy and robust indicator that is used in many
applications. The LED’s on the mechatronic sensors trainer, labeled LED7 and LED8, are
connected to digital output lines from which they can be turned on and off. As with switches,
LED’s can be wired to be active low or active high.

Procedure

1. Create VI as shown in Fig.1 using Lab view.


2. Ensure Jumper (J7) of QNET-MECHKIT is set to Optical switch, J8 to Micro switch and
J9 to Push button.
3. Ensure the correct Device is chosen.
4. The channel for Optical switch should be selected as ai0, for Micro switch should be
selected as ai1 and for Push button should be selected as ai2. The samples should be
continuous. And the sampling rate should be given as 200Hz.

Optical switch

1. Take piece of paper and slide it up and down into the optical switch. Examine the raw
responses in the Optical Switch scope.
2. Adjust threshold to obtain an on/off or 0/1 digital measurement in the Optical Switch –
Digital scope.
3. Record threshold used to get on/off measurement and paste the response (Fig.2) of the
Optical Switch and Optical Switch – Digital scope.
4. Study the behavior of the switch by varying the threshold level.

Fig.1. Block diagram fro capturing the switch signal and displaying.

Fig 2. a) Optical switch measured voltage. b) Optical switch processed output.

Micro switch

1. Press on the Micro Switch and examine its raw response in Micro Switch scope.
2. Adjust the Gain and Offset such that this the signal goes from 0 to 1 in the Micro Switch –
Digital scope when the Micro Switch is pressed.
3. Record the Gain and Offset used in Table 1 and capture representative Micro Switch and
Micro Switch – Digital responses (Fig.3).
4. Study the behavior of the switch by varying the gain and offset.
Table 1

Parameter Value
Gain
Offset

Fig 3. a) Micro switch measured voltage. b) Micro switch processed signal.

Push button

1. Press on the Push Button and examine its raw response in the Push Button scope.
2. Adjust the Gain and Offset such that this the signal goes from 0 to 1 in the Push Button –
Digital scope when the Push Button is pressed.
3. Record the Gain and Offset used in Table 2 and capture representative Push Button and
Push Button – Digital responses.

Table 2

Parameter Value
Gain
Offset

Fig 4. a) Raw voltage push button output. b) Processed push button output.

You might also like