ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Wall clock-thermometer. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Clocks, timers, relays, load switches The wall clock-thermometer offered to the attention of readers is made according to the simplest scheme and does not contain expensive elements. On a large indicator, assembled from single LEDs, the current time in hours and minutes is periodically replaced by the temperature values in the street and in the room.
The diagram of the watch-thermometer is shown in fig. 1. They are based on the AT89C2051-12PU (DD1) microcontroller. The clock frequency of the microcontroller is set by the ZQ1 quartz resonator at 3,6864 MHz. It is chosen from the condition of dividing its value in hertz by 12 without a remainder. This is necessary for the accurate running of the clock - in the microcontroller used, the duration of the machine cycle is equal to twelve periods of the clock frequency. Fine adjustment of the stroke is made by a tuning capacitor C4. It can be performed on a frequency meter connected to one of the outputs of the ZQ 1 quartz resonator through a 1 pF capacitor.
The clock-thermometer indicator consists of four seven-element familiarity (digits). Each element contains three LEDs connected in parallel. As an example, in fig. 2 shows the location and connection of the tens of hours LEDs (leftmost). The microcontroller directly controls the voltage supplied through resistors R8-R14 to the cathodes of the LEDs of the same-name elements of each category. Dynamic indication is organized with the help of switches on transistors VT1 -VT4, switching on the signals of the microcontroller the common anodes of the LEDs of the indicator discharges. Two LEDs (HL43 and HL44), separating the digits of hours and minutes on the indicator, flash with a period of 1 s, indicating the progress of the clock. When the clock is turned on by the SA2 switch, the indicator displays the time 00:00. Its exact value is set with the buttons SB1 and SB2. After pressing SB2 for the first time, the tens of hours digit starts flashing. The number displayed in it is changed by pressing SB1. The next presses on the SB2 button alternately proceed to setting the units of hours, tens and units of minutes. While holding SB1 pressed, the variable value increases at a rate of about two units per second, and when it reaches the maximum number for this bit, it returns to zero. After setting the units of minutes, pressing the SB2 button starts the clock. The microcontroller communicates via a 1-Wire interface organized by software with two digital temperature sensors DS18B20 - installed on the street BK1 and placed in the room BK2. If the room temperature is not of interest, then the BK2 sensor can be turned off by the SA1 switch. After 10 s of time display, the microcontroller program sends a command to the BK1 sensor to measure the temperature and within 2 s displays its value in whole degrees Celsius in the two right digits of the indicator, accompanying it with the letter U (street) in the leftmost digit. Then the same procedure is performed with the BK2 sensor, the readings of which are accompanied by the letter P (room). In both cases, the measured temperature range is from -55 to +99 °C. Its negative values are marked with a minus in the second digit of the indicator from the left. If there is no BK1 sensor or BK2 is off, the microcontroller program determines this and skips the corresponding procedure for measuring the temperature and displaying it on the indicator. Please note that at the beginning of its work, the program enters into the non-volatile memory of the sensors the values of some parameters that are required for their correct operation in the described device. Therefore, after the first connection of the sensor (for example, in case of its replacement), it is necessary to turn off and then turn on the power of the watch-thermometer.
The printed circuit board of the watch-thermometer is shown in fig. 3. It is made of fiberglass laminated on one side. All elements on it are mounted on the side of printed conductors. This made it possible to use the board as the back cover of the watch case. The case itself is glued from organic glass. The board with LEDs is located at its transparent front wall, between them there is a light filter made of a colored (red or green) film. Blue LEDs, the type of which is indicated in the diagram, can be replaced by others of any color, but of increased brightness, so as not to increase the current consumed by the watch-thermometer. The temperature sensor BK1 should be placed in a small casing to protect it from the sun's rays, and fixed outside the window at a distance of about a meter from the wall. The microcontroller program (file prog.asm) was written in assembly language for microcontrollers of the MCS-51 family and translated into the boot file prog.hex using the 8051 IDE for Windows (acebus. com/download/win8051.zip). Microcontroller programming can be done with any programmer capable of working with AT89 series microcontrollers. The constant voltage of the external power supply supplied to connector X1 can be in the range of 7 ... 24 V. I used a cell phone charger. In the event of an external power failure, the clock switches to a backup battery GB1, composed of five to six galvanic cells of AA size. The low current consumption of the LEDs used (a few milliamps) made it possible to refuse to turn off the indicator when switching to backup power. The microcontroller program can be downloaded from ftp://ftp.radio.ru/pub/2013/10/prog.zip. Author: A. Samus See other articles Section Clocks, timers, relays, load switches. Latest news of science and technology, new electronics: Machine for thinning flowers in gardens
02.05.2024 Advanced Infrared Microscope
02.05.2024 Air trap for insects
01.05.2024
Other interesting news: ▪ Revealed the secret of longevity of turtles ▪ Protein found to prevent preterm birth ▪ Protecting spin qubits from external noise ▪ Genes for gray hair, beard and eyebrows found ▪ Biostar Accessory for Cryptocurrency Mining News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the site Visual illusions. Article selection ▪ article Information wars and information terrorism. Basics of safe life ▪ article What are pigeons? Detailed answer ▪ Article First Vice-Rector (Vice-Rector for Teaching and Educational Work) of the Higher ▪ article Organization of 1-Wire-systems. Encyclopedia of radio electronics and electrical engineering ▪ article Amphibian Man. Focus Secret
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |