DaqDuino

Arduino-based Data Acquisition Device for Computer-controlled systems practices
ダウンロード: 665
更新 2022/3/21

ライセンスの表示

Use the Arduino board as a single-shot data aqcuisition (DAQ) device for computer-controlled systems practices (Digital Control Theory). This package comes with four main m-file functions: daqduino_start, daqduino_end, daqduino_write, daqduino_read. As an example, consider the fragment of a code to implement a digital PID control loop:
daqduino_start('COM5');
for k=1:2, % Initial conditions
y(k)=0; u(k)=0; e(k)=0; % output, control, error
end
for k=3:nit, % nit=number of iterations
y(k)=daqduino_read;
e(k)=yr(k)-y(k); %yr(k) is a reference sequence
u(k)=u(k-1)+s0*e(k)+s1*e(k-1)+s2*e(k-2);
daqduino_write(u(k),Ts); % Ts is the sampling time
end
A Simulink block is also available. However, it has not been tested very much. You may face some bugs.
An m-file example is given doing three practices: (1) Open-loop datalog; (2) Least-squares offline identification; (3) IMC Model-based Digital PID control tuned by the selection of the closed-loop time constant.
This package has been tested only with Arduino Uno R3 and Arduino Nano R3. The I/O pins in use are the Analog Input A0 and Pin 6 PWM. However, the Arduino code is very simple and you can modify it to your own needs. If you do so, please remember to reference/cite the author and research groups involved.
-------------
Laboratory of Control and Systems - LACOS, Federal University of Para, Brazil (ufpa.br)
Group of Control and Systems - GCS, State University of Santa Catarina, Brazil (udesc.br)
Author: Professor Antonio S. Silveira (lattes.cnpq.br/1828468407562753)

引用

Antonio Silveira (2026). DaqDuino (https://jp.mathworks.com/matlabcentral/fileexchange/50784-daqduino), MATLAB Central File Exchange. 取得日: .

MATLAB リリースの互換性
作成: R2009b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersData Acquisition Toolbox Supported Hardware についてさらに検索
コミュニティ
バージョン 公開済み リリース ノート
2.2.2

The Arduino side program, DaqDuino_Arduino.ino, was causing an error when the daqduino_read.m function was called from MATLAB. The problem was solved in the Arduino side after changing the line Serial.print(y[0]) to Serial.println(y[0]).

2.2.1

Corrected daqduino_read function.

2.2

Added support for Python. The standard baud rate is now set to 115200 bits per second. Analog-to-Digital 5V saturation was removed from Matlab/Scilab/Python-side read functions.

2.1

Small corrections to make DaqDuino compatible with MATLAB R2018 and with SCILAB 6.0.2.

2.0.0.0

Updated help and functions for installation procedures in Linux systems.

1.1.0.0

- Added some lines into the Arduino side program in order to limit the I/O range between 0V to 5V, and a new program to set the PWM frequency to 2kHz;
- Added a comment within the install notes regarding reset avoidance during the serial connection.
Sampling time Ts within the daqduino_block.mdl is now working fine at 0.04 seconds.

1.0.0.0