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

A simple home thermometer with two DS18B20 sensors. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Microcontrollers

Comments on the article Comments on the article

This project was born in the process of studying the principles of the 1-wire interface by me. To measure the temperature in this project, widely used sensors of the company "Dallas Semiconductor" type DS18B20. The device is capable of working with one or two sensors. It is supposed to use a thermometer for domestic purposes, where one sensor measures the temperature in the room, and the second measures the temperature outside. Indication of temperature values ​​is carried out using a character-synthesizing LCD display based on the HD44780 controller or its analogues.

When the device is turned on, the splash screen "Start…" appears on the display, which appears as a running line, then the following options are possible:

1) If the device does not detect connected sensors, the message "DO NOT SIG";
2) if the device detects one sensor, then the following message appears on the display: "T =<temperature sign><integer temperature value>,<tenths of temperature value>"
3) if the device detects two sensors, then the following message appears on the display: "T<k or y>=<temperature sign><integer temperature value>,<tenths of temperature value>", where k - signals that work with the sensor in the room is in progress, y- signals that work with the sensor on the street is in progress.

The videos attached to the article show the situations described above.
The device automatically determines the 64-bit code of each sensor and distinguishes them by the first mismatch of the code bits in a sequential comparison, where bit 0 is considered for the room sensor, bit 1 is considered for the outdoor sensor. Thus, it is quite easy to determine which sensor should be used where when two sensors are connected to the device and, for example, one of the sensors is artificially heated.

The sensors in the device operate in 12-bit mode. Temperature readings are updated approximately once every 845 ms.

A simple home thermometer with two DS18B20 sensors. Thermometer circuit on MK
(click to enlarge)

Switch SA1 is designed to switch sensors with which information is exchanged. If the switch is open, then work is carried out with the sensor in the room, if it is closed, then with the sensor outside. When switching sensors, there is an inertia (up to 845 ms.), Due to checking the state of the switch before issuing a measurement command.

Switch SA2 is used to turn on the LCD backlight. Resistor R2 selects the required brightness. Resistor R3 adjusts the contrast of the display.

The device uses quartz at 10 MHz. The circuit is operational if the microcontroller is powered by an internal 8 MHz oscillator. (When programming the fuzz in both cases, do not forget to set CKDIV8 to log. 1, i.e. disable the clock frequency division by 8).

The LCD will fit any on the HD44780 controller or its equivalents. In the prototype, the author used a single-line character-synthesizing LCD of size 8x1 (BC0801A). Displays of this format have a rather large size of symbols, which is convenient for perception, but their number does not allow simultaneously displaying information from two sensors. When using displays of other formats, please note that messages will be displayed in the first 8 positions of the top line.

A simple home thermometer with two DS18B20 sensors. Thermometer on breadboard

HEX firmware, LAY-file and device diagram you can download here (5 kb).

The project was written in the C language. The WinAvr compiler called in the Avr Studio4 environment was used.

Author: Anton Garkusha, gam-rainers [dog] mail.ru; Publication: cxem.net

See other articles Section Microcontrollers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

With a load on my head 03.05.2006

The Belgian physiologist Norman Heglund studied the process of carrying weights on the head by Nepalese porters - Sherpas, who usually accompany European climbers to the mountains.

They carry loads mainly on their heads. The physiology of Sherpas aged 11 to 68 was studied on a mountain path at an altitude of 2800 meters above sea level. Men carried loads on average 93 percent of their own weight, but some carried up to 183 percent. Women carried an average of 66 percent of their body weight.

Portable recorders attached to some of the porters showed that the energy consumption was half that of young Europeans who carried the same load in backpacks. True, Sherpas walk slowly and often stop to rest.

Other interesting news:

▪ Obesity Vaccine

▪ Mosquitoes fly to the voice

▪ Rotating TV

▪ MCP1810 - Lowest Iq LDO in the industry

▪ Fat causes depression

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ site section Clocks, timers, relays, load switches. Article selection

▪ article Plastics. History of invention and production

▪ Article Which of the Russian regions does Taiwan consider its territory? Detailed answer

▪ article Presser of building ceramic products. Standard instruction on labor protection

▪ article Flashing LED indicators on CMOS chips. Encyclopedia of radio electronics and electrical engineering

▪ article Grounding and electrical safety protective measures. Conductors of the potential equalization system. Encyclopedia of radio electronics and electrical engineering

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

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

www.diagram.com.ua

www.diagram.com.ua
2000-2024