Stirring calibration intercept

Hi everyone, has anyone encountered the following warning and do you know what it is about? It comes up when i try to calibrate the stirring of my leader. In the workers i didn’t get the same warning. I should mentioned that i have put stronger magnets on the fan (due to some modifications to the original design).
Screenshot_intercept

Hm, interesting. Can you post the recent logs (pio logs after SSHing in)? The logs will have the raw calibration data, and we can investigate.

Sure, here are the logs:

2024-03-20T16:29:08+0100 [stirring_calibration] DEBUG rpm_coef=0.015752846087493663, rpm_coef_std=0.0009881514479191424, intercept=-5.038106566079193, intercept_std=1.6508212167970764
2024-03-20T16:29:08+0100 [stirring_calibration] WARNING Something went wrong - the intercept should be greater than 0.
2024-03-20T16:44:07+0100 [monitor] DEBUG Running nohup pio run stirring >/dev/null 2>&1 & from monitor job.
2024-03-20T16:44:09+0100 [stirring] DEBUG Init.
2024-03-20T16:44:09+0100 [stirring] DEBUG Operating with RPM feedback loop.
2024-03-20T16:44:10+0100 [PWM@GPIO-17] DEBUG Initialized GPIO-17 using software-timing, initial frequency = 200.0 hz.
2024-03-20T16:44:10+0100 [stirring] DEBUG Found stirring calibration linear_v1.
2024-03-20T16:44:10+0100 [stirring] INFO Ready.
2024-03-20T16:44:10+0100 [stirring] DEBUG Starting stirring with 500.0 RPM.
2024-03-20T16:44:11+0100 [stirring] DEBUG Stirring is blocking until RPM is near 500.0.
2024-03-20T16:44:12+0100 [monitor] DEBUG Running nohup pio run air_bubbler >/dev/null 2>&1 & from monitor job.
2024-03-20T16:44:14+0100 [air_bubbler] DEBUG Init.
2024-03-20T16:44:14+0100 [PWM@GPIO-12] DEBUG Initialized GPIO-12 using hardware-timing, initial frequency = 200.0 hz.
2024-03-20T16:44:14+0100 [air_bubbler] INFO Ready.
2024-03-20T16:44:14+0100 [air_bubbler] DEBUG air_bubbler is blocking until disconnected.
2024-03-20T16:44:16+0100 [monitor] DEBUG Running nohup pio run temperature_control --automation-name only_record_temperature >/dev/null 2>&1 & from monitor job.
2024-03-20T16:44:18+0100 [temperature_control] DEBUG Init.
2024-03-20T16:44:18+0100 [PWM@GPIO-18] DEBUG Initialized GPIO-18 using software-timing, initial frequency = 8 hz.
2024-03-20T16:44:19+0100 [temperature_control] INFO Starting only_record_temperature().
2024-03-20T16:44:19+0100 [temperature_automation] DEBUG Init.
2024-03-20T16:44:19+0100 [temperature_automation] DEBUG Ready.
2024-03-20T16:44:19+0100 [temperature_control] INFO Ready.
2024-03-20T16:44:19+0100 [temperature_control] DEBUG temperature_control is blocking until disconnected.
2024-03-20T16:44:24+0100 [stirring] DEBUG stirring is blocking until disconnected.
2024-03-20T16:44:35+0100 [air_bubbler] INFO Updated duty_cycle from 50.0% to 80%.
2024-03-20T16:48:12+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [41.125, 41.1375, 41.125, 41.125, 41.125, 41.125, 41.125, 41.125, 41.125, 41.125, 41.125, 41.125, 41.1125, 41.125, 41.1, 41.1, 41.1, 41.0875, 41.0875, 41.125, 41.1125, 41.125, 41.125, 41.125, 41.125, 41.125, 41.125, 41.15, 41.1625]}
2024-03-20T16:51:57+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [41.3125, 41.3125, 41.35, 41.375, 41.375, 41.425, 41.4375, 41.45, 41.5, 41.5, 41.5125, 41.5625, 41.5625, 41.6, 41.625, 41.625, 41.6375, 41.675, 41.6875, 41.6875, 41.6875, 41.7375, 41.75, 41.75, 41.7625, 41.8125, 41.8125, 41.8375, 41.875]}
2024-03-20T16:54:18+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T16:54:18+0100 [stirring] DEBUG Kicking stirring
2024-03-20T16:55:42+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [42.25, 42.2625, 42.3125, 42.3375, 42.375, 42.375, 42.4375, 42.4375, 42.5, 42.5, 42.5125, 42.5625, 42.5625, 42.6, 42.625, 42.625, 42.6875, 42.6875, 42.725, 42.75, 42.75, 42.8125, 42.825, 42.875, 42.875, 42.875, 42.9375, 42.9375, 43.0]}
2024-03-20T16:56:48+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T16:56:48+0100 [stirring] DEBUG Kicking stirring
2024-03-20T16:59:27+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [43.325, 43.375, 43.375, 43.425, 43.4375, 43.5, 43.5, 43.5625, 43.6, 43.625, 43.675, 43.6875, 43.7375, 43.75, 43.8125, 43.8125, 43.875, 43.875, 43.9375, 43.975, 44.0, 44.05, 44.0625, 44.1125, 44.125, 44.1875, 44.1875, 44.25, 44.25]}
2024-03-20T17:00:58+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:00:58+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:01:40+0100 [export_experiment_data] INFO Starting export of table: pioreactor_unit_activity_data.
2024-03-20T17:01:44+0100 [export_experiment_data] INFO Finished export.
2024-03-20T17:03:12+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [44.6875, 44.75, 44.775, 44.8125, 44.8125, 44.875, 44.875, 44.9375, 44.9375, 45.0, 45.0, 45.0, 45.0625, 45.0625, 45.125, 45.125, 45.175, 45.1875, 45.2, 45.25, 45.2625, 45.3125, 45.3125, 45.375, 45.375, 45.4375, 45.4375, 45.5, 45.5]}
2024-03-20T17:03:28+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:03:28+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:05:58+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:05:58+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:06:57+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [45.875, 45.9, 45.9375, 46.0, 46.0, 46.025, 46.0625, 46.0875, 46.125, 46.1625, 46.1875, 46.2125, 46.25, 46.3, 46.3125, 46.325, 46.375, 46.375, 46.375, 46.375, 46.425, 46.4375, 46.45, 46.5, 46.5125, 46.5625, 46.575, 46.625, 46.625]}
2024-03-20T17:08:28+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:08:28+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:10:42+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [47.1, 47.125, 47.125, 47.125, 47.125, 47.125, 47.1625, 47.1875, 47.25, 47.25, 47.3125, 47.35, 47.375, 47.4125, 47.4375, 47.475, 47.5, 47.55, 47.5625, 47.6125, 47.625, 47.6875, 47.6875, 47.7375, 47.75, 47.8, 47.8125, 47.875, 47.875]}
2024-03-20T17:10:58+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:10:58+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:13:28+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:13:28+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:14:27+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [48.225, 48.25, 48.3125, 48.3125, 48.3375, 48.375, 48.4375, 48.4375, 48.4625, 48.5, 48.55, 48.5625, 48.6, 48.625, 48.625, 48.6625, 48.6875, 48.6875, 48.6875, 48.6875, 48.6875, 48.75, 48.75, 48.8125, 48.8375, 48.875, 48.9375, 48.9375, 49.0]}
2024-03-20T17:15:58+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:15:58+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:18:12+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [49.4375, 49.4375, 49.4375, 49.4375, 49.4375, 49.4375, 49.4625, 49.5, 49.55, 49.5625, 49.625, 49.625, 49.6875, 49.725, 49.75, 49.75, 49.8125, 49.8125, 49.8625, 49.875, 49.9375, 49.9375, 50.0, 50.0, 50.05, 50.0625, 50.1, 50.125, 50.125]}
2024-03-20T17:18:28+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:18:28+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:20:58+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:20:58+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:21:57+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [50.4875, 50.5, 50.5375, 50.5625, 50.575, 50.625, 50.625, 50.6875, 50.6875, 50.75, 50.75, 50.8125, 50.8125, 50.8625, 50.875, 50.875, 50.8875, 50.9, 50.8875, 50.8875, 50.9, 50.9375, 51.0, 51.0, 51.0625, 51.0625, 51.1125, 51.125, 51.175]}
2024-03-20T17:23:28+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:23:28+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:25:42+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [51.5625, 51.5625, 51.5625, 51.5625, 51.5625, 51.5625, 51.5625, 51.625, 51.625, 51.6875, 51.6875, 51.75, 51.7875, 51.8125, 51.8125, 51.875, 51.8875, 51.9375, 51.9375, 51.9625, 52.0, 52.0375, 52.0625, 52.0625, 52.1125, 52.125, 52.1375, 52.1875, 52.1875]}
2024-03-20T17:25:58+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:25:58+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:28:28+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:28:28+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:29:27+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [52.4875, 52.5, 52.5, 52.5625, 52.575, 52.6125, 52.625, 52.6625, 52.6875, 52.7125, 52.75, 52.75, 52.8125, 52.8125, 52.8125, 52.8125, 52.8125, 52.8125, 52.8125, 52.8125, 52.8125, 52.875, 52.875, 52.9375, 52.95, 53.0, 53.0125, 53.0625, 53.0625]}
2024-03-20T17:31:48+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:31:48+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:33:12+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [53.5, 53.5, 53.55, 53.5625, 53.5625, 53.625, 53.625, 53.6375, 53.6875, 53.6875, 53.6875, 53.7, 53.7125, 53.75, 53.7375, 53.7375, 53.7375, 53.75, 53.775, 53.8125, 53.825, 53.875, 53.875, 53.8875, 53.925, 53.9375, 53.9375, 53.9875, 54.0]}
2024-03-20T17:34:18+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:34:18+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:35:58+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:35:58+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:36:57+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [54.1625, 54.1875, 54.1875, 54.2125, 54.25, 54.3, 54.3125, 54.35, 54.375, 54.375, 54.425, 54.4375, 54.4375, 54.4375, 54.4875, 54.5, 54.5125, 54.5625, 54.5375, 54.5625, 54.5625, 54.5625, 54.5875, 54.625, 54.625, 54.6625, 54.675, 54.6875, 54.6875]}
2024-03-20T17:38:28+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:38:28+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:40:42+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [55.0, 55.0, 55.0, 55.0, 54.9625, 54.975, 55.0, 55.0, 55.0125, 55.0625, 55.075, 55.125, 55.125, 55.1875, 55.1875, 55.2, 55.25, 55.25, 55.3, 55.3125, 55.3125, 55.375, 55.375, 55.375, 55.425, 55.4375, 55.45, 55.5, 55.5]}
2024-03-20T17:40:58+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:40:58+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:43:28+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:43:28+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:44:27+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [55.6875, 55.7125, 55.75, 55.75, 55.7625, 55.8125, 55.8125, 55.85, 55.875, 55.875, 55.8875, 55.9375, 55.9375, 55.95, 55.9625, 55.9875, 55.9875, 56.0, 55.975, 55.9375, 55.9375, 56.0, 56.0, 56.025, 56.0625, 56.0625, 56.1, 56.125, 56.125]}
2024-03-20T17:45:08+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:45:08+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:47:38+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:47:38+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:48:12+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [56.375, 56.4, 56.4375, 56.4375, 56.4625, 56.4875, 56.5, 56.5, 56.5125, 56.55, 56.5625, 56.5625, 56.6125, 56.625, 56.625, 56.6625, 56.6875, 56.6875, 56.7, 56.6875, 56.7375, 56.725, 56.6875, 56.7, 56.6875, 56.6875, 56.725, 56.75, 56.75]}
2024-03-20T17:50:08+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:50:08+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:51:57+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [57.0625, 57.0625, 57.0625, 57.1125, 57.125, 57.125, 57.125, 57.125, 57.1125, 57.0875, 57.0625, 57.075, 57.125, 57.125, 57.1375, 57.1875, 57.1875, 57.25, 57.25, 57.25, 57.275, 57.3125, 57.3125, 57.3125, 57.375, 57.375, 57.375, 57.3875, 57.4375]}
2024-03-20T17:52:38+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:52:38+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:55:08+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:55:08+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:55:42+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [57.5625, 57.5625, 57.5875, 57.6125, 57.625, 57.625, 57.6375, 57.6875, 57.6875, 57.6875, 57.7375, 57.75, 57.75, 57.775, 57.8125, 57.8125, 57.8125, 57.8625, 57.875, 57.875, 57.875, 57.875, 57.875, 57.8375, 57.8125, 57.85, 57.8625, 57.875, 57.9125]}
2024-03-20T17:57:38+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T17:57:38+0100 [stirring] DEBUG Kicking stirring
2024-03-20T17:59:27+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [58.1875, 58.1875, 58.1875, 58.2375, 58.25, 58.25, 58.25, 58.2375, 58.2125, 58.2, 58.1875, 58.1875, 58.2125, 58.25, 58.25, 58.2875, 58.3125, 58.325, 58.375, 58.375, 58.375, 58.4, 58.4375, 58.4375, 58.4375, 58.45, 58.5, 58.5, 58.5125]}
2024-03-20T18:00:08+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T18:00:08+0100 [stirring] DEBUG Kicking stirring
2024-03-20T18:02:38+0100 [stirring] WARNING Stirring RPM is 0 - attempting to restart it automatically. It may be a temporary stall, target RPM may be too low, or not reading sensor correctly.
2024-03-20T18:02:38+0100 [stirring] DEBUG Kicking stirring
2024-03-20T18:03:12+0100 [temperature_control] DEBUG features={‘previous_heater_dc’: 0.0, ‘room_temp’: 22.0, ‘time_series_of_temp’: [58.575, 58.625, 58.625, 58.6375, 58.6875, 58.6875, 58.6875, 58.7125, 58.75, 58.75, 58.75, 58.7625, 58.8125, 58.8125, 58.8125, 58.85, 58.875, 58.875, 58.875, 58.875, 58.875, 58.875, 58.875, 58.8625, 58.8125, 58.8375, 58.875, 58.875, 58.8875]}

