很早之前就想做一款无刷电机控制器,忙于工作一直没有弄。最近有点时间画板,打样,焊接,调试,总算顺利的转起来。期间也遇到很多问题,上网查资料,自己量波形前前后后搞了差不多近一个月,(中间又出差一周)总算搞的差不多了,特意写个总结。











speed_duty=30; //30% start
BLDC_PHASE_CHANGE(Step[Phase]); //固定一相
Delay_MS(200);
speed_duty=pwm;
timer = 300;
while(1)
{
for(i=0;i<timer; i++)
{
Delay_US(120); //等待
}
timer-= timer/25+1;
if(timer < 25)
{
if(TEST_MANUELL)
{
timer = 25; //开环强制换向
}
else
{
bldc_dev.motor_state=RUN;
break;
}
}
Phase++;
Phase %= 6;
BLDC_PHASE_CHANGE(Step[Phase]); //
}




如下图,这个已经是比较好的了,还是有很多毛刺。这个给单片机中断,肯定一大堆问题,严重的换错相烧MOS管。


const unsigned int FilterNums = 0xff;
static unsigned int nums =0;
static unsigned int Queue_UStatus =0;
static unsigned int Queue_VStatus =0;
static unsigned int Queue_WStatus =0;
static unsigned char EMF_SVal =0;
unsigned char Filter_U_Status=0;
unsigned char Filter_V_Status=0;
unsigned char Filter_W_Status=0;
unsigned char EMF_Val=0;
unsigned int status_h;
unsigned int status_l;
unsigned int Delay30deg =0;
/* 清除中断标志位 */
if ( TIM_GetITStatus(TIM3 , TIM_IT_Update) != RESET )
{
TIM_ClearITPendingBit(TIM3 , TIM_FLAG_Update);
}






文章来源于:单片机与嵌入式 原文链接
本站所有转载文章系出于传递更多信息之目的,且明确注明来源,不希望被转载的媒体或个人可与我们联系,我们将立即进行删除处理。
相关文章

无刷直流电机的结构与工作原理(2024-04-02)
无刷直流电机的结构与工作原理;最近在DIY无刷电机驱动,因为初次接触,所以有些许耗时,完成以后会在本公众号开源分享。本期文章整理了一下无刷电机的工作原理以及部分驱动电路。
无刷直流电机
直流......

什么是BLDC电机?无刷直流电机转动原理示意图(2024-06-14)
用电风扇的数量在逐年增长,2020年的产量是2.3亿台。
目前国内主流的小家电厂商,比如美的、先锋、日彩、艾美特等等,基本上都有采用无刷电机的产品面市。其中艾美特的数量最大,小米的成本最低。 随着......

无刷电机的好处 无刷电机寿命(2023-06-27)
无刷电机的好处 无刷电机寿命; 无刷电机的好处
无刷电机相比有刷电机,具有以下好处:
高效率:由于无刷电机没有摩擦产生,效率更高。无刷电机的效率可以高达90%以上,而有刷电机......

无刷电机有什么好处 无刷电机类型有哪些 无刷电机工作原理(2023-05-09)
无刷电机有什么好处 无刷电机类型有哪些 无刷电机工作原理; 无刷电机之父是谁
无刷电机的发明者和先驱可以追溯到20世纪60年代,当时德国的电气工程师Werner Gartner首次提出了无刷直流电机......

提供机器人动力的无刷电机驱动器(2023-07-20)
提供机器人动力的无刷电机驱动器;必需装配多个电机,才能够用于移动主体或是的手臂、四肢,其中又以使用无刷直流电机(BLDC)为主流,为了高效的驱动,便得选择合适的驱动器。本文......

无刷电机好还是有刷电机好(2023-06-26)
无刷电机好还是有刷电机好; 无刷电机和有刷电机各有优劣,选择哪种电机应根据具体应用情况和需求进行综合考虑。
定子+转子+电刷是有刷电机的主要结构,通过转动磁场来获得转动力矩,从而......

有刷电机与无刷电机的区别 无刷电机无法启动问题(2023-05-09)
有刷电机与无刷电机的区别 无刷电机无法启动问题; 无刷和有刷电机哪个好
无刷电机相比有刷电机有以下几个优点:
高效:由于无刷电机没有电刷,摩擦力和能量损耗较小,因此......

有刷电机和无刷电机的优缺点(2023-12-28)
有刷电机和无刷电机的优缺点;有刷电机和无刷电机是现代电机中常见的两种类型,它们在结构、工作原理、性能方面存在一些差异。本文将详细介绍有刷电机和无刷电机的优缺点。一、有刷电机有刷电机也称为直流电机......

无刷电机启动不起来的原因 直流无刷电机失步得原因(2023-05-06)
无刷电机启动不起来的原因 直流无刷电机失步得原因; 无刷电机启动不起来的原因
无刷电机启动不起来的原因可能有很多,以下是一些常见的问题和解决方法:
电源问题:检查电源是否正常,电压......

无刷电机的优缺点,作用与寿命是什么(2024-08-09)
无刷电机的优缺点,作用与寿命是什么;无刷直流电机没有电刷和换向器,故得其名。由电动机主体和驱动器组成,是一种典型的机电一体化产品。作为电机行业的“新人”,虽然无刷直流电机进入中国的历史并不长,并且价格较有刷电机......