Skip to content
Snippets Groups Projects
Commit 9773262b authored by Alexandros Asonitis's avatar Alexandros Asonitis
Browse files

voltmeter for memristor released

parent 98bbe167
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ def OL(device):
return df
#double sweep from start to stop and then from start to stop
def sweep(start,stop,step,comp,integration,device): #step cannot be negative
def sweep(start,stop,step,comp,integration,voltmeter,device):
device.del_user_functions()
if start < stop and step < 0 :
step = -step
......@@ -168,13 +168,47 @@ def sweep(start,stop,step,comp,integration,device): #step cannot be negative
pcomp = 0
)
# Setup the voltmeter configurations
smu_voltmeter_1 = device.smu_dict()
smu_voltmeter_3 = device.smu_dict()
smu_voltmeter_1.update(
iname = 'I1',
vname = 'V1',
mode = 'I',
func = 'CONS',
value = 0,
comp = 'MAX',
)
smu_voltmeter_3.update(
iname = 'I3',
vname = 'V3',
mode = 'I',
func = 'CONS',
value = 0,
comp = 'MAX',
)
#disable smus 1 and 3
device.measurement_mode('SWE')
if voltmeter == False:
device.smu_disable(1)
device.smu_disable(3)
else:
device.setup_smu(1,smu_voltmeter_1)
device.setup_smu(3,smu_voltmeter_3)
device.setup_smu(2,smu_v)
device.setup_smu(4,smu_ground)
# Do it as the tool would do it
if voltmeter == True:
device.user_function("VMEAS","V","V3-V1")
device.setup_cons_smu(1,smu_voltmeter_1)
device.setup_cons_smu(3,smu_voltmeter_3)
device.setup_var1(parameters)
device.integration_time(integration)
......@@ -374,7 +408,6 @@ def plot_retention(x,y):
ax.plot(x,y)
display(fig)
def create_data_frame(x,y):
header = ['V(V)','ABSV(V)',"I(A)",'ABSI(A)',"R(Ohm)"]
data = {header[0]:x,header[1]:np.absolute(x),header[2]:y,header[3]:np.absolute(y),header[4]:np.divide(x,y)}
......
......@@ -77,6 +77,12 @@ auto_qcc = widgets.Checkbox(
style = {'description_width': 'initial'},
value = True
)
# Voltmeter for set reset endurance
voltmeter = widgets.Checkbox(
description = "Voltmeter",
style = {'description_width': 'initial'},
value = False
)
# THE BUTTONS
#create buttons as it shown in the how_buttons_look
......@@ -164,7 +170,7 @@ threshold = widgets.FloatText(
)
#align a button with a checkbox or integer bounded texts horizontaly
line0 = widgets.HBox([step,integration_time,sampling,auto_qcc])
line0 = widgets.HBox([step,integration_time,sampling,voltmeter,auto_qcc])
line1 = widgets.HBox([set,Vset,CC_vset])
line2 = widgets.HBox([reset,Vreset,CC_vreset])
line3 = widgets.HBox([full,number,auto_stop,threshold])
......@@ -196,7 +202,7 @@ display(tab)
display(widgets.HBox([import_ini_button,export_ini_button]))
display(output)
all_widgets=[sweep_button,cons_button,sample_series,field,DUT,set,reset,full,new_folder,retention_button,contact_check,qcc,qcc_select,Vset,CC_vset,Vreset,CC_vreset,step,integration_time,number,sampling,Vretention,period,duration,auto_qcc,auto_stop,threshold,export_ini_button,import_ini_button]
all_widgets=[sweep_button,cons_button,sample_series,field,DUT,set,reset,full,new_folder,retention_button,contact_check,qcc,qcc_select,Vset,CC_vset,Vreset,CC_vreset,step,integration_time,number,sampling,Vretention,period,duration,auto_qcc,auto_stop,threshold,export_ini_button,import_ini_button,voltmeter]
add_widgets_to_list(cons_dict,all_widgets)
add_widgets_to_list(sweep_dict,all_widgets)
......@@ -298,9 +304,11 @@ def on_set_button_clicked(b):
#execute measurement,plot results and save them
V12,I12 = sweep(0,Vset.value,step.value,CC_vset.value,integration_time.value,device)
V12,I12 = sweep(0,Vset.value,step.value,CC_vset.value,integration_time.value,voltmeter.value,device)
plot_sweep(V12,I12,'SET')
df = create_data_frame(V12,I12)
if voltmeter.value == True:
df["(V3-V1)(V)"] = np.array(device.return_values("VMEAS"))
display(df)
......@@ -346,9 +354,11 @@ def on_reset_button_clicked(b):
R_mean_before = sampling_check(0.01,device)
#execute measurement,plot results and save them
V34,I34 = sweep(0,Vreset.value,step.value,CC_vreset.value,integration_time.value,device)
V34,I34 = sweep(0,Vreset.value,step.value,CC_vreset.value,integration_time.value,voltmeter.value,device)
plot_sweep(V34,I34,'RESET')
df = create_data_frame(V34,I34)
if voltmeter.value == True:
df["(V3-V1)(V)"] = np.array(device.return_values("VMEAS"))
display(df)
if sampling.value == True: #do sampling set after reset process(100mV)
......@@ -428,7 +438,9 @@ def on_full_button_clicked(b):
R_mean_init = sampling_check(-0.01,device)
resistances.append(R_mean_init)
V12,I12 = sweep(0,Vset.value,step.value,CC_vset.value,integration_time.value,device) #set
V12,I12 = sweep(0,Vset.value,step.value,CC_vset.value,integration_time.value,voltmeter.value,device) #set
if voltmeter.value == True:
V12_meas = np.array(device.return_values("VMEAS"))
plot_sweep(V12,I12,f"SET Iteration {i+1}")
#after set/before reset
......@@ -439,10 +451,11 @@ def on_full_button_clicked(b):
stop = True
if stop == False: # do the reset everything ok
V34,I34 = sweep(0,Vreset.value,step.value,CC_vreset.value,integration_time.value,device) #reset
V34,I34 = sweep(0,Vreset.value,step.value,CC_vreset.value,integration_time.value,voltmeter.value,device) #reset
if voltmeter.value == True:
V34_meas = np.array(device.return_values("VMEAS"))
plot_sweep(V34,I34,f"RESET Iteration {i+1}")
#after reset
if sampling.value == True:#-0.1V
R_mean_reset = sampling_check(-0.01,device) #here LRS
......@@ -454,10 +467,16 @@ def on_full_button_clicked(b):
V=np.concatenate((V12,V34))
I=np.concatenate((I12,I34))
else: # Set failed keep only the set data
if voltmeter.value == True:
# Save also the voltmeter values
V_meas = np.concatenate((V12_meas,V34_meas))
else: # reset failed keep only the set data
V = np.copy(V12)
I = np.copy(I12)
R_mean_reset = float('nan') # Indicates that also the reset sampling check did not happen not a number!
if voltmeter.value == True:
V_meas = np.copy(V12_meas)
#Quick Contact Check after reset Process even if it fails
if auto_qcc.value == True:
......@@ -469,6 +488,8 @@ def on_full_button_clicked(b):
#create data frame and save to file
df = create_data_frame(V,I)
if voltmeter.value == True:
df["(V3-V1)(V)"] = V_meas
display(df)
if i == 0 :
header.extend([f"{i+1} Iteration"])
......
%% Cell type:code id:b913930d-b120-4e59-8a42-d9eecb526a61 tags:
``` python
%run memristor.py
```
%% Output
%% Cell type:code id:cf97050b-5c05-4e11-a706-60a4d48c3d0d tags:
%% Cell type:code id:a917fee4-b51f-4eb3-8ab9-dabee429d75f tags:
``` python
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment