How to change PWM Frequency of Arduino USING MATLAB SIMULINK Support package

조회 수: 41 (최근 30일)
HARIS
HARIS 2014년 6월 11일
댓글: Amin Gholizad 2024년 6월 17일
Hello,
i have problem with my project. I use Arduino uno and Simulink. For the control i need a PWM signal with 3000 Hz - 5000 Hz but the Simulink support package (PWM) has only 490 Hz and i can change only the duty-cycle.
What can I do?
I would welcome your response
  댓글 수: 16
Daniel Velazquez
Daniel Velazquez 2021년 7월 9일
You can change the frequency in Simulink just double click on the PWM block in the Frequency drop down menu select: Specify and write your desired frequency in Hz.
The problem is the higher the frequency (>100kHz) the lower the resolution of the PWM, but at 5kHz you should have no problem.
...as of July 8, 2021 with ATMEGA 2560.
Amin Gholizad
Amin Gholizad 2024년 6월 17일
Is there any way to make the frequency variable for implementing a frequency modulation?

댓글을 달려면 로그인하십시오.

답변 (1개)

Greg Wolff
Greg Wolff 2019년 8월 15일
You cannot change the PWM frequency of the PWM block found in the Arduino hardware support package.
You can however create custom device driver blocks. There is a good resource here:
that has various examples, all built around supporting Arduino boards.

커뮤니티

더 많은 답변 보기:  Power Electronics Community

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by