ghaytweyhtoo

[Sun Yat-sen University Competition] Portable temperature measurement system

 
Overview

Title: Portable Temperature Measurement System Team Information: Lin Zebang Award Information: Special Prize

1.        Overall system plan

The complete physical picture of the portable temperature measurement system is as follows: the blue, green and red LED lights are named "LOW", "NORMAL" and "HIGH" respectively, representing low temperature, normal temperature and high temperature. The functions of the three buttons are to set the temperature threshold, increase and decrease respectively. The LCD screen, Bluetooth module and power pin header are removed, as shown in the figure below: The overall system block diagram of the portable temperature measurement system is as follows:        The temperature measurement system is powered by three AA batteries, and the microcontroller collects temperature information through the temperature sensor and displays it on the LCD in real time on the screen and simultaneously transmitted to the computer through the Bluetooth module. When the temperature is high, the red light lights up and the buzzer sounds long; when the temperature is normal, the green light lights up, and when the temperature is low, the blue light lights up. The temperature threshold can be modified by pressing the key. 1.png 2.jpg 3.png

2.        Hardware circuit

The circuit schematic diagram is designed using Lichuang EDA. The overall diagram is as follows: 1.png the microcontroller uses STC8A8K32S4A12-LQFP44. The STC8 series of microcontrollers are microcontrollers that do not require an external crystal oscillator or external reset. They are 8051 microcontrollers that aim at super anti-interference, ultra-low price, high speed, and low power consumption. At the same operating frequency, the STC8 series of microcontrollers are better than traditional 8051 microcontrollers. About 12 times faster (11.2~13.2 times faster), the instruction code is fully compatible with traditional 8051. The clock circuit and reset circuit are omitted here. The temperature sensor is DS18B20, the measurement range is -55℃-125℃, I limited it to -49℃-99℃ in the program. The LCD screen uses LCD1602, the sliding rheostat can adjust the contrast, and C1 and C2 are used as filters. The Bluetooth module uses the HC-06 Bluetooth serial communication module, which is based on the Bluetooth Specification V2.0 data transmission module with EDR Bluetooth protocol. There is no need to understand the Bluetooth protocol when writing code, just write it according to serial communication. The buzzer adopts an active buzzer and is driven by an S8550 transistor. The three LED lights correspond to different temperature ranges, and a 1K resistor is used to limit the current. The key circuit uses software anti-shake. Use Lichuang EDA for PCB design. The PCB design is as follows. 2.png 3.png4.png 5.png 6.png 7.png 8.png 9.png


3.        Software design

The software is written using the Keil platform, and the official tool STC-ISP is used to download the program. 10.png The code is divided into seven source files: main.c contains the main control logic; include.h and include.c contain the STC8 header file, data type definition and delay function; ds18b20.h and ds18b20.c contain the temperature sensor Driver; lcd1602.h and lcd1602.c contain LCD drivers

The program flow chart is shown below. See attachment for source code 11.png

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-04 04:46:42

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号