Btw it is still stirring fine and it seems to be regulating the intensity of the stirrer.

So, I think you can ignore this warning, especially if your stirring seems okay. However, I do see lots of “Stirring RPM is 0 - attempting to restart it automatically.” in your logs - do you see stirring stall often?


More generally, stirring_calibration is an out-dated idea, and we likely will drop it in the future. It doesn’t really help except for faster RPM response times (if that’s even a good idea). We have better ideas on how to do this automatically without a calibration, too.

1 Like

Initially it was stalling and flashing the blue light often but after a while it stopped doing that. i will keep an eye on it and i will ignore it since the setup seems to be working otherwise. Thanks for looking into it :slight_smile:

@Eleni_M, something else to try to help it from stalling and starting again constantly. Try changing decreasing slightly Kp parameter in [stirring.pid] in your config, say to Kp=0.007 or Kp=0.006.

Are you targeting a very low RPM (like < 125 RPM)?

I have it at Kp=0.005 and the target RPM is 500.

Do you see anything else in my setting that might be a problem?

[stirring]
target_rpm=500
initial_duty_cycle=20
pwm_hz=200
use_rpm=1
duration_between_updates_seconds=50

If you’re using a different (heavier?) stir bar, this can be increased. One easy hack: once the stirring is stabilized and running smoothly, take a look at the PWM % for the stirring channel (usually 1) on the Pioreactor card:

Screenshot 2024-03-21 at 9.56.52 AM

and set the initial_duty_cycle to that value.

1 Like

Ok i will go back to that. I used to have it at 10% (i am using an external power supply of 12V 1A) but i thought that using the rpm calibration is better since the voltage fluctuates a little bit.