王达业

Four-channel temperature to serial port module-DS18B20

 
Overview

1. Input voltage 3.3V to 12V;

2. Use the default 12Bit resolution, the output resolution is 0.1 degrees Celsius, and the conversion takes 750ms. Check the CRC result of DS18B20 to ensure communication reliability.

3. TTL level output serial port data, fixed baud rate 115200bps, fixed output of one frame of data in 3 seconds, private communication protocol.

4. Design a host computer to record historical data to local files and display curves in real time.

5. Output JSON string. {"T1":12.3,"T2":15.6,"T3":-26,"T4":23}T1~T4 represents the four-channel sensor temperature.

Scan the QR code to follow the public account "IoT Zero Demon" and reply to "DS18B20" to get detailed information.

    The host computer will follow the public account and reply to DS18B20 to obtain the download link. Only one download entrance will be left to facilitate downloading the latest software during version upgrades. The software can record 4 channels of floating point numbers, and the communication protocol is a simple and crude JSON string. As long as you send the data according to the protocol, the software can parse and save it. The keywords of JSON must be T1~T4, otherwise the software will not recognize it.

The soldered board is as follows. Square and neat. By the way, a USB to TTL converter is soldered to facilitate direct plug-in of the terminals. photo.jpg The sensor is a DS18B20 with a stainless steel housing purchased from Taobao. The output terminals are soldered later. Taobao also sells sensors that directly output 3PIN terminals. The wire sequence is the same. If the terminals are matched, you can match them directly. Photo with sensor.jpg Screenshot of some code. The source code of the microcontroller has been uploaded as an attachment for your reference. The crystal oscillator frequency of the microcontroller should be configured as 22.1184MHZ. Screenshot of main function.jpg Screenshot of a single DS18B20 driver. According to the temperature calculated in the specification, the temperature above zero has been measured, but there is no condition to test the temperature below zero. It is not clear whether the temperature below zero can work normally. If any friends have actual test results, please leave a comment later. DS18B20 driver screenshot.jpg Finally, let’s put an animated picture of the host computer. It is quite convenient to use the host computer for data collection. The software has not undergone large-scale verification, and there will be unknown bugs in actual use. You can leave comments or feedback on the public account. I may fix it when I have time. It all depends on your mood. Hurry up and give me a like to make me happy. PC usage animation.gif

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-13 18:37:10

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号