Self-test failure (IR -> REF)

Hi,
First, I would like to say that this is a great initiative and I wish you every success in making bioreactors more accessible to scientific community.

I have recently bought two Pioreactors (v1.1) and, after following the instructions, have both successfully assembled and connected to Wi-Fi. I tried to run a self-test after that and ran into a problem with the apparent absence of a linear response between the IR LED and the photodiode in Channel 2 (90°). Both pioreactors appear to have the same problem. Would you have any suggestions/recommendations?

Event log

timestamp_localtime experiment pioreactor_unit timestamp message source level task
2024-06-08 18:24:11 Demo experiment pio1 2024-06-08T17:24:11.082246Z Starting self-test. Running 10 tests. app INFO self_test
2024-06-08 18:24:11 Demo experiment pio1 2024-06-08T17:24:11.097642Z test_pioreactor_HAT_present: :white_check_mark: app DEBUG self_test
2024-06-08 18:24:11 Demo experiment pio1 2024-06-08T17:24:11.168879Z test_detect_heating_pcb: :white_check_mark: app DEBUG self_test
2024-06-08 18:24:11 Demo experiment pio1 2024-06-08T17:24:11.203648Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-08 18:24:11 Demo experiment pio1 2024-06-08T17:24:11.209276Z ADC ready to read from PD channels 1, 2, with gain 1. app DEBUG adc_reader
2024-06-08 18:24:11 Demo experiment pio1 2024-06-08T17:24:11.688698Z Varying heating. app DEBUG self_test
2024-06-08 18:24:24 Demo experiment pio1 2024-06-08T17:24:24.848576Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-08 18:24:26 Demo experiment pio1 2024-06-08T17:24:26.769977Z Correlation between temp sensor and heating: 0.97 app DEBUG self_test
2024-06-08 18:24:32 Demo experiment pio1 2024-06-08T17:24:32.784771Z test_positive_correlation_between_temperature_and_heating: :white_check_mark: app DEBUG self_test
2024-06-08 18:24:32 Demo experiment pio1 2024-06-08T17:24:32.790786Z test_aux_power_is_not_too_high: :white_check_mark: app DEBUG self_test
2024-06-08 18:24:59 Demo experiment pio1 2024-06-08T17:24:59.059281Z Corr(A, 1) = 1.0 app DEBUG self_test
2024-06-08 18:24:59 Demo experiment pio1 2024-06-08T17:24:59.062708Z [(32, 0.09645419933229045), (35, 0.09863152973425277), (53, 0.11572266720108727), (44, 0.10694855621697068), (38, 0.1010654856629908), (47, 0.10974609466771185), (50, 0.11248344743076988), (41, 0.10372681994955281), (56, 0.11741680768698169), (59, 0.11951920442257775), (62, 0.12179782007547761), (65, 0.12407002190842785)] app DEBUG self_test
2024-06-08 18:24:59 Demo experiment pio1 2024-06-08T17:24:59.065207Z Corr(A, 2) = 0.19 app DEBUG self_test
2024-06-08 18:24:59 Demo experiment pio1 2024-06-08T17:24:59.067873Z [(32, 0.06084120269870052), (35, 0.060787022342132215), (53, 0.06085038936309487), (44, 0.060832446706653866), (38, 0.06082527310980005), (47, 0.06080620350511639), (50, 0.060868109958803464), (41, 0.06086673978829251), (56, 0.060865090831338724), (59, 0.06088069658611994), (62, 0.06082999921213661), (65, 0.060801631753397346)] app DEBUG self_test
2024-06-08 18:25:02 Demo experiment pio1 2024-06-08T17:25:02.137026Z Correlations between LEDs and PD:
{(‘A’, ‘1’): 1.0, (‘A’, ‘2’): 0.19}
app DEBUG self_test
2024-06-08 18:25:02 Demo experiment pio1 2024-06-08T17:25:02.155889Z missing A ⇝ 2
Traceback (most recent call last):
File /usr/local/lib/python3.11/dist-packages/pioreactor/actions/self_test.py, line 441, in _run
test(client, logger, unit, testing_experiment)
File /usr/local/lib/python3.11/dist-packages/pioreactor/actions/self_test.py, line 232, in test_all_positive_correlations_between_pds_and_leds
assert results[(ir_led_channel, ir_pd_channel)] > 0.90, fmissing {ir_led_channel} ⇝ {ir_pd_channel}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: missing A ⇝ 2
app DEBUG self_test
2024-06-08 18:25:02 Demo experiment pio1 2024-06-08T17:25:02.161603Z test all positive correlations between pds and leds: missing A ⇝ 2 app WARNING self_test
2024-06-08 18:25:02 Demo experiment pio1 2024-06-08T17:25:02.164187Z test_all_positive_correlations_between_pds_and_leds: :x: app DEBUG self_test
2024-06-08 18:25:02 Demo experiment pio1 2024-06-08T17:25:02.170905Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-08 18:25:02 Demo experiment pio1 2024-06-08T17:25:02.175669Z ADC ready to read from PD channels 1, 2, with gain 1. app DEBUG adc_reader
2024-06-08 18:25:03 Demo experiment pio1 2024-06-08T17:25:03.172224Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-08 18:25:03 Demo experiment pio1 2024-06-08T17:25:03.177750Z test_ambient_light_interference: :white_check_mark: app DEBUG self_test
2024-06-08 18:25:03 Demo experiment pio1 2024-06-08T17:25:03.184253Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-08 18:25:03 Demo experiment pio1 2024-06-08T17:25:03.187774Z ADC ready to read from PD channels 1, with gain 1. app DEBUG adc_reader
2024-06-08 18:25:04 Demo experiment pio1 2024-06-08T17:25:04.091515Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-08 18:25:04 Demo experiment pio1 2024-06-08T17:25:04.095890Z ADC offsets: {‘1’: 1191.189088519811}, and in voltage: {‘1’: 0.05999578742544835} app DEBUG adc_reader
2024-06-08 18:25:09 Demo experiment pio1 2024-06-08T17:25:09.603175Z test_REF_is_lower_than_0_dot_256_volts: :white_check_mark: app DEBUG self_test
2024-06-08 18:25:10 Demo experiment pio1 2024-06-08T17:25:10.204880Z Not using any IR LED reference. app DEBUG ir_led_ref
2024-06-08 18:25:10 Demo experiment pio1 2024-06-08T17:25:10.219931Z Not using any calibration. app DEBUG calibration_transformer
2024-06-08 18:25:10 Demo experiment pio1 2024-06-08T17:25:10.525052Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-08 18:25:10 Demo experiment pio1 2024-06-08T17:25:10.529743Z ADC ready to read from PD channels 1, 2, with gain 1. app DEBUG adc_reader
2024-06-08 18:25:11 Demo experiment pio1 2024-06-08T17:25:11.571679Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-08 18:25:12 Demo experiment pio1 2024-06-08T17:25:12.478187Z ADC offsets: {‘1’: 1189.9392335983885, ‘2’: 1205.9044983204165}, and in voltage: {‘1’: 0.05993283685706168, ‘2’: 0.060736948175478846} app DEBUG adc_reader
2024-06-08 18:26:20 Demo experiment pio1 2024-06-08T17:26:20.928878Z test_REF_is_in_correct_position: :white_check_mark: app DEBUG self_test
2024-06-08 18:26:20 Demo experiment pio1 2024-06-08T17:26:20.932573Z Not using any IR LED reference. app DEBUG ir_led_ref
2024-06-08 18:26:20 Demo experiment pio1 2024-06-08T17:26:20.935085Z Not using any calibration. app DEBUG calibration_transformer
2024-06-08 18:26:21 Demo experiment pio1 2024-06-08T17:26:21.340671Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-08 18:26:21 Demo experiment pio1 2024-06-08T17:26:21.344716Z ADC ready to read from PD channels 2, with gain 1. app DEBUG adc_reader
2024-06-08 18:26:22 Demo experiment pio1 2024-06-08T17:26:22.383604Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-08 18:26:23 Demo experiment pio1 2024-06-08T17:26:23.288232Z ADC offsets: {‘2’: 1207.17262311265}, and in voltage: {‘2’: 0.060800818929666434} app DEBUG adc_reader
2024-06-08 18:26:38 Demo experiment pio1 2024-06-08T17:26:38.106872Z test_PD_is_near_0_volts_for_blank: :white_check_mark: app DEBUG self_test
2024-06-08 18:27:09 Demo experiment pio1 2024-06-08T17:27:09.600147Z Correlation between stirring RPM and duty cycle: 0.99 app DEBUG self_test
2024-06-08 18:27:09 Demo experiment pio1 2024-06-08T17:27:09.603090Z dcs=[36.0, 34.5, 33.0, 31.5, 30.0, 28.5, 27.0, 25.5], measured_rpms=[1037.196297310795, 1000.2475422143299, 999.9792711779794, 891.189376940555, 811.8439227102607, 738.0839619589477, 674.8476718497708, 606.1162458993286] app DEBUG self_test
2024-06-08 18:27:12 Demo experiment pio1 2024-06-08T17:27:12.730862Z test_positive_correlation_between_rpm_and_stirring: :white_check_mark: app DEBUG self_test
2024-06-08 18:27:12 Demo experiment pio1 2024-06-08T17:27:12.734923Z 1 failed test :x: app INFO self_test

Hi @TimSkvortsov, thanks for the kind words!

This has been reported by some other users, and we are working on making this test more robust. Try the following:

  1. Add a slight volume of culture, or milk, or tea, or anything that is turbid (cloudy) to your vial. The goal is to add a little more light scatter to the culture.
  2. Try the self-test again (if other tests fail now, that’s okay and can be ignored)

Hi @CamDavidsonPilon, thanks for your suggestion, it fixed the problem with photodiodes.

I have another problem with one of the bioreactors now unfortunately – the magnetic stirrer seems to stop randomly during the self-test.

2024-06-10 14:47:35 Demo experiment pio1-worker1 2024-06-10T13:47:35.777319Z Starting self-test. Running 10 tests. app INFO self_test
2024-06-10 14:47:35 Demo experiment pio1-worker1 2024-06-10T13:47:35.786376Z test_pioreactor_HAT_present: :white_check_mark: app DEBUG self_test
2024-06-10 14:47:35 Demo experiment pio1-worker1 2024-06-10T13:47:35.861074Z test_detect_heating_pcb: :white_check_mark: app DEBUG self_test
2024-06-10 14:47:35 Demo experiment pio1-worker1 2024-06-10T13:47:35.912888Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-10 14:47:35 Demo experiment pio1-worker1 2024-06-10T13:47:35.947813Z ADC ready to read from PD channels 1, 2, with gain 1. app DEBUG adc_reader
2024-06-10 14:47:36 Demo experiment pio1-worker1 2024-06-10T13:47:36.364185Z Varying heating. app DEBUG self_test
2024-06-10 14:47:48 Demo experiment pio1-worker1 2024-06-10T13:47:48.880309Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-10 14:47:51 Demo experiment pio1-worker1 2024-06-10T13:47:51.149979Z Correlation between temp sensor and heating: 0.98 app DEBUG self_test
2024-06-10 14:47:56 Demo experiment pio1-worker1 2024-06-10T13:47:56.386620Z test_positive_correlation_between_temperature_and_heating: :white_check_mark: app DEBUG self_test
2024-06-10 14:47:56 Demo experiment pio1-worker1 2024-06-10T13:47:56.391835Z test_aux_power_is_not_too_high: :white_check_mark: app DEBUG self_test
2024-06-10 14:48:21 Demo experiment pio1-worker1 2024-06-10T13:48:21.123161Z Corr(A, 1) = 1.0 app DEBUG self_test
2024-06-10 14:48:21 Demo experiment pio1-worker1 2024-06-10T13:48:21.125721Z [(32, 0.09827861250919949), (35, 0.10058657476195744), (53, 0.11663276682271405), (44, 0.10807902007202656), (38, 0.10259237032963303), (47, 0.1107397506570529), (50, 0.11324634013075248), (41, 0.10501456769659434), (56, 0.11785385423486877), (59, 0.11975806111292342), (62, 0.1219027642740242), (65, 0.124067474579029)] app DEBUG self_test
2024-06-10 14:48:21 Demo experiment pio1-worker1 2024-06-10T13:48:21.128146Z Corr(A, 2) = 0.99 app DEBUG self_test
2024-06-10 14:48:21 Demo experiment pio1-worker1 2024-06-10T13:48:21.130678Z [(32, 0.0650443583001459), (35, 0.06508283175166249), (53, 0.06532350630570133), (44, 0.06517065063390019), (38, 0.06513288813812566), (47, 0.06526349078929809), (50, 0.06528957855681405), (41, 0.06516690760752165), (56, 0.06537353862511312), (59, 0.06544855227219769), (62, 0.06548641194047634), (65, 0.06551454218697256)] app DEBUG self_test
2024-06-10 14:48:24 Demo experiment pio1-worker1 2024-06-10T13:48:24.323431Z Correlations between LEDs and PD:
{(‘A’, ‘1’): 1.0, (‘A’, ‘2’): 0.99}
app DEBUG self_test
2024-06-10 14:48:24 Demo experiment pio1-worker1 2024-06-10T13:48:24.326632Z test_all_positive_correlations_between_pds_and_leds: :white_check_mark: app DEBUG self_test
2024-06-10 14:48:24 Demo experiment pio1-worker1 2024-06-10T13:48:24.330898Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-10 14:48:24 Demo experiment pio1-worker1 2024-06-10T13:48:24.334450Z ADC ready to read from PD channels 1, 2, with gain 1. app DEBUG adc_reader
2024-06-10 14:48:25 Demo experiment pio1-worker1 2024-06-10T13:48:25.338187Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-10 14:48:25 Demo experiment pio1-worker1 2024-06-10T13:48:25.342475Z test_ambient_light_interference: :white_check_mark: app DEBUG self_test
2024-06-10 14:48:25 Demo experiment pio1-worker1 2024-06-10T13:48:25.346680Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-10 14:48:25 Demo experiment pio1-worker1 2024-06-10T13:48:25.349449Z ADC ready to read from PD channels 1, with gain 1. app DEBUG adc_reader
2024-06-10 14:48:26 Demo experiment pio1-worker1 2024-06-10T13:48:26.252815Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-10 14:48:26 Demo experiment pio1-worker1 2024-06-10T13:48:26.256261Z ADC offsets: {‘1’: 1271.6542551979765}, and in voltage: {‘1’: 0.06404852017938525} app DEBUG adc_reader
2024-06-10 14:48:31 Demo experiment pio1-worker1 2024-06-10T13:48:31.762118Z test_REF_is_lower_than_0_dot_256_volts: :white_check_mark: app DEBUG self_test
2024-06-10 14:48:32 Demo experiment pio1-worker1 2024-06-10T13:48:32.394744Z Not using any IR LED reference. app DEBUG ir_led_ref
2024-06-10 14:48:32 Demo experiment pio1-worker1 2024-06-10T13:48:32.419212Z Not using any calibration. app DEBUG calibration_transformer
2024-06-10 14:48:32 Demo experiment pio1-worker1 2024-06-10T13:48:32.750650Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-10 14:48:32 Demo experiment pio1-worker1 2024-06-10T13:48:32.754195Z ADC ready to read from PD channels 1, 2, with gain 1. app DEBUG adc_reader
2024-06-10 14:48:33 Demo experiment pio1-worker1 2024-06-10T13:48:33.790786Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-10 14:48:34 Demo experiment pio1-worker1 2024-06-10T13:48:34.696519Z ADC offsets: {‘1’: 1270.6061365996763, ‘2’: 1277.8046966548184}, and in voltage: {‘1’: 0.06399573032324377, ‘2’: 0.06435829516118591} app DEBUG adc_reader
2024-06-10 14:49:51 Demo experiment pio1-worker1 2024-06-10T13:49:51.527375Z test_REF_is_in_correct_position: :white_check_mark: app DEBUG self_test
2024-06-10 14:49:51 Demo experiment pio1-worker1 2024-06-10T13:49:51.530915Z Not using any IR LED reference. app DEBUG ir_led_ref
2024-06-10 14:49:51 Demo experiment pio1-worker1 2024-06-10T13:49:51.533088Z Not using any calibration. app DEBUG calibration_transformer
2024-06-10 14:49:51 Demo experiment pio1-worker1 2024-06-10T13:49:51.965982Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-10 14:49:51 Demo experiment pio1-worker1 2024-06-10T13:49:51.969085Z ADC ready to read from PD channels 2, with gain 1. app DEBUG adc_reader
2024-06-10 14:49:53 Demo experiment pio1-worker1 2024-06-10T13:49:53.008096Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-10 14:49:53 Demo experiment pio1-worker1 2024-06-10T13:49:53.911972Z ADC offsets: {‘2’: 1275.8806303421597}, and in voltage: {‘2’: 0.06426138705935786} app DEBUG adc_reader
2024-06-10 14:50:07 Demo experiment pio1-worker1 2024-06-10T13:50:07.792216Z test_PD_is_near_0_volts_for_blank: :white_check_mark: app DEBUG self_test
2024-06-10 14:50:39 Demo experiment pio1-worker1 2024-06-10T13:50:39.409361Z Correlation between stirring RPM and duty cycle: 0.68 app DEBUG self_test
2024-06-10 14:50:39 Demo experiment pio1-worker1 2024-06-10T13:50:39.411519Z dcs=[36.0, 34.5, 33.0, 31.5, 30.0, 28.5, 27.0, 25.5], measured_rpms=[702.8769677677968, 954.7306247347872, 915.8362095986048, 860.7424363395329, 793.4205466894908, 718.8032575559811, 653.9033846572179, 570.3727931520718] app DEBUG self_test
2024-06-10 14:50:42 Demo experiment pio1-worker1 2024-06-10T13:50:42.657549Z RPM correlation not high enough: ([36.0, 34.5, 33.0, 31.5, 30.0, 28.5, 27.0, 25.5], [702.8769677677968, 954.7306247347872, 915.8362095986048, 860.7424363395329, 793.4205466894908, 718.8032575559811, 653.9033846572179, 570.3727931520718])
Traceback (most recent call last):
File /usr/local/lib/python3.11/dist-packages/pioreactor/actions/self_test.py, line 441, in _run
test(client, logger, unit, testing_experiment)
File /usr/local/lib/python3.11/dist-packages/pioreactor/actions/self_test.py, line 416, in test_positive_correlation_between_rpm_and_stirring
assert measured_correlation > 0.9, fRPM correlation not high enough: {(dcs, measured_rpms)}
^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: RPM correlation not high enough: ([36.0, 34.5, 33.0, 31.5, 30.0, 28.5, 27.0, 25.5], [702.8769677677968, 954.7306247347872, 915.8362095986048, 860.7424363395329, 793.4205466894908, 718.8032575559811, 653.9033846572179, 570.3727931520718])
app DEBUG self_test
2024-06-10 14:50:42 Demo experiment pio1-worker1 2024-06-10T13:50:42.661618Z test positive correlation between rpm and stirring: RPM correlation not high enough: ([36.0, 34.5, 33.0, 31.5, 30.0, 28.5, 27.0, 25.5], [702.8769677677968, 954.7306247347872, 915.8362095986048, 860.7424363395329, 793.4205466894908, 718.8032575559811, 653.9033846572179, 570.3727931520718]) app WARNING self_test
2024-06-10 14:50:42 Demo experiment pio1-worker1 2024-06-10T13:50:42.663558Z test_positive_correlation_between_rpm_and_stirring: :x: app DEBUG self_test
2024-06-10 14:50:42 Demo experiment pio1-worker1 2024-06-10T13:50:42.666803Z 1 failed test :x: app INFO self_test
2024-06-10 14:55:48 Demo experiment pio1-worker1 2024-06-10T13:55:48.107326Z Init. app DEBUG stirring
2024-06-10 14:55:48 Demo experiment pio1-worker1 2024-06-10T13:55:48.186949Z Operating with RPM feedback loop. app DEBUG stirring
2024-06-10 14:55:48 Demo experiment pio1-worker1 2024-06-10T13:55:48.278833Z Initialized GPIO-17 using software-timing, initial frequency = 200.0 hz. app DEBUG PWM@GPIO-17
2024-06-10 14:55:48 Demo experiment pio1-worker1 2024-06-10T13:55:48.373837Z Ready. app INFO stirring
2024-06-10 14:55:48 Demo experiment pio1-worker1 2024-06-10T13:55:48.375826Z Starting stirring with 500.0 RPM. app DEBUG stirring
2024-06-10 14:55:48 Demo experiment pio1-worker1 2024-06-10T13:55:48.768811Z stirring is blocking until RPM is near 500.0. app DEBUG stirring
2024-06-10 14:56:07 Demo experiment pio1-worker1 2024-06-10T13:56:07.318395Z Cleaned up GPIO-17. app DEBUG PWM@GPIO-17
2024-06-10 14:56:07 Demo experiment pio1-worker1 2024-06-10T13:56:07.430329Z Waited 18.7 seconds for RPM to match, breaking out early. app DEBUG stirring
2024-06-10 14:56:07 Demo experiment pio1-worker1 2024-06-10T13:56:07.432263Z stirring is blocking until disconnected. app DEBUG stirring
2024-06-10 14:56:08 Demo experiment pio1-worker1 2024-06-10T13:56:08.381441Z Disconnected. app INFO stirring
2024-06-10 14:56:08 Demo experiment pio1-worker1 2024-06-10T13:56:08.384080Z Updated state from ready to disconnected. app INFO stirring
2024-06-10 14:56:08 Demo experiment pio1-worker1 2024-06-10T13:56:08.385782Z Exiting caused by Python atexit. app DEBUG stirring
2024-06-10 14:56:09 Demo experiment pio1-worker1 2024-06-10T13:56:09.389594Z Disconnected successfully from MQTT. app DEBUG stirring
2024-06-10 14:56:17 Demo experiment pio1-worker1 2024-06-10T13:56:17.455429Z Starting self-test. Running 10 tests. app INFO self_test
2024-06-10 14:56:17 Demo experiment pio1-worker1 2024-06-10T13:56:17.464429Z test_pioreactor_HAT_present: :white_check_mark: app DEBUG self_test
2024-06-10 14:56:17 Demo experiment pio1-worker1 2024-06-10T13:56:17.542331Z test_detect_heating_pcb: :white_check_mark: app DEBUG self_test
2024-06-10 14:56:17 Demo experiment pio1-worker1 2024-06-10T13:56:17.606892Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-10 14:56:17 Demo experiment pio1-worker1 2024-06-10T13:56:17.631601Z ADC ready to read from PD channels 1, 2, with gain 1. app DEBUG adc_reader
2024-06-10 14:56:18 Demo experiment pio1-worker1 2024-06-10T13:56:18.116703Z Varying heating. app DEBUG self_test
2024-06-10 14:56:33 Demo experiment pio1-worker1 2024-06-10T13:56:33.545210Z Correlation between temp sensor and heating: 0.96 app DEBUG self_test
2024-06-10 14:56:33 Demo experiment pio1-worker1 2024-06-10T13:56:33.781660Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-10 14:56:38 Demo experiment pio1-worker1 2024-06-10T13:56:38.617469Z test_positive_correlation_between_temperature_and_heating: :white_check_mark: app DEBUG self_test
2024-06-10 14:56:38 Demo experiment pio1-worker1 2024-06-10T13:56:38.622003Z test_aux_power_is_not_too_high: :white_check_mark: app DEBUG self_test
2024-06-10 14:57:05 Demo experiment pio1-worker1 2024-06-10T13:57:05.986067Z Corr(A, 1) = 1.0 app DEBUG self_test
2024-06-10 14:57:05 Demo experiment pio1-worker1 2024-06-10T13:57:05.988528Z [(32, 0.09879847628684894), (35, 0.1011295343044402), (53, 0.11742090077473251), (44, 0.10889710832460005), (38, 0.10327863100245081), (47, 0.11157189103351728), (50, 0.1140603670849366), (41, 0.10570228611981376), (56, 0.11896414511878191), (59, 0.12075645885129305), (62, 0.12298182042648491), (65, 0.12519441826942157)] app DEBUG self_test
2024-06-10 14:57:05 Demo experiment pio1-worker1 2024-06-10T13:57:05.990730Z Corr(A, 2) = 0.97 app DEBUG self_test
2024-06-10 14:57:05 Demo experiment pio1-worker1 2024-06-10T13:57:05.993064Z [(32, 0.0649137843111305), (35, 0.06498868326207896), (53, 0.06523821147376604), (44, 0.06506315778781292), (38, 0.06501655165752086), (47, 0.0651490587584162), (50, 0.06513120196905754), (41, 0.06500138626378936), (56, 0.06521344254751905), (59, 0.06522111022290128), (62, 0.06526235538721777), (65, 0.06530756420545264)] app DEBUG self_test
2024-06-10 14:57:09 Demo experiment pio1-worker1 2024-06-10T13:57:09.172025Z Correlations between LEDs and PD:
{(‘A’, ‘1’): 1.0, (‘A’, ‘2’): 0.97}
app DEBUG self_test
2024-06-10 14:57:09 Demo experiment pio1-worker1 2024-06-10T13:57:09.175280Z test_all_positive_correlations_between_pds_and_leds: :white_check_mark: app DEBUG self_test
2024-06-10 14:57:09 Demo experiment pio1-worker1 2024-06-10T13:57:09.179591Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-10 14:57:09 Demo experiment pio1-worker1 2024-06-10T13:57:09.183238Z ADC ready to read from PD channels 1, 2, with gain 1. app DEBUG adc_reader
2024-06-10 14:57:10 Demo experiment pio1-worker1 2024-06-10T13:57:10.188183Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-10 14:57:10 Demo experiment pio1-worker1 2024-06-10T13:57:10.192620Z test_ambient_light_interference: :white_check_mark: app DEBUG self_test
2024-06-10 14:57:10 Demo experiment pio1-worker1 2024-06-10T13:57:10.196779Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-10 14:57:10 Demo experiment pio1-worker1 2024-06-10T13:57:10.199556Z ADC ready to read from PD channels 1, with gain 1. app DEBUG adc_reader
2024-06-10 14:57:11 Demo experiment pio1-worker1 2024-06-10T13:57:11.102928Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-10 14:57:11 Demo experiment pio1-worker1 2024-06-10T13:57:11.106307Z ADC offsets: {‘1’: 1269.9239904957828}, and in voltage: {‘1’: 0.06396137314768137} app DEBUG adc_reader
2024-06-10 14:57:18 Demo experiment pio1-worker1 2024-06-10T13:57:18.401048Z test_REF_is_lower_than_0_dot_256_volts: :white_check_mark: app DEBUG self_test
2024-06-10 14:57:19 Demo experiment pio1-worker1 2024-06-10T13:57:19.046674Z Not using any IR LED reference. app DEBUG ir_led_ref
2024-06-10 14:57:19 Demo experiment pio1-worker1 2024-06-10T13:57:19.072454Z Not using any calibration. app DEBUG calibration_transformer
2024-06-10 14:57:19 Demo experiment pio1-worker1 2024-06-10T13:57:19.404650Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-10 14:57:19 Demo experiment pio1-worker1 2024-06-10T13:57:19.408450Z ADC ready to read from PD channels 1, 2, with gain 1. app DEBUG adc_reader
2024-06-10 14:57:20 Demo experiment pio1-worker1 2024-06-10T13:57:20.447349Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-10 14:57:21 Demo experiment pio1-worker1 2024-06-10T13:57:21.353394Z ADC offsets: {‘1’: 1270.511340094112, ‘2’: 1276.6744958612148}, and in voltage: {‘1’: 0.06399095577397085, ‘2’: 0.06430137112854103} app DEBUG adc_reader
2024-06-10 14:58:33 Demo experiment pio1-worker1 2024-06-10T13:58:33.574878Z test_REF_is_in_correct_position: :white_check_mark: app DEBUG self_test
2024-06-10 14:58:33 Demo experiment pio1-worker1 2024-06-10T13:58:33.578296Z Not using any IR LED reference. app DEBUG ir_led_ref
2024-06-10 14:58:33 Demo experiment pio1-worker1 2024-06-10T13:58:33.580458Z Not using any calibration. app DEBUG calibration_transformer
2024-06-10 14:58:33 Demo experiment pio1-worker1 2024-06-10T13:58:33.883306Z Using ADC class Pico_ADC. app DEBUG adc_reader
2024-06-10 14:58:33 Demo experiment pio1-worker1 2024-06-10T13:58:33.886202Z ADC ready to read from PD channels 2, with gain 1. app DEBUG adc_reader
2024-06-10 14:58:34 Demo experiment pio1-worker1 2024-06-10T13:58:34.922158Z AC hz estimate: 50.0 app DEBUG adc_reader
2024-06-10 14:58:35 Demo experiment pio1-worker1 2024-06-10T13:58:35.825958Z ADC offsets: {‘2’: 1277.659469725304}, and in voltage: {‘2’: 0.06435098061803271} app DEBUG adc_reader
2024-06-10 14:58:49 Demo experiment pio1-worker1 2024-06-10T13:58:49.683532Z test_PD_is_near_0_volts_for_blank: :white_check_mark: app DEBUG self_test
2024-06-10 14:59:21 Demo experiment pio1-worker1 2024-06-10T13:59:21.214322Z Correlation between stirring RPM and duty cycle: -0.64 app DEBUG self_test
2024-06-10 14:59:21 Demo experiment pio1-worker1 2024-06-10T13:59:21.216538Z dcs=[36.0, 34.5, 33.0, 31.5, 30.0, 28.5, 27.0, 25.5], measured_rpms=[0.0, 0.0, 652.7621233556599, 806.364275115039, 755.2857653632436, 690.3322915398992, 620.9668134315133, 556.1104649286694] app DEBUG self_test
2024-06-10 14:59:24 Demo experiment pio1-worker1 2024-06-10T13:59:24.481567Z RPM correlation not high enough: ([36.0, 34.5, 33.0, 31.5, 30.0, 28.5, 27.0, 25.5], [0.0, 0.0, 652.7621233556599, 806.364275115039, 755.2857653632436, 690.3322915398992, 620.9668134315133, 556.1104649286694])
Traceback (most recent call last):
File /usr/local/lib/python3.11/dist-packages/pioreactor/actions/self_test.py, line 441, in _run
test(client, logger, unit, testing_experiment)
File /usr/local/lib/python3.11/dist-packages/pioreactor/actions/self_test.py, line 416, in test_positive_correlation_between_rpm_and_stirring
assert measured_correlation > 0.9, fRPM correlation not high enough: {(dcs, measured_rpms)}
^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: RPM correlation not high enough: ([36.0, 34.5, 33.0, 31.5, 30.0, 28.5, 27.0, 25.5], [0.0, 0.0, 652.7621233556599, 806.364275115039, 755.2857653632436, 690.3322915398992, 620.9668134315133, 556.1104649286694])
app DEBUG self_test
2024-06-10 14:59:24 Demo experiment pio1-worker1 2024-06-10T13:59:24.485650Z test positive correlation between rpm and stirring: RPM correlation not high enough: ([36.0, 34.5, 33.0, 31.5, 30.0, 28.5, 27.0, 25.5], [0.0, 0.0, 652.7621233556599, 806.364275115039, 755.2857653632436, 690.3322915398992, 620.9668134315133, 556.1104649286694]) app WARNING self_test
2024-06-10 14:59:24 Demo experiment pio1-worker1 2024-06-10T13:59:24.487579Z test_positive_correlation_between_rpm_and_stirring: :x: app DEBUG self_test
2024-06-10 14:59:24 Demo experiment pio1-worker1 2024-06-10T13:59:24.490792Z 1 failed test :x: app INFO self_test
2024-06-10 15:09:26 Demo experiment pio1 2024-06-10T14:09:26.060154Z Starting export of tables: pioreactor_unit_activity_data, logs. app INFO export_experiment_data

Hi @TimSkvortsov,

I think this is okay. It looks like the fan might be spinning too fast for the RPM sensor to detect it at high voltages. Optional: I suggest slightly reducing the configuration option [stirring] initial_duty_cycle from 30 to 25.

Thanks @CamDavidsonPilon. The fan starts spinning on its own about half of the time when I control it manually (Manage → Stirring ON), but does not start spinning in the self-test(or stops spinning mid-test) until given a light nudge with a pencil. I have tried varying the initial_duty_cycle parameter between 20 and 40 and also adjusting the distance between the fan and the vial holder, but without much success.

So the fan will start and stop frequently during the self-test (about half the tests utilize the fan for various functions).

However, the larger issue is that the fan often doesn’t start when you command it from the (Manage → Stirring ON) workflow. Some steps:

  1. Increase the initial_duty_cycle to a high value, like 40 or 50, or higher.
  2. See if you can increase the distance more.

If this ^ doesn’t work, we may have to send you up-rev version of the top-faceplate that increases this gap by 0.2mm. Send me an email at cam@pioreactor.com.