subject: Electronic Timers [print this page] Electronic Timers Electronic Timers
A timer is a specialized type of clock. A timer can be used to control the sequence of an event or process. Whereas a stopwatch counts upwards from zero for measuring elapsed time, a timer counts down from a specified time interval, like an hourglass. Timers can be mechanical, electromechanical, electronic (quartz), or even software as all modern computers include digital timers of one kind or another. When the set period expires some timers simply indicate so (e.g., by an audible signal), while others operate electrical switches.
Electronic timers are essentially quartz clocks with special electronics, and can achieve higher precision than mechanical timers. Electronic timers have digital electronics, but may have an analogue or digital display. Integrated circuits have made digital logic so inexpensive that an electronic timer is now less expensive than many mechanical and electromechanical timers. Individual timers are implemented as a simple single-chip computer system, similar to a watch and usually using the same, mass-produced, technology.
Many timers are now implemented in software. Modern controllers use a programmable logic controller rather than a box full of electromechanical parts. The logic is usually designed as if it were relays, using a special computer language called ladder logic. In PLCs, the software built into the controller usually simulates timers. Each timer is just an entry in a table maintained by the software.
Digital timers are used in safety device such as a gas timer.
Computer systems usually have at least one timer. These are typically digital counters that either increment or decrement at a fixed frequency, which is often configurable, and that interrupt the processor when reaching zero, or a counter with a sufficiently large word size that it will not reach its counter limit before the end of life of the system.
More sophisticated timers may have comparison logic to compare the timer value against a specific value, set by software, that triggers some action when the timer value matches the preset value. This might be used, for example, to measure events or generate pulse width modulated waveforms to control the speed of motors (using a class D digital electronic amplifier).