diff --git a/dev/test_mb_2023_4_mux_2023.py b/dev/test_mb_2023_4_mux_2023.py index 80ff435b8795ec55cefa96ecccbd3564e43acaf8..ca9c9c669028d077929a075488e37c40f928fb04 100644 --- a/dev/test_mb_2023_4_mux_2023.py +++ b/dev/test_mb_2023_4_mux_2023.py @@ -85,11 +85,11 @@ if within_ohmpi: print('Starting test with OhmPi.') k = OhmPi() # k.get_data() - k.load_sequence(os.path.join(os.path.dirname(__file__), '../sequences/test_circuit_1423.txt')) + k.load_sequence(os.path.join(os.path.dirname(__file__), '../sequences/wenner.txt')) k.reset_mux() # k.run_multiple_sequences(sequence_delay=20, nb_meas=3) - # k.run_sequence(injection_duration=0.2) - k.rs_check(tx_volt=4) + k.run_sequence(injection_duration=0.2) + # k.rs_check(tx_volt=4) # k.test_mux(mux_id=None, activation_time=0.2) # k._hw.switch_mux([A, B, M, N], state='on') # k._hw.vab_square_wave(12.,1., cycles=2) diff --git a/ohmpi/config.py b/ohmpi/config.py index fa30ccaadc748d016cd2307bff9678217e04259d..40665972ec78fcbb165cf92d2b3b5fb2fe617836 100644 --- a/ohmpi/config.py +++ b/ohmpi/config.py @@ -17,14 +17,15 @@ OHMPI_CONFIG = { 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } +r_shunt = 2. HARDWARE_CONFIG = { 'ctl': {'model': 'raspberry_pi'}, 'pwr': {'model': 'pwr_batt', 'voltage': 12., 'interface_name': 'none'}, 'tx': {'model': 'mb_2023_0_X', - 'voltage_max': 12., # Maximum voltage supported by the TX board [V] - 'adc_voltage_max': 4800., # Maximum voltage read by the current ADC on the TX board [mA] - 'r_shunt': 2., # Shunt resistance in Ohms - 'interface_name': 'i2c', + 'voltage_max': 50., # Maximum voltage supported by the TX board [V] + 'current_max': 4.80/(50*r_shunt), # Maximum voltage read by the current ADC on the TX board [A] + 'r_shunt': r_shunt, # Shunt resistance in Ohms + 'interface_name': 'i2c' }, 'rx': {'model': 'mb_2023_0_X', 'coef_p2': 2.50, # slope for conversion for ADS, measurement in V/V diff --git a/ohmpi/hardware_components/abstract_hardware_components.py b/ohmpi/hardware_components/abstract_hardware_components.py index be1e51e2c2712e249988d975d014503f8b1eacc7..5b98a620f4f1873104c14a6a3c6f4cc84ef6e7cb 100644 --- a/ohmpi/hardware_components/abstract_hardware_components.py +++ b/ohmpi/hardware_components/abstract_hardware_components.py @@ -423,7 +423,7 @@ class TxAbstract(ABC): def pwr_state(self, state): if state == 'on': self._pwr_state = 'on' - if not self.pwr.switchable: + if not self.pwr._switchable: self.exec_logger.debug(f'{self.model} cannot switch on power source') self.pwr.reload_settings() elif state == 'off': diff --git a/ohmpi_settings.json b/ohmpi_settings.json index e839f5fb9a4ddef894a5a8b714757b71cd860c02..2964e24b850157b3fe3a449a4cf5e62a701f82f3 100644 --- a/ohmpi_settings.json +++ b/ohmpi_settings.json @@ -1,5 +1,5 @@ { - "nb_electrodes": 64, + "nb_electrodes": 16, "injection_duration": 0.2, "nb_stack": 1, "nb_meas": 1,