李俊安 赵春丽 黄泽林 陈昊文 陈芳
摘 要:文章设计了一种控制魔方转动的控制系统。以三阶魔方为主要模型,通过研究三阶魔方的内部结构,以一个控制转动的魔方轴作为定轴,剩余的五个旋转的可动的动轴来控制魔方的转动。在该控制系统中,主要利用步进电机的精准角度的转动特性来控制魔方的每一个面的旋转,从而达到魔方控制的效果。步进电机的转动主要是通过STM32单片机的内部计算,精确修改旋转角度、细分系数。步进电机的转动器的设计是以STM32F103RCT6作为主控制器,以A4988步进电机驱动设备,详细分析步进电机驱动设备的工作原理、各部分接口电路以及控制器设计方案。通过实物设计实现了步进电机正反转任意角度和细分系数的控制,并通过精确计算步进脉冲个数实现了任意旋转角度的精确控制,该驱动控制器步进角度精度高0.1125度,以至于达到了魔方的精准旋转控制。
关键词:STM32;A4988;步进电机;魔方控制系统
中图分类号:TP242 文献标志码:A 文章编号:2095-2945(2018)20-0005-05
Abstract: A control system is designed to control the rotation of Rubik's Cube. Taking the three-order Rubik's Cube as the main model, the internal structure of the three-order Cube is studied. A rotating Cube axis is used as the fixed axis, and the remaining five rotating movable axes are used to control the rotation of the Cube. In this control system, the rotation characteristics of the precise angle of the stepping motor are mainly used to control the rotation of each side of the Rubik's Cube, so as to achieve the effect of the Rubik's Cube control. The rotation of stepper motor is mainly through the internal calculation of STM32 single chip computer, precise modification of rotation angle, and subdivision coefficient. The design of stepping motor rotator is based on STM32F103RCT6 as the main controller and A4988 as the driving device. The working principle, interface circuit and controller design scheme of the stepping motor drive device are analyzed in detail. The control of the forward and backward rotation angle and subdivision coefficient of the stepping motor is realized through the physical design, and the precise control of any rotation angle is realized by calculating the number of step pulses accurately. The stepping angle precision of the driving controller is 0.1125 degrees higher so as to achieve the precise rotation control of the Rubik's Cube.
Keywords: STM32; A4988; stepping motor; Rubik's Cube control system
引言
随着教育事业的不断发展,要求学生多元化方向发展,从而学生的课程越来越多,所需的书籍也随之增多。因此,基于书籍的分类,在魔方结构的基础上,我们推出一款以魔方结构为基础的智能书架。
以三阶魔方为例,魔方的转动可根据相关的魔方公式来进行,从而可以使特定方格达到理想位置。控制魔方转动的动力来源于步进电机,而步进电机的驱动有A4988模块给予,其指令由STM32发出及控制。……