ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Household thermometer-hygrometer based on the SHT21 sensor and LCD from the Nokia 3310 phone. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Power regulators, thermometers, heat stabilizers The authors of the article invite readers to make a portable device useful in everyday life, the basis of which are the components indicated in the title. At present, a huge number of descriptions of electronic thermometers have appeared in amateur radio literature. Most of these devices (for example, [1-3]) use the DS18B20 digital temperature sensor, which is due to its widespread use, relatively low cost, simple connection to the microcontroller using only one output, and high accuracy (about 0,5 °C). But for assessing the conditions of the human environment, in addition to temperature, other parameters are also important, especially the relative humidity of the air. Until recently, separate sensors were used to measure it, mostly analog, requiring painstaking calibration. But today, combined digital sensors that measure both temperature and humidity have become available to radio amateurs. An example is the SHT21 sensor [4]. According to the manufacturer, this is the smallest humidity and temperature sensor in the world. It comes in a miniature six-pin surface-mount package and connects to the microcontroller via the widely used I2C interface. Relative humidity measurement interval - 0...100% with a typical error of ±2%. The temperature in the range -40...+125 °C is measured with a typical error of ±0,3 °C. All this makes it very attractive for use as a sensor for a household moisture thermometer. The disadvantages include too small dimensions (3x3x1,1 mm) - not every radio amateur can easily cope with mounting it on a board, as well as a rather high cost. However, in 2011, the Sensirion company (developer of the sensor) sent these sensors to everyone for advertising purposes, and many Ukrainian and Russian radio amateurs managed to get them. According to the authors, the proposed article will be very useful to them. To display information in most amateur microcontroller devices, sign-synthesizing indicators on LEDs or liquid crystals are used. The former consume a lot of power, while the latter either require complex interfacing with the microcontroller, or do not differ in large digits, which makes it difficult to read their readings from a long distance or by people with impaired vision. Recently, radio amateurs have begun to use in their developments graphic LCDs from cell phones, which, with small dimensions and high efficiency, allow synthesizing rather large numbers on the screen. The most popular of them was the LCD from the Nokia 3310 cell phone. This is due to the ease of its connection to the microcontroller (only four or five wires are required, and the information exchange protocol is very simple) and the simple way to form an image on a screen with a resolution of 84x48 pixels. In addition, this LCD is much cheaper than commonly used products from Winstar and MELT. The ATtiny2313 microcontroller was chosen as the controller of the proposed device due to its prevalence, low cost, small size and wide allowable supply voltage range (2,7...5,5 V).
The scheme of the thermometer-hygrometer is shown in fig. 1. It is very simple - in addition to the already mentioned sensor (B1), LCD (HG1) and microcontroller (DD1), it has only three capacitors, two resistors and three connectors. Sensor B1, as mentioned above, measures the current temperature and humidity and transmits the received information to the microcontroller via the I2C interface. Since the I2C hardware module is not provided in the ATtiny23l3 microcontroller, the information exchange is organized by software. Resistors R1 and R2 connected to the SDA and SCL lines are required by the interface specification. They maintain a high logic level on them when the output transistors of the interface transmitters are closed. Capacitors C1 and C2 are blocking circuits for supplying the sensor and the microcontroller. They should be as close as possible to sensor B1 and microcontroller DD1, respectively. Capacitor C3 is necessary for the correct operation of the LCD and must have the one shown in Fig. 1 container. Sensor B1 and capacitor C1 are placed on a separate board, which is connected to the main board via a four-wire flat cable and connector X2. This is done in order to be able to place the sensor in a place convenient for measuring temperature and humidity. The HG1 LCD is connected to the microcontroller using a flat eight-wire cable and connector X3. Information is transmitted to the indicator via the implemented software interface SPI. The X1 plug is a two-row plug with a 5x2 pin arrangement. It is intended for programming the microcontroller, as well as for supplying the device with a supply voltage via the VCC and GND circuits. The purpose of the pins of the X1 plug is the same as that of the STK200/300 development board cable socket that is mated with it.
The moisture thermometer is assembled on two printed circuit boards: the main one (Fig. 2) and the sensor board (Fig. 3). Both are made of textolite foiled on one side.
The indicator from the Nokia 3310 phone is usually sold together with a keyboard unit and a microphone in the form of an assembly shown in fig. 4. It has a built-in PCD8544 controller, information about which can be found in [5]. On the reverse side of the indicator module there are spring contacts, the numbering of which is shown in fig. 5. It is to them that the wires of the flat cable connecting the LCD to the X3 connector should be soldered.
Of course, to reduce the dimensions, the indicator can be removed from the case and the wires can be soldered directly to the pads applied to the glass. But at the same time, the risk of accidentally damaging it is extremely high, so this option is not recommended. It is better to saw off the upper and lower parts from the indicator housing. In this case, soldering will be safer, and the indicator will remain protected from damage. But even in this case, it is worth remembering that it is impossible to overheat the spring contacts when soldering. If their plastic holder melts, it may cause a loss of contact or a short circuit. After assembling the main board, it is necessary to load the codes from the ht_meter.hex file into the program memory of the DD1 microcontroller. The microcontroller configuration should be set in accordance with Fig. 6.
It is important to remember that the maximum supply voltage of the sensor and LCD is 3,6 V, so you must disconnect them from connectors X2 and X3 before programming the microcontroller using a programmer with a supply voltage of 5 V. Having finished programming and disconnected the programmer, LCD and sensor are connected back, then supply voltage (no more than 3,6 V) is applied to pins 2 and 4 of connector X1. The authors used two AA size galvanic cells connected in series to power the device.
A properly assembled thermometer-hygrometer does not need to be adjusted. HG1 LCDs during its operation are displayed in two lines (Fig. 7): temperature values in degrees Celsius and relative humidity in percent. Below the LCD in the front panel of the device, a window is cut out and covered with a loose cloth, directly behind which a board with sensor B1 is installed. A power switch is not required in the device, since the current consumed by it is extremely small, which allows it to operate continuously from one set of galvanic cells for six months. PCB files in Diptrace format and the microcontroller program can be downloaded from ftp://ftp.radio.ru/pub/2013/09/ht-meter.zip. Literature
Author: P. Kuznetsov, S. Sokol 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: ▪ Evolution already takes into account urbanization ▪ Nanosensor detects pesticides on fruits ▪ YouOn Hydrogen Electric Bike ▪ LED strip for smart home Aqara LED Strip T1 News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the site Protection of electrical equipment. Article selection ▪ Article Balalaykin. Popular expression ▪ article Why is the Hawaiian language one of the most melodic in the world? Detailed answer ▪ article State administration of labor protection ▪ article All-metal delta antenna. Encyclopedia of radio electronics and electrical engineering
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |