2 0 1 1 年全国大学生电子设计竞赛 帆板控制系统(F 题) 【高职高专组】 2011 年9 月 1 日 2 摘 要 本系统通过对直流小风扇风速的调节实现对帆板转角 的控制,使帆板转角 能够随风速变化而改变,且能快速达到设定角度并稳定。以 AT89S52单片机为控制核心,通过键盘设定帆板角度,12864实时显示角度。单片机输出 PWM波控制风扇的风速,通过倾角传感器 WDD35D4测量帆板的倾角反馈至单片机,采用PID控制经典算法,使系统实现精确控制,然后微调风速的大小使帆板角度达到稳定。并且在达到设定范围时进行声光报警提示。通过调试与测试,实现了基本部分与发挥部分,最终实现在间距一定时 5秒内帆板达到设定角度,且最终绝对值误差不超过5度. 关键字:12864 ;WDD35D4;PWM;PID算法 III Abstract The system by DC small fan speed adjustment to achieve the corner of the control panels, corner panels to make changes in wind speed changes, and can quickly reach the set point and stable. AT89S52 microcontroller for the control of the core, through the keyboard angle set windsurfing, 12864 real-time display angle. Single-chip PWM output control fan speed, measured by inclination sensor WDD35D4 windsurfing inclination feedback to the microcontroller, using the classical PID control algorithm, the system to achieve precise control, and then fine-tune the size of the panels wind angle to stabilize. And the setting range is reached when sound and light alarm. Through the debugging and testing, to achieve a basic part and play a part, and ultimately in a certain distance within 5 seconds when the panels to set the angle, and the final absolute error of less than 5 degrees. Keywords: 12864; WDD35D4;PWM ; PID algorithm IV 目 录 1系统方案 ................................................................... 1 1.1 角度测量方案选择 ............................................................................................................ 1 1.2 风扇控制方案...