Recent Changes - Search:

Introduction to Microcontroller Programming

About PICmicro Chips

Clocking Your PICmicro Devices

E-Blocks

Flowcode Step By Step

PICmicro Projects

Labs

Switch Unit

<^< Switches | Course Index | Sensors >^>

The sensors just described change their resistance when changes take place in external conditions such as temperature or light level. They are analogue devices. Their resistance copies the external condition.

Switches also change their resistance, when switched on and off. A switch should have a huge resistance when switched off. That is why no current flows. It should have a tiny resistance when switched on, so as not to affect the current flowing. There are only two states, on and off. The resistance of the switch has only two values, huge and tiny. These are digital devices.

Like the analogue sensors, they are usually connected in a voltage divider circuit to convert their resistance change into a voltage change. The same rule applies as in the voltage dividers for the sensing units just described - the bigger resistor gets the bigger share of the power supply voltage.

In the switch unit circuits that follow, the huge resistance of the switch, when switched off, absolutely drowns the resistance of the resistor. The switch takes all of the supply voltage, and the resistor takes none. When switched on, the resistance of the resistor drowns the tiny resistance of the switch. Now the resistor takes all of the supply voltage and the switch takes none.

In the first example, this switch unit outputs a low voltage ('logic 0') when the push switch, shown connected to a 10k ohm resistor, is not pressed. When pressed, the switch unit outputs a high voltage ('logic 1').

In the next example, the switch unit is turned upside down, and so is the resulting behaviour!

This circuit outputs logic 1 when the switch is not pressed and logic 0 when pressed.

<^< Switches | Course index | Sensors >^>

Print - Search - Login

Page last modified on January 30, 2012, at 03:17 PM