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

Electronic event recorder. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Measuring technology

Comments on the article Comments on the article

Commercially available electronic event recorders are mainly designed for industrial applications and are quite expensive. The proposed device can be made independently. It does not contain expensive parts and captures the operation of four sensors, contact or with output signals of standard logic levels.

Electronic event recorder
Fig. 1

The diagram of the recorder is shown in fig. 1. Its basis is the PIC16F628A (DD1) microcontroller. Information about events (changes in the state of contact sensors SF1-SF4) is stored in the DS1 non-volatile memory chip connected to the microcontroller via the l2C serial interface.

The choice of the PIC16F682A microcontroller is due to the following:

- there is a built-in USART for organizing communication with a computer;
- low power consumption;
- operability is maintained when the supply voltage drops to 2,2 V;
- there is a timer synchronized by a separate quartz resonator, convenient for organizing a real-time clock and working even in the "sleep" mode of the microcontroller.

Information about each event occupies eight bytes in the memory of the DS1 chip. This means that the available 32 KB is enough to register 4096 events. Reading and writing are performed block by block: the address of the first byte of the block is followed by eight bytes of information. The increment (increase by one) of the address of each received or transmitted byte occurs automatically.
Most of the time, the microcontroller DD1 is in sleep mode, only its timer TMR1, synchronized by the "clock" quartz resonator ZQ2, works. Once per second, this timer generates an interrupt request, to process which the microcontroller wakes up, increments the time counter and polls the sensors. If their state has changed, the event information is written to the DS1 chip, after which the microcontroller "falls asleep" until the next interrupt.
An event registration (with indication of the state of the sensors, time and date) results in a change in the state of any of the four sensors. But you need to keep in mind that the sensors SF1 and SF2 are polled once per second, so short-term changes in their state may be missed. This can be used to eliminate the effects of contact bounce. But changes in the state of sensors SF1 and SF3 will be recorded, even if they occurred in the intervals between polls, and by the time of the poll the sensor has returned to its original state. These features should be taken into account when choosing the design of sensors and the method of their connection.

The current consumption of the recorder from a 3 V battery is about 200 μA, which allows it to operate from two AAA alkaline cells for at least six months.

To interact with a computer, the recorder has a serial RS-232 interface, the X1 connector of which is connected to the computer's COM port connector.

This allows:

- transfer the list of registered events from the device to the computer;
- clear this list in the registrar;
- set the exact time in the recorder's clock.

The RTS signal generated by the computer's COM port was not used for its intended purpose, but to power the DA1 level conversion chip. This reduces the current drawn from the GB1 battery and extends its life. The supply voltage of the DA1 chip is limited by the VD1 zener diode to 3,3 V. This is less than the typical value for the applied MAX232CPE chip, but it is sufficient for its normal interaction with a physical or virtual (organized using a USB-RS-232 converter) computer COM port.
A voltage of 3,3 V from the RTS line is also supplied to the HL1 LED, which indicates its presence, and to the RA2 input of the microcontroller. 

Table 1

Electronic event recorder

Note. Time is transmitted in six bytes in the following order, seconds, minutes, hours, day, month, year.

Upon detecting it, the microcontroller wakes up and initializes its USART. The exchange is carried out at a speed of 19200 baud.
The microcontroller is set to its initial state when the power is turned on by an internal signal. The MCLR input is not used.

Internal resistors are programmatically connected to the lines of port B of the microcontroller, connecting them to the power plus. They provide a current flowing from each line of about 200 µA. Event sensors can be not only physical contacts (reed switches, buttons), but also any devices with output logic signals that have standard TTL levels.
Socket X1 - DB-9F. As X2, any convenient connector can be used to connect sensors. When connecting the recorder to devices that have their own power sources, especially network ones (for example, to fix power outages, equipment failures), you need to take care of galvanic isolation using optocouplers or relays.
To interact with the logger, a computer program logger.exe has been developed that allows you to give it the commands listed in the table, receive responses to them and save the list of registered events in a file on the computer disk. The window of this program is shown in Fig. 2.

Electronic event recorder
Fig. 2

When the recorder is connected, it displays the number of events recorded by it, as well as the current time and date according to the recorder's internal clock.

By opening the "Journal" main menu item, you can synchronize the clocks of the recorder and the computer, save the list of events in a CSV (Comma Separated Values) file, and clear the recorder's memory. The CSV format is chosen as the most versatile, such a file can be opened, for example, in Microsoft Excel or in another spreadsheet. It is easy to write your own program for processing it.

