当前位置:网站首页>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 ~
边栏推荐
- Read PG in data warehouse in one article_ stat
- Ways to improve the performance of raspberry pie
- LeetCode_二分搜索_中等_153.寻找旋转排序数组中的最小值
- How did Guotai Junan Securities open an account? Is it safe to open an account?
- Centso7 OpenSSL error Verify return code: 20 (unable to get local issuer certificate)
- Enregistrement de la navigation et de la mise en service du robot ROS intérieur (expérience de sélection du rayon de dilatation)
- Introduce six open source protocols in detail (instructions for programmers)
- Flink | 多流转换
- Write it down once Net a new energy system thread surge analysis
- Introduction and basic use of stored procedures
猜你喜欢

最佳实践 | 用腾讯云AI意愿核身为电话合规保驾护航

【黑马早报】华为辟谣“军师”陈春花;恒驰5预售价17.9万元;周杰伦新专辑MV 3小时播放量破亿;法华寺回应万元月薪招人...

Getting started with MySQL

Thread pool reject policy best practices

Error lnk2019: unresolved external symbol

Scrapy教程经典实战【新概念英语】
![Scripy tutorial classic practice [New Concept English]](/img/bc/f1ef8b6de6bfb6afcdfb0d45541c72.png)
Scripy tutorial classic practice [New Concept English]

分布式事务解决方案

Getting started with cinnamon applet

2022-7-6 初学redis(一)在 Linux 下下载安装并运行 redis
随机推荐
Indoor ROS robot navigation commissioning record (experience in selecting expansion radius)
Redis只能做缓存?太out了!
Some principles of mongodb optimization
一文读懂数仓中的pg_stat
1、深拷贝 2、call apply bind 3、for of for in 区别
Mongodb command summary
工具箱之 IKVM.NET 项目新进展
高端了8年,雅迪如今怎么样?
Realize the IP address home display function and number home query
How far can it go to adopt a cow by selling the concept to the market?
Centso7 OpenSSL error Verify return code: 20 (unable to get local issuer certificate)
[QNX hypervisor 2.2 user manual]6.3.4 virtual register (guest_shm.h)
PAcP learning note 1: programming with pcap
一文读懂数仓中的pg_stat
QQ medicine, Tencent ticket
LeetCode_ Binary search_ Medium_ 153. Find the minimum value in the rotation sort array
PHP - laravel cache
MongoDB内部的存储原理
服务器到服务器 (S2S) 事件 (Adjust)
华为镜像地址