-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
844 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### 2400 device\n", | ||
"\n", | ||
"2400 device는 drain/source voltage를 인가하고, 이에 따른 transistor device에 흐르는 전류를 측정한다." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 11, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"KEITHLEY INSTRUMENTS INC.,MODEL 2420,4051227,C32 Oct 4 2010 14:20:11/A02 /J/L\n", | ||
"\n", | ||
"Voltage: 0 V, Current: -1.382756E-09\n", | ||
" A\n", | ||
"Voltage: 1 V, Current: -2.017378E-10\n", | ||
" A\n", | ||
"Voltage: 2 V, Current: -1.951761E-10\n", | ||
" A\n", | ||
"Voltage: 3 V, Current: -1.815496E-10\n", | ||
" A\n", | ||
"Voltage: 4 V, Current: -1.860914E-10\n", | ||
" A\n", | ||
"Voltage: 5 V, Current: -1.850819E-10\n", | ||
" A\n", | ||
"Voltage: 6 V, Current: -1.775108E-10\n", | ||
" A\n", | ||
"Voltage: 7 V, Current: -1.840714E-10\n", | ||
" A\n", | ||
"Voltage: 8 V, Current: -1.724632E-10\n", | ||
" A\n", | ||
"Voltage: 9 V, Current: -1.734720E-10\n", | ||
" A\n", | ||
"Voltage: 10 V, Current: -1.765009E-10\n", | ||
" A\n", | ||
"Measurements complete.\n", | ||
"Voltage: 0 V, Current: -1.382756E-09\n", | ||
" A\n", | ||
"Voltage: 1 V, Current: -2.017378E-10\n", | ||
" A\n", | ||
"Voltage: 2 V, Current: -1.951761E-10\n", | ||
" A\n", | ||
"Voltage: 3 V, Current: -1.815496E-10\n", | ||
" A\n", | ||
"Voltage: 4 V, Current: -1.860914E-10\n", | ||
" A\n", | ||
"Voltage: 5 V, Current: -1.850819E-10\n", | ||
" A\n", | ||
"Voltage: 6 V, Current: -1.775108E-10\n", | ||
" A\n", | ||
"Voltage: 7 V, Current: -1.840714E-10\n", | ||
" A\n", | ||
"Voltage: 8 V, Current: -1.724632E-10\n", | ||
" A\n", | ||
"Voltage: 9 V, Current: -1.734720E-10\n", | ||
" A\n", | ||
"Voltage: 10 V, Current: -1.765009E-10\n", | ||
" A\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"import pyvisa\n", | ||
"import time\n", | ||
"\n", | ||
"# VISA 리소스 매니저 생성\n", | ||
"rm = pyvisa.ResourceManager()\n", | ||
"\n", | ||
"# Keithley 2420 계측기에 연결 (VISA 주소를 적절히 변경)\n", | ||
"keithley = rm.open_resource('GPIB0::24::INSTR')\n", | ||
"\n", | ||
"# 장치 ID 확인 (선택사항)\n", | ||
"print(keithley.query('*IDN?'))\n", | ||
"\n", | ||
"# 초기 설정\n", | ||
"keithley.write('*RST') # 장치 리셋\n", | ||
"keithley.write(':SENS:FUNC \"CURR\"') # 전류 측정 모드 설정\n", | ||
"keithley.write(':SOUR:FUNC VOLT') # 전압 소스 모드 설정\n", | ||
"keithley.write(':FORM:ELEM CURR') # 전류만 읽기\n", | ||
"keithley.write(':SENS:CURR:PROT 0.1')\n", | ||
"# 전압 및 전류 측정 설정\n", | ||
"start_voltage = 0\n", | ||
"end_voltage = 10\n", | ||
"step_voltage = 1\n", | ||
"measurement_time = 1 # 초\n", | ||
"\n", | ||
"# 결과 저장을 위한 리스트\n", | ||
"voltages = []\n", | ||
"currents = []\n", | ||
"\n", | ||
"# 측정 루프\n", | ||
"try:\n", | ||
" for voltage in range(start_voltage, end_voltage + step_voltage, step_voltage):\n", | ||
" # 전압 설정\n", | ||
" keithley.write(f':SOUR:VOLT {voltage}')\n", | ||
" keithley.write(':OUTP ON') # 출력 켜기\n", | ||
"\n", | ||
" # 안정화 시간 대기\n", | ||
" time.sleep(0.5)\n", | ||
"\n", | ||
" # 전류 측정\n", | ||
" current = keithley.query(':READ?')\n", | ||
" # 측정값 저장\n", | ||
" voltages.append(voltage)\n", | ||
" currents.append(current)\n", | ||
"\n", | ||
" # 측정 시간 대기\n", | ||
" time.sleep(measurement_time)\n", | ||
"\n", | ||
" # 출력 끄기 (선택사항)\n", | ||
" keithley.write(':OUTP OFF')\n", | ||
"\n", | ||
" print(f'Voltage: {voltage} V, Current: {current} A')\n", | ||
"\n", | ||
"finally:\n", | ||
" # 장치 리셋 및 연결 해제\n", | ||
" keithley.write('*RST')\n", | ||
" keithley.close()\n", | ||
"\n", | ||
"# 결과 출력\n", | ||
"print(\"Measurements complete.\")\n", | ||
"for v, c in zip(voltages, currents):\n", | ||
" print(f\"Voltage: {v} V, Current: {c} A\")\n" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "base", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.11" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.