ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Thermometer with matrix LED indicators. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Measuring technology In this thermometer, temperature values are displayed using matrix LED modules. It is possible to adjust the brightness of the indicator and select the discreteness of the readings. The thermometer uses a microcontroller PIC16F630-I/P Temperature sensor - DS18B20. Interval of measured temperature from -55 оC to + 125 оC. The error of its measurement is ± 0,5 оC. Readings may be rounded up to 1. оC. On fig. 1 shows the appearance of the thermometer. It is attached to the wall with double-sided adhesive tape, the sensor is installed outside the window in the shade of trees.
The thermometer circuit is shown in fig. 2. By pressing the SB1 button, increase the brightness of the indicator, and by pressing the SB2 button, decrease it. There are 16 grades in total. When the brightness changes, the microcontroller saves the new value in its non-volatile memory. The indicator is based on three matrix modules A1-A3 FZ0148 [1]. Each of them consists of an 8x8 LED matrix and a MAX7219 chip [2], which controls the LEDs according to microcontroller commands. The modules are connected in parallel along the power lines VCC and GND and control signals CLK and CS (these lines pass from the first module connector to the second "through"), and sequentially along the information line. The information at the DOUT output is delayed relative to the input DIN by 16 cycles, set by the CLK pulses. The DOUT of each module except the last one is connected to the DIN input of the next one.
The last 16 bits of information sent to the module are always in the shift register of the MAX7219 chip. The transfer of the state of the DIN input to the low bit of the register occurs on the rising edge of the CLK pulse, but only when the CS input is low. With a rising edge at the CS input, information from the shift register is displayed by LEDs and remains on them until the next such edge. In the device under consideration, the low level of the CS signal is set for the time of transmission of 48 (16x3) bits of information loaded sequentially into three FZ0148 modules. Upon its completion, the rising edge of this signal allows the output of information to the LEDs to three modules simultaneously. On fig. 3 shows the placement of the output symbols on their matrices. Setting the jumper S1 puts the device in the mode of rounding the reading to an integer value. In this mode, there is no need for the A3 module, which displayed tenths of a degree, and it can be excluded from the device. If this module is left, it will always show 0.
The nominal supply voltage of the thermometer is 9 V, however, in fact, it can be in the range from 7,5 V to 25 V. The 5 V voltage required for the operation of the device is provided by the integrated positive voltage regulator DA1. On fig. 4 shows a drawing of the printed circuit board of the thermometer and the location of parts on it. For the DD1 microcontroller, a panel must be provided into which it is inserted already programmed. FZ0148 modules are installed in slots X1, X2 (A1), X3, X4 (A2) and X5, X6 (A3).
Connector X6 on the board, which is missing in the diagram, serves only for reliable mechanical fixation of the A3 module. The board with removed modules is shown in fig. 5. FZ0148 modules were purchased disassembled. The pin blocks of the connectors installed on them in the kit were angled, but during assembly I replaced them with straight ones. The gap formed due to the height of the connectors between the main board and the boards of the modules makes it possible to better remove heat from the integrated stabilizer DA1.
The temperature sensor BK1 is placed in a metal housing protected from moisture penetration and connected to the board with a bundle of three wires up to several meters long. Place the sensor in a place protected from direct sunlight and far from heating and other devices that generate a lot of heat during operation. The full set of displayed characters, including the minus sign and space, is shown in fig. 6, and in fig. 7 shows the contents of the microcontroller's EEPROM image storing these symbols. It has four bytes of memory for each character. Byte at address 30H is used to store the set brightness value.
The microcontroller program was created in the PIC Simulator IDE v7.21. The temperature values read from the BK1 sensor every 0,7 s are programmatically smoothed before being displayed on the indicator - each new value is written to an array of four two-byte words instead of the oldest one. Thus, this array always contains the results of the last four measurements. Their average value is displayed on the indicator. In the used version of the development environment, it is possible to simulate the operation of the DS18B20 sensor (Fig. 8), which greatly simplifies the debugging of the program. To organize the communication of the microcontroller with devices with an SPI interface, similar to that used in LED modules, the environment has a set of standard procedures and functions.
The microcontroller program can be downloaded from ftp://ftp.radio.ru/pub/2015/04/max7219.zip. Literature
Author: K. Abdukarimov See other articles Section Measuring technology. 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: ▪ Revealed the secret of tangling headphones ▪ Stream S03 portable hard drives with USB 3.0 interface ▪ Three-layer image sensor with DRAM memory for smartphones News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the site Note to the student. Article selection ▪ article Gifts of Pomona and Flora. Popular expression ▪ article Freeberry prickly. Legends, cultivation, methods of application
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |