# Time switch

A time switch (also called a timer switch, or simply timer) is a device that operates an electric switch controlled by a timer.
Intermatic introduced its first time switch in 1945, which was used for "electric signs, store window lighting, apartment hall lights, stokers, and oil and gas burners." A consumer version was added in 1952.
The switch may be connected to an electric circuit operating from mains power, including via a relay or contactor; or low voltage, including battery-operated equipment in vehicles. It may be built into power circuits (as with a central heating or water heater timer), plugged into a wall outlet with equipment plugged into the timer instead of directly into the power point; or built into equipment.

## Types
### Sleep timer

A sleep timer is a function on many modern televisions and other electronic devices that shuts off the power after a preset amount of time. The setting is usually made either from the remote control of the device or the device's menu. They are intended to allow viewers to watch as they fall asleep.
The mechanism may be mechanical (e.g., clockwork; rarely used nowadays), electromechanical (e.g., a slowly rotating geared motor that mechanically operates switches) or electronic, with semiconductor timing circuitry and switching devices and no moving parts.
The timer may switch equipment on, off, or both, at a preset time or times, after a preset interval, or cyclically. A countdown time switch switches power, usually off, after a preset time. A cyclical timer switches equipment both on and off at preset times over a period, then repeats the cycle; the period is usually 24 hours or 7 days.
For example, a central heating timer may supply heat for a specified period during the morning and evening every weekday, and all day on weekends. A timer for an unattended slow cooker may switch on automatically at a time and for a period suitable to have food ready at mealtime. Likewise, a coffee maker may turn itself on early in the morning in time for awakening residents to have fresh coffee already brewed for them.
Timers may do other processing or have sensors; for example, a timer may switch on lights only during hours of darkness, using a seasonal algorithm or light sensor. Combining the two allows a light to come on at sundown and go off at midnight, for example.

### Astronomical timer

An astronomical (or astronomic) timer calculates dawn and dusk times (tracking the sun position) for each day of the year based on the latitude and longitude (or just north/central/south and time zone on more cheaply made ones), and the day of the year (month and date), programmed by the user upon installation in addition to the usual time of day, except in the case of GPS enabled astronomic timers wherein all programming is fully automatic. This eliminates the need for a photocell (which may be repeatedly triggered on and off by the light which it operates) or for repeatedly re-setting a regular timer for seasonal changes in the length of day or for daylight-saving time. This allows exterior lighting like a porch light fixture to be controlled by simply replacing its indoor wall switch, or doing the same for a lamp in a dark interior corner (away from a window) by simply plugging-in a self-adjusting lamp timer.
Time switches can be used for many purposes, including saving electric energy by consuming it only when required, switching equipment on, off, or both at times required by some process, and home security (for example switching lights in a pattern that gives the impression that premises are attended) to reduce the likelihood of burglary or prowling.
Among applications are lighting (interior, exterior, and street lighting), cooking devices such as ovens, washing machines, and heating and cooling of buildings and vehicles. Built-in automatic washing machine controllers are examples of very complex electromechanical and electronic timers cycles, starting and stopping many processes including pumps and valves to fill and empty the drum with water, heating, and rotating at different speeds, with different combinations of settings for different fabrics.

### Digital Timers

A digital timer switch, also known as an electronic timer switch, seamlessly integrates semiconductor components for precise timing and a digital display format to present timing information in a user-friendly manner. Typically presented as a display panel or digital readout timer, this device offers high programmability, empowering users to customize timing sequences according to their specific needs.
The scope of applications for digital timer switches is broad and impactful. From controlling lighting systems to overseeing the operations of various electronic and electrical devices, these devices serve as versatile automation tools.
The advantages of using digital timer switches are noteworthy. The ability to automate tasks translates to increased efficiency and convenience, liberating users from repetitive actions such as toggling switches or adjusting timers. Notably, these devices promote energy conservation by allowing scheduled operations, thereby minimizing unnecessary power consumption.
In essence, digital timer switches are essential components in modern automation and control systems. By seamlessly blending accurate timing with user-friendly digital displays, they play a pivotal role in enhancing various facets of daily life.

### IoT Enabled Time Switch

An IoT-enabled time switch is a smart device that allows users to control and automate the operation of electrical appliances or systems based on a predefined schedule. This technology combines the functionality of a traditional time switch with the connectivity and intelligence of the Internet of Things (IoT).
At the core of an IoT-enabled time switch is a microcontroller or microprocessor that manages the scheduling and control of the connected devices. The time switch is connected to a local network or the internet via Wi-Fi, Ethernet, or other wireless communication protocols like Zigbee or Z-Wave. This connectivity enables the time switch to be controlled and monitored remotely through a smartphone app or web interface.
The time switch can be programmed to turn on or off a connected device at specific times or according to a set schedule. For example, a user could program the time switch to turn on the lights at a certain time in the morning and turn them off at night, or to activate a heating system at a specific time before the user arrives home from work.
Some advanced features of IoT-enabled time switches include the ability to monitor energy consumption, adjust schedules based on local weather conditions, and integrate with other smart home devices like smart speakers or home security systems. These features allow users to optimize their energy usage, increase comfort, and enhance the overall security of their homes.
In summary, an IoT-enabled time switch is a smart device that combines the functionality of a traditional time switch with the connectivity and intelligence of the Internet of Things, allowing users to control and automate the operation of electrical appliances or systems based on a predefined schedule.