Microchip
直播中

俞丽

8年用户 194经验值
私信 关注
[问答]

如何用pic32mz运行有刷直流电机

你好,大家好,在找了关于如何用PIC32运行有刷电机的帮助之后,我好像缺少了与电机上的编码器连接的QEI。MPLAX X有类似的插件或库,可以帮助我做到这一点吗?我了解PWM以及如何发送信号,对我来说,这是编码器的新东西。我正在使用PIC32MZ2048EFM144和MPLLABXHARMonyv3.30。谢谢,Matt

以上来自于百度翻译


      以下为原文

    Hello All,

After looking around for help on how to run a brushed motor with a PIC32,  it seems I'm missing something called the QEI to connect with the encoder on the motor? Is there a similar plug-in or library for MPLAB X that could help me do this?

I understand PWM and how to send signals, it is the encoder stuff that is new to me.
I am using the PIC32MZ2048EFM144 with MPLAB X Harmony v. 3.30.

Thanks,
Matt

回帖(3)

李海玮

2019-7-26 08:23:30
HI,正交编码器接口=QEI。我知道一些DSPIC处理器已经集成了。但如果你看看编码器发出的信号(编码器+示波器的数据表),就不难做出一个函数来给出电机的速度。然后我有2个计时器-我数了脉冲,2个时间。我不需要一个特定的速度,但只是一个马达,它将保持一个速度设定的电位计。整个计划和金属工作是一个1下午的项目,焊接车床项目,它仍然工作。如果它设置在最低速度,动态响应是CRAP,因为我计数100计数-在缓慢的速度,这需要一些时间。但如果你有一个分隔比较多的滗水式编码器,那么这就解决了。我想我的滗水式编码器有32个分隔。祝你好运。祝你好运,马可。

以上来自于百度翻译


      以下为原文

    Hi, 
Quadrature Encoder Interface = QEI. I know some dsPIC processors have it integrated. But if you look at the signals that your encoder gives out (datasheet of the encoder +  oscilloscope) it would not be hard to make a function to give you the speed of the motor. 
I used some old motors with unknown encoders, they had simple encoders that had open collector outputs. And then I had 2 timers - I counted the pulses and the 2 the time. I did not need a specific speed, but just a motor that would hold a speed set by a potenciometer. The whole program and metal work was a 1 afternoon project a welding lathe project and it still works. If its is set on the lowest speed the dynamic response is crap as I count 100 counts  - at slow speeds it takes some time. But this is solved to if you have a decant encoder that has more divisions I think mine had something like 32. 
Good luck. 
Best regards, 
Marko 
举报

张勇

2019-7-26 08:40:59
谢谢你,马可,我得看看和声的例子来计算计时器,但是我比昨天好多了。再次谢谢你,马特。

以上来自于百度翻译


      以下为原文

    Thanks Marko,
 
I'll have to look at the Harmony examples to figure out the timers, but I'm much better off than I was yesterday.
 
Thanks again,
Matt
举报

李海玮

2019-7-26 08:57:25
MHO的和谐是废话,除了一些互联网的东西外,每次都应该避免。看看定时器特定的数据表,你会有一些代码片断随时可用——如果我没记错的话,定时器就是计数器,定时器就是时间。定时器非常容易用普通C代码设置。祝你好运,马尔科。

以上来自于百度翻译


      以下为原文

    Harmony in MHO is crap and should be avoided every time, except for some internet stuff.
Look at the timer specific data sheet and you will have some code snippets there ready to use - for timers as counters and as timers for time, if I remember correctly. Timers are super easy to set up with normal c code. 
Best of luck, 
Marko 
举报

更多回帖

发帖
×
20
完善资料,
赚取积分