摘要
为了利用电磁控制实现摆杆按指定角度和周期运动,采用STC89C52单片机为主控芯片,ADXL345数字式3轴角度传感器实时检测摆杆角度,自适应算法算出摆杆摆动所需的时间,L298N驱动芯片在PWM脉冲信号控制下驱动电磁铁;LCD12864液晶显示屏显示预设参数。测试结果表明,摆动摆角绝对误差≤1°,最大启动响应时间≤9 s;最大停止响应时间≤10 s。
In order to move the pendulum rod by electromagnetic control according to the specified angle and period,a mi-crocontroller STC89C52 is used as master chip,a digital three-axis angle sensor ADXL345 is employed to detect the pendulum angle in real time,the adaptive algorithm is adopted to calculate the time required for the pendulum rod's swing,and the driving module L298N is selected to control the solenoid by PWM pulse signal. Furthermore,LCD12864 liquid crystal display is chosen to show the default parameters. The testing results show that the absolute error of the pendulum rod swing angle is ≤1° ,the maximum response time to start is ≤9 s,and maximum response time to stop is ≤10 s.
出处
《现代电子技术》
2014年第9期121-124,共4页
Modern Electronics Technique
关键词
电磁控制
三轴角度传感器
周期检测
自适应算法
electromagnetic control
three-axis angle sensor
cycle detection
adaptive algorithm