LoginSignup
2
0

More than 3 years have passed since last update.

LEDの特性を自動計測

Last updated at Posted at 2020-06-25

 小信号用のLEDの特性を測ります。
ファイル名

測定器のセット

GPIB-quitta.png

 電流計は、Keysight 34461Aを使います。PCとはUSBケーブルでUSB2.0 のコネクタにつなぎます。Instrument Control Toolboxを立ち上げます。scanをすると、VISAのところに見つけてきました。connectし、*IDN?コマンドを送ります。レスポンスがありました。
スクリーンショット 2020-06-25 12.47.55.png

 電圧計は、IWATSU VOAC7602を使います。PCとはUSBケーブルでUSB2.0 のコネクタにつなぎます。Iwatsu Test Instruments Tools Ver 1.9をダウンロードし、USBドライバをインストールします。Instrument Control Toolboxを立ち上げます。scanをすると、VISAのところに見つけてきました。connectし、*IDN?コマンドを送ります。レスポンスがありました。
スクリーンショット 2020-06-25 12.59.54.png

 実験用電源は、HEWLETT-PACKARD E3631Aを使います。PCと測定器はGPIB-USB変換ケーブル(Agilentの82357B)でUSB2.0 のコネクタにつなぎます。Instrument Control Toolboxを立ち上げます。scanをすると、VISAのところに見つけてきました。connectし、*IDN?コマンドを送ります。レスポンスがありました。
スクリーンショット 2020-06-25 13.01.38.png

初期化

 Instrument Control Toolboxで*IDN?を実行した後、Session logのタブを開きます。この中身をコピーします。

スクリーンショット 2020-06-25 14.10.40.png

 三つの測定器ごとにコピーをし、obj1になっているところを、obj_current、obj_voltage 、obj_power と測定器の機能がわかる名前に変更します。

Instrument Connection
clear
% Find a VISA-USB object.
obj_current =  instrfind('Type', 'visa-usb', 'RsrcName', 'USB0::0x2A8D::0x1301::MY53216054::0::INSTR', 'Tag', '');
obj_voltage =  instrfind('Type', 'visa-serial', 'RsrcName', 'ASRL7::INSTR', 'Tag', '');
obj_power   =  instrfind('Type', 'visa-gpib', 'RsrcName', 'GPIB1::10::INSTR', 'Tag', '');

if isempty(obj_current)
    obj_current = visa('KEYSIGHT', 'USB0::0x2A8D::0x1301::MY53216054::0::INSTR');
else
    fclose(obj_current);
    obj_current = obj_current(1);
end
if isempty(obj_voltage)
    obj_voltage = visa('KEYSIGHT', 'ASRL7::INSTR');
else
    fclose(obj_voltage);
    obj_voltage = obj_voltage(1);
end
if isempty(obj_power)
    obj_power = visa('KEYSIGHT', 'GPIB1::10::INSTR');
else
    fclose(obj_power);
    obj_power = obj_power(1);
end

% Connect to instrument object.
obj_current.InputBufferSize = 100000;
obj_voltage.InputBufferSize = 100000;
fopen(obj_current);
fopen(obj_voltage);
fopen(obj_power);

 このあと、測定器ごとに初期設定をします。

Instrument Configuration and Control
% Communicating with instrument object.
fprintf(obj_current, '*RST;*CLS');
fprintf(obj_voltage, '*RST;*CLS');
fprintf(obj_power,   '*RST;*CLS');

% Communicating with instrument object.
fprintf(obj_current, ':CONF:CURR; DC:RANG .1');  % 34461Aは電流測定モード
fprintf(obj_current, ':INIT');
pause(1)
fprintf(obj_voltage, ':CONF:VOLT:DC:RANG 10');   % VOAC7602は電圧測定モード
fprintf(obj_voltage, ':INIT');
fprintf(obj_power, ':INST:SEL P25V');     % +25V出力を使う
fprintf(obj_power, ':TRIG:SOUR IMM');
fprintf(obj_power, ':VOLTage:TRIG 1.0');  % 初期電圧1V
fprintf(obj_power, ':CURR:TRIG 0.03');    % 最大値30mA
fprintf(obj_power, ':OUTPut ON');
fprintf(obj_power, ':INIT');
pause(1)

 終了処理部分です。

Disconnect and Clean Up
% The following code has been automatically generated to ensure that any
% object manipulated in TMTOOL has been properly disposed when executed
% as part of a function or script.

% Disconnect all objects.
fclose(obj_current);
fclose(obj_voltage);
fclose(obj_power);

% Clean up all objects.
delete(obj_current);
delete(obj_voltage);
delete(obj_power);
clear obj_current;
clear obj_voltage;
clear obj_power;

測定は、電圧を上げていく

 10ステップでは間隔があきすぎたので、20ステップで計測しました。LEDは小信号用赤色です。

% Start
V = [];
A = [];
step = 28:50 % 14:25
for voltage = step
   message = ":VOLTage:TRIG " + voltage/20 ;
   fprintf(obj_power, message);
   fprintf(obj_power, ':INIT');
   pause(0.03)
   ic = query(obj_current, 'READ?')
   fprintf(obj_voltage, ':INIT');
   ec = query(obj_voltage, ':FETCh?')
   A(voltage) = str2num(ic) * 1000;
   V(voltage) = str2num(ec);
end

fprintf(obj_power, ":VOLTage:TRIG 0");
fprintf(obj_power, ':INIT');

 図を描きます。

figure
plot(V, A,'-o');
xlabel('電圧[V]');
ylabel('電流[mA]');
grid on;
title('LED')

 グラフです。

スクリーンショット 2020-06-26 07.36.09.png

 緑色のLEDです。
スクリーンショット 2020-06-26 07.47.14.png

2
0
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0