ALIENTEK MiniSTM32 DS18B20 Experiment Guide

DS18B20 is a digital temperature sensor with wide applicable voltage, simple interface with microprocessor, measuring temperature range of -55~+125℃, accuracy of ±0.5℃. It can directly read out the measured temperature, and can implement 9~l2-bit digital value reading mode according to actual requirements through simple programming. It works in the voltage range of 3—5.5 V, and adopts various packaging forms, which makes the system design flexible and convenient. The set resolution and user-set alarm temperature are stored in the EEPROM and remain unchanged after power off.


ALIENTEK MiniSTM32 DS18B20 Experiment Guide - cover page
Brand
STM32温度传感器
Category
Other Electronics
Document type
User Manual
Language
Chinese
Pages
9
File format
PDF
File size
351 KB
Published
06 February, 2012
Updated
30 September, 2023
MD5 checksum
E8F98F29335082B3E243A0D10306095E

About this manual

This guide explains how to add a DS18B20 one‑wire temperature sensor to the ALIENTEK MiniSTM32 development board and read temperature values. It includes an introduction to the DS18B20, hardware connection details, software implementation, and steps for downloading and testing the code.

The document provides the required circuit connections, source code files (ds18b20.c/h), and a sample main program that initializes the sensor, reads temperature every 200 ms, and displays the result on the LCD and LED indicators. This manual is written in Chinese.

What's inside

  • DS18B20 Overview
  • Hardware Design
  • Software Design
  • Download and Test
  • Connection Diagram

Specifications

Temperature range-55~+125 °C
Operating voltage3 V–5.5 V
Resolution9–12 bits
Microcontroller usedSTM32F103RBT6
Data line connectionPA0 via jumper

Frequently asked questions

How do I connect the DS18B20 sensor to the MiniSTM32 board?

Connect the DS18B20 data pin to the PA0 pin of the board using a jumper, power the sensor with 3‑5.5 V, and ensure the PA0 line is not left floating.

What function reads the temperature from the DS18B20?

Call the function DS18B20_Get_Temp(), which returns the temperature in 0.1 °C units as a signed short.

What happens if the DS18B20 is not detected?

The program displays "DS18B20 Check Failed!" on the LCD and flashes the LED, prompting you to check the sensor connection.

What are the temperature measurement limits of the DS18B20?

The sensor can measure temperatures from –55 °C up to +125 °C.

Download PDF (351 KB)

More STM32温度传感器 Manuals


View all STM32温度传感器 manuals →