基于 STC89C52单片机的康复马控制系统设计。外文翻译资料

 2022-11-30 16:59:01

Design of the Control System for Rehabilitation Horse Based on MCU STC89C52

Haitao Qi, Guanglei Feng and Hong Wang

School of Mechanical Engineering and Automation, Northeastern University, China

Abstract. It introduces a design of the control system for rehabilitation horse based on MCU STC89C52. The systemrsquo;s control core is an 8-bit MCU STC89C52. First, the user input commands through the keyboard, then send commands to the DA conversion chip PCF8591 which can achieve the digital signal to analog signal output after dealing with MCU. Finally, PCF8591 send analog signal to the speed controller of DC motor in order to control the DC motorrsquo;s speed. Meanwhile, it builds a human-machine interface (HMI) to display the real-time speed of the horse through LCD.

Keyword: rehabilitation horse, MCU STC89C52, DAC, DC motor speed control

Introduction

Horse riding can not only exercise the whole body, but also simulate most of the body points and accelerate blood circulation through the vibration; furthermore it has some special effects: exercising focus and regulating emotion. 1943, Hartel accepted surgery and drug treatment after suffering from polio, after treatment she could walked with a cane; but she resumed horseback riding. In 1952,she participated Olympics and obtained a silver medal [1]. Meanwhile, it is reported that more than 90% Miss Congeniality chose horse riding to keep shape at western countries [2]. From the beginning of May 2006, the Chinese Rehabilitation Research Center and the Beijing horse equestrian club work together to carry out the scientific research 'domestic equestrian therapy training for disabled children ' which indicates the official launch of the hippo therapy first introduced in the Mainland of China [3]. However, the real horse riding in real life will be constrained by time, space, horses, equipment, and many other conditions, in response to these shortcomings, the design of the rehabilitation horse can alleviate cervical disease, fatigue, hip and abdominal fat reduction, body shaping and so on. By analyzing the movement of the horse, this paper presents a digital DC speed control scheme which consists of a DC permanent magnet motor, DC motor speed controller and MCU control system. Meanwhile, to be able to display real-time movement of it, it has established a platform for human-machine interface (HMI).

Structure and function of control system

Structure of control system. The systemrsquo;s core controller is STC89C52. By collecting keyboard input, digital-analog conversion, and motor feedback, the user can control the horse directly. General diagram of the system is shown in Fig 1.

Function of control system. The control system is mainly controlled by MCU, then connecting the DAC circuit which can implement the digital signal into analog signals output, after that, input the signal to DC motor speed controller in order to control motorrsquo;s speed, to this end, three fixed modes: fast, medium and slow speed, and user-defined adjustment mode are set up. At the same time, the LCD would display the real-time speed of rehabilitation horse. In addition, the system is equipped with an emergency stop switch, so that it can be quickly stopped to ensure security.

Fig. 1. System block diagram

Main hardware design of control system

Control chip. In this system, it uses the 8-bit MCU STC89C52 which has the characteristics of highly reliable, ultra low-cost, low power and strong anti-interference [4]. It is compatible with MCU 8051, and supports for programming by assembly language and C language. In the internal of STC89C52, there are 8 KB Flash program memories, 2 KB of E2PROM, 512 Byte of RAM and 3 internal timers or counters which can be 8, 13, and 16-bit time / count.

D/A converter circuit. The D/A converter is a device which is able to convert the digital signal into the analog signal (current or voltage), referred to as D/A converter or DAC. PCF8591T is an 8-bit A/D and D/A Converter produced by Philips Semiconductor [5]; it is a monolithic, single supply, low power, 8-bit CMOS data acquisition device with 4 analog inputs, one analog output and a serial I2C bus interface, moreover in the PCF8591, input and output of the address, control and data signals are transmits with a serial manner through the two-lane and two-way I2C bus, the maximum conversion rate is decided by the I2C bus maximum rate.

The speed controller of DC motor. In this system, it chooses the speed controller of DC motor which has the PWM speed control. The controller is characterized by a low-voltage, DC, four-quadrant, regenerative and PWM speed control, using a dedicated MCU intelligent control, fast response, smooth operation, reliable protection functions and so on. In order to control the motor speed more accurately, the analog voltage signal, which converted by the DAC, will be sent to the controller to achieve speed control. It also has a function of feedback regulation to control the motor speed. The speed control connection of speed controller is shown in Fig.

