Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

Intermittent power interruption device with long delay. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Power Supplies

Comments on the article Comments on the article

A description is given of a simple device that allows, with a period of several hours, to automatically turn off and then turn on the power of any electrical appliance for a short time. The device is made on the ATtiny13A microcontroller and contains a minimum number of elements.

An example of the use of such a device can be the periodic shutdown of a device to restart its program (this restores the functionality that was broken as a result of a failure). It is possible, for example, to interrogate an electronic thermometer or other sensor with a period of several hours and transmit its readings via a radio channel.

In my village house, the recording system, in the absence of the owners, collects the readings of various sensors and sends them via a 3G modem to a specialized site where the database is stored. An unpredictable "drop-out" or even a complete cessation of updating information in the database was noticed. The reason was the loss of connection between the modem and the cellular network. Only a periodic reboot of all system devices (modem, router, controller) helped. I chose the easiest way to do this - turn off the power to the recording system for a few seconds every four or five hours.

To implement this method, you need a pulse generator with a very long repetition period. The solution of the problem by the traditional method leads to a rather complex device with high requirements for the long-term stability of the elements. The alternative is an inexpensive device on a microcontroller. The principle of its operation can be as follows: the “sleeping” microcontroller periodically “wakes up” at the signal of the watchdog timer, checks how much time has passed since the last reboot of the system and, if the right moment has come, turns off its power for a while.

The scheme of the device is shown in fig. 1. The +5V voltage is supplied from input socket XS1 (USB-BF) through normally closed contacts K1.1 of relay K1 to output sockets XS2 and XS3 (dual USBA-2J). With the output PB4 of the microcontroller DD1, an electronic key on the transistor VT1 is connected, in the collector circuit of which the winding of the relay K1 with a resistance of 75 ohms is connected (the operating voltage of the winding is 5 V).

Intermittent power interruption device with long delay
Rice. 1. Diagram of the device

The HL1 LED serves as an indicator of the device status. It lights up when power is off from sockets XS2 and XS3. On power-up, the microcontroller configures all of its port lines as inputs, so the transistor remains off and the relay coil is de-energized.

The microcontroller program was developed in the Algorithm Builder for AVR environment. The block diagram of the algorithm of its work is shown in fig. 2. The ATtiny13A microcontroller configuration bit states required for the program to work are shown in fig. 3.

Intermittent power interruption device with long delay
Rice. 2. Block diagram of the microcontroller program operation algorithm

Intermittent power interruption device with long delay
Rice. 3. ATtiny13A microcontroller configuration bit states required for the program to work

The operating mode of the watchdog timer of the microcontroller should be set in the development environment, as shown in fig. 4, which corresponds to the longest exposure time - 8,2 s. The program is built so that most of the time the microcontroller is in "sleep" mode. "Waking up" when the watchdog timer is triggered, it, according to the program, checks the contents of the register R0 and increases its contents by one.

Intermittent power interruption device with long delay
Rice. 4. Operating mode of the watchdog timer of the microcontroller

The value stored in the R0 register does not change in the "sleep" mode, which allows using its register as a counter for the number of "wake-ups" of the microcontroller. Register overflow occurs approximately every 35 minutes (8,2 s x 256). If its contents are non-zero, the counter overflow has not yet occurred and the microcontroller "falls asleep" again (it switches to Power down mode).

Overflows of register R0 are counted by the program in register R1. In my case, eight overflows were enough (8,2s x 256 x 8 = 4,7 hours), so the initial value in register R1 is 7, and each overflow of register R0 reduces it by one. After the specified time interval, the program configures the PB4 pin as an output and sets it to a high logic level. This opens the transistor VT1 and leads to the operation of the relay K1, which breaks the power circuit of the devices connected to the XS2 and XS3 connectors. After 8,2 s, the watchdog timer fires again, and the program returns the PB4 output to the input mode, which turns off the K1 relay. Power to external devices is restored.

As a result, approximately once every four and a half hours, the device de-energizes the device, which is fed through it with a voltage of 5 V, for eight seconds.

The interrupter is mounted on a fragment of a breadboard with dimensions of 20x50 mm. The microcontroller DD1 is installed in the panel. Relay K1 - SRS-05VDC-SL. Checking the manufactured breaker should be started without a microcontroller. A voltage of 5 V applied to socket XS1 must be present at socket 8 of the microcontroller panel and at the left (according to the diagram) output of the relay winding K1. This voltage is measured relative to socket 4 of the microcontroller board. You can check the operation of the transistor VT1 and relay K1 by short-circuiting slots 8 and 3 of the microcontroller panel - the relay should work, and the LED should turn on for the duration of the circuit. After installing the microcontroller in the panel, checking the operation of the device consists in a long wait for the moment when the LED turns on and the relay operates.

A heat-shrinkable tube is put on a tested board with parts, through which the glow of the HL1 LED is clearly visible. The finished breaker is shown in Fig. 5.

Intermittent power interruption device with long delay
Rice. 5. Appearance of the interrupter

It is interesting to note the "side effect". In order not to wait too long for the relay to operate during the check, a somewhat simplified program (without analyzing the state of the register R1) was loaded into the microcontroller of the receiving part of the device described in my article "Radio-controlled network extension cable" ("Radio", 2014, No. 7, p. 31 -33). During its operation, every 35 minutes, the extension sockets were turned on for 8 seconds. On New Year's Eve, Christmas tree illumination was connected to this extension cord. The effect was unexpected: at the most inopportune time, the illumination suddenly turned on. The Christmas tree, blinking merrily, cheered up those around for a few seconds.

Life has shown that a completely useless, at first glance, device, having worked in a village house for more than a year, turned out to be ... useful. When analyzing the information registered on the site, it became clear how rebooting the system solves the problem of freezing the cellular channel. At the same time, to fix the failure, you did not have to go to the site to restart the system. The device turned out to be compact and convenient. It should also be noted that it has a low current consumption in standby mode, which makes it possible to apply such a solution in self-powered systems.

The principles underlying the considered algorithm can also be used for other purposes, for example, to simulate the presence in the house.

The microcontroller program can be downloaded from ftp://ftp.radio.ru/pub/2016/08/pr.zip.

Author: A. Pakhomov

See other articles Section Power Supplies.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

Integration of smoke detectors into computers and mobile devices 01.12.2014

An Apple filing has appeared in the US Patent Office (USPTO) database that describes the integration of smoke detectors into electronic devices such as computers and mobile devices connected to the network.

The presence of a smoke detector will allow a computer or mobile device to detect and respond to a danger. In particular, the response may be the transmission of messages to neighboring devices and remote devices located at the rescuers. These messages may contain location information with a precise reference to the building in which the smoke was detected.

At the same time, information from accelerometers and other sensors will help determine whether the device is in the hands of the user, and more accurately indicate its location. In addition, a fire extinguishing system may be included.

As devices that can be equipped with smoke detectors to perform the above functions, the application lists a laptop, tablet, smartphone, and smart watch.

Other interesting news:

▪ Language and color vision

▪ Gardening is one of the best antidepressants

▪ Mutual understanding between human friends

▪ Let's charge the battery with our feet and hands

▪ The value of dark chocolate for older people with diseased arteries

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site for the radio amateur-designer. Article selection

▪ article What to do? Popular expression

▪ article Where do people of the Caucasian race live? Detailed answer

▪ article Hunting knot. Travel Tips

▪ article Refinement of the frequency meter control unit. Encyclopedia of radio electronics and electrical engineering

▪ article Disappearing coins. Focus Secret

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024