当前位置:网站首页>STM32 and motor development (upper system)
STM32 and motor development (upper system)
2022-07-02 10:30:00 【Embedded - old fee】
【 Statement : copyright , Welcome to reprint , Do not use for commercial purposes . Contact mailbox :feixiaoxing @163.com】
The motor itself is generally developed with PID perhaps FOC Accomplished . however , As a system , stay stm32 Before , There is usually a host system , This host system usually runs linux System or windows System . If it is linux System , Generally, there are various soc; If it is windows System , It is commonly pc Computer. .
To illustrate how the motor control system interacts with the upper layer , We can take the writing machine as an explanation . The writer usually takes pc Treat as a host , After preprocessing the image , Generate control commands one by one . These orders , Send to... Through serial port stm32, After serial port analysis 、 interpolation 、 Speed planning 、x/y/z After control , The corresponding image can be printed by writing with a pen . Similar methods can also be used for carving 、3d Printing and other occasions .
With the above instructions , We can try to understand , What actions a host system needs to do ;
a) Scan image ;
b) Grayscale processing ;
c) Generate control instructions ;
d) Send these instructions to mcu;
e) Receive execution results , Feed progress back to the screen .
It says a writing machine . We can change the scene , Like robots . Suppose there is such a robot with three wheels , The front is the driving wheel , It can move forward 、 back off 、 Spin around , Behind it is the driven wheel , There is no control . If the design goal is to make this robot from A Go to B spot , So what should it do ? Generally speaking , It can be broken down into several steps ,
a) Using the search algorithm , Search for a road without obstacles ;
b) According to the requirements of minimum turning radius, this road shall be treated in sections , There is a minimum distance requirement ;
c) Then according to the speed limit conditions, the entry speed of each section is planned 、 Exit speed 、 Entrance angle 、 Exit angle ;
d) Add path information 、 Turning radius information 、 Speed information 、 Angle information 、 Send segmented information mcu;
e) Receive the execution result circularly , Pass the progress in real time log Print out .
Through the above two systems , We find that the upper system pays more attention to the overall layout of the algorithm . When the algorithm is finished , Give it all to mcu To execute . therefore , Control is mcu The strengths of , The algorithm is not . After all ,mcu The frequency and performance of are there , You can't expect mcu Do something beyond its ability .
The actual application range of motor is very wide , No matter in the field of consumption 、 Industry 、 Military industry , They play a huge role . Controlling the motor is only the first step , The most important thing is to use the upper system to generate control instructions , Send to motor , Let it work properly to meet our needs , This is the fundamental purpose of learning motor , You can't learn motors just to learn motors . Different scenarios , Control requirements are also different , For example, some require faster , Some requirements are more accurate , Some require lower costs , Each scenario has its own specific constraints , These can only be practiced and felt constantly in work .
边栏推荐
猜你喜欢
Ctrip starts mixed office. How can small and medium-sized enterprises achieve mixed office?
Feature (5): how to organize information
Blender多鏡頭(多機比特)切換
Blender multi lens (multi stand) switching
ue4材质的入门和原理笔记
Blender海洋制作
UE4 night lighting notes
Tee command usage example
ue虚幻引擎程序化植物生成器设置——如何快速生成大片森林
2021-10-04
随机推荐
pytest--之测试报告allure配置
Career planning and development
Sil/pil test of matlab code generation
Sum the two numbers to find the target value
Bookmark collection management software suspension reading and data migration between knowledge base and browser bookmarks
2021-10-04
[unreal] animation notes of the scene
合并有序数列
Applet development summary
【Unity3D】嵌套使用Layout Group制作拥有动态子物体高度的Scroll View
allure--常用配置项
快速做出原型
Project practice, redis cluster technology learning (13)
[illusory] automatic door blueprint notes
ue4材质的入门和原理笔记
【虚幻】自动门蓝图笔记
UE4 night lighting notes
Webui automated learning
2837xd code generation module learning (1) -- GPIO module
Ue5 - AI pursuit (blueprint, behavior tree)