Software design of control system

Allow for the systemrsquo;s portability and easy to maintain and expand, the systemrsquo;s software design uses C language. It includes the main program, keyboard handler program, D/A conversion program and interrupt service program.

The logical of main program is: after the controller electrified, first, reading data which is stored in E2PROM to boot reset and initialize parameters, and then enter the main loop. The program of keyboard handler: system uses a separate button configuration, so the keyboard handler is mainly to eliminate the keysrsquo; jitter. I

剩余内容已隐藏,支付完成后下载完整资料


基于 STC89C52单片机的康复马控制系统设计。

Haitao Qi, Guanglei Feng和Hong Wang。

中国东北大学机械工程与自动化学院。

摘要:介绍了一种基于MCU STC89C52的康复马控制系统的设计。该系统的控制核心是一个8位的单片机STC89C52。首先,用户输入命令通过键盘,然后将命令发送给DA转换芯片PCF8591,在处理MCU后,可以实现数字信号到模拟信号输出。最后,PCF8591将模拟信号发送到直流电机的转速控制器,以控制直流电机的速度。同时,它还建立了人机界面(HMI),通过LCD显示马的实时速度。

关键词:康复马,单片机STC89C52, DAC,直流电机调速。

介绍

骑马不仅可以锻炼整个身体,还可以模拟人体的大部分穴位,通过振动加速血液循环;此外,它还具有一些特殊的作用:集中注意力和调节情绪。1943年,在接受了小儿麻痹症治疗后,哈特尔接受了手术和药物治疗,治疗后她可以拄着拐杖走路;但她又继续骑马了。1952年,她参加了奥运会,并获得一枚银牌[1]。与此同时,据报道,90%以上的选美小姐选择骑马在西方国家保持身材[2]。从2006年5月初开始,中国康复研究中心和北京马马术俱乐部共同开展了“国内残疾儿童马术治疗训练”的科学研究,这标志着首次在中国内地引进的hippo疗法的正式启动[3]。然而,真正的马在现实生活中会受到时间、空间、马匹、设备等诸多条件的制约,为了应对这些缺点,康复马的设计可以减轻颈椎病、疲劳、臀部和腹部脂肪的减少、塑形等。通过对马的运动分析,提出了一种由直流永磁电机、直流电机转速控制器和单片机控制系统组成的数字直流调速方案。同时,为了能够实时显示它的运动,它建立了人机界面的平台(HMI)。

控制系统的结构和功能

控制系统的结构。该系统的核心控制器是STC89C52。通过收集键盘输入、数字模拟转换和电机反馈,用户可以直接控制马。

控制系统的功能。控制系统主要由单片机控制,然后连接DAC电路可以实现数字信号转化为模拟信号输出,在那之后,输入信号的直流电机速度控制器,以控制电动机的速度,为此,三个固定的模式:快速、中、低速、和用户定义的调整模式设置。与此同时,液晶显示器将显示出康复马的实时速度。此外,该系统还配备了紧急停机开关,使其能够迅速停机以确保安全。

图1 系统框图

控制系统的主要硬件设计

控制芯片:该系统采用8位单片机STC89C52,具有高可靠性、超低成本、低功耗、强抗干扰等特点[4]。它与MCU 8051兼容,并通过汇编语言和C语言支持编程。在STC89C52的内部,有8kb的闪存程序内存,2kb的E2PROM, 512字节的RAM和3个内部定时器或计数器,可以是8、13和16比特的时间/计数。

D / A转换器电路:D/A转换器是一种能够将数字信号转换成模拟信号(电流或电压)的装置,称为D/A转换器或DAC。PCF8591T是由飞利浦半导体生产的8位A/D和D/A转换器[5];它是一个整体,单一的供应,低功率,8位CMOS数据采集设备4模拟输入,一个模拟输出,串行I2C总线接口,而且PCF8591,输入和输出的地址、控制和数据信号通过双车道与串行方式传输和双向I2C总线,I2C总线的最大转化率决定的最大速度。

直流电机的速度控制器:在此系统中,选择了具有PWM速度控制的直流电动机的速度控制器。该控制器具有低电压、直流、四象限、再生和PWM速度控制,采用专用的MCU智能控制、快速响应、平稳运行、可靠的保护功能等。为了更准确地控制电机转速,由DAC转换的模拟电压信号将被发送到控制器以实现速度控制。它还具有反馈调节功能,以控制电机转速。速度控制器的速度控制连接如图所示。

