2 Star 2 Fork 0

BouncyKinght / 温度控制系统

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Unlicense

温度控制系统

介绍

本项目是温度控制系统,其中stc8将作为温度采集装置,stm32使用无线/有线的方式获取温度,并采取了PID控制的方式进行温度的控制。最后使用python编写了上位机,展示了温度曲线,以及设置控制温度。

stm32

该部分使用的是stm32c6t6(c8t6太贵了),采用hal库进行开发,使用了STM32CubeMX。考虑到需要接受温度以及计算PID控制参数,于是使用了FreeRtos操作系统。

在操作系统中,一共运行了3个线程。

  1. 闪灯程序,该线程的作用是用来提醒一直在工作,并且用来接收上位机发送的温度数据。
  2. PID计算,该线程是用来控制PID计算的,并且使用串口向下位机发送计算的PID参数。
  3. LCD显示,该线程是用来显示实际温度以及计算的PWM,以及向上位机发送温度与PWM

中断函数

在stm32中有2个中断函数,分别是串口1接收中断,串口2接收中断,根据HAL库的规则可以重写回调函数HAL_UART_RxCpltCallback。

stc8

使用DHT11获取温度,并且使用CAP进行pwm输出。

This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to <http://unlicense.org>

简介

暂无描述 展开 收起
Unlicense
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C
1
https://gitee.com/bouncykinght/temperature-control-system.git
git@gitee.com:bouncykinght/temperature-control-system.git
bouncykinght
temperature-control-system
温度控制系统
master

搜索帮助