当前位置:网站首页>Sliding rail stepping motor commissioning (national ocean vehicle competition) (STM32 master control)
Sliding rail stepping motor commissioning (national ocean vehicle competition) (STM32 master control)
2022-07-07 13:33:00 【Xiao Lu who dreams of being a geek】
Tips : When the article is finished , Directories can be generated automatically , How to generate it, please refer to the help document on the right
List of articles
Preface
In the aircraft race : Commissioning experience of slide rail stepping motor
One 、 Slide rail stepping motor ?
It looks like this
A treasure called precision trapezoidal screw linear guide slide module CNC mobile module platform stepper motor …
Two 、 Use
1. Slide action
see , The position of the slide rail is a little in front of the aircraft , It is mainly used to adjust the pitch angle of the aircraft .
2. Driver ( I am using DM542)
It grows like this.
This is his Handbook :http://www.yunkong.com/upload/file/contents/2019/09/5d71f45d04867.pdf
DM542 The point that needs attention is the working current , Do not exceed the rated current of the stepping motor .
Subdivision parameters will affect the number of turns of the same pulse motor .
3. The simplest driving method I use ( use GPIO Delay to generate pulse )
/**
* @brief The stepper motor rotates
* @param tim Square wave period Company MS The shorter the period, the higher the frequency , The faster the speed Subdivided into 1 At least 10ms
* @param angle The angle value that needs to be rotated
* @param dir Select forward and reverse ( Value range :0,1)
* @param subdivide Subdivision values
* @note nothing
* @retval nothing
*/
void stepper_turn(int tim,float angle,float subdivide,uint8_t dir)
{
int n,i;
/* Calculate how many square waves the step angle is divided into according to the subdivision */
n=(int)(angle/(1.8/subdivide));
if(dir==CW) // Clockwise
{
MOTOR_DIR(CW);
}
else if(dir==CCW)// Anti-clockwise
{
MOTOR_DIR(CCW);
}
/* On enable */
MOTOR_EN(HIGH);
/* Simulated square wave */
for(i=0;i<n;i++)
{
MOTOR_PLU(HIGH);
Delay_us(tim/2); //tim I set it up. 1000 It's a delay 0.5ms
MOTOR_PLU(LOW);
Delay_us(tim/2);
}
/* Off enable */
MOTOR_EN(LOW);
}
There are also interrupts that generate pulses 、 perhaps PWM Peripherals generate pulses 、 I am using STM32F407 You can use peripherals , But I'm lazy .
summary
I haven't written a blog for a long time , Write a blog record … Look at my blog , It's also my motivation to update .
- Be sure to remember the stepping motor 4 Don't connect the wrong cable ( I am red and green color blind because of this adjustment all morning , Lesson from blood )
- Another point is to be careful not to stall , It will burn out the motor
- Add optocoupler to the MCU control board for safety , Prevent the current from reversing and burning the single chip microcomputer , It also increases the driving capacity .
bye ~
边栏推荐
- Final review notes of single chip microcomputer principle
- Fast development board pinctrl and GPIO subsystem experiment for itop-imx6ull - modify the device tree file
- Distributed transaction solution
- JS缓动动画原理教学(超细节)
- 迅为iTOP-IMX6ULL开发板Pinctrl和GPIO子系统实验-修改设备树文件
- 单片机学习笔记之点亮led 灯
- 记一次 .NET 某新能源系统 线程疯涨 分析
- JNA learning notes 1: Concepts
- move base参数解析及经验总结
- Mongodb replication (replica set) summary
猜你喜欢
随机推荐
Flink | multi stream conversion
社会责任·价值共创,中关村网络安全与信息化产业联盟对话网信企业家海泰方圆董事长姜海舟先生
SSRF漏洞file伪协议之[网鼎杯 2018]Fakebook1
Ogre入门尝鲜
MongoDB的导入导出、备份恢复总结
室內ROS機器人導航調試記錄(膨脹半徑的選取經驗)
Split screen bug notes
PAcP learning note 1: programming with pcap
Esp32 ① compilation environment
Write it down once Net a new energy system thread surge analysis
Shell batch file name (excluding extension) lowercase to uppercase
2022-7-6 初学redis(一)在 Linux 下下载安装并运行 redis
得物客服热线的演进之路
MongoDB优化的几点原则
迅为iTOP-IMX6ULL开发板Pinctrl和GPIO子系统实验-修改设备树文件
Realbasicvsr test pictures and videos
Data refresh of recyclerview
Some principles of mongodb optimization
Read PG in data warehouse in one article_ stat
Show the mathematical formula in El table