How to design an alarm system based on DS18B20 thermometer?

Updated on science 2024-03-22
4 answers
  1. Anonymous users2024-02-07

    The display temperature part is done, which means that you have completed the reading of the DS1820. In this case, you set a value in the program for comparison, greater than or less than a certain value output.

    The alarm system recommends that you use RS485 communication to send data through the serial port. If you use a computer on a computer, you'd better make your own Windows platform software. If it is a single-chip microcomputer for the upper computer, it is relatively easy.

    As long as you know how to serialize, you can convert the data. Hope it helps.

  2. Anonymous users2024-02-06

    The DS18B20 is enough to connect an IO port to the microcontroller, and the temperature data can be read only when the corresponding timing is met. As for the 1602 display, as long as the temperature data can be read, the data can be converted into a string and sent to the 1602.

    The temperature sensor is a digital sensor, containing a processor chip, which directly outputs a temperature digital signal, and the single-chip microcomputer uses the query method to read back the data and convert the output.

    Three-channel 18B20 temperature measurement digital tube display. -55 +125, use 1-digit digital tube to display the current channel number, 4-digit digital tube to display 18b20 current channel temperature value, negative sign and positive temperature 100 1 are displayed with the same digital tube, the bit is 0 and is not displayed.

  3. Anonymous users2024-02-05

    Summary. Dear, glad to answer for you. How does the DS18B20 temperature sensor interface interface with a microcontroller A:

    First, the hardware connection between the temperature sensor and the single-chip microcomputer should be completed: (1) the temperature sensor is to convert the non-electric amount into electricity, that is, the temperature is converted into voltage (the general voltage value is smaller than the millivolt level), so it is necessary to add a first-level operation amplification circuit to amplify to 0 5 volts or 1 5 volts (2) it is necessary to complete the conversion from analog to digital: the voltage (0 5V) representing the temperature is converted into 8 or 16 digits by a D converter.

    The second is to write software: realize the A D conversion of temperature acquisition, and convert the converted 8-bit or 16-bit digital quantity into a temperature value with a unit physical quantity according to the scale transformation formula.

    How the DS18B20 temperature sensor is connected to a microcontroller.

    Dear, glad to answer for you. How to connect the DS18B20 temperature sensor with the single-chip microcomputer Answer: First, the hardware connection between the temperature sensor and the single-chip microcomputer should be completed

    1) The temperature sensor converts non-electric power into electric power, that is, the temperature is converted into voltage (generally the voltage value is smaller than millivolt level), so it is necessary to add a first-level operation amplification circuit to amplify to 0 5 volts or 1 5 volts (2) It is necessary to complete the conversion from analog to digital: the voltage representing the temperature (0 5V) is converted into 8 bits or 16 digits through a D converter. The second is to write software:

    The A D conversion of temperature acquisition is realized, and the converted 8-bit or 16-bit digital quantity is converted into a temperature value with a unit physical quantity according to the scale transformation formula.

    Which three pins of the DS18B20 temperature sensor and the microcontroller are connected.

    The DS18B20 is a temperature sensor with a one-line bus (single bus)" interface. It has only three VCCs, GNDs and DQs.

    How to connect the hardware connection.

    The connection method of the computer hardware bus1Single-bus architectureIn many single-processor computers, a single-system bus is used to connect CPU, memory, and IO devices, which is called a single-bus structure.

    If my answer is helpful to you, please give a thumbs up (in the lower left corner), I look forward to your like, your efforts are very important to me, and your support is also the motivation for my progress. If you feel that my answer is still satisfactory, you can click on my avatar for one-on-one consultation. Finally, I wish you good health and a good mood!

  4. Anonymous users2024-02-04

    This depends on how the program reads the temperature.,It should be in the C language, right? t should be declared as integer or long integer data, or it may be floating-point, and it should be read with some shift per bit of data, or something like that. So t is the decimal representation of the read value.

    The temperature of the DS18B20 is represented by 12 bits, with the highest bit representing plus or minus. But generally 8-bit single-chip microcomputer can only read twice, a total of 16 bits, that is, 4 bits in T are redundant. How to get the real temperature value from the read value, you can try the bit arithmetic.

    The resolution of the DS18B20 is that the read temperature value is multiplied to get the true temperature value. But your hundreds, tens, and singles are all integers, and there must be forced data type conversion in the process of your calculation. Therefore, if you want to keep one decimal place, you need to multiply it by 10, that is, the value of one decimal place is brought to the single place, so that the value of one decimal place will not be thrown away in the calculation.

    Correspondingly, the molecule must be magnified by a factor of 10 in the calculation, so the number of hundreds, divided by 1000.

Related questions