Trying Out Other On/Off Sensors

Now that you’ve learned how to use a pushbutton, you should know that there are many other very basic sensors that work according to the same principle:

Toggle switch

The pushbutton that you’ve been using is a type of switch called a momentary switch, because once you let it go, it goes back to where it was. A common example of a momentary switch is a doorbell.

In contrast, a toggle switch stays where you put it. A common example of a toggle switch is a light switch.

We use the common names for these switches: a pushbutton refers to a momentary switch, while a switch refers to a toggle switch.

Although you might not think of a switch as a sensor, in fact it is: a pushbutton (momentary switch) senses when you are pressing it, and a (toggle) switch senses (electrically) and remembers (mechanically) the last state you put it in.

Thermostat

A switch that changes state when the temperature reaches a set value.

Magnetic switch (also known as a reed switch)

This has two contacts that come together when they are near a magnet; often used for burglar alarms to detect when a door or window is opened.

Carpet switch

A flat mat-like switch that can be placed under a carpet or a doormat to detect when a human being (or heavy cat) steps on them.

Tilt switch or tilt sensor

A simple but clever sensor that contains two (or more) contacts and a little metal ball (or a drop of mercury, but I don’t recommend using that). Figure 5-1 shows the inside of a typical model.

Inside Tilt Sensor

When the sensor is in its upright position, the ball bridges the two contacts, and this works just as if you had pressed a pushbutton. When you tilt this sensor, the ball moves, and the contact is opened, which is just as if you had released a pushbutton. Using this simple component, you can implement, for example, gestural interfaces that react when an object is moved or shaken.

Another useful sensor that is often found in burglar alarms is the passive infrared, or PIR, sensor, shown in Figure 5-2. This device changes state when a moderate infrared source, like a human, moves within its proximity. These sensors are often designed to detect humans but not small animals, so that burglar alarms won’t get triggered by pets.

figure 5 2

Detecting humans is actually quite complicated, and the PIR sensor is quite complex inside. Fortunately, we don’t really care about the insides. The only thing we need to know is that it results in a digital signal, indicating whether a human is present or not. This is why the PIR sensor is a digital sensor.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *