首先非常感谢面包板社区和灵动微提供的这次试用机会,非常荣幸能获得这个机会,下面我们来介绍一下这块板子,灵动微的MM32SPIN160C采用QFN32 封装,这颗MCU是一颗专用的无刷电机驱动芯片,芯片采用ARM Cortex M0内核心,内部竟然集成了无刷电机的三组预驱,这样不但节省了外置预驱的成本,同时更节省空间,未来应该会有更多的同类MCU采用这种方案;同时芯片带有5路DMA,分别是UART、I2C、SPI、ADC、定时器,带了DMA的芯片处理效率将大大提升;72M的主频,-40◦C ∼ 105◦C的宽温设计,适用范围更广,同时内置了48/72MHz 高速振荡器,16位高级定时器和32位的通用定时器,外设也是非常的丰富,带有12位的高速ADC,串口,IIC,SPI,比较器;
引脚功能和内部功能框图
硬件部分
开发板四周包了防撞边, 这也是我见过的唯一给开发板加防撞边的, 小小的举动大大的实用, 一方面可以直到支撑防止短路, 另一方面可以防止乱花台面和防止划伤手, 这个可以借鉴,值得推广;板子的反馈放大用了圣邦微的SGM8634轨到轨运放,输出MOS用的是东沅的60V耐压116A电流5.2豪欧内阻的FKBA6006,同时带了SWD和串口调试接口,底面MOS部分还带了散热片,这配置对于市面上常见的低压BLDC完全是够用了.
软件部分
官方提供的资料中已经给了出相当全面的软件,只要稍微的更改Whole_Motor_Parameters.h下的部分参数就行进行匹配;
//-----1,2 Shunt R PI Control parameters-------------------------------------------------------------------------------------------------
#define SHUNT_R_VALUE 42//50//unit:milli ohm, 50 means 0.05 ohm
#ifdef ENABLE_1_SHUNT_R_TO_MEASURE_3_PHASE_CURRENT
#define CURRENT_AMPLIFICATION_FACTOR 60 //unit:0.1 amplification factor, 60 means 60*0.1 = 6 amplification factor
#else
#define CURRENT_AMPLIFICATION_FACTOR 50//60//unit:0.1 amplification factor, 50 means 50*0.1 = 5 amplification factor
#endif
#define CURRENT_LIMIT 7//10 //unit: 0.1A, it will limit the maximum sine wave phase current in close loop operation
#define CURRENT_PROTECT 60//50 //unit: 0.1A, it will stop the motor if sine wave phase current over this value
#define PI_OUT_LIMIT 30000 //range(0~32767),Setup the Vd, Vq PI output limitation
//-----I_SUM R parameters for totoal current measurement-------------------------------------------------------------------
#define ISUM_R_VALUE 50 //unit:milli ohm, 40 means 0.04 ohm
#define ISUM_CURRENT_AMPLIFICATION_FACTOR 60 //unit:0.1 amplification factor, 50 means 50*0.1 = 5 amplification factor
//-----DC Bus voltage measurement------------------------------------------------------------------------------------------
#define VBUS_PULL_UP_R 1000 //unit : 0.1K Ohm, 1000 means 100K Ohm //20181215
#define VBUS_PULL_DOWN_R 100 //unit : 0.1K Ohm, 100 means 10K Ohm //20181215
#define ENABLE_DC_BUS_VOLTAGE_PROTECTION //if enable, it will do DC BUS voltage check and protection
#define DC_BUS_OVER_VOLTAGE_LIMITATION 300//unint : 100mV, 300 means 30V, if DC Bus voltage over this, it will stop motor
#define DC_BUS_UNDER_VOLTAGE_LIMITATION 110//unint : 100mV, 125 means 12.5V, if DC Bus voltage unser this, it will stop motor
#define DC_BUS_OVER_VOLTAGE_HYSTERESIS 20////unint : 100mV, 20 means 2V as hysteresis voltage for over voltage happened//20190626
#define DC_BUS_UNDER_VOLTAGE_HYSTERESIS 5////unint : 100mV, 20 means 2V as hysteresis voltage for under voltage happened//20190626
通过对其中的部分参数进行调整可以看到很轻松的让无感BLDC运转起来了
SVPWM反馈波形
通过此次试用感受到了灵动微MM32SPIN160C功能的强大,确实是一颗非常好用且功能全面的BLDC驱动MCU,不管是做方波,FOC,有感,无感都非常合适,再次感谢面包板社区,感谢灵动微!