Brushless motor encoder combination doesn't work with simulink

9 ビュー (過去 30 日間)
oussama
oussama 2023 年 1 月 10 日
回答済み: Joel Van Sickel 2023 年 1 月 11 日
Hello,
i am using a three-phased brushless motor and a rotary encoder. When i plug the motor and the encoder together in the arduino, the motor kind of glitches and does'nt follow the given signal, although without plugging the encoder the same code works fine, and the encoder works also fine without the motor.
I am using simulink arduino support package. i am giving the following signal to the motor using the continious servo block. the motor must rotate for 2.5 seconds in one direction and then 2.5 seconds in the other direction. It rotates correctly when the encoder is not plugged in . once i connect the rotary encoder to pins 2 and 3 of the arduino, the motor begins to glitch. With the presence of the encoder block, the arduino pwm signal becomes too noisy. What can i do to fix this?
Thanks in advance!

回答 (1 件)

Joel Van Sickel
Joel Van Sickel 2023 年 1 月 11 日
unfortunately this sounds like a hardware problem as the code will not be doing something differently just because an encoder is plugged in. Normally I'd start by looking for grounding issues, although I'm not sure how you could have grounding issues with an encoder as it shouldn't be grounded. If you have really long wires, they could be adding noise to the system, but that would be more likely to affect the encoder than the motor. I guess there could be something mechanically going on that is causing problems, but it sounds like it's only and issue if the wires are plugged in, not the fact that the encoder is attatched to the motor, so again, it doesn't really make sense that would be the issue either. I'm assuming pin 9 goes to some sort of driver for the brushless DC motor that handles all the actual control?

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by