2021-08-24 00:21:37 索炜达电子 959
项目编号:E536
文件大小:10M
源码说明:带中文注释
开发环境:C编译器
简要概述
青岛大学2020年电赛校选代码
题目:风扇控制系统
要求:
1.三种控制模式,对应PWM(1000HZ)输出20/30/70
2.数码管动态显示模式,温度和倒计时
3.按键控制工作模式,定时运行,停止和温度显示
4.DS18B20温度检测
5.LED显示工作模式
方案:使用freeRTOS,设置了六个进程,分别为控制中心,按键检测,温度检测,数码管显示,PWM输出,LED显示。
电路部分
原理图与PCB绘制都使用AD完成,放在/PCB目录下,与正点原子mini板通过排母连接,电源通过排线连接,同时提供额外的供电接口,使用跳线切换。电机驱动模块使用TB6612FNG,额外供电接口使用USB转2.54mm排针。数码管驱动使用74LS138与74HC573。
备注
1.使用了正点原子mini板上的PB2接口作为输入,因为PB2在板子上用作BOOT1,通过跳线接地,所以不使用跳线帽,而是通过一个100k电阻下拉。
2.原理图与实际PCB切换了PC9与PB14,还有其他差别,以PCB为准。
3.使用板载DS18B20,温度检测与延时代码均来自网络。
4.PCB上的开关和接线端子封装有问题,实际直接使用导线短接。
目录│文件列表:
│ QDU-Electronic-Design.rar
└ QDU-Electronic-Design
└ QDU-Electronic-Design
│ .mxproject
│ compertition.ioc
├ Core
│ ├ Inc
│ │ │ FreeRTOSConfig.h
│ │ │ main.h
│ │ │ stm32f1xx_hal_conf.h
│ │ └ stm32f1xx_it.h
│ └ Src
│ │ delay.c
│ │ delay.h
│ │ display.c
│ │ display.h
│ │ ds18b20.c
│ │ ds18b20.h
│ │ freertos.c
│ │ main.c
│ │ stm32f1xx_hal_msp.c
│ │ stm32f1xx_hal_timebase_tim.c
│ │ stm32f1xx_it.c
│ │ sys.c
│ │ sys.h
│ └ system_stm32f1xx.c
├ Drivers
│ ├ CMSIS
│ │ │ LICENSE.txt
│ │ ├ Core
│ │ │ ├ Include
│ │ │ │ │ cmsis_armcc.h
│ │ │ │ │ cmsis_armclang.h
│ │ │ │ │ cmsis_compiler.h
│ │ │ │ │ cmsis_gcc.h
│ │ │ │ │ cmsis_iccarm.h
│ │ │ │ │ cmsis_version.h
│ │ │ │ │ core_armv8mbl.h
│ │ │ │ │ core_armv8mml.h
│ │ │ │ │ core_cm0.h
│ │ │ │ │ core_cm0plus.h
│ │ │ │ │ core_cm1.h
│ │ │ │ │ core_cm23.h
│ │ │ │ │ core_cm3.h
│ │ │ │ │ core_cm33.h
│ │ │ │ │ core_cm4.h
│ │ │ │ │ core_cm7.h
│ │ │ │ │ core_sc000.h
│ │ │ │ │ core_sc300.h
│ │ │ │ │ mpu_armv7.h
│ │ │ │ │ mpu_armv8.h
│ │ │ │ └ tz_context.h
│ │ │ └ Template
│ │ │ └ ARMv8-M
│ │ │ │ main_s.c
│ │ │ └ tz_context.c
│ │ ├ Core_A
│ │ │ ├ Include
│ │ │ │ │ cmsis_armcc.h
│ │ │ │ │ cmsis_armclang.h
│ │ │ │ │ cmsis_compiler.h
│ │ │ │ │ cmsis_cp15.h
│ │ │ │ │ cmsis_gcc.h
│ │ │ │ │ cmsis_iccarm.h
│ │ │ │ │ core_ca.h
│ │ │ │ └ irq_ctrl.h
│ │ │ └ Source
│ │ │ └ irq_ctrl_gic.c
│ │ ├ Device
│ │ │ └ ST
│ │ │ └ STM32F1xx
│ │ │ ├ Include
│ │ │ │ │ stm32f100xb.h
│ │ │ │ │ stm32f100xe.h
│ │ │ │ │ stm32f101x6.h
│ │ │ │ │ stm32f101xb.h
│ │ │ │ │ stm32f101xe.h
│ │ │ │ │ stm32f101xg.h
│ │ │ │ │ stm32f102x6.h
│ │ │ │ │ stm32f102xb.h
│ │ │ │ │ stm32f103x6.h
│ │ │ │ │ stm32f103xb.h
│ │ │ │ │ stm32f103xe.h
│ │ │ │ │ stm32f103xg.h
│ │ │ │ │ stm32f105xc.h
│ │ │ │ │ stm32f107xc.h
│ │ │ │ │ stm32f1xx.h
│ │ │ │ └ system_stm32f1xx.h
│ │ │ └ Source
│ │ │ └ Templates
│ │ │ │ system_stm32f1xx.c
│ │ │ ├ arm
│ │ │ │ │ startup_stm32f100xb.s
│ │ │ │ │ startup_stm32f100xe.s
│ │ │ │ │ startup_stm32f101x6.s
│ │ │ │ │ startup_stm32f101xb.s
│ │ │ │ │ startup_stm32f101xe.s
│ │ │ │ │ startup_stm32f101xg.s
│ │ │ │ │ startup_stm32f102x6.s
│ │ │ │ │ startup_stm32f102xb.s
│ │ │ │ │ startup_stm32f103x6.s
│ │ │ │ │ startup_stm32f103xb.s
│ │ │ │ │ startup_stm32f103xe.s
│ │ │ │ │ startup_stm32f103xg.s
│ │ │ │ │ startup_stm32f105xc.s
│ │ │ │ └ startup_stm32f107xc.s
│ │ │ ├ gcc
│ │ │ │ │ startup_stm32f100xb.s
│ │ │ │ │ startup_stm32f100xe.s
│ │ │ │ │ startup_stm32f101x6.s
│ │ │ │ │ startup_stm32f101xb.s
│ │ │ │ │ startup_stm32f101xe.s
│ │ │ │ │ startup_stm32f101xg.s
│ │ │ │ │ startup_stm32f102x6.s
│ │ │ │ │ startup_stm32f102xb.s
│ │ │ │ │ startup_stm32f103x6.s
│ │ │ │ │ startup_stm32f103xb.s
│ │ │ │ │ startup_stm32f103xe.s
│ │ │ │ │ startup_stm32f103xg.s
│ │ │ │ │ startup_stm32f105xc.s
│ │ │ │ └ startup_stm32f107xc.s
│ │ │ └ iar
│ │ │ │ startup_stm32f100xb.s
│ │ │ │ startup_stm32f100xe.s
│ │ │ │ startup_stm32f101x6.s