From 17ac550433c2140583c1db8eaa1451cf8726685f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rojas=20Castiglione?= Date: Fri, 2 Aug 2024 19:16:07 -0400 Subject: [PATCH 01/11] second attemp draft PR --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 08c65515d1..f9afda9314 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ INFO:=top-level Makefile for IronOS - Soldering Iron Open Source Firmware Projec ### global adjustable variables +### second attempt draft PR # command for "docker compose" from DOCKER env. var. ifdef DOCKER From bcb08ad6cd8c7bd2b1c294d144bbc530d9a01052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rojas=20Castiglione?= Date: Fri, 2 Aug 2024 23:42:28 -0400 Subject: [PATCH 02/11] setting I, D to zero, experimenting with just P --- source/Core/BSP/Pinecilv2/configuration.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h index 8ca4ff4068..f309e09601 100644 --- a/source/Core/BSP/Pinecilv2/configuration.h +++ b/source/Core/BSP/Pinecilv2/configuration.h @@ -171,9 +171,9 @@ #define NEEDS_VBUS_PROBE 0 // No vbus probe, its not connected in pcb #define CANT_DIRECT_READ_SETTINGS // We cant memcpy settings due to flash cache #define TIP_CONTROL_PID // We use PID rather than integrator -#define TIP_PID_KP 40 // Reasonable compromise for most tips so far -#define TIP_PID_KI 6 // About as high for stability across tips -#define TIP_PID_KD 200 // Helps dampen smaller tips; ~= nothing for larger tips +#define TIP_PID_KP 40//40 // Reasonable compromise for most tips so far +#define TIP_PID_KI 0//6 // About as high for stability across tips +#define TIP_PID_KD 0//200 // Helps dampen smaller tips; ~= nothing for larger tips #define FILTER_DISPLAYED_TIP_TEMP 8 // Filtering for GUI display #endif /* Pinecilv2 */ From 52a57d4df5880d4a173df9f6638fa56ddddeb7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rojas=20Castiglione?= Date: Sat, 3 Aug 2024 16:28:44 -0400 Subject: [PATCH 03/11] settong P to 30 --- source/Core/BSP/Pinecilv2/configuration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h index f309e09601..81d466de0b 100644 --- a/source/Core/BSP/Pinecilv2/configuration.h +++ b/source/Core/BSP/Pinecilv2/configuration.h @@ -171,7 +171,7 @@ #define NEEDS_VBUS_PROBE 0 // No vbus probe, its not connected in pcb #define CANT_DIRECT_READ_SETTINGS // We cant memcpy settings due to flash cache #define TIP_CONTROL_PID // We use PID rather than integrator -#define TIP_PID_KP 40//40 // Reasonable compromise for most tips so far +#define TIP_PID_KP 30//40 // Reasonable compromise for most tips so far #define TIP_PID_KI 0//6 // About as high for stability across tips #define TIP_PID_KD 0//200 // Helps dampen smaller tips; ~= nothing for larger tips #define FILTER_DISPLAYED_TIP_TEMP 8 // Filtering for GUI display From 896bbd05221d6697a3796bf19a7cbdd3c2bc27d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rojas=20Castiglione?= Date: Mon, 5 Aug 2024 17:31:36 -0400 Subject: [PATCH 04/11] new PID parameters to compare with cloud compilation --- source/Core/BSP/Pinecilv2/configuration.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h index 81d466de0b..3d0a729a42 100644 --- a/source/Core/BSP/Pinecilv2/configuration.h +++ b/source/Core/BSP/Pinecilv2/configuration.h @@ -172,8 +172,8 @@ #define CANT_DIRECT_READ_SETTINGS // We cant memcpy settings due to flash cache #define TIP_CONTROL_PID // We use PID rather than integrator #define TIP_PID_KP 30//40 // Reasonable compromise for most tips so far -#define TIP_PID_KI 0//6 // About as high for stability across tips -#define TIP_PID_KD 0//200 // Helps dampen smaller tips; ~= nothing for larger tips +#define TIP_PID_KI 4//6 // About as high for stability across tips +#define TIP_PID_KD 300//200 // Helps dampen smaller tips; ~= nothing for larger tips #define FILTER_DISPLAYED_TIP_TEMP 8 // Filtering for GUI display #endif /* Pinecilv2 */ From c6705ac3c2d6a54b172d53e2662901ab04648e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rojas=20C?= <38339670+tomasrojasc@users.noreply.github.com> Date: Tue, 13 Aug 2024 20:41:35 -0400 Subject: [PATCH 05/11] Update Makefile Co-authored-by: discip <53649486+discip@users.noreply.github.com> --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index f9afda9314..08c65515d1 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ INFO:=top-level Makefile for IronOS - Soldering Iron Open Source Firmware Projec ### global adjustable variables -### second attempt draft PR # command for "docker compose" from DOCKER env. var. ifdef DOCKER From c336ec7773ef8760c8f408b1a1712583d35e7854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rojas=20C?= <38339670+tomasrojasc@users.noreply.github.com> Date: Tue, 13 Aug 2024 20:43:47 -0400 Subject: [PATCH 06/11] Update source/Core/BSP/Pinecilv2/configuration.h Co-authored-by: discip <53649486+discip@users.noreply.github.com> --- source/Core/BSP/Pinecilv2/configuration.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h index 3d0a729a42..4699d80459 100644 --- a/source/Core/BSP/Pinecilv2/configuration.h +++ b/source/Core/BSP/Pinecilv2/configuration.h @@ -171,9 +171,9 @@ #define NEEDS_VBUS_PROBE 0 // No vbus probe, its not connected in pcb #define CANT_DIRECT_READ_SETTINGS // We cant memcpy settings due to flash cache #define TIP_CONTROL_PID // We use PID rather than integrator -#define TIP_PID_KP 30//40 // Reasonable compromise for most tips so far -#define TIP_PID_KI 4//6 // About as high for stability across tips -#define TIP_PID_KD 300//200 // Helps dampen smaller tips; ~= nothing for larger tips +#define TIP_PID_KP 30 //40 // Reasonable compromise for most tips so far +#define TIP_PID_KI 4 //6 // About as high for stability across tips +#define TIP_PID_KD 300 //200 // Helps dampen smaller tips; ~= nothing for larger tips #define FILTER_DISPLAYED_TIP_TEMP 8 // Filtering for GUI display #endif /* Pinecilv2 */ From 2001093b1436d259e40fd10598dd659fc31865dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rojas=20Castiglione?= Date: Tue, 13 Aug 2024 20:47:28 -0400 Subject: [PATCH 07/11] returning to original parameters in Pinecil_V2 --- source/Core/BSP/Pinecilv2/configuration.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h index 4699d80459..8ca4ff4068 100644 --- a/source/Core/BSP/Pinecilv2/configuration.h +++ b/source/Core/BSP/Pinecilv2/configuration.h @@ -171,9 +171,9 @@ #define NEEDS_VBUS_PROBE 0 // No vbus probe, its not connected in pcb #define CANT_DIRECT_READ_SETTINGS // We cant memcpy settings due to flash cache #define TIP_CONTROL_PID // We use PID rather than integrator -#define TIP_PID_KP 30 //40 // Reasonable compromise for most tips so far -#define TIP_PID_KI 4 //6 // About as high for stability across tips -#define TIP_PID_KD 300 //200 // Helps dampen smaller tips; ~= nothing for larger tips +#define TIP_PID_KP 40 // Reasonable compromise for most tips so far +#define TIP_PID_KI 6 // About as high for stability across tips +#define TIP_PID_KD 200 // Helps dampen smaller tips; ~= nothing for larger tips #define FILTER_DISPLAYED_TIP_TEMP 8 // Filtering for GUI display #endif /* Pinecilv2 */ From c3f6de189c7be5dd3427bf271a6338ccefd81022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rojas=20Castiglione?= Date: Tue, 13 Aug 2024 20:48:27 -0400 Subject: [PATCH 08/11] adding working PID parameters to MHP30 --- source/Core/BSP/MHP30/configuration.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/Core/BSP/MHP30/configuration.h b/source/Core/BSP/MHP30/configuration.h index a2d5910be9..cd584202e2 100644 --- a/source/Core/BSP/MHP30/configuration.h +++ b/source/Core/BSP/MHP30/configuration.h @@ -165,6 +165,14 @@ #define ACCEL_EXITS_ON_MOVEMENT #define NEEDS_VBUS_PROBE 0 +#define CANT_DIRECT_READ_SETTINGS // We cant memcpy settings due to flash cache +#define TIP_CONTROL_PID // We use PID rather than integrator +#define TIP_PID_KP 22 //40 // Reasonable compromise for most tips so far +#define TIP_PID_KI 300 //6 // About as high for stability across tips +#define TIP_PID_KD 600 //200 // Helps dampen smaller tips; ~= nothing for larger tips +#define FILTER_DISPLAYED_TIP_TEMP 8 // Filtering for GUI display + + #define HARDWARE_MAX_WATTAGE_X10 650 #define TIP_THERMAL_MASS 65 // TODO, needs refinement #define TIP_RESISTANCE 60 // x10 ohms, ~6 typical From ba58d95adb62f61a2d0ff711f7db8a2d71058406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rojas=20Castiglione?= Date: Sun, 13 Oct 2024 23:01:56 -0300 Subject: [PATCH 09/11] removing thermal runaway --- source/Core/Threads/UI/logic/Soldering.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/Core/Threads/UI/logic/Soldering.cpp b/source/Core/Threads/UI/logic/Soldering.cpp index 50508025f4..ce7be436dc 100644 --- a/source/Core/Threads/UI/logic/Soldering.cpp +++ b/source/Core/Threads/UI/logic/Soldering.cpp @@ -163,11 +163,11 @@ OperatingMode gui_solderingMode(const ButtonState buttons, guiContext *cxt) { return OperatingMode::Sleeping; } - if (heaterThermalRunaway) { - currentTempTargetDegC = 0; // heater control off - heaterThermalRunaway = false; - cxt->transitionMode = TransitionAnimation::Right; - return OperatingMode::ThermalRunaway; - } +// if (heaterThermalRunaway) { +// currentTempTargetDegC = 0; // heater control off +// heaterThermalRunaway = false; +// cxt->transitionMode = TransitionAnimation::Right; +// return OperatingMode::ThermalRunaway; +// } return handleSolderingButtons(buttons, cxt); } From 3c548119377487c487107f0c23000aa51124df94 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 2 Nov 2024 00:14:15 +0100 Subject: [PATCH 10/11] Update Soldering.cpp --- source/Core/Threads/UI/logic/Soldering.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/Core/Threads/UI/logic/Soldering.cpp b/source/Core/Threads/UI/logic/Soldering.cpp index ce7be436dc..81d4f0db7f 100644 --- a/source/Core/Threads/UI/logic/Soldering.cpp +++ b/source/Core/Threads/UI/logic/Soldering.cpp @@ -163,11 +163,11 @@ OperatingMode gui_solderingMode(const ButtonState buttons, guiContext *cxt) { return OperatingMode::Sleeping; } -// if (heaterThermalRunaway) { -// currentTempTargetDegC = 0; // heater control off -// heaterThermalRunaway = false; -// cxt->transitionMode = TransitionAnimation::Right; -// return OperatingMode::ThermalRunaway; -// } + // if (heaterThermalRunaway) { + // currentTempTargetDegC = 0; // heater control off + // heaterThermalRunaway = false; + // cxt->transitionMode = TransitionAnimation::Right; + // return OperatingMode::ThermalRunaway; + // } return handleSolderingButtons(buttons, cxt); } From 24d7742df20ac81af102cb28d583abd0b3609e86 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Thu, 14 Nov 2024 21:01:55 +1100 Subject: [PATCH 11/11] Set ADC input pins to INPUT mode instead of ANALOG --- source/Core/BSP/MHP30/stm32f1xx_hal_msp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Core/BSP/MHP30/stm32f1xx_hal_msp.c b/source/Core/BSP/MHP30/stm32f1xx_hal_msp.c index 0fdf25caf5..d53a671961 100644 --- a/source/Core/BSP/MHP30/stm32f1xx_hal_msp.c +++ b/source/Core/BSP/MHP30/stm32f1xx_hal_msp.c @@ -57,16 +57,16 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) { PB1 ------> ADC2_IN9 */ GPIO_InitStruct.Pin = TIP_TEMP_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; HAL_GPIO_Init(TIP_TEMP_GPIO_Port, &GPIO_InitStruct); GPIO_InitStruct.Pin = TMP36_INPUT_Pin; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; HAL_GPIO_Init(TMP36_INPUT_GPIO_Port, &GPIO_InitStruct); GPIO_InitStruct.Pin = VIN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; HAL_GPIO_Init(VIN_GPIO_Port, &GPIO_InitStruct); GPIO_InitStruct.Pin = PLATE_SENSOR_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; HAL_GPIO_Init(PLATE_SENSOR_GPIO_Port, &GPIO_InitStruct); /* ADC2 interrupt Init */