ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Clock-alarm clock-thermometer with IR remote control. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Power regulators, thermometers, heat stabilizers The device offered to the attention of readers is made on a modern element base and differs from the designs previously published in the journal in advanced features and the use of an IR remote control to control it. The described device is designed to indicate the current time, give sound signals at a given time and indicate the temperature at two points (indoors and outdoors) in the range of -55 ... +99 °С with an accuracy of ±1 °С. Time and temperature are displayed alternately (for 10, 1 and 2 s respectively). Setting the clock readings, the alarm time, turning off the alarm, extinguishing and lighting the indicator is done from the IR remote control (DU). The alarm clock beeps with a pause of 10 s: first, two short (about 0,1 s) single ones, then the same number of double ones (with a pause of 0,1 s), and after them - two triple ones (with the same pause). After a minute, triple signals are given every second until the alarm is turned off (this "algorithm" is convenient if a child is sleeping in the room). There is a Snooze function (repeating the signal after a certain time), which allows you to sleep a little more after the first signal. If the indicator is off (for example, at night, so as not to disturb children when falling asleep), it lights up when the alarm goes off and shows the current time until it turns off or goes into Snooze mode. There is a short sound response to pressing the remote control buttons, indication (by LED) of the passage of commands from the remote control, backup power in the event of a power failure (in this case, the alarm clock gives a continuous signal). The schematic diagram of the device is shown in fig. 1. Its basis is the DD2 AT89C4051 microcontroller [1]. It controls the operation of all nodes. It includes a non-volatile program memory (4 KB), RAM (128 bytes), two timers, an interrupt system, etc. For reliable start-up and protection of the microcontroller from power failures, the KR1171SP47 (DA1) microcircuit was used. It keeps its output (pin 3) low when the supply voltage is less than 4,7 V. Capacitor C6 delays the transition to the log state. 0 (i.e. starting the microcontroller) after the supply voltage rises above the threshold level. In extreme cases, this chip can be omitted by using the standard reset scheme recommended by Atmel. However, in this case, device failures are possible due to "failures" in the power supply. The scoreboard of the device consists of five LED digital indicators SA08-11GWA from Kingbright. Indication - static. To reduce the brightness of the glow, diodes VD5 and VD6 are included in the power supply circuit of the indicators. When displaying time, HG1 and HG2 show respectively tens and units of hours, HG3 - dashes (-), HG4 and HG5 - tens and units of minutes (for example, 22-11), in temperature measurement mode, HG1 indicates its sign (only for negative values) , and HG2, HG3 and HG4, HG5 are respectively a numerical value and a unit of measurement (for example, -18°C for an outdoor sensor and 23°C for a room sensor, as evidenced by the "." symbol in the fourth digit). To control the display unit, only three outputs of the microcontroller were used: P1.2 (14) - for data transmission; P1.3 (15) - to strobe each bit set on P1 2; P1.4 (16) - to output the data loaded in DD3-DD7 to their outputs. The 74HC595 chip [2] is an eight-bit register with a serial input and a parallel output with a latch. This allows you to first load data into it, and only then submit it to the output. Outputs can be transferred to the third state. Each pin can supply up to 35 mA. The PCF8583 microcircuit [3] was used as a clock, which made it possible to forget that time can go astray in the absence of power (the accuracy of the rate depends practically only on the ZQ1 quartz resonator at 32768 Hz). The PCF8583 has a static memory that is used to determine the first time the clock is turned on (to prepare both the microcontroller and the clock itself for normal operation) and a hardware alarm clock. If the set time coincides with the current one, a low logic level appears at the INT (7) pin. As a result, the power supply circuit of the electromagnetic emitter HA1 is closed, and an interrupt signal is applied to the output РЗ.З (7) of the microcontroller DD2. Further, the signal from the INT output is switched off by software and the control of the emitter passes to the microcontroller (through an electronic key on field-effect transistors VT1, VT2). The clock is controlled by the l2C bus, organized by software (it is absent in the microcontroller). An electromagnetic emitter HSM1606X from JL World with a built-in generator operating at a frequency of about 2200 Hz was used to generate sound signals. The GB1 battery is used to power the clock chip and the sound emitter in the event of a power failure in the network. As mentioned, the alarm in this case gives a continuous signal, which can only be turned off by pressing the SB1 button. To receive control signals from the remote control, an integrated IR range receiver SFH506-36 from Siemens [4] was used. This chip is very sensitive to interference in the power circuit, so it includes a VD4C8C9 filter. The device is powered by a stabilized voltage converter based on the MC34063 microcircuit (domestic analogue - KR1156EU5). The operation of such converters is described in detail in [5] Schematic diagram of the IR remote control is shown in fig. 2. It is made on the basis of a small-sized Chinese-made calculator in the form of a cell phone (its case, keyboard and battery, consisting of two 389A cells, were used). The SAA3010 chip [6] (analogue - INA3010D software "Integral") in the SOIC package was used as a transmitter. This chip works in the RC-5 IR remote control system, developed by Philips for controlling household equipment and widely used (used in many TVs, including those produced, for example, by the Horizon software). In standby mode, the SAA3010 consumes very little current, which makes it very convenient to use the remote control - there is no need for a separate power switch. The microcircuit enters the active state when any button is pressed and returns to the micro-consumption mode when it is released. The RC-5 code system number used is 0 (for TV control). If necessary, for example, in order not to interfere with the work with the TV, if it uses the same standard, it is easy to switch to another encoding table. It is also possible to use a ready-made remote control from any household appliance, if you take care of transcoding commands. You can get acquainted with the operation of the IR remote control RC-5 in the article [7]. DALLAS DS1621 chips are used as remote temperature sensors. They are good because they use the 12C interface for exchange, which we have already generated programmatically. This means that they can be connected to the same microcontroller pins as the clock. The measurement error is entirely determined by the sensors and does not exceed ±0,5 °С, and the indication accuracy is 1°С. More detailed information about digital temperature sensors can be found on the website [8]. A few words about the location of the sensors. The external one must be covered from direct sunlight and from air flows at room temperature penetrating through the cracks in the frames, and the internal one should be positioned so that it is as far away from heating objects as possible (heating radiators, lamps, etc.). It is desirable to seal the external sensor to avoid corrosion of the printed circuit board, etc. (the author used silicone sealant). Thermal conductivity is reduced from this, but with sluggish processes, such as changes in atmospheric temperature, this is quite acceptable. Purpose of the remote control buttons: "TS" - time setting. After pressing it, enter the time in a 24-hour format with insignificant zeros, i.e. if it is currently eight thirty in the morning, then 0 8 - 3 0. After making sure that the time is entered correctly, press any button, and the device switches to clock mode . "BS" - setting the alarm time. The procedure is similar to setting the time. "OFF" - turn off the alarm. Button SB2 in the watch case performs the same function. "LED" - disable/enable indicators. Pressing any other button while the alarm is sounding puts it into Snooze mode. The appearance of the remote control and the installation view of the main unit of the device are shown in fig. 3. Codes "firmware" microcontroller in the form of a hex-file are shown in the table. The program is written in C. This provides opportunities for further upgrades. The program was developed and compiled in the Keil mVision2 V2.36 integrated environment. Assembler - A51 version V7.04, compiler - C V7.04, linker - BL51 version V5.02. The project file is termo.Uv2. A detailed description of the compiler can be found on the site [9] (there you can also "download" a demo version. The control program is written to the controller using the TURBO programmer. Before programming, you need to check the conformity of the installation with the circuit diagram of the device. A properly assembled structure does not need to be adjusted. Literature
Author: D.Chibyshev, Omsk See other articles Section Power regulators, thermometers, heat stabilizers. Read and write useful comments on this article. 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: ▪ LIS2DTW12 - low noise accelerometer with integrated temperature sensor ▪ The electric scooter will follow the rules of the road ▪ Gravity does not seep into other dimensions ▪ Record for the longest stay of a woman in space News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ site section Power regulators, thermometers, heat stabilizers. Article selection ▪ article The concept of drifting continents. History and essence of scientific discovery ▪ article How long ago did prosthetics appear? Detailed answer ▪ article security guard. Job description
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |