Mismatches in acquired digital signal in Simulink using Arduino Due

1 回表示 (過去 30 日間)
TAPABRATA SEN
TAPABRATA SEN 2019 年 8 月 16 日
回答済み: Arun Kumar 2019 年 9 月 25 日
Hi,
I was doing some simple signal acquisition models in Simulink (Matlab ver. R2017b) with Arduino Due board. I was giving a unipolar square wave (250 Hz) from a function generator to pin 8 of the Arduino Due microcontroller. The 'digital input' block in Simulink is used and the output of the block is connected to a scope. In the 'digital input' block, the sample time is set as 0.001.
Now, when I'm observing the signal, in the scope, it is not at all replicating the input. On the other hand, when I ran the exact same code in Arduino Uno, with the same square wave, the scope is showing the proper output. I've attached couple of pictures of scope outputs, which demonstrate the two scenarios.
Can anybody tell, what can be reason of this mismatch?
Looking forward to some solution of this problem.
  3 件のコメント
TAPABRATA SEN
TAPABRATA SEN 2019 年 8 月 20 日
Hi, Yes the hardware board I selected properly.
And regarding the solver, I selected 'fixed-step' type and 'auto' solver option.
Please let me know, what you think.
Roshni Garnayak
Roshni Garnayak 2019 年 9 月 9 日
Please create a service request at https://www.mathworks.com/support/contact_us.html

サインインしてコメントする。

回答 (1 件)

Arun Kumar
Arun Kumar 2019 年 9 月 25 日
Hi,
I think the issue is due to the operating voltages. Due is ARM based board and works at 3.3V while Uno(and other AVR boards) operate at 5V.
I suggest checking the output voltages on the function generator. For Due, max should be 3.3V.
HTH.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by