Recent Changes - Search:

Introduction to Microcontroller Programming

About PICmicro Chips

Clocking Your PICmicro Devices

E-Blocks

Flowcode Step By Step

PICmicro Projects

Labs

Schmitt Trigger

<^< Switch Debouncing | Course Index | Adding Outputs >^>

Imagine for a moment a home environment control system that needs to switch on the lights on when it gets dark, and switch on the heating when the temperature drops. The system relies on signals from a light sensing unit and a temperature sensing unit - these are analogue sensors, and not switches. Switches have only two possible states - on and off. Ideally, a switch unit outputs either 0V, or the full power supply voltage, (logic 0 or logic 1 as we saw earlier.) These analogue sensors can give out any voltage between 0V and the full power supply voltage.

Some PICmicro chips accept analogue input signals, and have a built in analogue-to-digital converter, which can be used to produce the switching action we want.

For other PICmicro chips, we need to add another sub-system to the sensors, to make them work like a switch. One such sub-system is called a Schmitt trigger.

The output of the Schmitt trigger circuit is either a high voltage (near to the full power supply voltage,) or a low voltage (near to 0V.) This gives the switching behaviour we discussed earlier.

The input voltage from the analogue sensor decides which of these outputs is produced. There are two fixed threshold voltages associated with the Schmitt trigger. When the voltage from the sensor increases and reaches the upper threshold, the output is the high voltage (logic 1). When the voltage from the analogue sensor drops below the lower threshold, the output changes to the low voltage (logic 0.)

The following graphs show this behaviour.

The signal from the sensor wobbles around, and crosses the thresholds several times, at points X and Y, but these have no effect on the output. It is only when the signal crosses for the first time that any change in the output takes place.

The output of the Schmitt trigger can be used to switch lights / heaters etc. off and on as indicated.

<^< Switch Debouncing | Course index | Adding Outputs >^>

Print - Search - Login

Page last modified on September 08, 2011, at 02:42 PM