基于 FPGA 的步进电机控制系统

2021-12-27 17:05:21居高峰陈嘉俪
科学与生活 2021年22期

居高峰 陈嘉俪

摘要:生活中旋转电机的使用需求日益增大,对其功能要求也随之提高,为使电机呈现多种状态动作,本文设计了一种基于无剑100开源平台的FPGA步进电机驱动系统。该系统使用Vivado软件对资料生成Bit流文件,将Bit流文件放到SD卡中配置到FPGA芯片之中,形成对应的电路。然后使用CDK软件编写代码,实现四路PWM波,通过对PWM波控制,实现57系列步进电机的正反转与加减速功能。通过自行设计的上位机进行监测,实现步进电机的驱动。

关键词:FPGA开发板;Bit流文件;步进电机;控制系统

Abstract:The demand for the use of rotating motors in daily life is increasing, and its functional requirements are also increasing. In order to make the motors show a variety of state actions, this paper designs an FPGA stepper motor drive system based on the Wujian 100 open source platform. The system uses Vivado software to generate a Bit stream file for the data, puts the Bit stream file in the SD card and configures it in the FPGA chip to form the corresponding circuit. Then use CDK software to write codes to realize four-channel PWM waves, and realize the forward and reverse rotation and acceleration/deceleration functions of 57 series stepping motors by controlling the PWM waves. Through the self-designed upper computer to monitor, realize the stepping motor drive.

Keywords:FPGA development board;Bit stream file;Stepper motor

旋转电机的实用场景有电动衣架、旋转式烤箱及电动卷帘门等,本文中以电动卷帘门的应用场景为主。电动卷闸门是以多关节活动的门片串联在一起,起动有电动机组带动,在固定的滑道内,以门上方卷轴为中心转动上下的门,广泛适用于商业门面、车库、商场、医院、厂矿企业等公共场所或住宅。本文设计了一种针对电动卷帘门的步进电机控制系统,通过Vivado生成FPGA的Bit流文件,电动卷帘门采用按键装置可以实现旋转电机的正转,反转,变速转动及限位暂停,轻松方便。在滑台两侧安装了两个限位开关,当滑台触碰到限位开关之后滑台会立即停止向前移动,并且向相反的方向短暂滑行一段距离,以保证限位开关弹簧的弹性,更加具有现实意义。

一、系统硬件设计

本系统的硬件部分由控制系统、驱动系统和执行系统组成。控制系统包括平头哥FPGA开发板以及接口扩展板,驱动系统采用电机驱动模块,57步进电机滑台为执行系统。……

登录APP查看全文