This thesis focuses on designing a temperature control system using the AT89C51 single chip microcomputer, which is widely used in production, scientific research, and daily life. The DS18B20 temperature sensor collects and converts real-time temperature data and transmits it to the single-chip microcomputer, which displays the current temperature on an external LCD1602 liquid crystal display screen. The single-chip microcomputer uses the PID algorithm to calculate the system deviation between the given and actual temperatures and controls the relay to heat and cool, achieving precise temperature control. The design principle, hardware, and software flow of the control system are discussed, and multiple simulation experiments demonstrate the system's high precision and stability. The research has significant implications for the development of intelligent control systems and has practical applications.