The event record format is as follows: day, month, year, hour, minute, second, sensor 1, sensor 2, sensor 3, sensor 4. All values ​​in it are decimal text. The character separating them (in this case, a semicolon) is set in the window that opens when you select the "Options" menu item. In the same window, select the COM port of the computer to which the recorder is connected, and the period for polling it by the computer (not to be confused with the period for polling sensors by the recorder).

The program can be downloaded hence.

Author: S. Kuleshov, Kurgan; Publication: radioradar.net

See other articles Section Measuring technology.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

The world's tallest astronomical observatory opened 04.05.2024

Exploring space and its mysteries is a task that attracts the attention of astronomers from all over the world. In the fresh air of the high mountains, far from city light pollution, the stars and planets reveal their secrets with greater clarity. A new page is opening in the history of astronomy with the opening of the world's highest astronomical observatory - the Atacama Observatory of the University of Tokyo. The Atacama Observatory, located at an altitude of 5640 meters above sea level, opens up new opportunities for astronomers in the study of space. This site has become the highest location for a ground-based telescope, providing researchers with a unique tool for studying infrared waves in the Universe. Although the high altitude location provides clearer skies and less interference from the atmosphere, building an observatory on a high mountain poses enormous difficulties and challenges. However, despite the difficulties, the new observatory opens up broad research prospects for astronomers. ... >>

Controlling objects using air currents 04.05.2024

The development of robotics continues to open up new prospects for us in the field of automation and control of various objects. Recently, Finnish scientists presented an innovative approach to controlling humanoid robots using air currents. This method promises to revolutionize the way objects are manipulated and open new horizons in the field of robotics. The idea of ​​controlling objects using air currents is not new, but until recently, implementing such concepts remained a challenge. Finnish researchers have developed an innovative method that allows robots to manipulate objects using special air jets as "air fingers". The air flow control algorithm, developed by a team of specialists, is based on a thorough study of the movement of objects in the air flow. The air jet control system, carried out using special motors, allows you to direct objects without resorting to physical ... >>

Purebred dogs get sick no more often than purebred dogs 03.05.2024

Caring for the health of our pets is an important aspect of the life of every dog ​​owner. However, there is a common assumption that purebred dogs are more susceptible to diseases compared to mixed dogs. New research led by researchers at the Texas School of Veterinary Medicine and Biomedical Sciences brings new perspective to this question. A study conducted by the Dog Aging Project (DAP) of more than 27 companion dogs found that purebred and mixed dogs were generally equally likely to experience various diseases. Although some breeds may be more susceptible to certain diseases, the overall diagnosis rate is virtually the same between both groups. The Dog Aging Project's chief veterinarian, Dr. Keith Creevy, notes that there are several well-known diseases that are more common in certain breeds of dogs, which supports the notion that purebred dogs are more susceptible to disease. ... >>

Random news from the Archive

Beetles are the most tenacious creatures 27.03.2015

Scientists from Colorado State University (USA) found that beetles were not only the largest group among insects and living beings in general (there are almost 400 species), but also the most capable of surviving subjects.

As a rule, entomologists focus on the emergence of new species, but extinction is no less important for understanding the history of animals. Paleontologists examined more than 5500 beetle fossils, representing the entire history of the order, starting from the Permian period (284 million years ago) and collected around the world.

It turned out that over hundreds of millions of years, only 35 beetle families out of 214 had died out, and in the largest order of beetles, Polyphaga (90% of all known species), there were no extinct families at all: they survived both the mass Permian and Cretaceous-Paleogene extinctions.

Although other groups of insects may well prove equally resistant to extinction, scientists cite the ability to quickly adapt to a wide variety of climatic conditions, as well as the incredible flexibility of their diet, among the reasons for such outstanding success of beetles.

Other interesting news:

▪ The film absorbs sweat and charges the gadget

▪ The world's largest TFT liquid crystal display

▪ Dangerous hydroelectric power station

▪ Prosthetic eye with night vision

▪ Heat resistant bioplastic

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Medicine. Selection of articles

▪ article Micromill. Drawing, description

▪ Why do plants turn towards the sun? Detailed answer

▪ article Jeweler. Job description

▪ article Minimum fuel level indicator in the tank. Encyclopedia of radio electronics and electrical engineering

▪ article VHF converter. Encyclopedia of radio electronics and electrical engineering

Leave your comment on this article:

Name:


Email (optional):


A comment:




Comments on the article:

Ivan72
This registrar would be equipped with an LCD indicator for autonomy, otherwise it is inconvenient with a computer every time. I would like an apartment alarm ...


All languages ​​of this page

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

www.diagram.com.ua

www.diagram.com.ua
2000-2024