控制系统软件设计

允许系统的可移植性和易于维护和扩展,系统的软件设计使用C语言。它包括主程序、键盘处理器程序、D/A转换程序和中断服务程序。

主程序的逻辑是:在控制器电化后,首先读取存储在E2PROM中的数据,引导复位和初始化参数,然后进入主循环。键盘处理器的程序:系统使用一个单独的按钮配置,所以键盘处理器主要是消除键的抖动。它是在MCU的端口接收到功率电平变化后;MCU不能立即识别键的状态变化,但是在延迟10毫秒后再次检测端口,如果信息仍然在变化,则说明该键被按下(或释放),这实际上避免了键按(或释放)时的抖动时间。

DA转换是通过PCF8591实现的,实现了DA的转换。首先给出I2C总线驱动的定义,可以方便快捷地使用总线。在定义后,可以对DAC函数进行编程,实现数字信号转换为模拟信号。

中断服务程序包括内部定时器中断和外部中断。内部定时器中断主要负责计算移动时间、倒计时时间等。外部中断主要负责脉冲计数和紧急停机。

实验

在实验中,仿真软件是Labcenter电子公司生产的Proteus7。Proteus的ISIS是EDA的仿真系统;它有一些功能,如模拟电路仿真、数字电路仿真、模拟系统由单片机及其外围电路,键盘和LCD模拟,等等。此外,它还有许多虚拟仪器[7]。

在系统中,控制信号由按键输入,在处理MCU STC89C52和DAC PCF8591后,速度控制器得到模拟信号(电压),同时,LCD上的系统显示状态。

实际与理论输出电压的误差分析如表1所示(直流电机控制器的误差约为1%)。

表1实际与理论输出电压误差分析。

给定速度(转/分)

10

20

30

40

50

60

70

80

90

输出电压(V)

0.491

0.998

1.485

1.993

2.48

2.986

3.474

3.980

4.468

理论电压(V)

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4

4.5

误差(%)

1.8

0.2

1

0.35

0.76

0.47

0.74

0.5

0.71

总误差(%)

2.7

1.2

1.5

1.3

1.8

1.5

1.7

1.5

1.8

系统的误差完全由控制电路和直流电机控制器造成,误差在2%左右。虽然输出电压和理论电压的比较,我们知道它比使用软件设计实现PWM函数更有效(其误差约为10%[8])。该系统实现了直流电机的有效控制。

结论

通过对其控制核心为STC89C52的控制系统的调试,实现了通过数字信号准确控制直流电机转速的功能。同时,PWM控制器的一些特点和优点保证了整个控制系统的稳定运行。并通过液晶显示器建立人机界面,实现人机对话。

确认

这项工作得到了中国国家科学基金(61071057)的支持,是中国中央大学的基础研究经费(N100603003)。

参考文献

[1] Meregillano G. Hippotherapy, J. Physical medicine and rehabilitation clinics of North America. 15(4) (2004) 843-854.

[2] C.Y Li et al. Artificial Horse for Rehabilitation, J. APCMBE 2008, IFMBE Proceedings Vol. 19, pp. 497-499.

[3] Weihong Wu, Xin Li. Therapeutic horse riding for disabled children, J. Chinese Journal of Physical Medicine and Rehabilitation. 29(3) (2007) 201-203.

[4] Dening ZHANG et al. Design of Measurement and Control system for Temperature and Illumination of Greenhouse Based on STC89C52, J. Journal of Anhui Agricultural Sciences. 39(2) (2011) 1145-1147.

[5] Philips Semiconductors. PCF 8591 8-bit A/D and D/A converter -- Product specification, OL. http://www.nxp.com/documents/data_sheet/PCF8591.pdf

[6] Jinan Keya Electronic. The product specification of low voltage and reversible DC motor controller 24RT20BL. http://www.jnky.com/index.asp

[7] Juan Liu et al. The skills training of C language and PROTUES simulation for SCM, in: Design circuit and Simulate using PROTUES, China Electric Power Public, Beijing, 2010, pp. 10-14.

[9] Ou Wang. Mechatronics Design and Simulation of Gymnastic Horse, D. Northeastern University, Shenyang, 2010.

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[21799],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。