Commit 0ce36a99 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Updates a test in dev for 2 muxes 2024

Showing with 6 additions and 6 deletions
+6 -6
......@@ -42,7 +42,7 @@ HARDWARE_CONFIG = {
'mcp_0': '0x22', # TODO : Replace this with pos of jumper on MUX board (address doesn't mean anything for the average user...
'mcp_1': '0x23', # TODO : Replace this with pos of jumper on MUX board (address doesn't mean anything for the average user...)
'roles': {'A': 'X', 'B': 'Y', 'M': 'XX', 'N': 'YY'},
'cabling': {(i, j): ('mux_1', i) for j in ['A', 'B', 'M', 'N'] for i in range(1, 9)},
'cabling': {(i+8, j): ('mux_1', i) for j in ['A', 'B', 'M', 'N'] for i in range(1, 9)},
'voltage_max': 12.},
'mux_2':
{'model': 'mux_2024_rev_0_0', # 'ohmpi_i2c_mux64_v1.01',
......@@ -51,7 +51,7 @@ HARDWARE_CONFIG = {
'mcp_0': '0x24', # TODO : Replace this with pos of jumper on MUX board (address doesn't mean anything for the average user...
'mcp_1': '0x25', # TODO : Replace this with pos of jumper on MUX board (address doesn't mean anything for the average user...)
'roles': {'A': 'X', 'B': 'Y', 'M': 'XX', 'N': 'YY'},
'cabling': {(i+8, j): ('mux_2', i) for j in ['A', 'B', 'M', 'N'] for i in range(1, 9)},
'cabling': {(i+16, j): ('mux_2', i) for j in ['A', 'B', 'M', 'N'] for i in range(1, 9)},
'voltage_max': 12.}
},
'default': {'voltage_max': 100.,
......
......@@ -45,15 +45,15 @@ if within_ohmpi:
print('Starting test of mux within OhmPi.')
k = OhmPi()
k.reset_mux()
k._hw.switch_mux([1, 4, 2, 3], state='on')
k._hw.switch_mux([9, 12, 10, 11], state='on')
k._hw.vab_square_wave(3.,1)
k._hw.switch_mux([1, 4, 2, 3], state='off')
k._hw.switch_mux([9, 12, 10, 11], state='off')
k._hw.calibrate_rx_bias() # electrodes 1 4 2 3 should be connected to a reference circuit
# print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV')
# k._hw._plot_readings()
k._hw.switch_mux([1, 4, 2, 3], state='on')
k._hw.switch_mux([9, 12, 10, 11], state='on')
k._hw.vab_square_wave(3.,1)
k._hw.switch_mux([1, 4, 2, 3], state='off')
k._hw.switch_mux([9, 12, 10, 11], state='off')
print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV')
k._hw._plot_readings()
plot_exec_log('ohmpi/logs/exec.log')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment