필터 지우기
필터 지우기

Arduino DUE timers and PWM frquency

조회 수: 16 (최근 30일)
Hocine YAKOUBI
Hocine YAKOUBI 2023년 9월 28일
답변: Hocine YAKOUBI 2023년 9월 28일
Hi,
I am attempting to control three DC motors using a PWM frequency of 15 kHz for three omniheel robot. Unfortunately, I am encountering some difficulties as the system is not operating as intended.
Specifically, while two of the motors are functioning correctly, the third one is producing noise and is not working properly.
Here are the configurations for the three DC motors:
PWM Pins Used: 9, 5, 6
Direction Control Pins: 2, 4, 7
PWM Frequency: 15 kHz
And here are the pins for the quadrature encoders:
Encoder 1 Pins: 44, 45
Encoder 2 Pins: 22, 23
Encoder 3 Pins: 42, 43
The noise is emanating from motor 2, connected to PIN 5, and associated with encoder 2.
ANy idea to have to resolve this ? problem with timers ?
Thanks by advance

답변 (1개)

Hocine YAKOUBI
Hocine YAKOUBI 2023년 9월 28일
I found this solution, but i didnt undurstund why it works ? for the motor on the PIN 5 (M2 in the picture) before i send the setpoint value to PID. I added constant with value -0.00002 to the setpoint. With this solution there is no noise !!!
But I have another issue :
Like a told you it's 3 omniwheel robot, so for the setpoint i sent 3 value, Vx, Vy and W from serial POrt (Raspi 4 and ROS).
If i send Vx= +-0.1 m/s and Vy=0 m/s. it works well.same for Vx=0 and Vy=+-0.1.
but if i send Vx=0.1 m/s and Vy=0.1 m/s. the M2 on PIN5 loose the control and run very fast withouth stop even I send 0 to Vx and Vy.
Could anyone explain what's happening and help to resolve this issue ? THanks again

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by