diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5c3ec26 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,66 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + + +## [0.5.0] - 2022-11-27 + +### Added + +- Added [PID Tuner](https://pidtuner.com) output +- Added average temperatures for more stable temperature display/handling +- Added "Max. Temp" setting (which is required for PID Tuner steps) +- Added Changelog + +### Changed + +- Enlarged PID constant length from 3 to 4 int digits +- Improved some internal var names +- Optimized Thermocouple class and implemented average temperature +- Moved profile handling into a separate class +- Resturctured handling of objects via globals (instead of space wasting pointer/reference parameter) +- Changed initial PID-Tuner wait time and saved some resources + +### Fixed + +- Fixed possibliy wrong PID derivate calculation as discussed [here](https://github.com/r-downing/AutoPID/issues/4) + + +## [0.4.0] - 2022-11-08 + +### Added + +- "Manual" or (open-end) "Reflow-Profile" Mode +- Reflow profiles for (low temp.) "Sn42/Bi57.6/Ag0.4" as well as (high temp.) "Sn96.5/Ag3.0/Cu0" + +### Changed + +- Moved most code into separate classes for higher flexibility and safer var/pointers +- Stripped down fonts, to get some more flash space + +## 0.3.0 - 2022-10-26 + +### Added + +- Built-in Setup +- Adjustabled PID constants +- BangON and BangOFF values +- Config storage into EEPROM + +[unreleased]: https://github.com/Apehaenger/Another-HotPlate-Firmware/compare/v0.5.0...develop +[0.5.0]: https://github.com/Apehaenger/Another-HotPlate-Firmware/compare/v0.4.0...v0.5.0 +[0.4.0]: https://github.com/Apehaenger/Another-HotPlate-Firmware/releases/v0.4.0 diff --git a/README.md b/README.md index ccf6900..be3bab2 100644 --- a/README.md +++ b/README.md @@ -21,33 +21,58 @@ As we all have some kind of fetish, and mine seem to be that I tend to over-opti ## Features -- Built-in "Setup" within Hot-Plate user interface +### Setup - ![Built-in Setup](assets/images/Setup-1.jpg) +Built-in "Setup" within Hot-Plate user interface -- "Manual" or (open-end) "Reflow-Profile" Mode, with built-in reflow profiles for low-temp. solder paste Sn42/Bi57.6/Ag0.4, as well as high-temp. Sn96.5/Ag3.0/Cu0. After (as well as during) the reflow profile time targets, the user may adapt the target temp. (every 10 seconds). At profile end, the last target temp remain active and the user has to stop the profile manually when everything reflowed correctly. +![Built-in Setup](assets/images/Setup-1.jpg) - ![Reflow Profiles](assets/images/ReflowProfiles.jpg) - ![Running Reflow Profile](assets/images/ReflowProfile-1.jpg) +### Reflow Profile -- PID constant settings (within built-in setup) +"Manual" or (open-end) "Reflow-Profile" Mode, with built-in reflow profiles for low-temp. solder paste Sn42/Bi57.6/Ag0.4, as well as high-temp. Sn96.5/Ag3.0/Cu0. After (as well as during) the reflow profile time targets, the user may adapt the target temp. (every 10 seconds). At profile end, the last target temp remain active and the user has to stop the profile manually when everything reflowed correctly. - ![Setup PID constant Kp](assets/images/Setup-PID.jpg) - ![Setup PID constant Kd](assets/images/Setup-PID-Kd.jpg) - ![Setup PID constant Ki](assets/images/Setup-PID-Ki.jpg) +![Reflow Profiles](assets/images/ReflowProfiles.jpg) +![Reflow Profile Start](assets/images/ReflowProfile-Start.jpg) +![Running Reflow Profile](assets/images/ReflowProfile-1.jpg) -- BangON/BangOFF (quick start) settings and functionality. Mainly for bad/non-configuraed PID controller constants (a good configured PID controller normally does not need BangON/BangOFF, but PID controller constant determination is complicated and time consuming) +### [PID Tuner](https://pidtuner.com) support - ![Setup BangON](assets/images/Setup-BangON.jpg) - ![Setup BangOFF](assets/images/Setup-BangOFF.jpg) +Simply start an automatic [step response](https://en.wikipedia.org/wiki/Step_response) run, with a connected serial console. +Afterwards copy the resulting data into [PID Tuner](https://pidtuner.com) and (auto-)tune your PID constants. +BTW: This step response can also be used to determine the overshot of the tuned target temperatures which might be used (at least as indication) for the [BangON](#bangonbangoff) setting. -- SSR type (active-low/high) configurable within buit-in setup +![Setup BangON](assets/images/PIDTuner-Start.jpg) +![Setup BangOFF](assets/images/PIDTuner-Heat.jpg) +![Setup BangOFF](assets/images/PIDTuner-Settle.jpg) +![Setup BangOFF](assets/images/PIDTuner-Output-1.jpg) - ![Setup SSR Type](assets/images/Setup-SSR.jpg) +### PID constants -- Save of settings to EEPROM possible within built-in setup +Either you know your PID constants, evaluate them the hard way "by hand" or use [PID Tuner support](#pid-tuner-support) for assistance in PID constant determination. - ![Setup Save](assets/images/Setup-Save.jpg) +![Setup PID constant Kp](assets/images/Setup-PID-Kp.jpg) +![Setup PID constant Kd](assets/images/Setup-PID-Kd.jpg) +![Setup PID constant Ki](assets/images/Setup-PID-Ki.jpg) + +### BangON/BangOff + +Quick start/Overshoot reduction settings and functionality. Mainly for bad/non-configuraed PID controller constants. +A good configured PID controller normally does not need BangON/BangOFF, but PID controller constant determination is complicated and time consuming. See [PID Tuner support](#pid-tuner-support) for assistance in PID constant determination. + +![Setup BangON](assets/images/Setup-BangON.jpg) +![Setup BangOFF](assets/images/Setup-BangOFF.jpg) + +### SSR type + +Active-low/high configurable within buit-in setup + +![Setup SSR Type](assets/images/Setup-SSR.jpg) + +### Save + +Save of settings to EEPROM possible within built-in setup + +![Setup Save](assets/images/Setup-Save.jpg) ## Requirements @@ -63,16 +88,16 @@ Assembled DIY Hot Plate like described in "[Tim's Hot Plate](https://www.instruc ## Roadmap -- [ ] Step response output for easier PID constant determination by the help of [PID Tuner](https://pidtuner.com) +- [X] Step response output for easier PID constant determination by the help of [PID Tuner](https://pidtuner.com) - [ ] Some kind of PID loop tuning/calibration -- [ ] Ramp-up determination to identify PTC time and TC delay (BangON calibration) +- [X] Ramp-up determination to identify ~~PTC time and TC delay~~ (BangON calibration) - [ ] Progressive rotary switching for quicker +/- move - [ ] C/F unit selection (if someone is interested in) - [ ] Larger display so that I don't need my glasses (old man wish) ## Known Bugs/Issues -- I've the impression that the Ki constant of the (currently) used [AutoPID](https://r-downing.github.io/AutoPID/) doesn't behave as expected. Will revalidate later ... +- [X] I've the impression that the Ki constant of the (currently) used [AutoPID](https://r-downing.github.io/AutoPID/) doesn't behave as expected -> Now fixed ## Technology @@ -81,12 +106,11 @@ The code structure is [PlatformIO/VSCode](https://platformio.org/) based (no Ard ## Installing 1. Upload .hex or .elf file WITHOUT HAVING AC-MAINS CONNECTED -2. Long-press (> 0.5s) to get into built-in setup -3. Choose "SSR Type" -4. Select your SSR type (Active-Low/High). In the case of [Tim's Hot Plate](https://www.instructables.com/Tims-Hot-Plate/) it will be "Active-Low" -5. Choose "Save & Quit" -6. Plug-in AC-Mains. Happy reflow soldering... - +1. Long-press (> 0.5s) to get into built-in setup +1. Choose "SSR Type" +1. Select your SSR type (Active-Low/High). In the case of [Tim's Hot Plate](https://www.instructables.com/Tims-Hot-Plate/) it will be "Active-Low" +1. Choose "Save & Quit" +1. Plug-in AC-Mains. Happy reflow soldering... ## Usage @@ -94,7 +118,6 @@ The code structure is [PlatformIO/VSCode](https://platformio.org/) based (no Ard - Push knob to stop (or start profile if it's displayed on screen) - Long-Push (> 0.5s) to get into built-in setup - ## Built With * [Tim's Hot Plate](https://www.instructables.com/Tims-Hot-Plate/) - Quite cool DIY reflow Hot Plate Project @ Instructables @@ -102,6 +125,7 @@ The code structure is [PlatformIO/VSCode](https://platformio.org/) based (no Ard * [MAX6675](https://github.com/adafruit/MAX6675-library) - Arduino library for interfacing with MAX6675 thermocouple amplifier * [CRC32](https://github.com/bakercp/CRC32) - An Arduino library for calculating a CRC32 checksum * [AutoPID](https://github.com/r-downing/AutoPID) - Fairly good documented (as well as feature rich and small) Arduino AutoPID library +* [PID Tuner](https://pidtuner.com) - Will help you to finde reasonable PID constants ## Contributing @@ -109,9 +133,9 @@ Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of cond ## Versioning - +We use [SemVer](http://semver.org/) for versioning. -We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/Apehaenger/Another-HotPlate-Firmware/tags). +For the versions available, please see [changelog](CHANGELOG.md) file or the [tags on this repository](https://github.com/Apehaenger/Another-HotPlate-Firmware/tags). ## Authors diff --git a/_remarks.md b/_remarks.md new file mode 100644 index 0000000..7c7ade1 --- /dev/null +++ b/_remarks.md @@ -0,0 +1,28 @@ +# Internal C/C++ remarks + +## When to pass by value, by pointer or by reference + +http://www.cplusplus.com/articles/z6vU7k9E/ says: + +1. Pass by value when the function does not want to modify the parameter and the value is easy to copy (ints, doubles, char, bool, etc... simple types. std::string, std::vector, and all other STL containers are NOT simple types.) + +2. Pass by const pointer when the value is expensive to copy AND the function does not want to modify the value pointed to AND NULL is a valid, expected value that the function handles. + +3. Pass by non-const pointer when the value is expensive to copy AND the function wants to modify the value pointed to AND NULL is a valid, expected value that the function handles. + +4. Pass by const reference when the value is expensive to copy AND the function does not want to modify the value referred to AND NULL would not be a valid value if a pointer was used instead. + +5. Pass by non-cont reference when the value is expensive to copy AND the function wants to modify the value referred to AND NULL would not be a valid value if a pointer was used instead. + +6. When writing template functions, there isn't a clear-cut answer because there are a few tradeoffs to consider that are beyond the scope of this discussion, but suffice it to say that most template functions take their parameters by value or (const) reference, however because iterator syntax is similar to that of pointers (asterisk to "dereference"), any template function that expects iterators as arguments will also by default accept pointers as well (and not check for NULL since the NULL iterator concept has a different syntax). + +Whereas https://www.geeksforgeeks.org/passing-by-pointer-vs-passing-by-reference-in-c/ states: + +- References are usually preferred over pointers whenever we don’t need “reseating”. +- Overall, Use references when you can, and pointers when you have to. But if we want to write C code that compiles with both C and a C++ compiler, you’ll have to restrict yourself to using pointers. + +Also: Allen Holub's "Enough Rope to Shoot Yourself in the Foot" lists the following 2 rules: +``` +120. Reference arguments should always be `const` +121. Never use references as outputs, use pointers +``` diff --git a/assets/PID Tuner/My Tims HotPlate #1.md b/assets/PID Tuner/My Tims HotPlate #1.md new file mode 100644 index 0000000..80a0af2 --- /dev/null +++ b/assets/PID Tuner/My Tims HotPlate #1.md @@ -0,0 +1,3430 @@ +# My first "Tim's Hot-Plate" + +## Specifications + +- PTC, 220V, 400W, 12 * 7 cm +- K-Type TC via Kapton tape around PTC element +- Arduino Nano 3.x, CH-340 + +## PID Tuner + +### Sample 1, 2022-11-11 + +- Process Input = SSR state +- Target Temp = 100 °C +- Settle Temp = Target Temp + +Process Data: +``` +-10.00, 0, 24.06 +-0.01, 0, 24.06 +0.00, 5000.00, 24.06 +0.72, 5000.00, 23.93 +1.44, 5000.00, 24.00 +2.16, 5000.00, 23.95 +2.87, 5000.00, 24.10 +3.59, 5000.00, 24.34 +4.31, 5000.00, 24.48 +5.03, 5000.00, 24.85 +5.75, 5000.00, 25.51 +6.46, 5000.00, 26.35 +7.17, 5000.00, 27.80 +7.89, 5000.00, 29.12 +8.60, 5000.00, 30.68 +9.32, 5000.00, 32.53 +10.04, 5000.00, 34.62 +10.76, 5000.00, 37.61 +11.48, 5000.00, 40.12 +12.20, 5000.00, 42.74 +12.93, 5000.00, 45.41 +13.65, 5000.00, 49.20 +14.37, 5000.00, 51.97 +15.09, 5000.00, 54.86 +15.81, 5000.00, 57.72 +16.54, 5000.00, 61.64 +17.26, 5000.00, 64.57 +17.98, 5000.00, 67.62 +18.71, 5000.00, 70.63 +19.42, 5000.00, 73.60 +20.14, 5000.00, 77.55 +20.86, 5000.00, 80.32 +21.57, 5000.00, 83.21 +22.29, 5000.00, 86.10 +23.01, 5000.00, 89.99 +23.73, 5000.00, 92.72 +24.45, 5000.00, 95.43 +25.18, 5000.00, 98.04 +25.91, 0.00, 101.78 +26.63, 0.00, 104.33 +27.35, 0.00, 107.05 +28.08, 0.00, 109.59 +28.78, 0.00, 112.13 +29.49, 0.00, 115.42 +30.20, 0.00, 117.71 +30.91, 0.00, 119.80 +31.62, 0.00, 121.98 +32.33, 0.00, 123.93 +33.05, 0.00, 125.84 +33.75, 0.00, 127.70 +34.47, 0.00, 129.92 +35.19, 0.00, 131.45 +35.90, 0.00, 132.80 +36.62, 0.00, 134.05 +37.34, 0.00, 135.14 +38.06, 0.00, 136.60 +38.78, 0.00, 137.54 +39.49, 0.00, 138.29 +40.22, 0.00, 139.18 +40.94, 0.00, 140.07 +41.66, 0.00, 140.79 +42.38, 0.00, 141.18 +43.09, 0.00, 141.73 +43.81, 0.00, 142.21 +44.53, 0.00, 142.49 +45.25, 0.00, 142.62 +45.96, 0.00, 142.90 +46.68, 0.00, 143.17 +47.40, 0.00, 143.46 +48.12, 0.00, 143.37 +48.84, 0.00, 143.36 +49.56, 0.00, 143.34 +50.28, 0.00, 143.26 +51.00, 0.00, 143.20 +51.71, 0.00, 143.12 +52.43, 0.00, 143.01 +53.15, 0.00, 142.89 +53.87, 0.00, 142.64 +54.59, 0.00, 142.45 +55.31, 0.00, 142.32 +56.02, 0.00, 142.03 +56.74, 0.00, 141.79 +57.45, 0.00, 141.60 +58.16, 0.00, 141.37 +58.87, 0.00, 141.12 +59.59, 0.00, 140.94 +60.31, 0.00, 140.50 +61.03, 0.00, 140.23 +61.76, 0.00, 139.88 +62.48, 0.00, 139.63 +63.21, 0.00, 139.35 +63.92, 0.00, 139.22 +64.64, 0.00, 138.84 +65.37, 0.00, 138.71 +66.09, 0.00, 138.52 +66.81, 0.00, 138.30 +67.53, 0.00, 137.86 +68.25, 0.00, 137.54 +68.96, 0.00, 137.18 +69.67, 0.00, 136.93 +70.39, 0.00, 136.59 +71.11, 0.00, 136.27 +71.83, 0.00, 135.93 +72.55, 0.00, 135.63 +73.27, 0.00, 135.35 +74.00, 0.00, 134.99 +74.72, 0.00, 134.64 +75.44, 0.00, 134.36 +76.15, 0.00, 134.06 +76.87, 0.00, 133.77 +77.59, 0.00, 133.46 +78.31, 0.00, 133.14 +79.02, 0.00, 132.79 +79.74, 0.00, 132.47 +80.45, 0.00, 132.07 +81.15, 0.00, 131.67 +81.86, 0.00, 131.46 +82.57, 0.00, 131.15 +83.28, 0.00, 130.83 +84.01, 0.00, 130.49 +84.73, 0.00, 130.18 +85.45, 0.00, 129.90 +86.17, 0.00, 129.58 +86.89, 0.00, 129.30 +87.61, 0.00, 129.01 +88.32, 0.00, 128.71 +89.04, 0.00, 128.35 +89.76, 0.00, 128.09 +90.48, 0.00, 127.80 +91.18, 0.00, 127.62 +91.89, 0.00, 127.45 +92.60, 0.00, 127.14 +93.31, 0.00, 126.81 +94.03, 0.00, 126.56 +94.75, 0.00, 126.13 +95.46, 0.00, 125.79 +96.18, 0.00, 125.63 +96.90, 0.00, 125.36 +97.61, 0.00, 125.10 +98.33, 0.00, 124.71 +99.05, 0.00, 124.45 +99.76, 0.00, 124.14 +100.48, 0.00, 123.83 +101.19, 0.00, 123.67 +101.91, 0.00, 123.29 +102.62, 0.00, 122.88 +103.33, 0.00, 122.66 +104.04, 0.00, 122.17 +104.74, 0.00, 121.89 +105.45, 0.00, 121.70 +106.15, 0.00, 121.47 +106.86, 0.00, 121.28 +107.56, 0.00, 120.93 +108.28, 0.00, 120.65 +109.00, 0.00, 120.44 +109.72, 0.00, 120.13 +110.43, 0.00, 119.89 +111.14, 0.00, 119.61 +111.86, 0.00, 119.42 +112.57, 0.00, 119.16 +113.28, 0.00, 118.76 +113.99, 0.00, 118.62 +114.70, 0.00, 118.33 +115.41, 0.00, 118.01 +116.12, 0.00, 117.80 +116.82, 0.00, 117.51 +117.52, 0.00, 117.19 +118.23, 0.00, 116.93 +118.94, 0.00, 116.68 +119.65, 0.00, 116.39 +120.36, 0.00, 116.10 +121.07, 0.00, 115.89 +121.78, 0.00, 115.62 +122.49, 0.00, 115.47 +123.21, 0.00, 115.17 +123.91, 0.00, 114.97 +124.62, 0.00, 114.65 +125.34, 0.00, 114.46 +126.05, 0.00, 114.31 +126.75, 0.00, 114.07 +127.46, 0.00, 113.63 +128.17, 0.00, 113.52 +128.88, 0.00, 113.18 +129.58, 0.00, 113.09 +130.29, 0.00, 112.83 +130.99, 0.00, 112.63 +131.70, 0.00, 112.27 +132.40, 0.00, 111.85 +133.10, 0.00, 111.59 +133.80, 0.00, 111.50 +134.50, 0.00, 111.29 +135.19, 0.00, 111.10 +135.90, 0.00, 110.72 +136.61, 0.00, 110.44 +137.32, 0.00, 110.06 +138.04, 0.00, 109.82 +138.77, 0.00, 109.50 +139.50, 0.00, 109.18 +140.22, 0.00, 108.78 +140.95, 0.00, 108.64 +141.67, 0.00, 108.29 +142.40, 0.00, 107.85 +143.12, 0.00, 107.51 +143.83, 0.00, 107.09 +144.55, 0.00, 106.68 +145.28, 0.00, 106.38 +146.01, 0.00, 105.93 +146.73, 0.00, 105.67 +147.46, 0.00, 105.47 +148.18, 0.00, 105.31 +148.90, 0.00, 104.86 +149.63, 0.00, 104.67 +150.35, 0.00, 104.53 +151.08, 0.00, 104.38 +151.80, 0.00, 104.13 +152.53, 0.00, 103.84 +153.25, 0.00, 103.61 +153.97, 0.00, 103.36 +154.69, 0.00, 103.24 +155.41, 0.00, 103.10 +156.12, 0.00, 103.05 +156.84, 0.00, 102.71 +157.56, 0.00, 102.58 +158.28, 0.00, 102.44 +159.00, 0.00, 102.33 +159.71, 0.00, 102.09 +160.42, 0.00, 102.05 +161.14, 0.00, 101.82 +161.86, 0.00, 101.78 +162.57, 0.00, 101.64 +163.28, 0.00, 101.42 +163.99, 0.00, 101.19 +164.70, 0.00, 101.02 +165.42, 0.00, 100.97 +166.15, 0.00, 100.72 +166.87, 0.00, 100.54 +167.60, 0.00, 100.22 +168.32, 0.00, 100.08 +``` +Overshot (BangON) = 43 + +Default Model: Kp = 193.1, Ki = 5.4, Kd = 1351.1 +Result = 10-20 Overshot at temps > 60°C + +Adapted Model with: + +- Reduced gain with less overshot + +Kp = 32, Ki = 0.2, Kd = 283 + +Adapter Model with Kd < 1000: + +Kp = 121, Ki = 2.6, Kd = 930 + + +Result = Much better, still some overshot around 10°C, but slighly slow + +### Sample 2, 2022-11-18 + +- Process Input = SSR state +- Target Temp = 100 °C +- Settle Temp = Target Temp +- PWM Window = max / 5 + +Process Data: +``` +216.50, 0, 26.86 +216.75, 0, 26.88 +217.00, 0, 26.96 +217.34, 0, 26.97 +217.66, 0, 26.99 +217.97, 0, 26.99 +218.22, 0, 26.94 +218.48, 0, 26.95 +218.73, 0, 26.91 +218.98, 0, 26.88 +219.31, 0, 26.90 +219.62, 0, 26.99 +219.87, 0, 26.99 +220.12, 0, 26.99 +220.45, 0, 26.99 +220.70, 0, 26.94 +220.95, 0, 26.95 +221.27, 0, 27.01 +221.58, 1, 27.06 +221.83, 1, 27.01 +222.08, 1, 27.01 +222.33, 1, 26.96 +222.65, 0, 26.96 +222.90, 0, 26.97 +223.15, 0, 27.07 +223.48, 0, 27.11 +223.79, 0, 27.14 +224.04, 0, 27.08 +224.29, 0, 27.01 +224.62, 0, 26.96 +224.87, 0, 27.02 +225.12, 0, 27.01 +225.37, 0, 27.19 +225.66, 0, 27.25 +225.98, 0, 27.30 +226.23, 0, 27.34 +226.48, 0, 27.40 +226.83, 1, 27.47 +227.08, 1, 27.37 +227.33, 1, 27.50 +227.67, 0, 27.63 +227.99, 0, 27.65 +228.24, 0, 27.64 +228.49, 0, 27.76 +228.82, 0, 27.76 +229.07, 0, 27.81 +229.32, 0, 27.90 +229.66, 0, 28.06 +229.97, 0, 28.10 +230.22, 0, 28.29 +230.47, 0, 28.34 +230.82, 0, 28.47 +231.07, 0, 28.57 +231.32, 0, 28.66 +231.66, 1, 28.92 +231.91, 1, 29.04 +232.19, 1, 29.18 +232.44, 1, 29.21 +232.72, 0, 29.21 +233.04, 0, 29.37 +233.29, 0, 29.50 +233.54, 0, 29.77 +233.87, 0, 29.81 +234.12, 0, 29.90 +234.40, 0, 30.02 +234.71, 0, 30.29 +235.03, 0, 30.43 +235.28, 0, 30.55 +235.53, 0, 30.80 +235.88, 0, 30.84 +236.13, 0, 30.92 +236.38, 0, 31.04 +236.72, 1, 31.35 +237.04, 1, 31.58 +237.29, 1, 31.96 +237.54, 0, 32.07 +237.88, 0, 32.21 +238.13, 0, 32.37 +238.38, 0, 32.65 +238.72, 0, 32.87 +238.97, 0, 33.00 +239.24, 0, 33.25 +239.49, 0, 33.53 +239.74, 0, 33.72 +240.08, 0, 33.93 +240.33, 0, 34.14 +240.58, 0, 34.36 +240.91, 0, 34.77 +241.23, 0, 34.87 +241.48, 0, 35.15 +241.73, 1, 35.27 +242.07, 1, 35.41 +242.32, 1, 35.68 +242.61, 0, 36.07 +242.93, 0, 36.15 +243.18, 0, 36.42 +243.43, 0, 36.64 +243.78, 0, 37.23 +244.09, 0, 37.38 +244.34, 0, 37.88 +244.61, 0, 38.06 +244.93, 0, 38.20 +245.18, 0, 38.51 +245.43, 0, 38.76 +245.78, 0, 39.29 +246.03, 0, 39.43 +246.30, 0, 39.75 +246.63, 1, 40.20 +246.95, 1, 40.46 +247.20, 1, 40.77 +247.45, 1, 41.27 +247.81, 0, 41.57 +248.06, 0, 41.75 +248.31, 0, 42.05 +248.64, 0, 42.52 +248.95, 0, 42.82 +249.20, 0, 43.38 +249.45, 0, 43.71 +249.80, 0, 44.02 +250.05, 0, 44.31 +250.30, 0, 44.88 +250.64, 0, 45.15 +250.89, 0, 45.42 +251.16, 0, 45.69 +251.41, 0, 46.27 +251.70, 1, 46.52 +252.03, 1, 46.86 +252.28, 1, 47.09 +252.53, 0, 47.75 +252.87, 0, 48.05 +253.12, 0, 48.39 +253.37, 0, 48.66 +253.72, 0, 49.23 +254.03, 0, 49.54 +254.28, 0, 50.06 +254.53, 0, 50.40 +254.87, 0, 50.67 +255.12, 0, 50.99 +255.37, 0, 51.34 +255.71, 0, 51.93 +256.02, 0, 52.29 +256.27, 0, 53.05 +256.52, 1, 53.39 +256.86, 1, 53.66 +257.11, 1, 53.93 +257.36, 1, 54.68 +257.61, 0, 54.95 +257.94, 0, 55.31 +258.19, 0, 55.70 +258.44, 0, 56.06 +258.69, 0, 56.40 +258.94, 0, 57.03 +259.19, 0, 57.33 +259.51, 0, 57.76 +259.76, 0, 58.16 +260.01, 0, 58.53 +260.36, 0, 59.21 +260.68, 0, 60.03 +261.00, 0, 60.38 +261.32, 0, 60.80 +261.64, 1, 61.60 +261.96, 1, 61.98 +262.21, 1, 62.76 +262.46, 1, 63.01 +262.82, 0, 63.36 +263.07, 0, 63.78 +263.32, 0, 64.49 +263.66, 0, 64.79 +263.91, 0, 65.23 +264.16, 0, 65.69 +264.41, 0, 66.10 +264.71, 0, 66.84 +265.03, 0, 67.33 +265.28, 0, 67.76 +265.53, 0, 68.62 +265.87, 0, 69.09 +266.12, 0, 69.52 +266.37, 0, 69.92 +266.72, 1, 70.86 +267.04, 1, 71.24 +267.29, 1, 72.10 +267.54, 0, 72.58 +267.88, 0, 73.02 +268.13, 0, 73.46 +268.38, 0, 73.92 +268.73, 0, 74.82 +269.04, 0, 75.25 +269.29, 0, 76.29 +269.54, 0, 76.73 +269.87, 0, 77.14 +270.12, 0, 77.51 +270.37, 0, 78.06 +270.70, 0, 79.03 +271.02, 0, 79.57 +271.27, 0, 80.51 +271.52, 1, 81.00 +271.87, 1, 81.55 +272.12, 1, 82.04 +272.37, 1, 82.86 +272.63, 0, 83.39 +272.95, 0, 83.81 +273.20, 0, 84.30 +273.45, 0, 84.74 +273.80, 0, 85.73 +274.11, 0, 86.14 +274.36, 0, 87.23 +274.64, 0, 87.63 +274.96, 0, 88.16 +275.21, 0, 88.57 +275.46, 0, 89.59 +275.81, 0, 90.12 +276.06, 0, 90.65 +276.31, 0, 91.17 +276.66, 1, 92.20 +276.98, 1, 92.76 +277.23, 1, 93.75 +277.48, 1, 94.30 +277.83, 0, 94.79 +278.08, 0, 95.33 +278.33, 0, 95.82 +278.67, 0, 96.51 +278.92, 0, 96.96 +279.19, 0, 97.47 +279.44, 0, 98.56 +279.69, 0, 99.05 +280.03, 0, 99.54 +280.28, 0, 100.13 +280.53, 0, 101.18 +280.88, 0, 101.75 +281.13, 0, 102.20 +281.38, 0, 102.76 +281.64, 0, 103.75 +281.89, 0, 104.20 +282.14, 0, 104.71 +282.49, 0, 105.27 +282.74, 0, 106.26 +282.99, 0, 106.76 +283.34, 0, 107.26 +283.67, 0, 108.20 +284.00, 0, 108.66 +284.25, 0, 109.13 +284.50, 0, 109.99 +284.85, 0, 110.44 +285.10, 0, 110.76 +285.36, 0, 111.20 +285.70, 0, 112.04 +286.02, 0, 112.48 +286.27, 0, 113.10 +286.52, 0, 113.48 +286.87, 0, 113.88 +287.12, 0, 114.31 +287.37, 0, 115.01 +287.73, 0, 115.31 +287.98, 0, 115.59 +288.23, 0, 115.98 +288.48, 0, 116.62 +288.73, 0, 116.95 +288.98, 0, 117.16 +289.30, 0, 117.48 +289.63, 0, 117.90 +289.95, 0, 118.22 +290.20, 0, 118.37 +290.45, 0, 118.76 +290.70, 0, 119.01 +291.02, 0, 119.21 +291.27, 0, 119.41 +291.52, 0, 119.53 +291.77, 0, 119.73 +292.02, 0, 120.14 +292.27, 0, 120.22 +292.62, 0, 120.32 +292.87, 0, 120.51 +293.12, 0, 120.92 +293.47, 0, 121.08 +293.72, 0, 121.22 +293.97, 0, 121.32 +294.22, 0, 121.56 +294.47, 0, 121.60 +294.72, 0, 121.73 +295.04, 0, 121.88 +295.29, 0, 122.05 +295.54, 0, 122.14 +295.88, 0, 122.26 +296.13, 0, 122.36 +296.38, 0, 122.39 +296.74, 0, 122.61 +297.05, 0, 122.69 +297.30, 0, 122.75 +297.55, 0, 122.75 +297.90, 0, 122.85 +298.15, 0, 122.78 +298.40, 0, 122.95 +298.76, 0, 123.01 +299.01, 0, 123.16 +299.26, 0, 123.18 +299.51, 0, 123.25 +299.76, 0, 123.25 +300.01, 0, 123.30 +300.34, 0, 123.29 +300.67, 0, 123.32 +301.00, 0, 123.35 +301.25, 0, 123.38 +301.50, 0, 123.46 +301.85, 0, 123.47 +302.10, 0, 123.33 +302.35, 0, 123.41 +302.70, 0, 123.35 +302.95, 0, 123.33 +303.23, 0, 123.37 +303.48, 0, 123.32 +303.73, 0, 123.31 +304.07, 0, 123.25 +304.32, 0, 123.25 +304.57, 0, 123.16 +304.92, 0, 123.13 +305.17, 0, 123.10 +305.42, 0, 123.03 +305.67, 0, 122.88 +305.92, 0, 122.80 +306.17, 0, 122.74 +306.52, 0, 122.69 +306.77, 0, 122.66 +307.02, 0, 122.56 +307.38, 0, 122.60 +307.70, 0, 122.55 +308.03, 0, 122.49 +308.28, 0, 122.49 +308.53, 0, 122.44 +308.88, 0, 122.37 +309.19, 0, 122.40 +309.44, 0, 122.27 +309.69, 0, 122.21 +310.04, 0, 122.17 +310.29, 0, 122.09 +310.54, 0, 122.06 +310.88, 0, 122.04 +311.13, 0, 121.99 +311.38, 0, 121.94 +311.74, 0, 121.82 +312.05, 0, 121.66 +312.30, 0, 121.55 +312.55, 0, 121.59 +312.89, 0, 121.57 +313.14, 0, 121.56 +313.39, 0, 121.23 +313.75, 0, 121.23 +314.00, 0, 121.04 +314.25, 0, 120.98 +314.50, 0, 120.81 +314.75, 0, 120.74 +315.00, 0, 120.75 +315.33, 0, 120.75 +315.66, 0, 120.62 +315.98, 0, 120.54 +316.23, 0, 120.49 +316.48, 0, 120.31 +316.83, 0, 120.30 +317.08, 0, 120.19 +317.33, 0, 120.10 +317.68, 0, 120.01 +318.01, 0, 119.91 +318.26, 0, 119.71 +318.51, 0, 119.52 +318.86, 0, 119.47 +319.11, 0, 119.37 +319.36, 0, 119.34 +319.70, 0, 119.12 +319.95, 0, 119.10 +320.20, 0, 119.08 +320.45, 0, 118.97 +320.70, 0, 118.93 +320.95, 0, 118.94 +321.29, 0, 118.80 +321.61, 0, 118.62 +321.94, 0, 118.55 +322.19, 0, 118.44 +322.44, 0, 118.37 +322.69, 0, 118.35 +323.02, 0, 118.28 +323.27, 0, 118.27 +323.52, 0, 118.12 +323.77, 0, 117.91 +324.02, 0, 117.82 +324.27, 0, 117.76 +324.59, 0, 117.76 +324.84, 0, 117.71 +325.09, 0, 117.64 +325.44, 0, 117.56 +325.69, 0, 117.40 +325.94, 0, 117.42 +326.29, 0, 117.40 +326.60, 0, 117.37 +326.85, 0, 117.23 +327.10, 0, 117.18 +327.45, 0, 117.04 +327.70, 0, 116.99 +327.95, 0, 116.71 +328.30, 0, 116.67 +328.62, 0, 116.39 +328.95, 0, 116.31 +329.26, 0, 116.20 +329.51, 0, 116.04 +329.76, 0, 115.98 +330.10, 0, 115.93 +330.35, 0, 115.85 +330.63, 0, 115.63 +330.96, 0, 115.56 +331.21, 0, 115.44 +331.46, 0, 115.41 +331.81, 0, 115.11 +332.06, 0, 115.14 +332.33, 0, 115.06 +332.66, 0, 115.04 +332.98, 0, 114.98 +333.23, 0, 114.90 +333.48, 0, 114.87 +333.83, 0, 114.74 +334.08, 0, 114.65 +334.33, 0, 114.54 +334.68, 0, 114.43 +334.93, 0, 114.35 +335.18, 0, 114.33 +335.43, 0, 114.12 +335.68, 0, 114.05 +335.93, 0, 113.99 +336.27, 0, 113.84 +336.52, 0, 113.72 +336.77, 0, 113.64 +337.11, 0, 113.61 +337.36, 0, 113.59 +337.65, 0, 113.37 +337.97, 0, 113.34 +338.28, 0, 113.33 +338.53, 0, 113.25 +338.78, 0, 113.15 +339.13, 0, 113.17 +339.38, 0, 113.19 +339.66, 0, 112.99 +339.99, 0, 112.89 +340.24, 0, 112.76 +340.49, 0, 112.66 +340.74, 0, 112.50 +340.99, 0, 112.45 +341.24, 0, 112.41 +341.56, 0, 112.18 +341.81, 0, 111.99 +342.06, 0, 111.96 +342.42, 0, 111.81 +342.67, 0, 111.80 +342.92, 0, 111.64 +343.26, 0, 111.53 +343.57, 0, 111.47 +343.82, 0, 111.30 +344.07, 0, 111.19 +344.42, 0, 111.15 +344.67, 0, 111.07 +344.92, 0, 110.96 +345.26, 0, 110.87 +345.51, 0, 110.69 +345.80, 0, 110.65 +346.05, 0, 110.46 +346.30, 0, 110.37 +346.64, 0, 110.29 +346.89, 0, 110.18 +347.14, 0, 109.98 +347.50, 0, 109.78 +347.75, 0, 109.73 +348.00, 0, 109.63 +348.35, 0, 109.32 +348.68, 0, 109.21 +349.01, 0, 109.12 +349.26, 0, 109.04 +349.54, 0, 108.93 +349.79, 0, 108.73 +350.04, 0, 108.58 +350.29, 0, 108.52 +350.63, 0, 108.41 +350.88, 0, 108.30 +351.13, 0, 108.24 +351.48, 0, 108.14 +351.73, 0, 108.12 +351.98, 0, 107.92 +352.33, 0, 107.89 +352.66, 0, 107.76 +352.98, 0, 107.76 +353.23, 0, 107.76 +353.51, 0, 107.70 +353.76, 0, 107.59 +354.01, 0, 107.47 +354.26, 0, 107.43 +354.59, 0, 107.34 +354.84, 0, 107.37 +355.09, 0, 107.15 +355.34, 0, 107.17 +355.66, 0, 107.14 +355.91, 0, 107.11 +356.16, 0, 106.99 +356.51, 0, 106.90 +356.76, 0, 106.82 +357.01, 0, 106.76 +357.26, 0, 106.56 +357.51, 0, 106.49 +357.76, 0, 106.49 +358.01, 0, 106.34 +358.34, 0, 106.32 +358.67, 0, 106.12 +358.99, 0, 106.09 +359.24, 0, 106.02 +359.49, 0, 105.88 +359.85, 0, 105.80 +360.10, 0, 105.69 +360.35, 0, 105.60 +360.71, 0, 105.48 +360.96, 0, 105.43 +361.21, 0, 105.39 +361.46, 0, 105.32 +361.71, 0, 105.24 +361.96, 0, 105.09 +362.30, 0, 105.07 +362.63, 0, 105.00 +362.96, 0, 104.95 +363.21, 0, 104.96 +363.46, 0, 104.79 +363.72, 0, 104.73 +364.05, 0, 104.64 +364.30, 0, 104.56 +364.55, 0, 104.55 +364.90, 0, 104.39 +365.15, 0, 104.26 +365.40, 0, 104.26 +365.66, 0, 104.07 +365.91, 0, 104.00 +366.16, 0, 103.90 +366.52, 0, 103.87 +366.77, 0, 103.83 +367.02, 0, 103.81 +367.27, 0, 103.80 +367.60, 0, 103.74 +367.85, 0, 103.64 +368.10, 0, 103.37 +368.35, 0, 103.40 +368.69, 0, 103.42 +368.94, 0, 103.33 +369.19, 0, 103.32 +369.54, 0, 103.15 +369.79, 0, 103.07 +370.04, 0, 103.01 +370.29, 0, 103.06 +370.62, 0, 103.04 +370.95, 0, 103.03 +371.20, 0, 102.84 +371.45, 0, 102.77 +371.70, 0, 102.72 +372.03, 0, 102.52 +372.28, 0, 102.52 +372.53, 0, 102.32 +372.88, 0, 102.36 +373.13, 0, 102.24 +373.38, 0, 102.09 +373.74, 0, 102.06 +373.99, 0, 102.05 +374.24, 0, 101.99 +374.49, 0, 101.94 +374.74, 0, 101.77 +374.99, 0, 101.72 +375.33, 0, 101.62 +375.66, 0, 101.44 +375.98, 0, 101.35 +376.23, 0, 101.33 +376.48, 0, 101.21 +376.83, 0, 101.14 +377.08, 0, 101.06 +377.35, 0, 101.05 +377.68, 0, 100.80 +378.01, 0, 100.79 +378.26, 0, 100.74 +378.51, 0, 100.74 +378.87, 0, 100.54 +379.12, 0, 100.48 +379.37, 0, 100.34 +379.62, 0, 100.22 +379.95, 0, 100.18 +380.20, 0, 100.19 +``` +Overshot (BangON) = 23 + +PID Tuner result = useless + +### Sample 3, 2022-11-18 + +- Process Input = SSR state +- Target Temp = 100 °C +- Settle Temp = Target Temp +- PWM Window = max + +Process Data: +``` +12.00, 0, 40.41 +12.50, 0, 40.38 +13.00, 0, 40.49 +13.56, 0, 40.39 +14.06, 0, 40.43 +14.61, 0, 40.22 +15.13, 0, 40.23 +15.65, 0, 40.22 +16.17, 0, 40.14 +16.69, 0, 40.14 +17.21, 1, 40.11 +17.77, 1, 40.04 +18.27, 1, 39.92 +18.84, 1, 39.88 +19.34, 1, 39.94 +19.84, 1, 40.04 +20.45, 1, 40.16 +20.95, 1, 40.22 +21.52, 1, 40.46 +22.02, 1, 40.99 +22.60, 1, 41.36 +23.10, 1, 41.87 +23.67, 1, 42.86 +24.21, 1, 43.82 +24.71, 1, 45.21 +25.28, 1, 46.32 +25.78, 1, 48.04 +26.35, 1, 49.30 +26.85, 1, 50.87 +27.43, 1, 53.20 +27.97, 1, 54.82 +28.47, 1, 57.24 +29.04, 1, 58.92 +29.54, 1, 61.72 +30.10, 1, 63.65 +30.64, 1, 66.65 +31.14, 1, 68.56 +31.71, 1, 70.58 +32.21, 1, 73.56 +32.79, 1, 75.50 +33.29, 1, 78.42 +33.85, 1, 80.46 +34.35, 1, 82.46 +34.85, 1, 85.55 +35.46, 1, 87.48 +35.96, 1, 90.37 +36.53, 1, 92.38 +37.03, 1, 95.44 +37.62, 1, 97.28 +38.12, 1, 99.18 +38.68, 0, 102.03 +39.22, 0, 103.84 +39.72, 0, 106.53 +40.29, 0, 108.25 +40.79, 0, 110.93 +41.36, 0, 112.72 +41.86, 0, 114.23 +42.36, 0, 116.73 +42.96, 0, 118.29 +43.46, 0, 120.47 +44.03, 0, 121.84 +44.53, 0, 123.35 +45.03, 0, 125.17 +45.62, 0, 126.43 +46.12, 0, 128.14 +46.68, 0, 129.22 +47.18, 0, 130.22 +47.76, 0, 131.65 +48.28, 0, 132.54 +48.78, 0, 133.55 +49.35, 0, 134.17 +49.85, 0, 135.25 +50.43, 0, 135.74 +50.93, 0, 136.33 +51.49, 0, 136.98 +52.02, 0, 137.49 +52.52, 0, 138.09 +53.09, 0, 138.40 +53.63, 0, 138.85 +54.17, 0, 139.12 +54.72, 0, 139.64 +55.26, 0, 139.87 +55.76, 0, 140.10 +56.26, 0, 140.24 +56.85, 0, 140.51 +57.35, 0, 140.49 +57.92, 0, 140.61 +58.42, 0, 140.70 +59.01, 0, 140.91 +59.51, 0, 140.97 +60.01, 0, 141.06 +60.60, 0, 140.86 +61.10, 0, 141.15 +61.67, 0, 141.32 +62.17, 0, 141.39 +62.75, 0, 141.36 +63.27, 0, 141.33 +63.77, 0, 141.45 +64.33, 0, 141.43 +64.83, 0, 141.36 +65.40, 0, 141.36 +65.90, 0, 141.29 +66.40, 0, 141.15 +67.00, 0, 141.09 +67.50, 0, 141.00 +68.06, 0, 140.87 +68.56, 0, 140.73 +69.06, 0, 140.54 +69.66, 0, 140.47 +70.16, 0, 140.32 +70.74, 0, 140.21 +71.24, 0, 140.07 +71.82, 0, 139.92 +72.32, 0, 139.68 +72.82, 0, 139.44 +73.41, 0, 139.29 +73.91, 0, 139.00 +74.48, 0, 138.87 +74.98, 0, 138.65 +75.55, 0, 138.42 +76.05, 0, 138.19 +76.63, 0, 138.01 +77.17, 0, 137.95 +77.71, 0, 137.68 +78.24, 0, 137.43 +78.74, 0, 137.32 +79.24, 0, 136.89 +79.84, 0, 136.65 +80.34, 0, 136.49 +80.91, 0, 136.31 +81.41, 0, 135.96 +81.99, 0, 135.70 +82.49, 0, 135.41 +82.99, 0, 135.11 +83.58, 0, 134.89 +84.08, 0, 134.65 +84.67, 0, 134.60 +85.17, 0, 134.40 +85.75, 0, 134.25 +86.25, 0, 133.97 +86.75, 0, 133.68 +87.34, 0, 133.53 +87.84, 0, 133.34 +88.42, 0, 133.09 +88.92, 0, 132.81 +89.48, 0, 132.74 +89.98, 0, 132.32 +90.48, 0, 132.08 +91.07, 0, 131.96 +91.57, 0, 131.78 +92.13, 0, 131.59 +92.66, 0, 131.19 +93.16, 0, 131.03 +93.74, 0, 130.88 +94.24, 0, 130.47 +94.82, 0, 130.20 +95.32, 0, 129.82 +95.88, 0, 129.52 +96.38, 0, 129.47 +96.88, 0, 129.17 +97.47, 0, 129.02 +97.97, 0, 128.66 +98.54, 0, 128.55 +99.04, 0, 128.44 +99.62, 0, 128.23 +100.16, 0, 127.93 +100.69, 0, 127.66 +101.23, 0, 127.51 +101.73, 0, 127.16 +102.29, 0, 127.10 +102.82, 0, 126.94 +103.32, 0, 126.80 +103.89, 0, 126.64 +104.39, 0, 126.45 +104.96, 0, 126.23 +105.46, 0, 126.05 +106.04, 0, 125.99 +106.57, 0, 125.67 +107.07, 0, 125.40 +107.65, 0, 125.30 +108.15, 0, 124.88 +108.73, 0, 124.78 +109.23, 0, 124.59 +109.81, 0, 124.31 +110.33, 0, 124.19 +110.83, 0, 123.87 +111.41, 0, 123.74 +111.91, 0, 123.51 +112.48, 0, 123.24 +112.98, 0, 123.03 +113.48, 0, 122.72 +114.06, 0, 122.59 +114.56, 0, 122.35 +115.12, 0, 122.10 +115.65, 0, 121.81 +116.15, 0, 121.57 +116.72, 0, 121.30 +117.22, 0, 121.05 +117.79, 0, 120.85 +118.29, 0, 120.57 +118.86, 0, 120.36 +119.36, 0, 120.27 +119.86, 0, 120.21 +120.46, 0, 120.05 +120.96, 0, 119.64 +121.52, 0, 119.41 +122.02, 0, 119.43 +122.52, 0, 119.10 +123.12, 0, 118.93 +123.66, 0, 118.84 +124.19, 0, 118.71 +124.69, 0, 118.51 +125.25, 0, 118.31 +125.79, 0, 118.20 +126.29, 0, 117.92 +126.84, 0, 117.86 +127.34, 0, 117.69 +127.84, 0, 117.51 +128.42, 0, 117.24 +128.92, 0, 116.90 +129.48, 0, 116.65 +129.98, 0, 116.54 +130.48, 0, 116.34 +131.05, 0, 116.22 +131.55, 0, 116.09 +132.11, 0, 116.06 +132.63, 0, 115.91 +133.13, 0, 115.61 +133.69, 0, 115.52 +134.19, 0, 115.35 +134.77, 0, 115.21 +135.27, 0, 115.09 +135.77, 0, 114.52 +136.36, 0, 114.43 +136.86, 0, 114.24 +137.43, 0, 114.12 +137.93, 0, 113.97 +138.43, 0, 113.75 +139.02, 0, 113.58 +139.52, 0, 113.35 +140.08, 0, 113.32 +140.61, 0, 113.02 +141.11, 0, 112.88 +141.67, 0, 112.71 +142.17, 0, 112.52 +142.74, 0, 112.38 +143.24, 0, 112.25 +143.80, 0, 111.95 +144.32, 0, 111.75 +144.82, 0, 111.59 +145.38, 0, 111.42 +145.88, 0, 111.36 +146.38, 0, 111.11 +146.97, 0, 110.88 +147.47, 0, 110.65 +148.04, 0, 110.55 +148.54, 0, 110.39 +149.10, 0, 110.08 +149.63, 0, 109.87 +150.13, 0, 109.56 +150.69, 0, 109.40 +151.19, 0, 109.23 +151.77, 0, 109.09 +152.27, 0, 108.93 +152.85, 0, 108.71 +153.37, 0, 108.64 +153.87, 0, 108.51 +154.46, 0, 108.33 +154.96, 0, 108.09 +155.53, 0, 107.94 +156.03, 0, 107.92 +156.61, 0, 107.62 +157.11, 0, 107.48 +157.68, 0, 107.33 +158.22, 0, 107.11 +158.72, 0, 107.02 +159.29, 0, 106.93 +159.79, 0, 106.73 +160.37, 0, 106.42 +160.87, 0, 106.23 +161.37, 0, 106.10 +161.87, 0, 106.02 +162.42, 0, 105.84 +162.92, 0, 105.72 +163.48, 0, 105.47 +163.98, 0, 105.30 +164.55, 0, 105.14 +165.09, 0, 104.86 +165.64, 0, 104.67 +166.18, 0, 104.61 +166.72, 0, 104.47 +167.27, 0, 104.35 +167.77, 0, 104.23 +168.33, 0, 104.11 +168.83, 0, 103.93 +169.33, 0, 103.72 +169.83, 0, 103.67 +170.39, 0, 103.57 +170.89, 0, 103.41 +171.47, 0, 103.35 +171.97, 0, 103.31 +172.53, 0, 103.07 +173.08, 0, 103.00 +173.62, 0, 102.78 +174.15, 0, 102.68 +174.69, 0, 102.44 +175.24, 0, 102.37 +175.74, 0, 102.16 +176.30, 0, 101.97 +176.80, 0, 101.75 +177.30, 0, 101.55 +177.90, 0, 101.38 +178.40, 0, 101.05 +178.97, 0, 101.03 +179.47, 0, 100.97 +180.06, 0, 100.83 +180.56, 0, 100.70 +181.06, 0, 100.43 +181.66, 0, 100.38 +182.16, 0, 100.31 +182.75, 0, 100.28 +183.25, 0, 100.08 +``` +Overshot (BangON) = 41 + +PID Tuner result = useless + +### Sample 4, 2022-11-19 + +- Process Input = PID max. output +- Target Temp = 100 °C +- Settle Temp = Target Temp + +Process Data: +``` +73.09, 0.00, 24.36 +73.62, 0.00, 24.41 +74.13, 0.00, 24.34 +74.65, 0.00, 24.46 +75.17, 0.00, 24.51 +75.69, 0.00, 24.55 +76.19, 0.00, 24.66 +76.73, 0.00, 24.61 +77.23, 0.00, 24.58 +77.73, 0.00, 24.53 +78.28, 5000.00, 24.53 +78.78, 5000.00, 24.61 +79.28, 5000.00, 24.71 +79.86, 5000.00, 24.76 +80.36, 5000.00, 24.91 +80.94, 5000.00, 24.85 +81.44, 5000.00, 24.87 +82.02, 5000.00, 25.01 +82.52, 5000.00, 25.24 +83.02, 5000.00, 25.63 +83.63, 5000.00, 25.95 +84.13, 5000.00, 26.73 +84.69, 5000.00, 27.24 +85.19, 5000.00, 27.96 +85.76, 5000.00, 29.29 +86.29, 5000.00, 30.27 +86.79, 5000.00, 31.93 +87.36, 5000.00, 33.19 +87.86, 5000.00, 35.22 +88.44, 5000.00, 36.68 +88.94, 5000.00, 38.21 +89.51, 5000.00, 40.70 +90.05, 5000.00, 42.32 +90.55, 5000.00, 44.99 +91.12, 5000.00, 46.80 +91.66, 5000.00, 49.57 +92.20, 5000.00, 51.48 +92.70, 5000.00, 53.48 +93.27, 5000.00, 56.46 +93.81, 5000.00, 58.47 +94.31, 5000.00, 61.54 +94.88, 5000.00, 63.65 +95.38, 5000.00, 66.83 +95.96, 5000.00, 68.94 +96.46, 5000.00, 71.00 +97.04, 5000.00, 74.06 +97.54, 5000.00, 76.22 +98.04, 5000.00, 79.27 +98.63, 5000.00, 81.27 +99.13, 5000.00, 84.38 +99.70, 5000.00, 86.37 +100.20, 5000.00, 88.41 +100.78, 5000.00, 91.30 +101.31, 5000.00, 93.36 +101.81, 5000.00, 96.18 +102.39, 5000.00, 98.00 +102.89, 0.00, 100.84 +103.47, 0.00, 102.63 +103.97, 0.00, 104.44 +104.54, 0.00, 107.10 +105.04, 0.00, 108.93 +105.62, 0.00, 111.55 +106.15, 0.00, 113.12 +106.69, 0.00, 115.56 +107.22, 0.00, 117.22 +107.72, 0.00, 118.77 +108.28, 0.00, 121.03 +108.82, 0.00, 122.53 +109.32, 0.00, 124.52 +109.88, 0.00, 125.83 +110.38, 0.00, 127.55 +110.96, 0.00, 128.81 +111.46, 0.00, 129.92 +111.96, 0.00, 131.67 +112.56, 0.00, 132.66 +113.06, 0.00, 134.16 +113.64, 0.00, 135.10 +114.14, 0.00, 135.93 +114.71, 0.00, 137.03 +115.23, 0.00, 137.67 +115.73, 0.00, 138.46 +116.29, 0.00, 139.02 +116.79, 0.00, 139.84 +117.37, 0.00, 140.26 +117.87, 0.00, 140.71 +118.45, 0.00, 141.31 +118.98, 0.00, 141.66 +119.48, 0.00, 142.16 +120.04, 0.00, 142.46 +120.54, 0.00, 142.90 +121.11, 0.00, 142.97 +121.65, 0.00, 143.37 +122.19, 0.00, 143.42 +122.73, 0.00, 143.53 +123.23, 0.00, 143.57 +123.82, 0.00, 143.55 +124.32, 0.00, 143.69 +124.89, 0.00, 143.84 +125.39, 0.00, 143.84 +125.97, 0.00, 143.90 +126.47, 0.00, 143.75 +127.04, 0.00, 143.75 +127.57, 0.00, 143.75 +128.07, 0.00, 143.72 +128.65, 0.00, 143.73 +129.15, 0.00, 143.50 +129.74, 0.00, 143.46 +130.24, 0.00, 143.43 +130.82, 0.00, 143.29 +131.32, 0.00, 143.18 +131.82, 0.00, 143.00 +132.41, 0.00, 142.86 +132.91, 0.00, 142.52 +133.48, 0.00, 142.42 +133.98, 0.00, 142.12 +134.54, 0.00, 142.07 +135.04, 0.00, 142.01 +135.62, 0.00, 141.76 +136.16, 0.00, 141.54 +136.69, 0.00, 141.26 +137.23, 0.00, 141.06 +137.73, 0.00, 140.90 +138.30, 0.00, 140.66 +138.80, 0.00, 140.51 +139.30, 0.00, 140.17 +139.91, 0.00, 140.06 +140.41, 0.00, 139.86 +141.00, 0.00, 139.68 +141.50, 0.00, 139.28 +142.07, 0.00, 138.99 +142.57, 0.00, 138.94 +143.07, 0.00, 138.46 +143.66, 0.00, 138.25 +144.16, 0.00, 138.02 +144.74, 0.00, 137.75 +145.24, 0.00, 137.47 +145.81, 0.00, 137.30 +146.31, 0.00, 137.14 +146.81, 0.00, 136.81 +147.42, 0.00, 136.56 +147.92, 0.00, 136.40 +148.49, 0.00, 136.17 +148.99, 0.00, 135.91 +149.55, 0.00, 135.71 +150.05, 0.00, 135.56 +150.64, 0.00, 135.42 +151.18, 0.00, 135.18 +151.72, 0.00, 135.09 +152.26, 0.00, 134.93 +152.76, 0.00, 134.67 +153.33, 0.00, 134.51 +153.83, 0.00, 134.33 +154.40, 0.00, 134.08 +154.95, 0.00, 133.87 +155.45, 0.00, 133.61 +156.02, 0.00, 133.30 +156.52, 0.00, 132.97 +157.08, 0.00, 132.71 +157.62, 0.00, 132.48 +158.12, 0.00, 132.08 +158.68, 0.00, 131.95 +159.18, 0.00, 131.66 +159.75, 0.00, 131.51 +160.25, 0.00, 131.09 +160.82, 0.00, 130.98 +161.32, 0.00, 130.90 +161.82, 0.00, 130.46 +162.43, 0.00, 130.33 +162.93, 0.00, 129.83 +163.50, 0.00, 129.67 +164.00, 0.00, 129.61 +164.58, 0.00, 129.38 +165.08, 0.00, 129.23 +165.66, 0.00, 128.96 +166.20, 0.00, 128.79 +166.70, 0.00, 128.38 +167.27, 0.00, 128.29 +167.77, 0.00, 128.15 +168.33, 0.00, 127.73 +168.85, 0.00, 127.65 +169.35, 0.00, 127.40 +169.91, 0.00, 127.21 +170.41, 0.00, 126.99 +170.99, 0.00, 126.78 +171.49, 0.00, 126.59 +171.99, 0.00, 126.32 +172.57, 0.00, 125.94 +173.07, 0.00, 125.66 +173.65, 0.00, 125.51 +174.15, 0.00, 125.29 +174.71, 0.00, 125.06 +175.25, 0.00, 124.90 +175.75, 0.00, 124.71 +176.31, 0.00, 124.50 +176.81, 0.00, 124.16 +177.39, 0.00, 124.01 +177.89, 0.00, 123.83 +178.47, 0.00, 123.60 +179.00, 0.00, 123.43 +179.50, 0.00, 123.27 +180.07, 0.00, 123.00 +180.57, 0.00, 122.79 +181.13, 0.00, 122.68 +181.66, 0.00, 122.48 +182.16, 0.00, 122.31 +182.74, 0.00, 121.96 +183.24, 0.00, 121.77 +183.80, 0.00, 121.59 +184.30, 0.00, 121.47 +184.80, 0.00, 121.36 +185.38, 0.00, 121.14 +185.88, 0.00, 120.93 +186.46, 0.00, 120.73 +186.96, 0.00, 120.47 +187.52, 0.00, 120.09 +188.06, 0.00, 119.87 +188.56, 0.00, 119.52 +189.12, 0.00, 119.39 +189.66, 0.00, 118.99 +190.19, 0.00, 118.95 +190.69, 0.00, 118.83 +191.19, 0.00, 118.58 +191.79, 0.00, 118.41 +192.29, 0.00, 118.04 +192.85, 0.00, 117.88 +193.35, 0.00, 117.79 +193.85, 0.00, 117.42 +194.44, 0.00, 117.19 +194.94, 0.00, 116.89 +195.49, 0.00, 116.69 +195.99, 0.00, 116.47 +196.49, 0.00, 116.22 +197.06, 0.00, 115.96 +197.56, 0.00, 115.70 +198.12, 0.00, 115.62 +198.65, 0.00, 115.53 +199.15, 0.00, 115.43 +199.70, 0.00, 115.27 +200.20, 0.00, 115.00 +200.78, 0.00, 114.83 +201.28, 0.00, 114.66 +201.78, 0.00, 114.48 +202.37, 0.00, 114.31 +202.87, 0.00, 113.86 +203.45, 0.00, 113.76 +203.95, 0.00, 113.63 +204.50, 0.00, 113.58 +205.04, 0.00, 113.36 +205.54, 0.00, 113.23 +206.09, 0.00, 113.06 +206.63, 0.00, 112.87 +207.16, 0.00, 112.78 +207.69, 0.00, 112.60 +208.19, 0.00, 112.26 +208.75, 0.00, 112.25 +209.25, 0.00, 112.13 +209.82, 0.00, 111.90 +210.33, 0.00, 111.75 +210.83, 0.00, 111.60 +211.39, 0.00, 111.47 +211.89, 0.00, 111.48 +212.39, 0.00, 111.40 +212.98, 0.00, 111.25 +213.48, 0.00, 110.97 +214.04, 0.00, 110.68 +214.54, 0.00, 110.72 +215.04, 0.00, 110.68 +215.62, 0.00, 110.62 +216.12, 0.00, 110.33 +216.68, 0.00, 110.21 +217.18, 0.00, 110.08 +217.68, 0.00, 109.79 +218.27, 0.00, 109.63 +218.77, 0.00, 109.52 +219.34, 0.00, 109.42 +219.84, 0.00, 109.35 +220.42, 0.00, 109.13 +220.92, 0.00, 108.91 +221.42, 0.00, 108.53 +221.92, 0.00, 108.47 +222.47, 0.00, 108.21 +222.97, 0.00, 107.94 +223.54, 0.00, 107.91 +224.04, 0.00, 107.69 +224.62, 0.00, 107.53 +225.12, 0.00, 107.43 +225.68, 0.00, 107.31 +226.22, 0.00, 107.15 +226.72, 0.00, 106.91 +227.29, 0.00, 106.77 +227.79, 0.00, 106.61 +228.38, 0.00, 106.51 +228.88, 0.00, 106.42 +229.47, 0.00, 106.11 +230.00, 0.00, 105.97 +230.50, 0.00, 105.77 +231.07, 0.00, 105.64 +231.57, 0.00, 105.32 +232.13, 0.00, 105.25 +232.67, 0.00, 105.12 +233.22, 0.00, 104.81 +233.72, 0.00, 104.74 +234.22, 0.00, 104.61 +234.72, 0.00, 104.52 +235.26, 0.00, 104.43 +235.76, 0.00, 104.25 +236.33, 0.00, 104.21 +236.83, 0.00, 103.96 +237.41, 0.00, 103.82 +237.91, 0.00, 103.62 +238.49, 0.00, 103.39 +239.03, 0.00, 103.30 +239.53, 0.00, 103.19 +240.09, 0.00, 103.08 +240.63, 0.00, 102.82 +241.18, 0.00, 102.66 +241.72, 0.00, 102.43 +242.26, 0.00, 102.33 +242.76, 0.00, 102.30 +243.26, 0.00, 102.18 +243.84, 0.00, 102.12 +244.34, 0.00, 101.73 +244.90, 0.00, 101.74 +245.42, 0.00, 101.65 +245.92, 0.00, 101.29 +246.47, 0.00, 101.23 +246.97, 0.00, 101.05 +247.53, 0.00, 100.76 +248.03, 0.00, 100.61 +248.63, 0.00, 100.37 +249.17, 0.00, 100.23 +``` +Overshot (BangON) = 43 + +PID Tuner result: Kp = + +### Sample 5, 2022-11-22 + +- Process Input = PID max. output = 1000 +- Target Temp = 100 °C +- Settle Temp = max. temp - 10°C settle temp + +Process Data: +``` +544.46, 0.00, 45.18 +545.05, 0.00, 45.33 +545.55, 1000.00, 45.39 +546.05, 1000.00, 45.26 +546.64, 1000.00, 45.19 +547.14, 1000.00, 45.36 +547.74, 1000.00, 45.28 +548.24, 1000.00, 45.35 +548.84, 1000.00, 45.45 +549.34, 1000.00, 45.69 +549.92, 1000.00, 45.81 +550.42, 1000.00, 46.06 +551.02, 1000.00, 46.63 +551.52, 1000.00, 47.32 +552.03, 1000.00, 48.42 +552.53, 1000.00, 49.22 +553.11, 1000.00, 50.23 +553.62, 1000.00, 51.81 +554.20, 1000.00, 52.93 +554.72, 1000.00, 54.94 +555.29, 1000.00, 56.46 +555.79, 1000.00, 58.79 +556.38, 1000.00, 60.40 +557.01, 1000.00, 62.95 +557.51, 1000.00, 64.69 +558.02, 1000.00, 67.51 +558.52, 1000.00, 69.28 +559.11, 1000.00, 71.14 +559.71, 1000.00, 74.04 +560.21, 1000.00, 75.85 +560.80, 1000.00, 78.81 +561.30, 1000.00, 80.74 +561.82, 1000.00, 83.70 +562.32, 1000.00, 85.86 +562.90, 1000.00, 87.91 +563.40, 1000.00, 90.95 +564.00, 1000.00, 92.88 +564.50, 1000.00, 95.70 +565.09, 1000.00, 97.69 +565.59, 0.00, 100.53 +566.17, 0.00, 102.34 +566.69, 0.00, 105.15 +567.26, 0.00, 107.11 +567.78, 0.00, 108.94 +568.28, 0.00, 111.55 +568.85, 0.00, 113.25 +569.35, 0.00, 115.80 +569.96, 0.00, 117.37 +570.57, 0.00, 119.60 +571.07, 0.00, 121.01 +571.66, 0.00, 123.04 +572.24, 0.00, 124.77 +572.74, 0.00, 125.99 +573.32, 0.00, 127.22 +573.93, 0.00, 128.76 +574.43, 0.00, 129.61 +575.02, 0.00, 130.85 +575.52, 0.00, 131.78 +576.13, 0.00, 132.83 +576.69, 0.00, 133.91 +577.19, 0.00, 134.57 +577.77, 0.00, 135.32 +578.27, 0.00, 136.00 +578.84, 0.00, 136.53 +579.34, 0.00, 137.22 +579.93, 0.00, 137.54 +580.54, 0.00, 138.10 +581.09, 0.00, 138.28 +581.65, 0.00, 138.69 +582.23, 0.00, 138.90 +582.73, 0.00, 139.18 +583.31, 0.00, 139.52 +583.81, 0.00, 139.74 +584.39, 0.00, 139.80 +585.02, 0.00, 139.88 +585.52, 0.00, 140.06 +586.10, 0.00, 140.25 +586.66, 0.00, 140.46 +587.24, 0.00, 140.52 +587.74, 0.00, 140.61 +588.24, 0.00, 140.50 +588.85, 0.00, 140.59 +589.35, 0.00, 140.58 +589.93, 0.00, 140.55 +590.43, 0.00, 140.48 +591.03, 0.00, 140.39 +591.53, 0.00, 140.38 +592.12, 0.00, 140.29 +592.68, 0.00, 140.27 +593.26, 0.00, 140.03 +593.76, 0.00, 139.87 +594.34, 0.00, 139.74 +594.89, 0.00, 139.57 +595.49, 0.00, 139.46 +595.99, 0.00, 139.60 +596.58, 0.00, 139.56 +597.08, 0.00, 139.23 +597.66, 0.00, 139.19 +598.16, 0.00, 139.07 +598.75, 0.00, 138.95 +599.31, 0.00, 138.75 +599.98, 0.00, 138.44 +600.48, 0.00, 138.29 +601.07, 0.00, 138.22 +601.62, 0.00, 137.98 +602.20, 0.00, 137.84 +602.72, 0.00, 137.64 +603.29, 0.00, 137.45 +603.79, 0.00, 137.24 +604.29, 0.00, 137.01 +604.89, 0.00, 136.87 +605.39, 0.00, 136.65 +605.98, 0.00, 136.36 +606.48, 0.00, 136.20 +607.08, 0.00, 135.87 +607.58, 0.00, 135.57 +608.16, 0.00, 135.31 +608.67, 0.00, 135.20 +609.17, 0.00, 135.04 +609.77, 0.00, 134.98 +610.27, 0.00, 134.68 +610.85, 0.00, 134.52 +611.35, 0.00, 134.29 +611.94, 0.00, 134.14 +612.44, 0.00, 133.82 +613.04, 0.00, 133.52 +613.54, 0.00, 133.21 +614.04, 0.00, 132.96 +614.64, 0.00, 132.71 +615.14, 0.00, 132.56 +615.75, 0.00, 132.45 +616.25, 0.00, 132.06 +616.82, 0.00, 131.85 +617.43, 0.00, 131.59 +617.98, 0.00, 131.50 +618.48, 0.00, 131.28 +619.09, 0.00, 131.03 +619.59, 0.00, 130.84 +620.17, 0.00, 130.71 +620.69, 0.00, 130.43 +621.27, 0.00, 130.32 +621.77, 0.00, 130.17 +``` +Overshot (BangON) = 40 + +PID Tuner result: Kp = 22.8, Ki = 0.5, Kd = 113.3 + +### Sample 6, 2022-11-27 + +- Process Input = PID max. output = 10000 +- Target Temp = 100 °C +- Settle Temp = max. temp - 10°C settle temp + +Process Data: +``` +39.62, 0.00, 23.34 +40.12, 0.00, 23.40 +40.66, 0.00, 23.19 +41.23, 0.00, 23.20 +41.81, 0.00, 23.31 +42.37, 0.00, 23.40 +42.96, 0.00, 23.34 +43.46, 0.00, 23.40 +43.96, 0.00, 23.46 +44.63, 0.00, 23.48 +45.20, 0.00, 23.41 +45.72, 0.00, 23.36 +46.30, 0.00, 23.43 +46.87, 0.00, 23.46 +47.45, 0.00, 23.53 +47.95, 0.00, 23.31 +48.59, 0.00, 23.40 +49.09, 0.00, 23.13 +49.67, 10000.00, 23.22 +50.17, 10000.00, 23.18 +50.69, 10000.00, 23.25 +51.26, 10000.00, 23.21 +51.87, 10000.00, 23.15 +52.37, 10000.00, 23.23 +52.95, 10000.00, 23.45 +53.45, 10000.00, 23.48 +54.04, 10000.00, 23.59 +54.54, 10000.00, 23.68 +55.05, 10000.00, 24.22 +55.66, 10000.00, 24.73 +56.16, 10000.00, 25.60 +56.75, 10000.00, 26.03 +57.25, 10000.00, 27.31 +57.83, 10000.00, 28.29 +58.33, 10000.00, 29.38 +58.91, 10000.00, 31.15 +59.46, 10000.00, 32.46 +59.96, 10000.00, 34.45 +60.66, 10000.00, 36.77 +61.24, 10000.00, 38.37 +61.74, 10000.00, 40.83 +62.31, 10000.00, 42.57 +62.95, 10000.00, 45.29 +63.45, 10000.00, 47.04 +64.05, 10000.00, 49.90 +64.55, 10000.00, 51.66 +65.13, 10000.00, 54.64 +65.69, 10000.00, 56.68 +66.19, 10000.00, 59.84 +66.78, 10000.00, 61.90 +67.28, 10000.00, 64.84 +67.86, 10000.00, 66.99 +68.36, 10000.00, 69.03 +68.95, 10000.00, 72.00 +69.45, 10000.00, 74.04 +70.04, 10000.00, 77.28 +70.59, 10000.00, 79.41 +71.09, 10000.00, 82.43 +71.67, 10000.00, 84.44 +72.17, 10000.00, 87.47 +72.77, 10000.00, 89.35 +73.27, 10000.00, 92.38 +73.85, 10000.00, 94.33 +74.35, 10000.00, 96.21 +74.95, 10000.00, 98.91 +75.45, 0.00, 100.71 +75.97, 0.00, 103.17 +76.57, 0.00, 104.85 +77.07, 0.00, 107.25 +77.66, 0.00, 108.87 +78.16, 0.00, 111.48 +78.75, 0.00, 113.17 +79.25, 0.00, 114.84 +79.85, 0.00, 117.19 +80.35, 0.00, 119.44 +81.00, 0.00, 120.77 +81.50, 0.00, 122.80 +82.11, 0.00, 124.18 +82.61, 0.00, 126.12 +83.18, 0.00, 127.34 +83.69, 0.00, 128.98 +84.27, 0.00, 130.13 +84.78, 0.00, 131.21 +85.28, 0.00, 132.63 +85.89, 0.00, 133.45 +86.39, 0.00, 134.81 +86.98, 0.00, 135.57 +87.48, 0.00, 136.78 +88.08, 0.00, 137.45 +88.58, 0.00, 138.26 +89.16, 0.00, 138.75 +89.71, 0.00, 139.38 +90.21, 0.00, 139.64 +90.80, 0.00, 139.95 +91.30, 0.00, 140.39 +91.88, 0.00, 140.80 +92.38, 0.00, 141.25 +92.96, 0.00, 141.24 +93.57, 0.00, 141.55 +94.12, 0.00, 141.67 +94.67, 0.00, 142.05 +95.24, 0.00, 142.25 +95.74, 0.00, 142.51 +96.32, 0.00, 142.66 +96.93, 0.00, 142.60 +97.43, 0.00, 142.66 +97.95, 0.00, 142.62 +98.45, 0.00, 142.62 +99.04, 0.00, 142.60 +99.54, 0.00, 142.61 +100.12, 0.00, 142.61 +100.63, 0.00, 142.37 +101.21, 0.00, 142.33 +101.73, 0.00, 142.29 +102.30, 0.00, 142.23 +102.91, 0.00, 142.12 +103.46, 0.00, 141.93 +103.96, 0.00, 141.68 +104.54, 0.00, 141.49 +105.04, 0.00, 141.30 +105.61, 0.00, 141.14 +106.11, 0.00, 140.95 +106.69, 0.00, 140.77 +107.19, 0.00, 140.53 +107.71, 0.00, 140.36 +108.21, 0.00, 140.22 +108.79, 0.00, 139.96 +109.29, 0.00, 139.83 +109.88, 0.00, 139.62 +110.38, 0.00, 139.27 +110.96, 0.00, 138.99 +111.46, 0.00, 138.82 +112.06, 0.00, 138.62 +112.56, 0.00, 138.19 +113.14, 0.00, 137.89 +113.69, 0.00, 137.42 +114.30, 0.00, 137.27 +114.96, 0.00, 137.00 +115.46, 0.00, 136.57 +116.05, 0.00, 136.37 +116.55, 0.00, 136.19 +117.13, 0.00, 136.00 +117.69, 0.00, 135.68 +118.27, 0.00, 135.52 +118.77, 0.00, 135.25 +119.35, 0.00, 135.12 +119.90, 0.00, 134.93 +120.40, 0.00, 134.82 +121.00, 0.00, 134.53 +121.50, 0.00, 134.16 +122.08, 0.00, 134.00 +122.58, 0.00, 133.66 +123.16, 0.00, 133.50 +123.67, 0.00, 133.33 +124.25, 0.00, 133.11 +124.76, 0.00, 132.98 +125.26, 0.00, 132.60 +125.88, 0.00, 132.37 +``` +Overshot (BangON) = 42 + +PID Tuner result: Kp = 190, Ki = 3.8, Kd = 1357 + +### Sample 7, 2022-11-27 + +- Process Input = PID max. output = 999 +- Target Temp = 30 °C Steps +- Settle Temp = max. temp - 10°C settle temp + +Process Data: +``` +1.00, 0.00, 23.26 +19.25, 0.00, 23.26 +19.81, 0.00, 23.16 +20.39, 999.00, 23.33 +20.89, 999.00, 23.30 +21.39, 999.00, 23.35 +22.01, 999.00, 23.40 +22.51, 999.00, 23.41 +23.11, 999.00, 23.44 +23.61, 999.00, 23.42 +24.19, 999.00, 23.49 +24.73, 999.00, 23.74 +25.33, 999.00, 23.92 +25.98, 999.00, 24.51 +26.48, 999.00, 24.87 +27.09, 999.00, 25.81 +27.59, 999.00, 26.52 +28.09, 999.00, 27.80 +28.70, 999.00, 28.69 +29.30, 999.00, 30.39 +29.95, 999.00, 32.12 +30.45, 999.00, 33.43 +30.96, 999.00, 35.75 +31.56, 999.00, 37.34 +32.06, 999.00, 39.80 +32.67, 999.00, 41.56 +33.27, 999.00, 44.49 +33.94, 999.00, 47.50 +34.49, 999.00, 49.26 +34.99, 999.00, 52.41 +35.68, 0.00, 55.50 +36.25, 0.00, 57.59 +36.85, 0.00, 60.76 +37.35, 0.00, 62.95 +38.02, 0.00, 66.18 +38.52, 0.00, 69.42 +39.12, 0.00, 71.45 +39.73, 0.00, 74.43 +40.23, 0.00, 76.37 +40.73, 0.00, 79.11 +41.31, 0.00, 80.76 +41.97, 0.00, 83.34 +42.47, 0.00, 84.95 +42.97, 0.00, 87.19 +43.56, 0.00, 88.63 +44.06, 0.00, 90.56 +44.66, 0.00, 91.81 +45.26, 0.00, 93.64 +45.81, 0.00, 94.86 +46.31, 0.00, 96.50 +46.91, 0.00, 97.41 +47.51, 0.00, 98.81 +48.01, 0.00, 99.56 +48.72, 0.00, 101.16 +49.29, 0.00, 102.01 +49.85, 0.00, 103.00 +50.35, 0.00, 103.65 +50.93, 0.00, 104.22 +51.43, 0.00, 104.97 +52.02, 0.00, 105.48 +52.52, 0.00, 106.09 +53.10, 0.00, 106.56 +53.63, 0.00, 107.13 +54.20, 0.00, 107.44 +54.75, 0.00, 107.85 +55.25, 0.00, 108.18 +55.83, 0.00, 108.44 +56.33, 0.00, 108.76 +56.92, 0.00, 108.83 +57.42, 0.00, 109.07 +58.02, 0.00, 109.27 +58.52, 0.00, 109.43 +59.11, 0.00, 109.50 +59.63, 0.00, 109.62 +60.21, 0.00, 109.81 +60.71, 0.00, 109.79 +61.21, 0.00, 109.80 +61.82, 0.00, 109.78 +62.32, 0.00, 109.87 +62.91, 0.00, 109.92 +63.41, 0.00, 110.04 +64.00, 0.00, 110.09 +64.50, 0.00, 110.04 +65.07, 0.00, 110.15 +65.62, 0.00, 110.16 +66.12, 0.00, 110.05 +66.71, 0.00, 110.03 +67.32, 0.00, 109.85 +67.99, 0.00, 109.65 +68.49, 0.00, 109.56 +69.07, 0.00, 109.34 +69.63, 0.00, 108.90 +70.21, 0.00, 108.79 +70.71, 0.00, 108.56 +71.30, 0.00, 108.35 +71.80, 0.00, 108.40 +72.30, 0.00, 108.28 +72.89, 0.00, 107.91 +73.39, 0.00, 107.74 +73.98, 0.00, 107.74 +74.48, 0.00, 107.75 +75.06, 0.00, 107.75 +75.56, 0.00, 107.62 +76.14, 0.00, 107.51 +76.69, 0.00, 107.42 +77.27, 0.00, 107.31 +77.79, 0.00, 107.16 +78.29, 0.00, 106.89 +78.87, 0.00, 106.84 +79.37, 0.00, 106.53 +79.97, 0.00, 106.39 +80.47, 0.00, 106.35 +81.05, 0.00, 106.22 +81.55, 0.00, 106.09 +82.14, 0.00, 105.79 +82.70, 0.00, 105.56 +83.27, 0.00, 105.54 +83.77, 0.00, 105.17 +84.36, 0.00, 105.11 +84.91, 0.00, 105.00 +85.41, 0.00, 105.00 +86.01, 0.00, 104.85 +86.51, 0.00, 104.73 +87.10, 0.00, 104.47 +87.62, 0.00, 104.20 +88.20, 0.00, 103.96 +88.72, 0.00, 103.95 +89.30, 0.00, 103.65 +89.80, 0.00, 103.37 +90.38, 0.00, 103.28 +91.01, 0.00, 103.23 +91.51, 0.00, 103.23 +92.01, 0.00, 103.12 +92.62, 0.00, 102.85 +93.12, 0.00, 102.69 +93.69, 0.00, 102.62 +94.19, 0.00, 102.53 +94.79, 0.00, 102.42 +95.29, 0.00, 102.31 +95.86, 0.00, 101.93 +96.36, 0.00, 101.81 +96.88, 0.00, 101.77 +97.38, 0.00, 101.73 +97.95, 0.00, 101.65 +98.56, 0.00, 101.52 +99.06, 0.00, 101.24 +99.67, 0.00, 101.17 +100.17, 0.00, 101.10 +100.70, 0.00, 101.01 +101.27, 0.00, 100.83 +101.77, 0.00, 100.71 +102.36, 0.00, 100.45 +103.00, 0.00, 100.18 +103.50, 0.00, 99.97 +104.07, 0.00, 99.70 +104.57, 999.00, 99.63 +105.18, 999.00, 99.28 +105.73, 999.00, 98.99 +106.23, 999.00, 98.92 +106.81, 999.00, 98.95 +107.31, 999.00, 98.93 +107.89, 999.00, 99.05 +108.39, 999.00, 99.26 +108.99, 999.00, 99.62 +109.49, 999.00, 100.29 +110.10, 999.00, 100.92 +110.63, 999.00, 101.84 +111.21, 999.00, 102.64 +111.71, 999.00, 103.50 +112.21, 999.00, 104.93 +112.83, 999.00, 105.76 +113.43, 999.00, 107.37 +113.93, 999.00, 108.56 +114.43, 999.00, 110.23 +115.04, 999.00, 111.41 +115.54, 999.00, 113.29 +116.12, 999.00, 114.68 +116.69, 999.00, 116.62 +117.27, 999.00, 117.90 +117.77, 999.00, 119.98 +118.36, 999.00, 121.35 +118.99, 999.00, 123.26 +119.49, 999.00, 125.19 +120.09, 999.00, 126.58 +120.65, 999.00, 128.62 +121.23, 0.00, 129.78 +121.73, 0.00, 131.71 +122.31, 0.00, 132.79 +122.81, 0.00, 134.60 +123.39, 0.00, 135.65 +123.94, 0.00, 137.49 +124.44, 0.00, 138.76 +125.04, 0.00, 140.52 +125.54, 0.00, 141.61 +126.11, 0.00, 142.71 +126.63, 0.00, 144.32 +127.21, 0.00, 145.31 +127.73, 0.00, 146.72 +128.30, 0.00, 147.53 +128.80, 0.00, 148.69 +129.39, 0.00, 149.31 +129.94, 0.00, 150.34 +130.44, 0.00, 150.99 +131.04, 0.00, 151.94 +131.65, 0.00, 152.45 +132.15, 0.00, 153.04 +132.74, 0.00, 153.48 +133.24, 0.00, 153.71 +133.83, 0.00, 154.18 +134.33, 0.00, 154.56 +134.83, 0.00, 154.91 +135.33, 0.00, 155.17 +135.92, 0.00, 155.37 +136.42, 0.00, 155.68 +137.02, 0.00, 155.72 +137.52, 0.00, 155.78 +138.10, 0.00, 155.85 +138.62, 0.00, 156.01 +139.20, 0.00, 156.15 +139.71, 0.00, 156.08 +140.21, 0.00, 156.16 +140.80, 0.00, 155.92 +141.30, 0.00, 155.94 +141.89, 0.00, 155.92 +142.39, 0.00, 155.99 +142.99, 0.00, 155.95 +143.49, 0.00, 156.06 +144.07, 0.00, 155.94 +144.63, 0.00, 155.82 +145.21, 0.00, 155.57 +145.71, 0.00, 155.54 +146.21, 0.00, 155.41 +146.81, 0.00, 155.26 +147.31, 0.00, 154.58 +147.90, 0.00, 154.45 +148.40, 0.00, 154.16 +149.00, 0.00, 153.82 +149.50, 0.00, 153.64 +150.08, 0.00, 153.50 +150.64, 0.00, 153.41 +151.22, 0.00, 153.03 +151.72, 0.00, 152.76 +152.30, 0.00, 152.62 +152.81, 0.00, 152.34 +153.31, 0.00, 152.20 +153.88, 0.00, 151.96 +154.38, 0.00, 151.54 +154.97, 0.00, 151.35 +155.47, 0.00, 151.36 +156.08, 0.00, 150.96 +156.60, 0.00, 150.93 +157.10, 0.00, 150.68 +157.68, 0.00, 150.56 +158.18, 0.00, 150.36 +158.78, 0.00, 150.18 +159.28, 0.00, 149.79 +159.86, 0.00, 149.37 +160.36, 0.00, 149.13 +160.96, 0.00, 148.63 +161.46, 0.00, 148.54 +162.05, 0.00, 148.21 +162.55, 0.00, 148.01 +163.14, 0.00, 147.76 +163.69, 0.00, 147.59 +164.19, 0.00, 147.47 +164.79, 0.00, 147.18 +165.40, 0.00, 147.09 +165.90, 0.00, 146.94 +166.49, 0.00, 146.67 +166.99, 0.00, 146.65 +167.57, 0.00, 146.52 +168.07, 0.00, 146.37 +168.66, 0.00, 146.01 +169.24, 0.00, 145.75 +169.85, 0.00, 145.57 +170.35, 999.00, 145.33 +170.94, 999.00, 144.98 +171.44, 999.00, 144.56 +172.06, 999.00, 144.45 +172.63, 999.00, 144.11 +173.21, 999.00, 144.07 +173.74, 999.00, 144.27 +174.32, 999.00, 144.38 +174.97, 999.00, 144.60 +175.47, 999.00, 145.17 +176.08, 999.00, 145.70 +176.65, 999.00, 146.51 +177.23, 999.00, 147.10 +177.73, 999.00, 147.97 +178.32, 999.00, 148.58 +178.98, 999.00, 149.68 +179.48, 999.00, 150.85 +180.08, 999.00, 151.36 +180.64, 999.00, 152.63 +181.22, 999.00, 153.32 +181.72, 999.00, 154.58 +182.32, 999.00, 155.45 +182.97, 999.00, 156.73 +183.47, 999.00, 157.79 +184.06, 999.00, 158.63 +184.63, 999.00, 159.99 +185.22, 999.00, 160.81 +185.72, 999.00, 162.12 +186.31, 999.00, 162.90 +186.96, 999.00, 164.36 +187.46, 999.00, 165.45 +188.06, 999.00, 166.28 +188.56, 999.00, 167.42 +189.16, 999.00, 168.27 +189.73, 999.00, 169.43 +190.31, 999.00, 170.11 +190.95, 999.00, 171.18 +191.45, 999.00, 172.22 +192.05, 999.00, 172.91 +192.55, 999.00, 173.58 +193.14, 999.00, 174.73 +193.70, 0.00, 175.74 +194.28, 0.00, 176.38 +194.88, 0.00, 177.42 +195.43, 0.00, 177.95 +195.93, 0.00, 178.34 +196.63, 0.00, 178.65 +197.21, 0.00, 178.80 +197.71, 0.00, 179.01 +198.29, 0.00, 179.29 +198.79, 0.00, 179.65 +199.36, 0.00, 179.92 +200.00, 0.00, 180.30 +200.50, 0.00, 180.51 +201.00, 0.00, 180.83 +201.50, 0.00, 180.95 +202.09, 0.00, 181.06 +202.69, 0.00, 181.27 +203.19, 0.00, 181.37 +203.80, 0.00, 181.28 +204.31, 0.00, 181.27 +204.97, 0.00, 181.45 +205.47, 0.00, 181.62 +206.05, 0.00, 181.57 +206.55, 0.00, 181.60 +207.16, 0.00, 181.70 +207.67, 0.00, 181.86 +208.24, 0.00, 181.83 +208.76, 0.00, 181.84 +209.26, 0.00, 181.73 +209.83, 0.00, 181.75 +210.33, 0.00, 181.91 +210.91, 0.00, 181.94 +211.41, 0.00, 182.05 +212.00, 0.00, 182.02 +212.55, 0.00, 182.01 +213.05, 0.00, 182.05 +213.64, 0.00, 182.00 +214.14, 0.00, 181.93 +214.72, 0.00, 182.00 +215.22, 0.00, 181.96 +215.80, 0.00, 182.05 +216.30, 0.00, 181.93 +216.80, 0.00, 181.93 +217.41, 0.00, 181.92 +217.91, 0.00, 181.93 +218.52, 0.00, 181.83 +219.02, 0.00, 181.79 +219.68, 0.00, 181.73 +220.25, 0.00, 181.64 +220.77, 0.00, 181.65 +221.27, 0.00, 181.69 +221.87, 0.00, 181.57 +222.37, 0.00, 181.42 +222.95, 0.00, 181.49 +223.56, 0.00, 181.46 +224.06, 0.00, 181.48 +224.66, 0.00, 181.19 +225.23, 0.00, 181.27 +225.84, 0.00, 181.21 +226.34, 0.00, 181.18 +226.95, 0.00, 181.04 +227.45, 0.00, 180.80 +228.05, 0.00, 180.69 +228.55, 0.00, 180.49 +229.05, 0.00, 180.32 +229.65, 0.00, 180.16 +230.15, 0.00, 179.65 +230.74, 0.00, 179.33 +231.24, 0.00, 178.91 +231.83, 0.00, 178.48 +232.33, 0.00, 178.08 +232.94, 0.00, 177.45 +233.48, 0.00, 176.77 +233.98, 0.00, 176.22 +234.64, 0.00, 175.39 +235.22, 0.00, 174.74 +235.72, 0.00, 174.03 +236.30, 0.00, 173.57 +236.91, 0.00, 173.03 +237.41, 0.00, 172.48 +237.92, 0.00, 171.74 +238.51, 999.00, 171.20 +239.01, 999.00, 170.60 +239.61, 999.00, 170.15 +240.11, 999.00, 169.79 +240.71, 999.00, 169.26 +241.21, 999.00, 169.03 +241.71, 999.00, 168.78 +242.30, 999.00, 168.68 +242.80, 999.00, 168.73 +243.40, 999.00, 168.88 +244.05, 999.00, 168.99 +244.55, 999.00, 169.45 +245.15, 999.00, 169.79 +245.72, 999.00, 170.35 +246.30, 999.00, 170.64 +246.80, 999.00, 171.23 +247.39, 999.00, 171.65 +248.03, 999.00, 172.45 +248.53, 999.00, 173.28 +249.12, 999.00, 173.95 +249.68, 999.00, 174.76 +250.26, 999.00, 175.39 +250.76, 999.00, 176.37 +251.36, 999.00, 177.05 +252.00, 999.00, 177.84 +252.50, 999.00, 178.22 +253.09, 999.00, 178.56 +253.66, 999.00, 178.85 +254.24, 999.00, 179.09 +254.74, 999.00, 179.46 +255.33, 999.00, 179.78 +255.98, 999.00, 180.15 +256.48, 999.00, 180.37 +257.09, 999.00, 180.85 +257.65, 999.00, 181.22 +258.23, 999.00, 181.50 +258.73, 999.00, 181.64 +259.23, 999.00, 181.82 +259.73, 999.00, 181.89 +260.31, 999.00, 182.19 +260.95, 999.00, 182.22 +261.45, 999.00, 182.38 +262.05, 999.00, 182.46 +262.62, 999.00, 182.64 +263.20, 999.00, 182.57 +263.73, 999.00, 182.72 +264.31, 999.00, 182.82 +264.96, 999.00, 182.75 +265.46, 999.00, 182.85 +266.06, 999.00, 183.00 +266.63, 999.00, 183.15 +267.21, 999.00, 183.32 +267.71, 999.00, 183.54 +268.31, 999.00, 183.80 +268.96, 999.00, 184.74 +269.46, 999.00, 186.84 +270.07, 999.00, 188.40 +270.64, 999.00, 190.64 +271.22, 999.00, 192.27 +271.72, 999.00, 194.35 +272.32, 999.00, 195.72 +272.97, 999.00, 197.51 +273.47, 999.00, 198.92 +274.07, 999.00, 199.91 +274.65, 999.00, 201.00 +275.23, 0.00, 202.00 +275.73, 0.00, 202.68 +276.31, 0.00, 203.34 +276.81, 0.00, 204.17 +277.40, 0.00, 204.65 +278.04, 0.00, 205.21 +278.54, 0.00, 205.49 +279.14, 0.00, 205.86 +279.70, 0.00, 206.34 +280.28, 0.00, 206.67 +280.78, 0.00, 206.90 +281.37, 0.00, 207.02 +282.00, 0.00, 207.18 +282.50, 0.00, 207.38 +283.08, 0.00, 207.46 +283.64, 0.00, 207.43 +284.14, 0.00, 207.34 +284.74, 0.00, 207.08 +285.24, 0.00, 207.13 +285.85, 0.00, 207.03 +286.35, 0.00, 206.98 +286.93, 0.00, 206.86 +287.43, 0.00, 206.72 +288.04, 0.00, 206.65 +288.54, 0.00, 206.46 +289.13, 0.00, 206.10 +289.66, 0.00, 205.78 +290.24, 0.00, 205.54 +290.74, 0.00, 205.25 +291.24, 0.00, 204.90 +291.85, 0.00, 204.62 +292.35, 0.00, 204.32 +292.95, 0.00, 204.12 +293.45, 0.00, 203.79 +294.06, 0.00, 203.50 +294.62, 0.00, 203.18 +295.20, 0.00, 202.71 +295.73, 0.00, 202.51 +296.30, 0.00, 202.14 +296.80, 0.00, 201.57 +297.39, 0.00, 201.30 +298.02, 0.00, 200.81 +298.52, 0.00, 200.61 +299.11, 0.00, 200.15 +299.67, 0.00, 199.66 +300.25, 0.00, 199.25 +300.75, 0.00, 198.68 +301.33, 0.00, 198.49 +301.97, 0.00, 198.11 +302.47, 0.00, 197.65 +302.98, 0.00, 196.99 +303.59, 0.00, 196.39 +304.09, 999.00, 196.07 +304.70, 999.00, 195.91 +305.20, 999.00, 195.19 +305.81, 999.00, 194.84 +306.31, 999.00, 194.26 +306.91, 999.00, 193.74 +307.41, 999.00, 193.34 +308.02, 999.00, 193.27 +308.52, 999.00, 193.01 +309.11, 999.00, 193.04 +309.64, 999.00, 193.28 +310.22, 999.00, 193.55 +310.72, 999.00, 193.88 +311.32, 999.00, 194.24 +311.97, 999.00, 194.69 +312.47, 999.00, 194.90 +312.97, 999.00, 195.45 +313.47, 999.00, 195.89 +314.08, 999.00, 196.52 +314.58, 999.00, 196.88 +315.18, 999.00, 197.24 +315.71, 999.00, 197.50 +316.29, 999.00, 197.74 +316.79, 999.00, 198.28 +317.38, 999.00, 198.68 +318.03, 999.00, 199.17 +318.53, 999.00, 199.76 +319.14, 999.00, 200.20 +319.72, 999.00, 200.74 +320.30, 999.00, 201.34 +320.80, 999.00, 201.72 +321.39, 999.00, 202.14 +322.04, 999.00, 202.58 +322.54, 999.00, 203.04 +323.14, 999.00, 203.19 +323.72, 999.00, 203.64 +324.31, 999.00, 204.01 +324.88, 999.00, 204.33 +325.54, 999.00, 204.86 +326.04, 999.00, 205.23 +326.65, 999.00, 205.69 +327.15, 999.00, 205.93 +327.66, 999.00, 206.35 +328.25, 999.00, 206.67 +328.75, 999.00, 207.22 +329.35, 999.00, 207.50 +330.00, 999.00, 207.92 +330.50, 999.00, 208.27 +331.11, 999.00, 208.58 +331.66, 999.00, 208.78 +332.25, 999.00, 209.08 +332.75, 999.00, 209.43 +333.36, 999.00, 209.81 +334.01, 999.00, 210.16 +334.51, 999.00, 210.68 +335.10, 999.00, 210.94 +335.66, 999.00, 211.38 +336.24, 999.00, 211.66 +336.74, 999.00, 212.04 +337.32, 999.00, 212.30 +337.96, 999.00, 212.53 +338.46, 999.00, 212.66 +339.05, 999.00, 212.67 +339.55, 999.00, 212.84 +340.15, 999.00, 212.93 +340.72, 999.00, 213.14 +341.30, 999.00, 213.23 +341.80, 999.00, 213.25 +342.30, 999.00, 213.22 +342.89, 999.00, 213.37 +343.39, 999.00, 213.52 +344.00, 999.00, 213.65 +344.50, 999.00, 213.64 +345.08, 999.00, 213.60 +345.65, 999.00, 213.57 +346.23, 999.00, 213.67 +346.73, 999.00, 213.88 +347.32, 999.00, 214.02 +347.96, 999.00, 214.30 +348.46, 999.00, 214.51 +349.05, 999.00, 214.66 +349.55, 999.00, 214.74 +350.15, 999.00, 214.94 +350.71, 999.00, 215.39 +351.30, 999.00, 215.56 +351.80, 999.00, 215.72 +352.30, 999.00, 215.94 +352.89, 999.00, 216.05 +353.39, 999.00, 216.36 +353.99, 999.00, 216.45 +354.49, 999.00, 216.53 +355.09, 999.00, 216.52 +355.66, 999.00, 216.63 +356.24, 999.00, 216.69 +356.74, 999.00, 216.80 +357.33, 999.00, 216.82 +357.97, 999.00, 217.18 +358.47, 999.00, 217.33 +359.06, 999.00, 217.57 +359.62, 999.00, 218.08 +360.20, 999.00, 218.41 +360.73, 999.00, 218.68 +361.31, 999.00, 218.84 +361.96, 999.00, 218.79 +362.46, 999.00, 218.82 +363.06, 999.00, 219.05 +363.62, 999.00, 219.07 +364.20, 999.00, 219.31 +364.73, 999.00, 219.57 +365.31, 999.00, 219.53 +365.96, 999.00, 219.68 +366.46, 999.00, 219.84 +366.96, 999.00, 219.86 +367.46, 999.00, 219.82 +368.17, 999.00, 219.85 +368.67, 999.00, 219.76 +369.17, 999.00, 219.80 +369.70, 999.00, 219.82 +370.27, 999.00, 219.98 +370.86, 999.00, 219.99 +371.36, 999.00, 220.08 +371.95, 999.00, 220.17 +372.52, 999.00, 219.98 +373.02, 999.00, 220.00 +373.70, 999.00, 220.16 +374.29, 999.00, 220.21 +374.79, 999.00, 220.23 +375.38, 999.00, 220.08 +376.03, 999.00, 219.73 +376.53, 999.00, 219.55 +377.12, 999.00, 219.57 +377.69, 999.00, 219.55 +378.27, 999.00, 219.62 +378.77, 999.00, 219.97 +379.37, 999.00, 220.07 +380.02, 999.00, 220.31 +380.52, 999.00, 220.49 +381.12, 999.00, 220.77 +381.69, 999.00, 221.11 +382.27, 999.00, 221.25 +382.77, 999.00, 221.32 +383.35, 999.00, 221.39 +383.99, 999.00, 221.24 +384.49, 999.00, 221.42 +385.08, 999.00, 221.54 +385.64, 999.00, 221.65 +386.22, 999.00, 221.82 +386.72, 999.00, 222.02 +387.31, 999.00, 222.19 +387.95, 999.00, 222.47 +388.45, 999.00, 222.57 +389.06, 999.00, 222.70 +389.63, 999.00, 222.86 +390.21, 999.00, 223.05 +390.71, 999.00, 223.07 +391.21, 999.00, 223.13 +391.83, 999.00, 223.26 +392.43, 999.00, 223.46 +392.93, 999.00, 223.47 +393.43, 999.00, 223.50 +393.96, 999.00, 223.60 +394.53, 999.00, 223.62 +395.14, 999.00, 223.71 +395.70, 999.00, 223.82 +396.29, 999.00, 223.96 +396.79, 999.00, 224.06 +397.38, 999.00, 223.94 +398.03, 999.00, 223.99 +398.53, 999.00, 223.89 +399.13, 999.00, 223.98 +399.70, 999.00, 223.95 +400.29, 999.00, 223.74 +400.79, 999.00, 223.70 +401.38, 999.00, 223.72 +402.03, 999.00, 223.61 +402.53, 999.00, 223.56 +403.13, 999.00, 223.45 +403.69, 999.00, 223.26 +404.28, 999.00, 223.26 +404.78, 999.00, 223.24 +405.37, 999.00, 223.39 +406.02, 999.00, 223.42 +406.52, 999.00, 223.52 +407.11, 999.00, 223.74 +407.68, 999.00, 223.89 +408.27, 999.00, 223.97 +408.77, 999.00, 224.00 +409.36, 999.00, 224.04 +410.02, 999.00, 224.01 +410.52, 999.00, 224.01 +411.12, 999.00, 224.19 +411.69, 999.00, 224.29 +412.27, 999.00, 224.33 +412.77, 999.00, 224.38 +413.37, 999.00, 224.37 +414.02, 999.00, 224.52 +414.52, 999.00, 224.63 +415.13, 999.00, 224.68 +415.69, 999.00, 224.72 +416.28, 999.00, 224.78 +416.95, 0.00, 224.77 +417.45, 0.00, 224.54 +418.05, 0.00, 224.56 +418.55, 0.00, 224.60 +419.14, 0.00, 224.58 +419.69, 0.00, 224.66 +420.27, 0.00, 224.70 +420.77, 0.00, 224.61 +421.36, 0.00, 224.53 +421.99, 0.00, 224.26 +422.49, 0.00, 224.06 +423.07, 0.00, 223.81 +423.63, 0.00, 223.74 +424.20, 0.00, 223.56 +424.72, 0.00, 223.33 +425.30, 0.00, 223.12 +425.81, 0.00, 222.91 +426.31, 0.00, 222.66 +426.89, 0.00, 222.42 +427.39, 0.00, 222.14 +427.98, 0.00, 221.86 +428.48, 0.00, 221.69 +429.05, 0.00, 221.43 +429.55, 0.00, 221.29 +430.16, 0.00, 220.99 +430.72, 0.00, 220.64 +431.22, 0.00, 220.41 +431.80, 0.00, 220.21 +432.30, 0.00, 219.62 +432.88, 0.00, 219.44 +433.48, 0.00, 218.95 +433.98, 0.00, 218.64 +434.51, 0.00, 218.23 +435.01, 0.00, 218.06 +435.67, 0.00, 217.60 +436.24, 0.00, 217.48 +436.85, 0.00, 216.98 +437.35, 0.00, 216.68 +437.85, 0.00, 216.25 +438.45, 0.00, 215.89 +438.95, 0.00, 215.36 +439.53, 0.00, 215.00 +440.03, 0.00, 214.41 +440.60, 0.00, 213.94 +441.10, 999.00, 213.59 +441.71, 999.00, 213.10 +442.27, 999.00, 212.38 +442.87, 999.00, 212.19 +443.37, 999.00, 211.67 +443.97, 999.00, 211.43 +444.47, 999.00, 211.06 +445.05, 999.00, 210.95 +445.55, 999.00, 210.88 +446.15, 999.00, 210.75 +446.71, 999.00, 210.78 +447.30, 999.00, 210.81 +447.80, 999.00, 210.73 +448.39, 999.00, 210.65 +449.04, 999.00, 210.54 +449.54, 999.00, 210.53 +450.14, 999.00, 210.56 +450.70, 999.00, 210.74 +451.28, 999.00, 210.80 +451.78, 999.00, 210.85 +452.38, 999.00, 211.08 +453.00, 999.00, 211.25 +453.50, 999.00, 211.38 +454.09, 999.00, 211.61 +454.64, 999.00, 211.63 +455.22, 999.00, 211.72 +455.72, 999.00, 211.82 +456.22, 999.00, 211.96 +456.82, 999.00, 211.88 +457.32, 999.00, 211.90 +457.91, 999.00, 211.80 +458.41, 999.00, 211.89 +459.01, 999.00, 212.02 +459.51, 999.00, 212.43 +460.09, 999.00, 212.68 +460.66, 999.00, 212.88 +461.24, 999.00, 212.84 +461.74, 999.00, 213.04 +462.32, 999.00, 213.11 +462.96, 999.00, 213.42 +463.46, 999.00, 213.68 +464.07, 999.00, 214.08 +464.63, 999.00, 214.48 +465.21, 999.00, 214.68 +465.71, 999.00, 214.97 +466.21, 999.00, 215.40 +466.82, 999.00, 215.70 +467.32, 999.00, 215.91 +467.91, 999.00, 215.94 +468.41, 999.00, 215.90 +469.03, 999.00, 215.80 +469.53, 999.00, 216.05 +470.12, 999.00, 216.26 +470.68, 999.00, 216.66 +471.27, 999.00, 216.92 +471.77, 999.00, 217.17 +472.35, 999.00, 217.29 +472.98, 999.00, 217.74 +473.48, 999.00, 218.01 +474.08, 999.00, 218.46 +474.64, 999.00, 218.71 +475.23, 999.00, 218.99 +475.73, 999.00, 219.23 +476.33, 999.00, 219.52 +476.90, 999.00, 219.71 +477.51, 999.00, 219.82 +478.01, 999.00, 220.00 +478.61, 999.00, 219.98 +479.11, 999.00, 220.22 +479.71, 999.00, 220.46 +480.21, 999.00, 220.69 +480.71, 999.00, 220.72 +481.29, 999.00, 220.82 +481.79, 999.00, 220.95 +482.39, 999.00, 221.05 +483.02, 999.00, 221.16 +``` +Overshot (BangON) = 42 + +PID Tuner result: Kp = , Ki = , Kd = + +### Sample 8, 2022-11-27 + +- Process Input = PID max. output = 999 +- Target Temp = 100 °C +- Settle Temp = max. temp - 10°C settle temp + +Process Data: +``` +30.10, 0.00, 28.74 +30.62, 0.00, 28.70 +31.19, 999.00, 28.68 +31.73, 999.00, 28.49 +32.23, 999.00, 28.49 +32.81, 999.00, 28.59 +33.31, 999.00, 28.60 +33.89, 999.00, 28.75 +34.39, 999.00, 28.87 +34.98, 999.00, 29.01 +35.49, 999.00, 29.18 +35.99, 999.00, 29.57 +36.57, 999.00, 29.99 +37.07, 999.00, 30.64 +37.65, 999.00, 31.41 +38.15, 999.00, 32.14 +38.76, 999.00, 33.48 +39.27, 999.00, 34.68 +39.95, 999.00, 36.52 +40.45, 999.00, 38.64 +41.04, 999.00, 40.04 +41.54, 999.00, 42.44 +42.12, 999.00, 44.19 +42.68, 999.00, 46.73 +43.26, 999.00, 48.47 +43.76, 999.00, 51.34 +44.34, 999.00, 53.36 +44.97, 999.00, 56.35 +45.47, 999.00, 58.46 +46.05, 999.00, 61.48 +46.55, 999.00, 63.63 +47.07, 999.00, 66.78 +47.57, 999.00, 68.86 +48.15, 999.00, 71.04 +48.65, 999.00, 74.17 +49.23, 999.00, 76.47 +49.73, 999.00, 79.78 +50.31, 999.00, 81.82 +50.83, 999.00, 83.92 +51.33, 999.00, 87.01 +51.91, 999.00, 89.14 +52.41, 999.00, 92.24 +53.00, 999.00, 94.20 +53.50, 999.00, 97.18 +54.08, 999.00, 99.24 +54.64, 0.00, 102.24 +55.22, 0.00, 104.15 +55.72, 0.00, 107.03 +56.30, 0.00, 108.88 +56.86, 0.00, 111.50 +57.46, 0.00, 113.27 +57.96, 0.00, 115.83 +58.65, 0.00, 118.07 +59.23, 0.00, 119.56 +59.84, 0.00, 121.60 +60.38, 0.00, 122.93 +61.05, 0.00, 124.76 +61.55, 0.00, 126.53 +62.13, 0.00, 127.61 +62.68, 0.00, 129.11 +63.25, 0.00, 129.99 +63.75, 0.00, 131.28 +64.33, 0.00, 132.04 +64.88, 0.00, 133.19 +65.48, 0.00, 133.93 +65.98, 0.00, 134.75 +66.56, 0.00, 135.30 +67.06, 0.00, 135.83 +67.64, 0.00, 136.50 +68.14, 0.00, 136.81 +68.73, 0.00, 137.23 +69.28, 0.00, 137.60 +69.95, 0.00, 138.04 +70.45, 0.00, 138.43 +71.05, 0.00, 138.63 +71.55, 0.00, 139.01 +72.13, 0.00, 139.13 +72.68, 0.00, 139.32 +73.26, 0.00, 139.53 +73.76, 0.00, 139.79 +74.34, 0.00, 139.74 +74.97, 0.00, 140.04 +75.47, 0.00, 140.02 +75.97, 0.00, 140.10 +76.47, 0.00, 140.13 +77.08, 0.00, 140.21 +77.58, 0.00, 140.21 +78.15, 0.00, 140.15 +78.67, 0.00, 140.13 +79.25, 0.00, 140.17 +79.75, 0.00, 140.07 +80.25, 0.00, 140.08 +80.84, 0.00, 140.14 +81.34, 0.00, 139.98 +81.93, 0.00, 139.90 +82.43, 0.00, 139.89 +83.02, 0.00, 139.89 +83.52, 0.00, 139.75 +84.11, 0.00, 139.53 +84.66, 0.00, 139.34 +85.16, 0.00, 139.18 +85.74, 0.00, 139.07 +86.24, 0.00, 138.79 +86.82, 0.00, 138.60 +87.32, 0.00, 138.46 +87.90, 0.00, 138.30 +88.40, 0.00, 138.12 +88.99, 0.00, 137.90 +89.63, 0.00, 137.47 +90.21, 0.00, 137.24 +90.72, 0.00, 137.16 +91.29, 0.00, 136.88 +91.79, 0.00, 136.60 +92.38, 0.00, 136.31 +93.00, 0.00, 136.00 +93.50, 0.00, 135.86 +94.09, 0.00, 135.59 +94.64, 0.00, 135.29 +95.22, 0.00, 135.14 +95.74, 0.00, 134.90 +96.24, 0.00, 134.78 +96.83, 0.00, 134.63 +97.33, 0.00, 134.38 +97.91, 0.00, 134.15 +98.41, 0.00, 133.82 +99.00, 0.00, 133.62 +99.50, 0.00, 133.44 +100.08, 0.00, 133.13 +100.63, 0.00, 132.76 +101.13, 0.00, 132.67 +101.73, 0.00, 132.56 +102.23, 0.00, 132.33 +102.80, 0.00, 132.07 +103.41, 0.00, 131.90 +103.91, 0.00, 131.66 +104.42, 0.00, 131.30 +105.03, 0.00, 131.28 +105.53, 0.00, 130.98 +106.14, 0.00, 130.71 +106.66, 0.00, 130.37 +107.24, 0.00, 130.13 +``` +Overshot (BangON) = 40 + +PID Tuner result: Kp = 19.9, Ki = 0.4, Kd = 84.6 +PID Tuner result: Kp = 26.0, Ki = 0.6, Kd = 110.5 + +### Sample 9, 2022-11-27 + +- Process Input = PID max. output = 5000 +- Target Temp = 100 °C +- Settle Temp = max. temp - 10°C settle temp + +Process Data: +``` +12.34, 0.00, 24.57 +12.98, 0.00, 24.66 +13.48, 0.00, 24.69 +13.98, 0.00, 24.64 +14.65, 0.00, 24.49 +15.22, 0.00, 24.58 +15.75, 0.00, 24.60 +16.33, 0.00, 24.47 +16.90, 0.00, 24.41 +17.47, 5000.00, 24.43 +17.97, 5000.00, 24.30 +18.55, 5000.00, 24.36 +19.05, 5000.00, 24.45 +19.63, 5000.00, 24.47 +20.19, 5000.00, 24.54 +20.69, 5000.00, 24.48 +21.27, 5000.00, 24.62 +21.77, 5000.00, 24.90 +22.34, 5000.00, 25.26 +23.01, 5000.00, 25.77 +23.51, 5000.00, 26.08 +24.09, 5000.00, 26.97 +24.63, 5000.00, 28.06 +25.13, 5000.00, 29.05 +25.74, 5000.00, 30.08 +26.35, 5000.00, 31.75 +27.02, 5000.00, 33.58 +27.52, 5000.00, 34.97 +28.10, 5000.00, 37.14 +28.65, 5000.00, 39.70 +29.23, 5000.00, 41.46 +29.73, 5000.00, 44.10 +30.23, 5000.00, 46.10 +30.83, 5000.00, 47.81 +31.33, 5000.00, 50.85 +31.91, 5000.00, 52.89 +32.41, 5000.00, 56.00 +33.01, 5000.00, 58.09 +33.51, 5000.00, 61.39 +34.09, 5000.00, 63.62 +34.64, 5000.00, 66.86 +35.14, 5000.00, 68.92 +35.73, 5000.00, 71.13 +36.33, 5000.00, 74.31 +37.00, 5000.00, 77.53 +37.50, 5000.00, 79.70 +38.08, 5000.00, 82.80 +38.64, 5000.00, 84.92 +39.14, 5000.00, 88.15 +39.74, 5000.00, 90.14 +40.35, 5000.00, 93.25 +41.02, 5000.00, 96.19 +41.52, 5000.00, 99.20 +42.10, 0.00, 101.17 +42.65, 0.00, 103.91 +43.23, 0.00, 105.77 +43.73, 0.00, 107.44 +44.23, 0.00, 110.18 +44.82, 0.00, 111.79 +45.32, 0.00, 114.31 +45.93, 0.00, 115.87 +46.53, 0.00, 118.19 +47.03, 0.00, 119.76 +47.63, 0.00, 121.93 +48.21, 0.00, 123.88 +48.72, 0.00, 125.11 +49.30, 0.00, 126.33 +49.90, 0.00, 127.75 +50.40, 0.00, 128.80 +51.00, 0.00, 130.24 +51.50, 0.00, 131.11 +52.01, 0.00, 132.25 +52.62, 0.00, 132.88 +53.12, 0.00, 133.89 +53.70, 0.00, 134.38 +54.20, 0.00, 134.87 +54.79, 0.00, 135.78 +55.30, 0.00, 136.32 +55.88, 0.00, 136.98 +56.43, 0.00, 137.41 +56.93, 0.00, 137.82 +57.63, 0.00, 138.32 +58.21, 0.00, 138.54 +58.73, 0.00, 138.84 +59.31, 0.00, 139.12 +59.81, 0.00, 139.52 +60.39, 0.00, 139.74 +61.03, 0.00, 139.97 +61.53, 0.00, 140.16 +62.04, 0.00, 140.20 +62.54, 0.00, 140.26 +63.13, 0.00, 140.30 +63.65, 0.00, 140.36 +64.23, 0.00, 140.37 +64.73, 0.00, 140.40 +65.31, 0.00, 140.30 +65.81, 0.00, 140.28 +66.39, 0.00, 140.14 +66.95, 0.00, 140.01 +67.56, 0.00, 139.96 +68.06, 0.00, 139.95 +68.64, 0.00, 139.87 +69.14, 0.00, 139.57 +69.74, 0.00, 139.47 +70.24, 0.00, 139.35 +70.83, 0.00, 139.14 +71.33, 0.00, 139.10 +71.94, 0.00, 138.88 +72.50, 0.00, 138.68 +73.00, 0.00, 138.55 +73.67, 0.00, 138.19 +74.25, 0.00, 138.13 +74.86, 0.00, 138.01 +75.36, 0.00, 137.82 +75.95, 0.00, 137.79 +76.45, 0.00, 137.54 +77.04, 0.00, 137.42 +77.59, 0.00, 137.22 +78.09, 0.00, 136.92 +78.70, 0.00, 136.82 +79.20, 0.00, 136.58 +79.78, 0.00, 136.29 +80.28, 0.00, 136.03 +80.86, 0.00, 135.84 +81.36, 0.00, 135.59 +81.94, 0.00, 135.52 +82.49, 0.00, 135.23 +82.99, 0.00, 135.14 +83.66, 0.00, 134.86 +84.24, 0.00, 134.65 +84.74, 0.00, 134.33 +85.31, 0.00, 133.93 +85.94, 0.00, 133.59 +86.44, 0.00, 133.33 +87.03, 0.00, 133.04 +87.53, 0.00, 132.79 +88.05, 0.00, 132.33 +88.55, 0.00, 132.08 +89.12, 0.00, 131.82 +89.63, 0.00, 131.62 +90.20, 0.00, 131.53 +90.71, 0.00, 131.31 +91.29, 0.00, 131.20 +91.80, 0.00, 130.90 +92.30, 0.00, 130.65 +92.88, 0.00, 130.43 +93.38, 0.00, 130.15 +``` +Overshot (BangON) = 40 + +PID Tuner result: Kp = 93.6, Ki = 1.8, Kd = 418.3 +PID Tuner result: Kp = 111.3, Ki = 2.4, Kd = 427.9 + +### Sample 10, 2022-11-27 + +- Process Input = PID max. output = 5000 +- Target Temp = +30°C Steps +- Settle Temp = max. temp - 10°C settle temp + +Process Data: +``` +65.41, 0.00, 31.03 +65.91, 0.00, 32.01 +66.49, 0.00, 32.87 +66.99, 0.00, 33.97 +67.58, 0.00, 34.94 +68.08, 0.00, 36.25 +68.72, 0.00, 37.15 +69.22, 0.00, 38.59 +69.80, 0.00, 39.31 +70.30, 0.00, 40.52 +70.80, 5000.00, 41.29 +71.37, 5000.00, 42.16 +71.98, 5000.00, 43.34 +72.48, 5000.00, 44.13 +72.98, 5000.00, 45.47 +73.56, 5000.00, 46.26 +74.06, 5000.00, 47.55 +74.67, 5000.00, 48.49 +75.27, 5000.00, 50.21 +75.84, 5000.00, 52.08 +76.44, 5000.00, 53.42 +76.94, 5000.00, 55.48 +77.54, 5000.00, 57.07 +78.13, 5000.00, 59.27 +78.69, 5000.00, 61.88 +79.29, 5000.00, 63.69 +79.94, 5000.00, 66.35 +80.44, 5000.00, 68.14 +81.05, 0.00, 70.90 +81.64, 0.00, 73.87 +82.21, 0.00, 75.77 +82.81, 0.00, 78.79 +83.31, 0.00, 80.64 +83.96, 0.00, 83.50 +84.46, 0.00, 86.35 +85.06, 0.00, 88.17 +85.65, 0.00, 90.91 +86.17, 0.00, 92.38 +86.71, 0.00, 94.80 +87.28, 0.00, 96.46 +87.87, 0.00, 98.60 +88.37, 0.00, 99.97 +88.88, 0.00, 101.87 +89.48, 0.00, 103.09 +89.98, 0.00, 104.69 +90.66, 0.00, 106.22 +91.23, 0.00, 107.14 +91.84, 0.00, 108.36 +92.34, 0.00, 109.13 +93.02, 0.00, 110.27 +93.52, 0.00, 111.23 +94.11, 0.00, 111.87 +94.70, 0.00, 112.68 +95.20, 0.00, 113.18 +95.70, 0.00, 113.75 +96.28, 0.00, 114.34 +96.78, 0.00, 114.90 +97.38, 0.00, 115.15 +97.91, 0.00, 115.78 +98.50, 0.00, 116.14 +99.00, 0.00, 116.41 +99.69, 0.00, 116.76 +100.26, 0.00, 117.02 +100.76, 0.00, 117.34 +101.26, 0.00, 117.49 +101.84, 0.00, 117.58 +102.45, 0.00, 117.87 +102.95, 0.00, 118.00 +103.45, 0.00, 118.24 +104.04, 0.00, 118.32 +104.54, 0.00, 118.44 +105.14, 0.00, 118.46 +105.64, 0.00, 118.43 +106.22, 0.00, 118.50 +106.72, 0.00, 118.45 +107.22, 0.00, 118.42 +107.80, 0.00, 118.40 +108.30, 0.00, 118.27 +108.87, 0.00, 118.22 +109.37, 0.00, 117.96 +110.00, 0.00, 117.78 +110.50, 0.00, 117.64 +111.09, 0.00, 117.50 +111.68, 0.00, 117.12 +112.25, 0.00, 117.19 +112.84, 0.00, 117.13 +113.34, 0.00, 117.03 +113.99, 0.00, 116.87 +114.49, 0.00, 116.81 +115.09, 0.00, 116.66 +115.68, 0.00, 116.46 +116.18, 0.00, 116.42 +116.68, 0.00, 116.37 +117.27, 0.00, 116.29 +117.77, 0.00, 116.16 +118.36, 0.00, 115.93 +118.98, 0.00, 115.73 +119.54, 0.00, 115.55 +120.13, 0.00, 115.34 +120.67, 0.00, 115.16 +121.24, 0.00, 115.00 +121.84, 0.00, 114.84 +122.40, 0.00, 114.80 +123.01, 0.00, 114.74 +123.51, 0.00, 114.59 +124.10, 0.00, 114.45 +124.70, 0.00, 114.25 +125.26, 0.00, 114.03 +125.85, 0.00, 113.94 +126.35, 0.00, 113.71 +126.95, 0.00, 113.58 +127.45, 0.00, 113.46 +127.95, 0.00, 113.40 +128.53, 0.00, 113.14 +129.12, 0.00, 112.81 +129.65, 0.00, 112.53 +130.15, 0.00, 112.33 +130.75, 0.00, 112.24 +131.34, 0.00, 112.04 +131.99, 0.00, 111.89 +132.49, 0.00, 111.70 +132.99, 0.00, 111.35 +133.57, 0.00, 111.26 +134.07, 0.00, 110.93 +134.67, 0.00, 110.69 +135.17, 0.00, 110.51 +135.69, 0.00, 110.37 +136.27, 0.00, 110.19 +136.86, 0.00, 110.07 +137.36, 0.00, 109.96 +137.96, 0.00, 109.64 +138.46, 0.00, 109.40 +138.96, 0.00, 109.22 +139.63, 0.00, 109.06 +140.21, 0.00, 108.95 +140.72, 0.00, 108.62 +141.30, 0.00, 108.50 +141.91, 0.00, 108.41 +142.41, 0.00, 108.25 +142.92, 0.00, 107.93 +143.51, 0.00, 107.85 +144.01, 0.00, 107.66 +144.68, 0.00, 107.53 +145.25, 0.00, 107.47 +145.77, 0.00, 107.15 +146.38, 5000.00, 107.10 +147.05, 5000.00, 106.82 +147.55, 5000.00, 106.63 +148.13, 5000.00, 106.58 +148.68, 5000.00, 106.56 +149.27, 5000.00, 106.41 +149.88, 5000.00, 106.61 +150.38, 5000.00, 106.80 +150.98, 5000.00, 107.33 +151.48, 5000.00, 107.89 +152.09, 5000.00, 108.73 +152.71, 5000.00, 109.79 +153.25, 5000.00, 110.55 +153.75, 5000.00, 111.82 +154.35, 5000.00, 112.69 +154.97, 5000.00, 114.28 +155.47, 5000.00, 115.32 +156.06, 5000.00, 117.05 +156.56, 5000.00, 118.39 +157.06, 5000.00, 120.40 +157.66, 5000.00, 121.53 +158.16, 5000.00, 123.50 +158.77, 5000.00, 124.82 +159.27, 5000.00, 126.87 +159.86, 5000.00, 128.11 +160.36, 5000.00, 130.08 +160.95, 5000.00, 131.41 +161.56, 5000.00, 133.22 +162.06, 5000.00, 134.50 +162.65, 5000.00, 136.26 +163.20, 0.00, 137.35 +163.70, 0.00, 139.43 +164.29, 0.00, 140.53 +164.94, 0.00, 142.63 +165.44, 0.00, 144.56 +166.02, 0.00, 145.69 +166.52, 0.00, 146.98 +167.13, 0.00, 148.68 +167.63, 0.00, 150.21 +168.13, 0.00, 151.22 +168.72, 0.00, 152.23 +169.32, 0.00, 153.40 +169.97, 0.00, 154.63 +170.47, 0.00, 155.29 +170.97, 0.00, 156.44 +171.56, 0.00, 157.11 +172.06, 0.00, 158.17 +172.65, 0.00, 158.79 +173.15, 0.00, 159.52 +173.75, 0.00, 159.96 +174.25, 0.00, 160.47 +174.83, 0.00, 160.76 +175.38, 0.00, 161.12 +175.99, 0.00, 161.39 +176.49, 0.00, 161.70 +177.08, 0.00, 161.80 +177.68, 0.00, 161.87 +178.21, 0.00, 161.91 +178.71, 0.00, 162.02 +179.30, 0.00, 162.04 +179.90, 0.00, 162.06 +180.40, 0.00, 162.12 +181.07, 0.00, 162.29 +181.57, 0.00, 162.36 +182.17, 0.00, 162.37 +182.79, 0.00, 162.32 +183.29, 0.00, 162.20 +183.88, 0.00, 162.14 +184.41, 0.00, 162.10 +185.01, 0.00, 162.11 +185.51, 0.00, 161.92 +186.11, 0.00, 161.83 +186.71, 0.00, 161.64 +187.28, 0.00, 161.47 +187.88, 0.00, 161.33 +188.38, 0.00, 161.20 +188.99, 0.00, 161.05 +189.59, 0.00, 160.87 +190.09, 0.00, 160.70 +190.68, 0.00, 160.51 +191.25, 0.00, 160.30 +191.86, 0.00, 160.10 +192.36, 0.00, 159.79 +192.96, 0.00, 159.51 +193.56, 0.00, 159.30 +194.11, 0.00, 159.19 +194.65, 0.00, 158.79 +195.23, 0.00, 158.50 +195.83, 0.00, 158.32 +196.33, 0.00, 157.91 +196.93, 0.00, 157.71 +197.43, 0.00, 157.30 +197.93, 0.00, 157.14 +198.51, 0.00, 156.95 +199.11, 0.00, 156.45 +199.65, 0.00, 155.95 +200.23, 0.00, 155.70 +200.75, 0.00, 155.43 +201.25, 0.00, 155.19 +201.83, 0.00, 155.03 +202.33, 0.00, 154.63 +202.91, 0.00, 154.40 +203.51, 0.00, 154.01 +204.01, 0.00, 153.83 +204.51, 0.00, 153.52 +205.13, 0.00, 153.38 +205.67, 0.00, 152.92 +206.24, 0.00, 152.54 +206.84, 0.00, 152.02 +207.34, 0.00, 151.70 +207.99, 0.00, 151.23 +208.49, 5000.00, 150.99 +209.09, 5000.00, 150.87 +209.71, 5000.00, 150.36 +210.21, 5000.00, 150.18 +210.81, 5000.00, 149.89 +211.31, 5000.00, 149.80 +211.81, 5000.00, 149.95 +212.31, 5000.00, 149.97 +212.89, 5000.00, 150.16 +213.51, 5000.00, 150.46 +214.01, 5000.00, 151.00 +214.60, 5000.00, 151.54 +215.10, 5000.00, 152.41 +215.70, 5000.00, 152.94 +216.20, 5000.00, 153.65 +216.81, 5000.00, 154.73 +217.31, 5000.00, 155.81 +217.91, 5000.00, 156.56 +218.52, 5000.00, 157.68 +219.07, 5000.00, 158.57 +219.63, 5000.00, 159.59 +220.18, 5000.00, 160.33 +220.73, 5000.00, 161.51 +221.31, 5000.00, 162.74 +221.92, 5000.00, 163.61 +222.42, 5000.00, 165.01 +223.02, 5000.00, 165.96 +223.52, 5000.00, 167.21 +224.11, 5000.00, 167.89 +224.66, 5000.00, 169.13 +225.24, 5000.00, 169.81 +225.85, 5000.00, 171.00 +226.35, 5000.00, 171.73 +227.02, 5000.00, 172.86 +227.52, 5000.00, 174.01 +228.13, 5000.00, 174.73 +228.64, 5000.00, 175.82 +229.22, 5000.00, 176.49 +229.83, 5000.00, 177.48 +230.33, 5000.00, 177.99 +230.94, 5000.00, 178.48 +231.44, 5000.00, 178.90 +231.94, 5000.00, 179.08 +232.63, 5000.00, 179.55 +233.21, 5000.00, 179.95 +233.72, 5000.00, 180.20 +234.31, 5000.00, 180.70 +234.91, 0.00, 181.12 +235.41, 0.00, 181.50 +236.00, 0.00, 181.68 +236.50, 0.00, 181.80 +237.16, 0.00, 182.09 +237.70, 0.00, 182.19 +238.27, 0.00, 182.25 +238.88, 0.00, 182.42 +239.38, 0.00, 182.54 +239.95, 0.00, 182.68 +240.52, 0.00, 182.76 +241.12, 0.00, 182.75 +241.66, 0.00, 182.92 +242.24, 0.00, 182.98 +242.84, 0.00, 183.01 +243.34, 0.00, 183.06 +244.01, 0.00, 183.09 +244.51, 0.00, 183.12 +245.11, 0.00, 183.15 +245.70, 0.00, 183.32 +246.20, 0.00, 183.44 +246.81, 0.00, 183.72 +247.35, 0.00, 184.12 +247.97, 0.00, 184.72 +248.47, 0.00, 185.70 +249.05, 0.00, 186.40 +249.55, 0.00, 187.40 +250.16, 0.00, 188.03 +250.66, 0.00, 188.85 +251.24, 0.00, 189.37 +251.77, 0.00, 189.94 +252.27, 0.00, 190.37 +252.86, 0.00, 190.65 +253.36, 0.00, 190.84 +253.94, 0.00, 190.90 +254.54, 0.00, 191.13 +255.04, 0.00, 191.13 +255.54, 0.00, 191.07 +256.12, 0.00, 191.04 +256.67, 0.00, 190.91 +257.25, 0.00, 190.90 +257.86, 0.00, 190.75 +258.36, 0.00, 190.57 +259.04, 0.00, 190.13 +259.54, 0.00, 189.63 +260.15, 0.00, 189.25 +260.66, 0.00, 188.80 +261.24, 0.00, 188.50 +261.84, 0.00, 188.17 +262.34, 0.00, 187.88 +263.01, 0.00, 187.47 +263.51, 0.00, 187.19 +264.11, 0.00, 186.95 +264.62, 0.00, 186.68 +265.20, 0.00, 186.48 +265.70, 0.00, 185.99 +266.28, 0.00, 185.73 +266.89, 0.00, 185.33 +267.45, 0.00, 184.90 +268.05, 0.00, 184.70 +268.55, 0.00, 184.40 +269.16, 0.00, 184.17 +269.67, 0.00, 183.76 +270.25, 0.00, 183.58 +270.75, 0.00, 183.14 +271.25, 0.00, 182.69 +271.84, 0.00, 182.30 +272.34, 0.00, 181.79 +272.91, 0.00, 181.55 +273.51, 0.00, 181.00 +``` +Last step overshot (BangON) = 10 + +PID Tuner result: Kp = 435, Ki = 26, Kd = 1724 +PID Tuner result: Kp = 73, Ki = 1.5, Kd = 243 +PID Tuner result: Kp = 166, Ki = 3.8, Kd = 467 +PID Tuner result: Kp = 150, Ki = 3.8, Kd = 467 +PID Tuner result: Kp = 250, Ki = 7.3, Kd = 1717 diff --git a/assets/PID Tuner/My Tims HotPlate #2.md b/assets/PID Tuner/My Tims HotPlate #2.md new file mode 100644 index 0000000..6e3bac4 --- /dev/null +++ b/assets/PID Tuner/My Tims HotPlate #2.md @@ -0,0 +1,827 @@ +# My second "Tim's Hot-Plate" + +## Specifications + +- PTC, 220V, 400W, 12 * 7 cm +- K-Type TC via screw +- Arduino Nano 3.x, FTDI + +## PID Tuner + +### Sample 1, 2022-11-11 + +- Target Temp = 100 °C +- Temp Noise = 2 °C +- Temp Settle = 10 °C + +Process Data (manually insert the first two rows): +``` +-1, 0, 28.21 +-0.1, 0, 28.21 +0.00, 1, 28.21 +0.72, 1, 28.34 +1.44, 1, 28.24 +2.16, 1, 28.30 +2.88, 1, 28.70 +3.60, 1, 29.53 +4.32, 1, 30.79 +5.04, 1, 32.50 +5.75, 1, 35.12 +6.47, 1, 39.80 +7.19, 1, 44.21 +7.91, 1, 49.24 +8.64, 1, 54.64 +9.36, 1, 61.96 +10.09, 1, 67.31 +10.80, 1, 72.77 +11.52, 1, 77.98 +12.24, 1, 83.15 +12.97, 1, 89.97 +13.69, 1, 94.63 +14.41, 1, 99.13 +15.13, 0, 103.59 +15.85, 0, 107.80 +16.57, 0, 113.10 +17.27, 0, 116.71 +17.98, 0, 119.91 +18.70, 0, 122.54 +19.41, 0, 125.01 +20.13, 0, 127.77 +20.85, 0, 129.43 +21.57, 0, 130.75 +22.28, 0, 131.88 +22.99, 0, 132.80 +23.71, 0, 133.82 +24.43, 0, 134.36 +25.15, 0, 134.82 +25.87, 0, 135.15 +26.58, 0, 135.26 +27.31, 0, 135.43 +28.03, 0, 135.31 +28.75, 0, 135.29 +29.46, 0, 135.09 +30.17, 0, 135.08 +30.89, 0, 134.76 +31.61, 0, 134.65 +32.34, 0, 134.42 +33.06, 0, 134.20 +33.78, 0, 133.84 +34.49, 0, 133.29 +35.20, 0, 133.06 +35.92, 0, 132.53 +36.63, 0, 132.25 +37.34, 0, 131.93 +38.05, 0, 131.42 +38.76, 0, 131.18 +39.47, 0, 130.75 +40.19, 0, 130.59 +40.91, 0, 130.07 +41.63, 0, 129.77 +42.35, 0, 129.45 +43.06, 0, 129.10 +43.78, 0, 128.83 +44.50, 0, 128.28 +45.22, 0, 127.94 +45.93, 0, 127.39 +46.65, 0, 127.26 +47.35, 0, 126.90 +48.07, 0, 126.69 +48.79, 0, 126.32 +49.50, 0, 126.00 +50.22, 0, 125.76 +50.94, 0, 125.25 +51.66, 0, 124.89 +52.38, 0, 124.64 +53.10, 0, 124.25 +53.81, 0, 123.95 +54.53, 0, 123.60 +55.24, 0, 123.19 +``` +Overshot (BangON) = 35 + +### Sample 2, 2022-11-18 + +- Target Temp = 100 °C + +Process Data (manually insert the first two rows): +``` +89.27, 0.00, 23.92 +89.92, 0.00, 23.96 +90.54, 0.00, 23.85 +91.17, 0.00, 23.87 +91.77, 0.00, 23.95 +92.37, 0.00, 23.98 +93.01, 0.00, 23.89 +93.65, 0.00, 23.85 +94.26, 0.00, 23.88 +94.93, 5000.00, 23.91 +95.54, 5000.00, 23.95 +96.14, 5000.00, 24.01 +96.83, 5000.00, 24.10 +97.43, 5000.00, 24.21 +98.11, 5000.00, 24.95 +98.78, 5000.00, 26.07 +99.42, 5000.00, 27.62 +100.06, 5000.00, 29.93 +100.70, 5000.00, 32.98 +101.34, 5000.00, 36.77 +101.99, 5000.00, 41.20 +102.63, 5000.00, 46.27 +103.23, 5000.00, 51.72 +103.91, 5000.00, 57.25 +104.51, 5000.00, 60.89 +105.11, 5000.00, 66.32 +105.76, 5000.00, 71.66 +106.37, 5000.00, 76.82 +106.97, 5000.00, 81.84 +107.68, 5000.00, 86.96 +108.28, 5000.00, 90.19 +108.88, 5000.00, 94.68 +109.48, 5000.00, 99.04 +110.14, 0.00, 103.39 +110.75, 0.00, 107.44 +111.34, 0.00, 110.10 +111.85, 0.00, 113.78 +112.45, 0.00, 115.99 +113.11, 0.00, 119.23 +113.78, 0.00, 122.01 +114.42, 0.00, 124.38 +115.06, 0.00, 126.51 +115.69, 0.00, 128.32 +116.32, 0.00, 129.78 +116.92, 0.00, 130.91 +117.52, 0.00, 131.58 +118.13, 0.00, 132.42 +118.78, 0.00, 133.01 +119.39, 0.00, 133.51 +120.03, 0.00, 133.99 +120.71, 0.00, 134.30 +121.31, 0.00, 134.37 +121.91, 0.00, 134.59 +122.53, 0.00, 134.66 +123.17, 0.00, 134.64 +123.77, 0.00, 134.77 +124.37, 0.00, 134.72 +124.88, 0.00, 134.50 +125.48, 0.00, 134.36 +126.08, 0.00, 134.17 +126.59, 0.00, 134.01 +127.25, 0.00, 133.81 +127.89, 0.00, 133.65 +128.53, 0.00, 133.49 +129.18, 0.00, 133.06 +129.83, 0.00, 132.79 +130.48, 0.00, 132.46 +131.09, 0.00, 132.17 +131.69, 0.00, 131.81 +132.29, 0.00, 131.70 +132.91, 0.00, 131.45 +133.53, 0.00, 130.99 +134.13, 0.00, 130.69 +134.73, 0.00, 130.48 +135.35, 0.00, 130.08 +136.00, 0.00, 129.68 +136.64, 0.00, 129.40 +137.27, 0.00, 129.08 +137.91, 0.00, 128.72 +138.51, 0.00, 128.46 +139.11, 0.00, 128.29 +139.75, 0.00, 127.84 +140.39, 0.00, 127.37 +140.99, 0.00, 127.04 +141.66, 0.00, 126.60 +142.26, 0.00, 126.34 +142.86, 0.00, 126.14 +143.57, 0.00, 125.82 +144.22, 0.00, 125.66 +144.86, 0.00, 125.17 +145.50, 0.00, 124.95 +146.14, 0.00, 124.64 +146.79, 0.00, 124.32 +147.40, 0.00, 123.92 +148.04, 0.00, 123.66 +148.71, 0.00, 123.37 +149.31, 0.00, 123.19 +149.91, 0.00, 122.77 +150.62, 0.00, 122.47 +151.26, 0.00, 122.27 +151.89, 0.00, 122.00 +152.52, 0.00, 121.63 +153.15, 0.00, 121.29 +153.75, 0.00, 120.83 +154.35, 0.00, 120.75 +154.86, 0.00, 120.62 +155.46, 0.00, 120.44 +156.05, 0.00, 120.03 +156.69, 0.00, 119.86 +157.29, 0.00, 119.50 +157.89, 0.00, 119.31 +158.49, 0.00, 119.03 +159.13, 0.00, 118.74 +159.74, 0.00, 118.52 +160.34, 0.00, 118.20 +160.94, 0.00, 118.08 +161.55, 0.00, 117.77 +162.18, 0.00, 117.48 +162.82, 0.00, 117.13 +163.42, 0.00, 116.91 +164.08, 0.00, 116.64 +164.68, 0.00, 116.59 +165.37, 0.00, 116.26 +166.02, 0.00, 115.92 +166.66, 0.00, 115.71 +167.29, 0.00, 115.29 +167.93, 0.00, 114.98 +168.53, 0.00, 114.86 +169.13, 0.00, 114.82 +169.64, 0.00, 114.58 +170.24, 0.00, 114.50 +170.91, 0.00, 114.04 +171.56, 0.00, 113.79 +172.21, 0.00, 113.54 +172.84, 0.00, 113.31 +173.47, 0.00, 113.15 +174.08, 0.00, 112.86 +174.68, 0.00, 112.55 +175.28, 0.00, 112.49 +175.89, 0.00, 112.40 +176.50, 0.00, 112.05 +177.10, 0.00, 111.88 +177.70, 0.00, 111.68 +178.30, 0.00, 111.45 +178.83, 0.00, 111.29 +179.46, 0.00, 111.01 +180.09, 0.00, 110.71 +180.75, 0.00, 110.39 +181.36, 0.00, 110.16 +181.96, 0.00, 110.12 +182.66, 0.00, 109.86 +183.26, 0.00, 109.77 +183.86, 0.00, 109.52 +184.47, 0.00, 109.26 +185.10, 0.00, 109.10 +185.70, 0.00, 108.80 +186.31, 0.00, 108.78 +186.97, 0.00, 108.59 +187.62, 0.00, 108.42 +188.26, 0.00, 108.17 +188.90, 0.00, 107.97 +189.52, 0.00, 107.64 +190.12, 0.00, 107.43 +190.72, 0.00, 107.29 +191.34, 0.00, 107.10 +192.00, 0.00, 106.88 +192.63, 0.00, 106.69 +193.24, 0.00, 106.44 +193.91, 0.00, 106.17 +194.51, 0.00, 106.05 +195.11, 0.00, 105.86 +195.76, 0.00, 105.73 +196.40, 0.00, 105.43 +197.03, 0.00, 105.21 +197.69, 0.00, 104.95 +198.29, 0.00, 104.72 +198.89, 0.00, 104.64 +199.52, 0.00, 104.48 +200.18, 0.00, 104.23 +200.83, 0.00, 104.02 +201.48, 0.00, 103.93 +202.11, 0.00, 103.60 +202.71, 0.00, 103.47 +203.30, 0.00, 103.35 +203.82, 0.00, 103.11 +204.42, 0.00, 102.89 +205.09, 0.00, 102.66 +205.77, 0.00, 102.49 +206.41, 0.00, 102.24 +207.04, 0.00, 102.25 +207.68, 0.00, 101.90 +208.32, 0.00, 101.82 +208.97, 0.00, 101.70 +209.57, 0.00, 101.43 +210.17, 0.00, 101.32 +210.86, 0.00, 101.09 +211.46, 0.00, 100.97 +212.15, 0.00, 100.69 +212.81, 0.00, 100.55 +213.45, 0.00, 100.40 +214.09, 0.00, 100.12 +``` +Overshot (BangON) = 34 + +PID Tuner result: Kp = 126.2, Ki = 4.7, Kd = 379.1 + +### Sample 3, 2022-11-18 + +- Target Temp = 100 °C +- Output = pwmWindowMax / 5 + +Process Data (manually insert the first two rows): +``` +13.99, 0.00, 31.24 +14.61, 0.00, 31.21 +15.23, 0.00, 31.36 +15.84, 0.00, 31.35 +16.45, 0.00, 31.31 +17.06, 0.00, 31.32 +17.69, 0.00, 31.13 +18.31, 0.00, 31.22 +18.92, 0.00, 31.29 +19.55, 1000.00, 31.23 +20.15, 1000.00, 31.25 +20.75, 1000.00, 31.26 +21.35, 1000.00, 31.13 +22.05, 1000.00, 31.34 +22.67, 1000.00, 31.93 +23.29, 1000.00, 32.21 +23.89, 1000.00, 32.66 +24.49, 1000.00, 32.87 +25.09, 1000.00, 33.27 +25.72, 1000.00, 33.71 +26.32, 1000.00, 34.19 +26.92, 1000.00, 34.62 +27.61, 1000.00, 35.17 +28.24, 1000.00, 36.05 +28.87, 1000.00, 36.74 +29.51, 1000.00, 37.41 +30.15, 1000.00, 38.12 +30.75, 1000.00, 38.76 +31.35, 1000.00, 39.27 +32.04, 1000.00, 39.96 +32.69, 1000.00, 40.86 +33.31, 1000.00, 41.88 +33.95, 1000.00, 42.78 +34.60, 1000.00, 43.63 +35.26, 1000.00, 44.44 +35.89, 1000.00, 45.29 +36.49, 1000.00, 46.21 +37.09, 1000.00, 47.00 +37.79, 1000.00, 47.83 +38.42, 1000.00, 49.03 +39.05, 1000.00, 50.10 +39.71, 1000.00, 50.87 +40.35, 1000.00, 51.73 +40.96, 1000.00, 52.66 +41.61, 1000.00, 53.70 +42.21, 1000.00, 54.54 +42.87, 1000.00, 55.81 +43.51, 1000.00, 57.00 +44.15, 1000.00, 58.13 +44.82, 1000.00, 59.27 +45.47, 1000.00, 60.28 +46.10, 1000.00, 61.49 +46.70, 1000.00, 62.59 +47.30, 1000.00, 63.45 +47.90, 1000.00, 64.93 +48.50, 1000.00, 66.24 +49.12, 1000.00, 67.38 +49.72, 1000.00, 68.12 +50.32, 1000.00, 69.11 +50.95, 1000.00, 70.22 +51.55, 1000.00, 71.43 +52.15, 1000.00, 72.32 +52.82, 1000.00, 73.91 +53.46, 1000.00, 75.45 +54.09, 1000.00, 76.83 +54.75, 1000.00, 78.02 +55.40, 1000.00, 79.25 +56.04, 1000.00, 80.50 +56.66, 1000.00, 82.30 +57.26, 1000.00, 83.89 +57.86, 1000.00, 85.11 +58.56, 1000.00, 86.90 +59.20, 1000.00, 88.73 +59.86, 1000.00, 90.35 +60.50, 1000.00, 91.77 +61.12, 1000.00, 93.16 +61.72, 1000.00, 94.95 +62.32, 1000.00, 96.14 +62.92, 1000.00, 98.02 +63.53, 1000.00, 99.79 +64.12, 0.00, 101.27 +64.73, 0.00, 102.27 +65.34, 0.00, 103.75 +66.00, 0.00, 104.96 +66.65, 0.00, 105.83 +67.26, 0.00, 106.69 +67.92, 0.00, 107.38 +68.52, 0.00, 107.91 +69.12, 0.00, 108.25 +69.76, 0.00, 108.60 +70.41, 0.00, 108.89 +71.04, 0.00, 109.14 +71.69, 0.00, 109.23 +72.29, 0.00, 109.45 +72.89, 0.00, 109.44 +73.53, 0.00, 109.45 +74.18, 0.00, 109.31 +74.84, 0.00, 109.35 +75.49, 0.00, 109.30 +76.11, 0.00, 109.10 +76.71, 0.00, 108.92 +77.31, 0.00, 108.95 +77.83, 0.00, 108.90 +78.43, 0.00, 108.68 +79.12, 0.00, 108.38 +79.72, 0.00, 108.20 +80.33, 0.00, 107.90 +80.93, 0.00, 107.66 +81.53, 0.00, 107.60 +82.13, 0.00, 107.32 +82.78, 0.00, 107.05 +83.42, 0.00, 106.88 +84.05, 0.00, 106.60 +84.71, 0.00, 106.49 +85.31, 0.00, 106.26 +85.91, 0.00, 106.07 +86.54, 0.00, 105.78 +87.19, 0.00, 105.60 +87.83, 0.00, 105.20 +88.45, 0.00, 105.03 +89.09, 0.00, 104.84 +89.69, 0.00, 104.71 +90.31, 0.00, 104.50 +90.97, 0.00, 104.17 +91.61, 0.00, 104.04 +92.27, 0.00, 103.85 +92.91, 0.00, 103.63 +93.54, 0.00, 103.32 +94.14, 0.00, 103.08 +94.82, 0.00, 102.83 +95.42, 0.00, 102.68 +96.10, 0.00, 102.41 +96.70, 0.00, 102.30 +97.30, 0.00, 101.90 +97.90, 0.00, 101.81 +98.50, 0.00, 101.69 +99.10, 0.00, 101.52 +99.74, 0.00, 101.34 +100.35, 0.00, 101.17 +100.95, 0.00, 100.97 +101.65, 0.00, 100.69 +102.25, 0.00, 100.57 +102.85, 0.00, 100.31 +103.48, 0.00, 100.05 +``` +Overshot (BangON) = 9 + +PID Tuner result: Kp = 82, Ki = 2, Kd = 675 + +### Sample 4, 2022-11-21 + +- Target Temp = 90 °C +- Output = pwmWindowMax = 5000 + +Process Data (manually insert the first two rows): +``` +22.08, 0.00, 36.91 +22.60, 0.00, 36.94 +23.10, 0.00, 36.73 +23.64, 0.00, 36.62 +24.16, 0.00, 36.56 +24.68, 0.00, 36.54 +25.20, 0.00, 36.54 +25.70, 0.00, 36.66 +26.20, 0.00, 36.56 +26.76, 0.00, 36.72 +27.28, 5000.00, 36.56 +27.83, 5000.00, 36.67 +28.36, 5000.00, 36.65 +28.86, 5000.00, 36.66 +29.43, 5000.00, 36.80 +29.93, 5000.00, 37.01 +30.48, 5000.00, 37.58 +31.01, 5000.00, 38.09 +31.51, 5000.00, 39.46 +32.08, 5000.00, 40.62 +32.62, 5000.00, 43.13 +33.15, 5000.00, 45.23 +33.68, 5000.00, 47.65 +34.18, 5000.00, 51.86 +34.75, 5000.00, 55.00 +35.25, 5000.00, 59.92 +35.83, 5000.00, 63.32 +36.33, 5000.00, 66.75 +36.83, 5000.00, 71.89 +37.41, 5000.00, 75.35 +37.91, 5000.00, 80.53 +38.47, 5000.00, 83.89 +38.97, 5000.00, 87.06 +39.47, 0.00, 91.94 +40.04, 0.00, 95.06 +40.54, 0.00, 99.58 +41.10, 0.00, 102.35 +41.65, 0.00, 106.25 +42.15, 0.00, 108.79 +42.71, 0.00, 110.98 +43.21, 0.00, 113.98 +43.79, 0.00, 115.80 +44.29, 0.00, 117.32 +44.85, 0.00, 119.42 +45.37, 0.00, 120.72 +45.87, 0.00, 122.39 +46.45, 0.00, 123.29 +46.95, 0.00, 124.44 +47.51, 0.00, 125.09 +48.01, 0.00, 125.64 +48.51, 0.00, 126.21 +49.11, 0.00, 126.64 +49.65, 0.00, 127.12 +50.18, 0.00, 127.39 +50.72, 0.00, 127.70 +51.26, 0.00, 127.81 +51.76, 0.00, 127.97 +52.34, 0.00, 128.15 +52.86, 0.00, 128.10 +53.36, 0.00, 127.95 +53.92, 0.00, 128.06 +54.42, 0.00, 128.08 +55.00, 0.00, 127.96 +55.50, 0.00, 127.71 +56.00, 0.00, 127.62 +56.59, 0.00, 127.57 +57.09, 0.00, 127.49 +57.67, 0.00, 127.35 +58.17, 0.00, 127.14 +58.74, 0.00, 126.76 +59.27, 0.00, 126.53 +59.77, 0.00, 126.26 +60.33, 0.00, 126.20 +60.83, 0.00, 125.96 +61.41, 0.00, 125.76 +61.91, 0.00, 125.52 +62.41, 0.00, 125.27 +63.01, 0.00, 125.08 +63.51, 0.00, 124.75 +64.07, 0.00, 124.47 +64.57, 0.00, 124.25 +65.13, 0.00, 123.97 +65.68, 0.00, 123.80 +66.18, 0.00, 123.40 +66.75, 0.00, 123.30 +67.25, 0.00, 122.84 +67.83, 0.00, 122.57 +68.33, 0.00, 122.40 +68.89, 0.00, 122.21 +69.41, 0.00, 121.96 +69.91, 0.00, 121.65 +70.46, 0.00, 121.35 +70.96, 0.00, 121.28 +71.46, 0.00, 121.01 +72.06, 0.00, 120.79 +72.56, 0.00, 120.52 +73.12, 0.00, 120.25 +73.66, 0.00, 119.97 +74.19, 0.00, 119.65 +74.73, 0.00, 119.42 +75.23, 0.00, 119.13 +75.80, 0.00, 118.99 +76.30, 0.00, 118.78 +76.87, 0.00, 118.63 +77.37, 0.00, 118.44 +77.87, 0.00, 118.13 +``` +Overshot (BangON) = 38 + +PID Tuner result: Kp = 78, Ki = 2.2, Kd = 167 + +### Sample 5, 2022-11-21 + +- Target Temp = 90 °C +- Output = pwmWindowMax = 1000 + +Process Data (manually insert the first two rows): +``` +12.39, 0.00, 41.44 +12.95, 0.00, 41.56 +13.53, 1000.00, 41.58 +14.03, 1000.00, 41.49 +14.70, 1000.00, 41.53 +15.20, 1000.00, 41.66 +15.80, 1000.00, 41.78 +16.40, 1000.00, 41.90 +16.90, 1000.00, 42.25 +17.41, 1000.00, 42.94 +18.03, 1000.00, 43.66 +18.53, 1000.00, 45.34 +19.13, 1000.00, 47.00 +19.64, 1000.00, 49.99 +20.21, 1000.00, 52.50 +20.72, 1000.00, 55.37 +21.22, 1000.00, 59.85 +21.81, 1000.00, 63.22 +22.31, 1000.00, 68.27 +22.88, 1000.00, 71.91 +23.38, 1000.00, 75.30 +23.96, 1000.00, 80.58 +24.46, 1000.00, 84.09 +24.98, 1000.00, 89.22 +25.58, 0.00, 92.54 +26.08, 0.00, 97.36 +26.68, 0.00, 100.46 +27.18, 0.00, 104.76 +27.76, 0.00, 107.53 +28.32, 0.00, 111.30 +28.94, 0.00, 113.47 +29.44, 0.00, 116.47 +30.02, 0.00, 118.21 +30.52, 0.00, 119.66 +31.13, 0.00, 121.69 +31.63, 0.00, 122.83 +32.13, 0.00, 124.20 +32.71, 0.00, 125.09 +33.21, 0.00, 126.33 +33.80, 0.00, 126.94 +34.30, 0.00, 127.52 +34.91, 0.00, 127.83 +35.52, 0.00, 128.45 +36.07, 0.00, 128.73 +36.62, 0.00, 129.12 +37.20, 0.00, 129.40 +37.71, 0.00, 129.53 +38.29, 0.00, 129.49 +38.79, 0.00, 129.61 +39.37, 0.00, 129.58 +40.00, 0.00, 129.56 +40.50, 0.00, 129.54 +41.08, 0.00, 129.39 +41.63, 0.00, 129.13 +42.13, 0.00, 129.08 +42.73, 0.00, 128.81 +43.23, 0.00, 128.78 +43.81, 0.00, 128.68 +44.31, 0.00, 128.40 +44.89, 0.00, 128.13 +45.50, 0.00, 127.93 +46.05, 0.00, 127.81 +46.55, 0.00, 127.45 +47.12, 0.00, 127.38 +47.67, 0.00, 126.96 +48.25, 0.00, 126.70 +48.75, 0.00, 126.47 +49.32, 0.00, 126.35 +49.95, 0.00, 125.99 +50.45, 0.00, 125.77 +50.97, 0.00, 125.45 +51.57, 0.00, 125.25 +52.07, 0.00, 124.96 +52.68, 0.00, 124.83 +53.18, 0.00, 124.37 +53.75, 0.00, 124.10 +54.27, 0.00, 123.98 +54.77, 0.00, 123.78 +55.35, 0.00, 123.59 +56.01, 0.00, 123.06 +56.51, 0.00, 122.76 +57.08, 0.00, 122.62 +57.63, 0.00, 122.25 +58.20, 0.00, 122.02 +58.75, 0.00, 121.67 +59.36, 0.00, 121.48 +60.01, 0.00, 121.23 +60.51, 0.00, 120.96 +61.12, 0.00, 120.75 +61.63, 0.00, 120.47 +62.21, 0.00, 120.25 +62.72, 0.00, 120.11 +63.22, 0.00, 119.75 +63.81, 0.00, 119.56 +64.31, 0.00, 119.31 +``` +Overshot (BangON) = 39 + +PID Tuner result: Kp = 13.7, Ki = 0.4, Kd = 34.7 + +### Sample 6, 2022-11-21 + +- Target Temp = 90 °C +- Output = pwmWindowMax = 15000 + +Process Data (manually insert the first two rows): +``` +18.80, 0.00, 35.19 +19.37, 0.00, 35.18 +19.96, 0.00, 35.20 +20.46, 0.00, 35.14 +20.96, 0.00, 35.15 +21.62, 0.00, 35.17 +22.18, 0.00, 35.01 +22.71, 0.00, 34.92 +23.30, 0.00, 35.00 +23.94, 0.00, 35.02 +24.51, 0.00, 35.04 +25.09, 0.00, 35.03 +25.62, 0.00, 35.01 +26.12, 0.00, 34.96 +26.70, 0.00, 35.03 +27.29, 0.00, 34.91 +27.87, 0.00, 34.99 +28.45, 0.00, 34.95 +28.95, 0.00, 34.93 +29.61, 0.00, 34.96 +30.11, 0.00, 34.92 +30.69, 0.00, 34.99 +31.28, 0.00, 34.92 +31.78, 0.00, 34.86 +32.28, 0.00, 34.83 +32.85, 0.00, 34.70 +33.35, 0.00, 34.82 +34.00, 15000.00, 34.74 +34.50, 15000.00, 34.83 +35.08, 15000.00, 34.85 +35.63, 15000.00, 34.80 +36.21, 15000.00, 34.83 +36.76, 15000.00, 35.14 +37.36, 15000.00, 35.59 +38.02, 15000.00, 36.52 +38.52, 15000.00, 38.10 +39.13, 15000.00, 39.43 +39.63, 15000.00, 42.14 +40.13, 15000.00, 44.46 +40.73, 15000.00, 47.04 +41.34, 15000.00, 51.37 +42.00, 15000.00, 56.42 +42.50, 15000.00, 59.87 +43.11, 15000.00, 65.23 +43.62, 15000.00, 68.84 +44.12, 15000.00, 74.41 +44.73, 15000.00, 77.98 +45.33, 15000.00, 83.17 +46.00, 15000.00, 88.10 +46.50, 0.00, 91.46 +47.11, 0.00, 96.30 +47.65, 0.00, 101.03 +48.15, 0.00, 104.01 +48.73, 0.00, 106.67 +49.23, 0.00, 110.52 +49.81, 0.00, 112.78 +50.42, 0.00, 115.90 +50.92, 0.00, 117.79 +51.43, 0.00, 120.14 +52.04, 0.00, 121.58 +52.54, 0.00, 123.43 +53.15, 0.00, 124.50 +53.66, 0.00, 125.85 +54.24, 0.00, 126.58 +54.85, 0.00, 127.44 +55.35, 0.00, 128.01 +55.86, 0.00, 128.58 +56.36, 0.00, 128.92 +56.94, 0.00, 129.22 +57.55, 0.00, 129.41 +58.05, 0.00, 129.62 +58.63, 0.00, 129.83 +59.13, 0.00, 129.97 +59.73, 0.00, 130.19 +60.23, 0.00, 130.11 +60.74, 0.00, 130.15 +61.24, 0.00, 130.06 +61.82, 0.00, 130.04 +62.32, 0.00, 129.96 +62.90, 0.00, 129.84 +63.40, 0.00, 129.72 +63.99, 0.00, 129.64 +64.49, 0.00, 129.37 +65.08, 0.00, 129.10 +65.59, 0.00, 129.02 +66.09, 0.00, 128.93 +66.67, 0.00, 128.68 +67.17, 0.00, 128.56 +67.77, 0.00, 128.18 +68.27, 0.00, 127.91 +68.84, 0.00, 127.63 +69.34, 0.00, 127.44 +69.95, 0.00, 127.18 +70.49, 0.00, 127.04 +71.10, 0.00, 126.80 +71.65, 0.00, 126.43 +72.23, 0.00, 126.05 +72.73, 0.00, 125.69 +73.31, 0.00, 125.58 +73.81, 0.00, 125.30 +74.39, 0.00, 125.04 +74.94, 0.00, 124.79 +75.44, 0.00, 124.52 +76.03, 0.00, 124.27 +76.53, 0.00, 124.04 +77.11, 0.00, 123.85 +77.62, 0.00, 123.63 +78.20, 0.00, 123.21 +78.71, 0.00, 122.93 +79.29, 0.00, 122.77 +79.80, 0.00, 122.60 +80.30, 0.00, 122.37 +80.87, 0.00, 122.19 +81.37, 0.00, 121.79 +81.95, 0.00, 121.60 +82.45, 0.00, 121.34 +83.02, 0.00, 121.05 +83.58, 0.00, 120.84 +84.08, 0.00, 120.57 +84.66, 0.00, 120.37 +85.16, 0.00, 120.10 +85.75, 0.00, 120.02 +``` +Overshot (BangON) = 40 + +PID Tuner result: Kp = 194, Ki = 5.2, Kd = 803 diff --git a/assets/images/PIDTuner-Heat.jpg b/assets/images/PIDTuner-Heat.jpg new file mode 100644 index 0000000..49e4b64 Binary files /dev/null and b/assets/images/PIDTuner-Heat.jpg differ diff --git a/assets/images/PIDTuner-Output-1.jpg b/assets/images/PIDTuner-Output-1.jpg new file mode 100644 index 0000000..5948837 Binary files /dev/null and b/assets/images/PIDTuner-Output-1.jpg differ diff --git a/assets/images/PIDTuner-Settle.jpg b/assets/images/PIDTuner-Settle.jpg new file mode 100644 index 0000000..8bc21a6 Binary files /dev/null and b/assets/images/PIDTuner-Settle.jpg differ diff --git a/assets/images/PIDTuner-Start.jpg b/assets/images/PIDTuner-Start.jpg new file mode 100644 index 0000000..1ab2997 Binary files /dev/null and b/assets/images/PIDTuner-Start.jpg differ diff --git a/assets/images/ReflowProfile-1.jpg b/assets/images/ReflowProfile-1.jpg index 2b2c114..a974d35 100644 Binary files a/assets/images/ReflowProfile-1.jpg and b/assets/images/ReflowProfile-1.jpg differ diff --git a/assets/images/ReflowProfile-Start.jpg b/assets/images/ReflowProfile-Start.jpg index 57f0284..15f6c8e 100644 Binary files a/assets/images/ReflowProfile-Start.jpg and b/assets/images/ReflowProfile-Start.jpg differ diff --git a/assets/images/ReflowProfiles.jpg b/assets/images/ReflowProfiles.jpg index aec07ba..efa92fb 100644 Binary files a/assets/images/ReflowProfiles.jpg and b/assets/images/ReflowProfiles.jpg differ diff --git a/assets/images/Setup-1.jpg b/assets/images/Setup-1.jpg index 816351a..bfe81a5 100644 Binary files a/assets/images/Setup-1.jpg and b/assets/images/Setup-1.jpg differ diff --git a/assets/images/Setup-BangOFF.jpg b/assets/images/Setup-BangOFF.jpg index 774238a..5f4a20b 100644 Binary files a/assets/images/Setup-BangOFF.jpg and b/assets/images/Setup-BangOFF.jpg differ diff --git a/assets/images/Setup-BangON.jpg b/assets/images/Setup-BangON.jpg index dc9c436..fa024a5 100644 Binary files a/assets/images/Setup-BangON.jpg and b/assets/images/Setup-BangON.jpg differ diff --git a/assets/images/Setup-PID-Kd.jpg b/assets/images/Setup-PID-Kd.jpg index 107af99..0f189a4 100644 Binary files a/assets/images/Setup-PID-Kd.jpg and b/assets/images/Setup-PID-Kd.jpg differ diff --git a/assets/images/Setup-PID-Ki.jpg b/assets/images/Setup-PID-Ki.jpg index 1154cd3..4e1f417 100644 Binary files a/assets/images/Setup-PID-Ki.jpg and b/assets/images/Setup-PID-Ki.jpg differ diff --git a/assets/images/Setup-PID-Kp.jpg b/assets/images/Setup-PID-Kp.jpg new file mode 100644 index 0000000..7802058 Binary files /dev/null and b/assets/images/Setup-PID-Kp.jpg differ diff --git a/assets/images/Setup-PID.jpg b/assets/images/Setup-PID.jpg deleted file mode 100644 index 042aefa..0000000 Binary files a/assets/images/Setup-PID.jpg and /dev/null differ diff --git a/assets/images/Setup-SSR.jpg b/assets/images/Setup-SSR.jpg index 6c173d7..c4ba31b 100644 Binary files a/assets/images/Setup-SSR.jpg and b/assets/images/Setup-SSR.jpg differ diff --git a/assets/images/Setup-Save.jpg b/assets/images/Setup-Save.jpg index 5f431d7..f904b21 100644 Binary files a/assets/images/Setup-Save.jpg and b/assets/images/Setup-Save.jpg differ diff --git a/include/Display.hpp b/include/Display.hpp deleted file mode 100644 index e050e80..0000000 --- a/include/Display.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef Display_h -#define Display_h - -#include -#include -#include "main.hpp" -#include "Hotplate.hpp" - -class Display -{ -public: - enum uiMode - { - Main, - Setup - }; - - Display(); - void initialize(); - void update(Thermocouple *, Hotplate *); - void changeUiMode(uiMode nextUi); - -private: - U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2; - uiMode uiM = uiMode::Main; - - uint16_t _lastTarget; - bool _lastPower; - double _lastTemp; - short _lastProfileTimePosition = 0; - - void inputBangValues(); - void inputPidConstants(); - void inputReflowProfile(Hotplate *); - void inputSsrType(); - void mainScreen(Thermocouple *, Hotplate *); - void setStdFont(); - void setupScreen(Hotplate *); - void userInterfaceInputValue(const char *title, const char *pre, uint8_t *value, uint8_t lo, uint8_t hi, uint8_t digits, const char *post); - void userInterfaceInputDouble(const char *title, const char *pre, double *value, uint8_t numInt, uint8_t numDec, const char *post); - u8g2_uint_t drawUTF8Lines(u8g2_uint_t x, u8g2_uint_t y, u8g2_uint_t w, u8g2_uint_t line_height, const char *s); -}; - -#endif \ No newline at end of file diff --git a/include/Hotplate.hpp b/include/Hotplate.hpp index a841f68..6c28bbe 100644 --- a/include/Hotplate.hpp +++ b/include/Hotplate.hpp @@ -1,90 +1,85 @@ #ifndef Hotplate_h #define Hotplate_h -#define PROFILE_TIME_INTERVAL_MS 10000 +#define PID_TUNER_INTERVAL_MS 500 // How often Serial.print values for PID Tuner +#define PID_TUNER_TEMP_SETTLED_C 10 +#define PID_TUNER_TEMP_STEPS_C 30 // PID Tuner setpoint steps (after temp settle) to get a wide range of PID Tuner setps #include -#include "main.hpp" -#include "Thermocouple.hpp" + +#define PID_SAMPLE_MS 250 // Should be the shortest PTC-on time, but not shorter than a typical inrush-current period of a PTC (approx. 0.1s) class Hotplate { + const uint8_t _ssrPin; + public: - enum State + /* + * FIXME: Should switch to "flagged enums" and merge them to State, + * but they're tricky/ugly with <= C 11.x + */ + enum class Mode : uint8_t { - Off, - On, - // Autotune, + Manual = 0x0, + PIDTuner = 0x1, }; - enum Profile : uint8_t // User selectable reflow profile/mode + /* + * This State enum is for informational (display) AS WELL AS control flow purposes. + * It has mixed usage mainly to save some byte. + * At the moment there's only the PIDTuner who's using the control flow related items + * like (StandBy), Start, Heating and Settle and the used names are held to be generic, + * so that they can be used also for other (future) control flows. + * + * FIXME: Should switch to "flagged enums" and merge also Mode here, + * but they're tricky/ugly with <= C 11.x + */ + enum class State : uint8_t { - Manual, - Sn42Bi576Ag04, - Sn965Ag30Cu05, + // Control flow purposes + StandBy = 0x0, // Waiting for "Press to start" (a process flow) + Start = 0x1, // Start flow + Wait = 0x2, // Wait some off time + Heat = 0x4, // Heat up to to target temp + Settle = 0x8, // Wait temp get settled + // Informational (display) purposes + BangOn = 0x10, + BangOff = 0x20, + PID = 0x40, }; - const char *profile2str[3] = { - [Manual] = "Manual", - [Sn42Bi576Ag04] = "Sn42/Bi57.6/Ag0.4", - [Sn965Ag30Cu05] = "Sn96.5/Ag3.0/Cu0.5", - }; + Hotplate(uint8_t ssr_pin); - enum ControllerState - { - off, - pid, - bangOn, - bangOff, - }; + void setup(); + void loop(); - Hotplate(uint8_t ssr_pin); - void compute(float temp); - ControllerState getControllerState(); - uint16_t getOutput(); - short getProfileTimePosition(); - bool getPower(); - uint16_t getSetpoint(); - void runProfile(); + Mode getMode() { return _mode; }; + uint16_t getOutput() { return _output; }; + bool getPower() { return _power; }; + uint16_t getSetpoint() { return _setpoint; }; + State getState() { return _state; }; + + bool isStandBy() { return (isMode(Mode::PIDTuner) && isState(State::StandBy)); }; + bool isMode(Mode checkMode) { return _mode == checkMode; }; + bool isState(State checkState) { return _state == checkState; }; + + void setMode(Mode newMode) { _mode = newMode; }; + void setState(State newState) { _state = newState; }; void setSetpoint(uint16_t setpoint); + void updatePidGains(); private: - typedef struct - { - uint16_t time_s; // After n seconds... - uint16_t temp_c; // reach this target temp - } ProfileTimeTarget; - - typedef struct - { - ProfileTimeTarget *timeTargets; - uint8_t size; // size of timeTargets[] - uint16_t duration_s; // Duration (s) of the complete profile (last entry) - } ProfileTimeTargets; - - // FIXME: Should be possible directly within mode2timeTargets - ProfileTimeTarget _profileTimeTargets_Sn42Bi576Ag04[4] = {{90, 90}, {180, 130}, {210, 138}, {240, 165}}; - ProfileTimeTargets _profileTimeTarget_Sn42Bi576Ag04 = {_profileTimeTargets_Sn42Bi576Ag04, sizeof(_profileTimeTargets_Sn42Bi576Ag04) / sizeof(ProfileTimeTarget), 240}; - // - ProfileTimeTarget _profileTimeTargets_tSn965Ag30Cu05[4] = {{90, 150}, {180, 175}, {210, 217}, {240, 249}}; - ProfileTimeTargets _profileTimeTarget_tSn965Ag30Cu05 = {_profileTimeTargets_tSn965Ag30Cu05, sizeof(_profileTimeTargets_tSn965Ag30Cu05) / sizeof(ProfileTimeTarget), 240}; - - ProfileTimeTargets *_profile2timeTargets[3] = { - [Manual] = nullptr, - [Sn42Bi576Ag04] = &_profileTimeTarget_Sn42Bi576Ag04, - [Sn965Ag30Cu05] = &_profileTimeTarget_tSn965Ag30Cu05, - }; - AutoPID _myPID; - State _state = State::Off; - double _input = 0, _setpoint = 0, _output = 0; - uint32_t _pwmWindowStart_ms, _profileStart_ms, _profileNext_ms = 0, _pidTunerNext_ms = 0; - ControllerState _controllerState = ControllerState::off; + double _input, _setpoint = 0, _output = 0; + uint32_t _nextInterval_ms = 0, _pwmWindowStart_ms, _pidTunerOutputNext_ms = 0; + Mode _mode = Mode::Manual; + State _state = State::StandBy; bool _power = false; - uint8_t _ssrPin; - short getProfileTemp(); + uint16_t _pidTunerTempTarget, _pidTunerTempMax; + + bool pwmWindowReached(); void setPower(bool); }; diff --git a/include/Led.hpp b/include/Led.hpp index bde2595..0ecd835 100644 --- a/include/Led.hpp +++ b/include/Led.hpp @@ -11,13 +11,12 @@ class Led { -public: - Led(uint8_t pin); + const uint8_t _pin; - void blinkByTemp(double temp); +public: + Led(const uint8_t pin); -private: - uint8_t _pin; + void blinkByTemp(const float temp); }; #endif \ No newline at end of file diff --git a/include/Profile.hpp b/include/Profile.hpp new file mode 100644 index 0000000..b143b95 --- /dev/null +++ b/include/Profile.hpp @@ -0,0 +1,60 @@ +#ifndef Profile_h +#define Profile_h + +#define PROFILE_TIME_INTERVAL_MS 10000 // Allows a user to adjust the target for the amount of interval + +class Profile +{ +public: + enum Profiles : uint8_t // User selectable reflow profile/mode + { + Manual, + Sn42Bi576Ag04, + Sn965Ag30Cu05, + }; + + const char *profile2str[3] = { + [Manual] = "Manual", + [Sn42Bi576Ag04] = "Sn42/Bi57.6/Ag0.4", + [Sn965Ag30Cu05] = "Sn96.5/Ag3.0/Cu0.5", + }; + + Profile() {}; + void loop(); + + short getSecondsLeft(); + + bool isStandBy(); + + bool startProfile(); + void stopProfile(); + +private: + typedef struct + { + uint16_t time_s; // After n seconds... + uint16_t temp_c; // reach this target temp + } ProfileTimeTarget; + + typedef struct + { + uint8_t length; // length of (the next) timeTargets[] + ProfileTimeTarget *timeTargets; + uint16_t duration_s; // Duration (s) of the complete profile (last entry) + } ProfileTimeTargets; + + // FIXME: Should be possible directly within _profile2timeTargets + const ProfileTimeTargets _profileTimeTarget_Sn42Bi576Ag04 = {4, (ProfileTimeTarget[]){{90, 90}, {180, 130}, {210, 138}, {240, 165}}, 240}; + const ProfileTimeTargets _profileTimeTarget_tSn965Ag30Cu05 = {4, (ProfileTimeTarget[]){{90, 150}, {180, 175}, {210, 217}, {240, 249}}, 240}; + ProfileTimeTargets const *_profile2timeTargets[3] = { + [Manual] = nullptr, + [Sn42Bi576Ag04] = &_profileTimeTarget_Sn42Bi576Ag04, + [Sn965Ag30Cu05] = &_profileTimeTarget_tSn965Ag30Cu05, + }; + + uint32_t _nextInterval_ms = 0, _profileStart_ms = 0; + + uint16_t getTempTarget(); +}; + +#endif \ No newline at end of file diff --git a/include/Thermocouple.hpp b/include/Thermocouple.hpp index 6161d03..bbdea98 100644 --- a/include/Thermocouple.hpp +++ b/include/Thermocouple.hpp @@ -4,16 +4,25 @@ #include #define TC_MAX_READ_INTERVAL_MS 220 // MAX6675 module can read values every 170-220 ms +#define TC_AVG_SAMPLES 5 // How much samples to use for average calculation. 5 sample @ 220ms result in a max temp delay of approx. 1s -class Thermocouple { +/* + * Simple Thermocouple wrapper around MAX6675. Mainly to be open for other TC controller... + * Later, one might implement a bridge pattern + */ +class Thermocouple +{ public: - Thermocouple(int8_t pin_CLK, int8_t pin_CS, int8_t pin_DO); + Thermocouple(const int8_t pin_CLK, const int8_t pin_CS, const int8_t pin_DO); float getTemperature(); + float getTemperatureAverage(); private: - MAX6675 MaxTc; - unsigned long _lastRead_ms = 0; - float _lastTemp; + MAX6675 _Tc; + uint32_t _nextRead_ms = 0; + float _lastTemp, _avgTemp; + + void readTemperature(); }; #endif \ No newline at end of file diff --git a/include/Ui.hpp b/include/Ui.hpp new file mode 100644 index 0000000..b53b9bc --- /dev/null +++ b/include/Ui.hpp @@ -0,0 +1,58 @@ +#ifndef Ui_h +#define Ui_h + +#include +#include +#include "Hotplate.hpp" + +#define INTERVAL_DISP 100 // (max) Display refresh rate (if dirty) + +class Ui +{ +public: + enum Mode + { + Main, + Setup + }; + + Ui(); + void setup(); + void loop(); + + void changeMode(Mode nextMode) { _mode = nextMode; }; + +private: + typedef struct MainScreenCrcData + { + Hotplate::Mode hpMode; + bool hpPower; + uint16_t hpSetpoint; + Hotplate::State hpState; + short profileSecLeft; + float tcTempAvg; + } MainScreenCrcData; + + U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2; + Mode _mode = Mode::Main; + + uint32_t _nextInterval_ms = 0; + uint32_t _lastMainScreenCrc; + + void displayMainScreen(); + void displaySetupScreen(); + + void inputBangValues(); + void inputMaxTemp(); + void inputPidConstants(); + void inputReflowProfile(); + void inputSsrType(); + + void setStdFont(); + + void userInterfaceInputDouble(const char *title, const char *pre, double *value, uint8_t numInt, uint8_t numDec, const char *post); + + u8g2_uint_t drawUTF8Lines(u8g2_uint_t x, u8g2_uint_t y, u8g2_uint_t w, u8g2_uint_t line_height, const char *s); +}; + +#endif \ No newline at end of file diff --git a/include/config.hpp b/include/config.hpp index cb5318e..3cab520 100644 --- a/include/config.hpp +++ b/include/config.hpp @@ -1,59 +1,46 @@ -#pragma once +#ifndef config_h +#define config_h -#include "Hotplate.hpp" +#include "Profile.hpp" + +#define CONFIG_VERSION 8 // Change to force reload of default config even if config structure hasn't changed namespace Config { - typedef struct Conf // Default config if read of EEPROM fails, or not set +#pragma pack(push, 1) + struct Conf // Default config if read of EEPROM fails, or not set { - bool disp_unit_c = true; // °C/F - - uint16_t pid_pwm_window_ms = 5000; // For best autotune results, this should be at least system-temp-delay time long - uint16_t pid_sample_ms = 200; // Should be the shortest PTC-on time, but not shorter than a typical inrush-current period of a PTC (approx. 0.1s) - uint16_t pid_max_temp_c = 300; // Max. PTC/PID temperature (*C) - - /* Kp tuning (with TC cables around plate), BangOn & BangOff = 0: - * Kp Ki Kd Setpoint °C Result - * ------------------------------------------------------------------- - * 10 0 0 165 Max. 159, then approx. 152 +/- 1 - * 40 0 0 165 Max. 169, then 158-162 - * 30 0 0 165 Max. 170, then 159-166 - * 20 0 0 165 Max. 168, then 155-156 Quite good - * 15 0 0 165 Max. 164, then 153-162 - * 10 0 0 165 Max. 160, then 140-143. Repeated test, quite slow! - * 20 0 0 165 Max. 164, then 150-162 - * 50 0 0 165 Max. 170, then 156-165 - */ - double pid_Kp = 50; - - /* Ki tuning (with TC cables around plate), BangOn & BangOff = 0: - * Kp Ki Kd Setpoint °C Result - * ------------------------------------------------------------------- - * 20 100 0 165 Max. 180, aborted - * 20 300 0 165 Max. 181, aborted - * 20 10 0 165 Max. 181, then 168-177 - * 20 5 0 165 Max. 178, then 167-175 - */ - double pid_Ki = 0; - double pid_Kd = 0; - uint8_t pid_bangOn_temp_c = 40; - uint8_t pid_bangOff_temp_c = 5; + bool disp_unit_c = true; // °C/F - Hotplate::Profile profile = Hotplate::Profile::Manual; + uint8_t max_temp_c = 200; // Max. possible (or allowed) heater temperature (*C) + uint16_t pid_pwm_window_ms = 5000; // For easiest handling, this might/should be approx. system-temp-delay time long + + double pid_Kp = 100.0; + double pid_Ki = 2.0; + double pid_Kd = 422.0; + + uint8_t pid_bangOn_temp_c = 50; + uint8_t pid_bangOff_temp_c = 5; + + Profile::Profiles profile = Profile::Profiles::Manual; + bool ssr_active_low = true; // SSR = on @ low level = true, or on high level - unsigned long pid_tuner_interval_ms = 500; - } Conf; + uint8_t version = CONFIG_VERSION; + }; +#pragma pack(pop) - typedef struct EEPConfig // EEPROM Config struct + struct EEPConfig // EEPROM Config struct { uint32_t crc; Conf conf; - } EEPConfig; + }; extern Conf active; void load(); void save(); -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/include/main.hpp b/include/main.hpp index ed7b92b..47825b6 100644 --- a/include/main.hpp +++ b/include/main.hpp @@ -1,10 +1,13 @@ -#pragma once +#ifndef main_h +#define main_h -#include -#include "config.hpp" +#include "Ui.hpp" +#include "Thermocouple.hpp" #include "Hotplate.hpp" +#include "Profile.hpp" //#define DEBUG_SERIAL +//#define DEBUG_UI_SERIAL // Thermocouple (MAX6675) pins #define TC_DO_PIN 6 @@ -32,5 +35,11 @@ #define LONG_PRESS_TIME_MS 500 // Long-Press if larger // Internal -#define VERSION_TEXT "0.4.0" -#define INTERVAL_DISP 100 // (max) Display refresh rate (if dirty) \ No newline at end of file +#define VERSION_TEXT "0.5.0" + +extern Ui ui; +extern Thermocouple thermocouple; +extern Hotplate hotplate; +extern Profile profile; + +#endif \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 17d9402..027ca41 100644 --- a/platformio.ini +++ b/platformio.ini @@ -16,7 +16,7 @@ lib_deps = olikraus/U8g2@^2.33.15 adafruit/MAX6675 library@^1.1.0 bakercp/CRC32@^2.0.0 - r-downing/AutoPID@^1.0.3 + https://github.com/Apehaenger/AutoPID.git#master build_src_filter = +<*> -<.git/> - upload_speed = 115200 upload_flags = -V diff --git a/src/Hotplate.cpp b/src/Hotplate.cpp index d24c131..4bd0207 100644 --- a/src/Hotplate.cpp +++ b/src/Hotplate.cpp @@ -16,129 +16,22 @@ */ #include #include "main.hpp" -#include "Hotplate.hpp" +#include "config.hpp" -Hotplate::Hotplate(uint8_t ssr_pin) : _myPID(&_input, &_setpoint, &_output, +Hotplate::Hotplate(uint8_t ssr_pin) : _ssrPin(ssr_pin), + _myPID(&_input, &_setpoint, &_output, 0, Config::active.pid_pwm_window_ms, Config::active.pid_Kp, Config::active.pid_Ki, Config::active.pid_Kd) { - _ssrPin = ssr_pin; - pinMode(ssr_pin, OUTPUT); - setPower(false); // Be sure it's off - - _myPID.setBangBang(Config::active.pid_bangOn_temp_c, Config::active.pid_bangOff_temp_c); - _myPID.setTimeStep(Config::active.pid_sample_ms); // time interval at which PID calculations are allowed to run in milliseconds -} - -Hotplate::ControllerState Hotplate::getControllerState() -{ - return _controllerState; -} - -uint16_t Hotplate::getOutput() -{ - return _output; -} - -bool Hotplate::getPower() -{ - return _power; -} - -uint16_t Hotplate::getSetpoint() -{ - return _setpoint; -} - -void Hotplate::runProfile() -{ - _state = State::On; - _profileStart_ms = millis(); - _profileNext_ms = _profileStart_ms; } -short Hotplate::getProfileTimePosition() +void Hotplate::setup() { - // In-line math in C sucks! - long timePosMs = millis() - _profileStart_ms - (1000UL * _profile2timeTargets[Config::active.profile]->duration_s); - short timePosS = round(0.001 * timePosMs); -#ifdef DEBUG_SERIAL_PROTIMPOS - Serial.print("millis(): "); - Serial.print(millis()); - Serial.print(", profile start(ms): "); - Serial.print(_profileStart_ms); - Serial.print(", profile duration(s): "); - Serial.print(_profile2timeTargets[Config::active.profile]->duration_s); - Serial.print(", timePosMs: "); - Serial.print(timePosMs); - Serial.println(", timePosS: "); -#endif - return timePosS; -} - -/* - * Get profile time/temp target dependent of current time/temp - * @return -1 in the case where PROFILE_TIME_INTERVAL is not reached or profile ended - */ -short Hotplate::getProfileTemp() -{ - uint32_t now = millis(); - short nextTemp; - - if (_profileNext_ms && now < _profileNext_ms) - { - return -1; - } - _profileNext_ms += PROFILE_TIME_INTERVAL_MS; - - ProfileTimeTarget timeTarget; - - for (uint8_t i = 0; i < _profile2timeTargets[Config::active.profile]->size; i++) - { - timeTarget = _profile2timeTargets[Config::active.profile]->timeTargets[i]; // Make code more readable - -#ifdef DEBUG_SERIAL_PROTEM - Serial.print("Profile: "); - Serial.print(Config::active.profile); - Serial.print(" = "); - Serial.print(Hotplate::profile2str[Config::active.profile]); - Serial.print(": time_s = "); - Serial.print(timeTarget.time_s); - Serial.print(", temp_c = "); - Serial.println(timeTarget.temp_c); -#endif - if ((now - _profileStart_ms) > (1000UL * timeTarget.time_s) || - _input > timeTarget.temp_c) // FIXME: This would result in a wrong profile time left display if already hot - { - continue; // Already beyond this time or temp target - } + pinMode(_ssrPin, OUTPUT); + setPower(false); // Be sure it's off - // In-line math in C sucks :-/ - float tempDiff = timeTarget.temp_c - _input; - float timeLeft_ms = (1000.0 * timeTarget.time_s) + _profileStart_ms - now; - float intervalsProfile = (1000.0 * timeTarget.time_s) / PROFILE_TIME_INTERVAL_MS; - float intervalsLeft = (timeLeft_ms / PROFILE_TIME_INTERVAL_MS) - 1; - - nextTemp = _input + round(tempDiff / intervalsProfile * (intervalsProfile - intervalsLeft)); - -#ifdef DEBUG_SERIAL_PROTEM - Serial.print("TimeTarget = "); - Serial.print(i); - Serial.print(": tempDiff = "); - Serial.print(tempDiff); - Serial.print(", timeLeft(ms) = "); - Serial.print(timeLeft_ms); - Serial.print(", intervals = "); - Serial.print(intervalsProfile); - Serial.print(", intervalsLeft = "); - Serial.print(intervalsLeft); - Serial.print(", new Setpoint = "); - Serial.println(nextTemp); -#endif - return nextTemp; - } - _profileNext_ms = 0; // Stop looping through profile array - return 0; // Profile ended + _myPID.setBangBang(Config::active.pid_bangOn_temp_c, Config::active.pid_bangOff_temp_c); + _myPID.setTimeStep(PID_SAMPLE_MS); // time interval at which PID calculations are allowed to run in milliseconds } void Hotplate::setPower(bool pow) @@ -151,66 +44,122 @@ void Hotplate::setSetpoint(uint16_t setpoint) { _setpoint = setpoint; - if (_setpoint) - { - //_myPID.stop(); - _myPID.run(); - _state = State::On; - _pwmWindowStart_ms = millis(); - } - else + if (!_setpoint) { - _state = State::Off; - _controllerState = ControllerState::off; + _mode = Mode::Manual; + _state = State::StandBy; _myPID.stop(); _output = 0; - setPower(false); // Don't wait for the next compute() + setPower(false); // Don't wait for the next loop() + return; + } + + if (_state == State::StandBy) + { + _state = State::PID; } + _myPID.run(); + _pwmWindowStart_ms = millis(); } /** - * @brief Update PID controllers PID gains from (probably actualized) config + * @brief Update PID controllers PID gains */ void Hotplate::updatePidGains() { _myPID.setGains(Config::active.pid_Kp, Config::active.pid_Ki, Config::active.pid_Kd); } -void Hotplate::compute(float temp) +bool Hotplate::pwmWindowReached() { - short nextTemp; - _input = temp; + return (millis() - _pwmWindowStart_ms > Config::active.pid_pwm_window_ms); +} + +void serialPrintLine() +{ + Serial.println("-------------------"); +} + +void Hotplate::loop() +{ + uint32_t now = millis(); + if (now < _nextInterval_ms) + { + return; + } + _nextInterval_ms = now + PID_SAMPLE_MS; + + _input = thermocouple.getTemperatureAverage(); switch (_state) { - case State::Off: + case State::StandBy: // Wait for "Press start" setPower(false); return; - ; - case State::On: - if (Config::active.profile != Hotplate::Profile::Manual) + case State::PID: + case State::BangOn: + case State::BangOff: + _myPID.run(); + // Informative state changes. Logic copied from AutoPID.cpp + if (Config::active.pid_bangOn_temp_c && ((_setpoint - _input) > Config::active.pid_bangOn_temp_c)) + _state = State::BangOn; + else if (Config::active.pid_bangOff_temp_c && ((_input - _setpoint) > Config::active.pid_bangOff_temp_c)) + _state = State::BangOff; + else + _state = State::PID; + break; + case State::Start: // Start/Init PID Tuner + Serial.println("Copy & Paste to https://pidtuner.com"); + Serial.println("Time, Input, Output"); + serialPrintLine(); + _pwmWindowStart_ms = now; + _state = State::Wait; + break; + case State::Wait: // Wait one pwmWindow before start. PID Tuner calculations may fail if not started with 0 output + if (!pwmWindowReached()) { - nextTemp = getProfileTemp(); - if (nextTemp > 0) // Allow manual correction per interval, and do not stop at end + break; + } + _pidTunerTempTarget = _input + PID_TUNER_TEMP_STEPS_C; + _setpoint = _pidTunerTempTarget; + _state = State::Heat; + _output = Config::active.pid_pwm_window_ms; + break; + case State::Heat: + if (_input > _setpoint) // By the use of _input the user may adapt the target during heatup + { + _setpoint = 0; + _output = 0; + _pwmWindowStart_ms = now; + _pidTunerTempMax = _input; + _state = State::Settle; + } + break; + case State::Settle: + if (_input > _pidTunerTempMax) // overshooting + { + _pidTunerTempMax = _input; + break; + } + if (_input <= (_pidTunerTempMax - PID_TUNER_TEMP_SETTLED_C)) // Settled + { + if (_input + PID_TUNER_TEMP_STEPS_C < Config::active.max_temp_c) { - setSetpoint(nextTemp); + // One more step + _state = State::Wait; + break; } + _state = State::StandBy; + _mode = Mode::Manual; + serialPrintLine(); + Serial.print("Done. Last step overshot (BangON) = "); + Serial.println(_pidTunerTempMax - _pidTunerTempTarget); } - _myPID.run(); break; } - // Informative state changes. Logic copied from AutoPID.cpp - if (Config::active.pid_bangOn_temp_c && ((_setpoint - _input) > Config::active.pid_bangOn_temp_c)) - _controllerState = ControllerState::bangOn; - else if (Config::active.pid_bangOff_temp_c && ((_input - _setpoint) > Config::active.pid_bangOff_temp_c)) - _controllerState = ControllerState::bangOff; - else - _controllerState = ControllerState::pid; - // Soft PWM - uint32_t now = millis(); - if (now - _pwmWindowStart_ms > Config::active.pid_pwm_window_ms) + if (pwmWindowReached()) { // time to shift the Relay Window _pwmWindowStart_ms += Config::active.pid_pwm_window_ms; } @@ -222,22 +171,21 @@ void Hotplate::compute(float temp) Serial.print(", Input: "); Serial.print(_input); Serial.print(", Controller state: "); - Serial.print(_controllerState); + Serial.print(_state); Serial.print(", Output: "); Serial.print(_output); Serial.print(", SSR: "); Serial.println(_power); #endif -#ifdef DEBUG_SERIAL_PIDTUNER - if (_state == State::On && now >= _pidTunerNext_ms) + if (isMode(Mode::PIDTuner) && !isState(State::StandBy) && + now >= _pidTunerOutputNext_ms) { - _pidTunerNext_ms = now + Config::active.pid_tuner_interval_ms; - Serial.print(now); + _pidTunerOutputNext_ms = now + PID_TUNER_INTERVAL_MS; + Serial.print((float)now / 1000); Serial.print(", "); - Serial.print(_power); + Serial.print(_output); Serial.print(", "); Serial.println(_input); } -#endif } \ No newline at end of file diff --git a/src/Led.cpp b/src/Led.cpp index b62354a..f7e9dfc 100644 --- a/src/Led.cpp +++ b/src/Led.cpp @@ -17,29 +17,28 @@ #include "main.hpp" #include "Led.hpp" -Led::Led(uint8_t pin) +Led::Led(uint8_t pin) : _pin(pin) { - _pin = pin; pinMode(pin, OUTPUT); } -void Led::blinkByTemp(double temp) +void Led::blinkByTemp(const float temp) { uint32_t currentMillis = millis(); if (temp >= (LED_WARM_TEMP + LED_HOT_TEMP)) { digitalWrite(_pin, 1); // Very-Hot LED + return; } - else if (temp >= LED_HOT_TEMP) + if (temp >= LED_HOT_TEMP) { digitalWrite(_pin, (currentMillis / LED_HOT_MILLIS) % 2); // Hot LED + return; } - else if (temp >= LED_WARM_TEMP) + if (temp >= LED_WARM_TEMP) { digitalWrite(_pin, (currentMillis / LED_WARM_MILLIS) % 2); // Warm LED + return; } - else - { - digitalWrite(_pin, 0); - } + digitalWrite(_pin, 0); } \ No newline at end of file diff --git a/src/Profile.cpp b/src/Profile.cpp new file mode 100644 index 0000000..a2e1dc4 --- /dev/null +++ b/src/Profile.cpp @@ -0,0 +1,160 @@ +/* + * This file is part of the Another-Reflow-HotPlate-Firmware project (https://github.com/Apehaenger/Another-Reflow-HotPlate-Firmware). + * Copyright (c) 2022 Jörg Ebeling + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include "main.hpp" +#include "config.hpp" + +/** + * @brief Start profile if not already started + * + * @return true if profile got started + * @return false if profile is already running + */ +bool Profile::startProfile() +{ + if (_profileStart_ms) // Profile already running + { + return false; + } + _profileStart_ms = millis(); + _nextInterval_ms = 0; + hotplate.setState(Hotplate::State::PID); + return true; +} + +void Profile::stopProfile() +{ + _profileStart_ms = 0; + hotplate.setState(Hotplate::State::StandBy); +} + +/** + * @brief Is the current profile != Manual profile, and idle (waiting to get started)? + * + * @return true if the current profile is != Manual and stand-by (not started) + * @return false if not + */ +bool Profile::isStandBy() +{ + return (Config::active.profile != Profile::Profiles::Manual && !_profileStart_ms); +} + +short Profile::getSecondsLeft() +{ + // In-line math in C sucks! + long timePosMs = millis() - _profileStart_ms - (1000UL * _profile2timeTargets[Config::active.profile]->duration_s); + short timePosS = round(0.001 * timePosMs); + +#ifdef DEBUG_SERIAL_PROTIMPOS + Serial.print("millis(): "); + Serial.print(millis()); + Serial.print(", profile start(ms): "); + Serial.print(_profileStart_ms); + Serial.print(", profile duration(s): "); + Serial.print(_profile2timeTargets[Config::active.profile]->duration_s); + Serial.print(", timePosMs: "); + Serial.print(timePosMs); + Serial.println(", timePosS: "); +#endif + + return timePosS; +} + +void Profile::loop() +{ + uint32_t now = millis(); + if (now < _nextInterval_ms) + { + return; + } + _nextInterval_ms = now + PROFILE_TIME_INTERVAL_MS; + + if (Config::active.profile == Profile::Profiles::Manual || !_profileStart_ms) // Not the same as: isStandBy() + { + return; + } + + short nextTemp = getTempTarget(); + if (!nextTemp) + { + return; + } + + hotplate.setSetpoint(nextTemp); +} + +/** + * @brief Get profile time/temp target dependent of current time & temp + * @return 0 in the case where PROFILE_TIME_INTERVAL is not reached or profile ended + */ +uint16_t Profile::getTempTarget() +{ + uint32_t now = millis(); + uint16_t nextTemp; + ProfileTimeTarget timeTarget; + uint32_t targetTime_ms; + + for (uint8_t i = 0; i < _profile2timeTargets[Config::active.profile]->length; i++) + { + timeTarget = _profile2timeTargets[Config::active.profile]->timeTargets[i]; // Make code more readable + +#ifdef DEBUG_SERIAL_PROTEM + Serial.print("Profile: "); + Serial.print(Config::active.profile); + Serial.print(" = "); + Serial.print(Hotplate::profile2str[Config::active.profile]); + Serial.print(": time_s = "); + Serial.print(timeTarget.time_s); + Serial.print(", temp_c = "); + Serial.println(timeTarget.temp_c); +#endif + + targetTime_ms = 1000UL * timeTarget.time_s; + if ((now - _profileStart_ms) > targetTime_ms || + thermocouple.getTemperatureAverage() > timeTarget.temp_c) // FIXME: This would result in a wrong profile time left display if already hot + { + continue; // Already beyond this time or temp target + } + + // In-line math in C sucks :-/ + float tempDiff = timeTarget.temp_c - thermocouple.getTemperatureAverage(); + float timeLeft_ms = targetTime_ms + _profileStart_ms - now; + float intervalsProfile = targetTime_ms / PROFILE_TIME_INTERVAL_MS; + float intervalsLeft = (timeLeft_ms / PROFILE_TIME_INTERVAL_MS) - 1; + + nextTemp = thermocouple.getTemperatureAverage() + round(tempDiff / intervalsProfile * (intervalsProfile - intervalsLeft)); + +#ifdef DEBUG_SERIAL_PROTEM + Serial.print("TimeTarget = "); + Serial.print(i); + Serial.print(": tempDiff = "); + Serial.print(tempDiff); + Serial.print(", timeLeft(ms) = "); + Serial.print(timeLeft_ms); + Serial.print(", intervals = "); + Serial.print(intervalsProfile); + Serial.print(", intervalsLeft = "); + Serial.print(intervalsLeft); + Serial.print(", new Setpoint = "); + Serial.println(nextTemp); +#endif + + return nextTemp; + } + + return 0; // Profile ended +} \ No newline at end of file diff --git a/src/Thermocouple.cpp b/src/Thermocouple.cpp index 541d85a..6bd0e46 100644 --- a/src/Thermocouple.cpp +++ b/src/Thermocouple.cpp @@ -16,17 +16,33 @@ */ #include "Thermocouple.hpp" -Thermocouple::Thermocouple(int8_t pin_CLK, int8_t pin_CS, int8_t pin_DO) : MaxTc(pin_CLK, pin_CS, pin_DO) {} +Thermocouple::Thermocouple(const int8_t pin_CLK, const int8_t pin_CS, const int8_t pin_DO) : _Tc(pin_CLK, pin_CS, pin_DO) {} -float Thermocouple::getTemperature() +void Thermocouple::readTemperature() { - if ((millis() - _lastRead_ms) < TC_MAX_READ_INTERVAL_MS) + if ((millis() < _nextRead_ms)) { - return _lastTemp; + return; } + _nextRead_ms = millis() + TC_MAX_READ_INTERVAL_MS; + // TODO: Read temperate dependent on EEPROM unit setting (C/F) - _lastTemp = MaxTc.readCelsius(); - _lastRead_ms = millis(); + _lastTemp = _Tc.readCelsius(); + // Cumulative (rolling) average temperature of the last TC_AVG_SAMPLES + // See https://en.wikipedia.org/wiki/Moving_average#Cumulative_average + _avgTemp -= _avgTemp / TC_AVG_SAMPLES; + _avgTemp += _lastTemp / TC_AVG_SAMPLES; +} + +float Thermocouple::getTemperature() +{ + readTemperature(); return _lastTemp; } + +float Thermocouple::getTemperatureAverage() +{ + readTemperature(); + return _avgTemp; +} diff --git a/src/Display.cpp b/src/Ui.cpp similarity index 53% rename from src/Display.cpp rename to src/Ui.cpp index 6bc0b22..29a2145 100644 --- a/src/Display.cpp +++ b/src/Ui.cpp @@ -14,8 +14,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#include "CRC32.h" #include "main.hpp" -#include "Display.hpp" #include "config.hpp" #include "../assets/fonts/my_u8g2_font_7x13B.hpp" #include "../assets/fonts/my_u8g2_font_open_iconic_embedded_2x.hpp" @@ -27,31 +27,39 @@ * 1 non-counted empty pixel row * 48 pixel i.e. blue */ +Ui::Ui() : u8g2(U8G2_R0, /* reset=*/U8X8_PIN_NONE) {} -Display::Display() : u8g2(U8G2_R0, /* reset=*/U8X8_PIN_NONE) -{ -} - -void Display::initialize() +void Ui::setup() { u8g2.begin(ROTARY_S_PIN, ROTARY_A_PIN, ROTARY_B_PIN); u8g2.clear(); } -void Display::mainScreen(Thermocouple *TcPtr, Hotplate *HotpPtr) +void Ui::displayMainScreen() { + // CRC32 of main screen relevant values + // Do it via struct and a single crc.calculate() call instead of multiple crc.update() calls which would be more expensive! + MainScreenCrcData crcData = {hotplate.getMode(), hotplate.getPower(), hotplate.getSetpoint(), hotplate.getState(), + profile.getSecondsLeft(), thermocouple.getTemperatureAverage()}; + uint32_t mainScreenCrc = CRC32::calculate(&crcData, 1); + +#ifdef DEBUG_UI_SERIAL + Serial.print("mainScreenCrc: "); + Serial.print(mainScreenCrc, HEX); + Serial.print(", _lastMainScreenCrc: "); + Serial.println(_lastMainScreenCrc, HEX); +#endif + // Check if we need to make the expensive display redraw - if (TcPtr->getTemperature() == _lastTemp && - HotpPtr->getSetpoint() == _lastTarget && - HotpPtr->getPower() == _lastPower && - HotpPtr->getProfileTimePosition() == _lastProfileTimePosition) + if (mainScreenCrc == _lastMainScreenCrc) { return; } + _lastMainScreenCrc = mainScreenCrc; - char cbuf[12]; // Longest entry length = "Target: 123\0" - String s = ""; - u8g2_uint_t y; + char cbuf[14]; // Longest entry length = "PID ????/5000\0", before "Target: 123\0" + String s; + u8g2_uint_t x, y; u8g2.firstPage(); do @@ -59,51 +67,73 @@ void Display::mainScreen(Thermocouple *TcPtr, Hotplate *HotpPtr) // Standard (small font) setStdFont(); - // Profile / Mode - u8g2.drawStr(0, 13, HotpPtr->profile2str[Config::active.profile]); + // 1st row + y = 9; + // Mode + switch (hotplate.getMode()) + { + case Hotplate::Mode::PIDTuner: + u8g2.drawStr(0, y, "PID Tuner:"); + x = 71; + switch (hotplate.getState()) + { + case Hotplate::State::Wait: + u8g2.drawStr(x, y, "Wait..."); + break; + case Hotplate::State::Heat: + u8g2.drawStr(x, y, "Heat..."); + break; + case Hotplate::State::Settle: + u8g2.drawStr(x, y, "Settle..."); + break; + default: + break; + } + break; + default: + u8g2.drawStr(0, y, profile.profile2str[Config::active.profile]); + break; + } // 2nd row - y = 27; - if (Config::active.profile != Hotplate::Profile::Manual && - HotpPtr->getControllerState() == Hotplate::ControllerState::off) + y = 25; // For two color display need to be >= 25 + if (hotplate.isStandBy() || (!hotplate.isMode(Hotplate::Mode::PIDTuner) && profile.isStandBy())) { - s = "Push to start"; - u8g2.drawStr((u8g2.getDisplayWidth()-u8g2.getStrWidth(s.c_str()))/2, y, s.c_str()); + const char *cp = "Push to start"; + u8g2.drawStr((u8g2.getDisplayWidth() - u8g2.getStrWidth(cp)) / 2, y, cp); } else { // Target temperature - _lastTarget = HotpPtr->getSetpoint(); - sprintf(cbuf, "Target: %3d", _lastTarget); - u8g2.drawFrame(u8g2.getStrWidth(cbuf) - (3 * 7) - 2, 16, (3 * 7) + 4, 13); + sprintf(cbuf, "Target: %3d", hotplate.getSetpoint()); + // u8g2.drawFrame(u8g2.getStrWidth(cbuf) - (3 * 7) - 3, y - 12, (3 * 7) + 6, 15); u8g2.drawStr(0, y, cbuf); - if (Config::active.profile != Hotplate::Profile::Manual) + if (Config::active.profile != Profile::Profiles::Manual && !hotplate.isMode(Hotplate::Mode::PIDTuner)) { - sprintf(cbuf, "%3ds", HotpPtr->getProfileTimePosition()); + sprintf(cbuf, "%3ds", profile.getSecondsLeft()); u8g2.drawStr(85, y, cbuf); } } - // Controller state - switch (HotpPtr->getControllerState()) + // Row 3 = Controller state + x = 1; + y = 40; + switch (hotplate.getState()) { - case Hotplate::ControllerState::bangOn: - s = "BangON"; + case Hotplate::State::BangOn: + strcpy(cbuf, "BangON"); u8g2.setFontMode(0); u8g2.setDrawColor(1); - u8g2.drawBox(0, 29, u8g2.getStrWidth(s.c_str()) + 2, 13); + u8g2.drawBox(0, 29, u8g2.getStrWidth(cbuf) + 2, 13); u8g2.setDrawColor(0); - u8g2.drawStr(1, 40, s.c_str()); + u8g2.drawStr(x, y, cbuf); break; - case Hotplate::ControllerState::pid: - s = "PID "; - s += HotpPtr->getOutput(); - s += "/"; - s += Config::active.pid_pwm_window_ms; - u8g2.drawStr(1, 40, s.c_str()); + case Hotplate::State::PID: + sprintf(cbuf, "PID %4d/%4d", hotplate.getOutput(), Config::active.pid_pwm_window_ms); + u8g2.drawStr(x, y, cbuf); break; - case Hotplate::ControllerState::bangOff: - u8g2.drawStr(1, 40, "BangOFF"); + case Hotplate::State::BangOff: + u8g2.drawStr(x, y, "BangOFF"); break; default: break; @@ -117,15 +147,11 @@ void Display::mainScreen(Thermocouple *TcPtr, Hotplate *HotpPtr) u8g2.setFont(my_u8g2_font_fur20); // Temperature - dtostrf(TcPtr->getTemperature(), 5, 1, cbuf); - s = String(cbuf); - s.concat(" °C"); - u8g2.drawUTF8(35, 64, s.c_str()); - _lastTemp = TcPtr->getTemperature(); + dtostrf(thermocouple.getTemperatureAverage(), 5, 1, cbuf); + u8g2.drawUTF8(35, 64, cbuf); // SSR Power - _lastPower = HotpPtr->getPower(); - if (_lastPower) + if (hotplate.getPower()) { u8g2.setFont(my_u8g2_font_open_iconic_embedded_2x); u8g2.drawStr(5, 62, "C"); // Power symbol = 67 = C @@ -134,12 +160,7 @@ void Display::mainScreen(Thermocouple *TcPtr, Hotplate *HotpPtr) } while (u8g2.nextPage()); } -void Display::changeUiMode(uiMode nextUi) -{ - uiM = nextUi; -} - -void Display::userInterfaceInputDouble(const char *title, const char *pre, double *value, uint8_t numInt, uint8_t numDec, const char *post) +void Ui::userInterfaceInputDouble(const char *title, const char *pre, double *value, uint8_t numInt, uint8_t numDec, const char *post) { uint8_t iV; String valueStr = "", prePart, postPart; @@ -158,20 +179,15 @@ void Display::userInterfaceInputDouble(const char *title, const char *pre, doubl { dtostrf(*value, numInt + numDec + 1, numDec, cbuf); valueStr = String(cbuf); + valueStr.replace(' ', '0'); } - // Serial.print("valueStr: "); - // Serial.println(valueStr); - // Loop over als string chars for (uint8_t i = 0; i < valueStr.length(); i++) { if (valueStr[i] == '.') continue; - if (valueStr[i] == ' ') - valueStr[i] = '0'; - prePart = pre; prePart += valueStr.substring(0, i); prePart += "["; @@ -181,20 +197,6 @@ void Display::userInterfaceInputDouble(const char *title, const char *pre, doubl postPart = "]"; postPart += valueStr.substring(i + 1); - /* - Serial.print("i: "); - Serial.print(i, HEX); - Serial.print(", pre: '"); - Serial.print(pre); - Serial.print("', prePart: '"); - Serial.print(prePart); - Serial.print("', edit digit "); - Serial.print(iV, HEX); - Serial.print(", postPart: '"); - Serial.print(postPart); - Serial.println("'"); - */ - if (u8g2.userInterfaceInputValue(title, prePart.c_str(), &iV, 0, 9, 1, postPart.c_str()) == 0) return; // We don't have a "home" (escape) button yet valueStr[i] = iV + 0x30; @@ -202,41 +204,49 @@ void Display::userInterfaceInputDouble(const char *title, const char *pre, doubl *value = valueStr.toDouble(); } -void Display::inputBangValues() +void Ui::inputBangValues() { u8g2.firstPage(); do { setStdFont(); - // FIXME: The following should go into a loop with a mapped "Kx" string and config var if (u8g2.userInterfaceInputValue("Bang-ON until\ntarget-temp", "minus ", &Config::active.pid_bangOn_temp_c, 0, 255, 3, " °C") == 0) - return; // We don't have a "home" (escape) button yet + return; // We don't have a "home" (escape) button if (u8g2.userInterfaceInputValue("Bang-OFF at\ntarget-temp", "plus ", &Config::active.pid_bangOff_temp_c, 0, 255, 3, " °C") == 0) + return; // We don't have a "home" (escape) button + } while (u8g2.nextPage()); +} + +void Ui::inputMaxTemp() +{ + u8g2.firstPage(); + do + { + setStdFont(); + if (u8g2.userInterfaceInputValue("Set max.", "Temperature ", &Config::active.max_temp_c, 0, 255, 3, " °C") == 0) return; // We don't have a "home" (escape) button yet } while (u8g2.nextPage()); } -void Display::inputPidConstants() +void Ui::inputPidConstants() { u8g2.firstPage(); do { setStdFont(); - // FIXME: The following should go into a loop with a mapped "Kx" string and config var const char *title = "Select\nPID constant"; - userInterfaceInputDouble(title, "Kp = ", &Config::active.pid_Kp, 3, 1, ""); - userInterfaceInputDouble(title, "Ki = ", &Config::active.pid_Ki, 3, 1, ""); - userInterfaceInputDouble(title, "Kd = ", &Config::active.pid_Kd, 3, 1, ""); + userInterfaceInputDouble(title, "Kp = ", &Config::active.pid_Kp, 4, 1, ""); + userInterfaceInputDouble(title, "Ki = ", &Config::active.pid_Ki, 4, 1, ""); + userInterfaceInputDouble(title, "Kd = ", &Config::active.pid_Kd, 4, 1, ""); } while (u8g2.nextPage()); } -void Display::setStdFont() +void Ui::setStdFont() { - // u8g2.setFont(my_u8g2_font_8x13B); u8g2.setFont(my_u8g2_font_7x13B); } -void Display::inputSsrType() +void Ui::inputSsrType() { u8g2.firstPage(); do @@ -255,7 +265,7 @@ void Display::inputSsrType() } while (u8g2.nextPage()); } -void Display::inputReflowProfile(Hotplate *HotpPtr) +void Ui::inputReflowProfile() { u8g2.firstPage(); do @@ -263,19 +273,19 @@ void Display::inputReflowProfile(Hotplate *HotpPtr) setStdFont(); String modeList = ""; - for (uint8_t i = 0; i < sizeof(Hotplate::profile2str) / sizeof(char *); ++i) + for (uint8_t i = 0; i < sizeof(Profile::profile2str) / sizeof(char *); ++i) { if (i > 0) modeList += "\n"; - modeList += HotpPtr->profile2str[i]; + modeList += profile.profile2str[i]; } uint8_t sel = u8g2.userInterfaceSelectionList("Setup Profile", Config::active.profile + 1, modeList.c_str()); - Config::active.profile = static_cast(sel - 1); + Config::active.profile = static_cast(sel - 1); } while (u8g2.nextPage()); } -void Display::setupScreen(Hotplate *HotpPtr) +void Ui::displaySetupScreen() { u8g2.firstPage(); do @@ -285,70 +295,59 @@ void Display::setupScreen(Hotplate *HotpPtr) s += VERSION_TEXT; s += ")"; - /* Setup - * ----- - * Reflow Profile - * Display unit - * SSR Type - * PID Coefficients - * Calibration - * Save to EEPROM - * Quit - */ uint8_t sel = u8g2.userInterfaceSelectionList(s.c_str(), 1, - "Reflow Profile\n(Display unit)\nSSR Type\nPID constants\nBangBang\n(Calibration)\nLoad saved\nSave & Quit\nQuit"); - // 1 2 3 4 5 6 7 8 9 + "Reflow Profile\n(Display unit)\nSSR Type\nMax. Temperature\nPID constants\nBangBang\nPID Tuner\nLoad saved\nSave & Quit\nQuit"); + // 1 2 3 4 5 6 7 8 9 10 switch (sel) { case 1: // Reflow Profile - inputReflowProfile(HotpPtr); + inputReflowProfile(); break; case 3: // SSR Type inputSsrType(); break; - case 4: // PID constants + case 4: // BangBang values + inputMaxTemp(); + break; + case 5: // PID constants inputPidConstants(); - HotpPtr->updatePidGains(); + hotplate.updatePidGains(); break; - case 5: // BangBang values + case 6: // BangBang values inputBangValues(); break; - case 7: // Load saved + case 7: // PID Tuner + hotplate.setMode(Hotplate::Mode::PIDTuner); + changeMode(Mode::Main); + break; + case 8: // Load saved Config::load(); break; - case 8: // Save & Quit + case 9: // Save & Quit Config::save(); - changeUiMode(uiMode::Main); + changeMode(Mode::Main); break; default: - changeUiMode(uiMode::Main); + changeMode(Mode::Main); } } while (u8g2.nextPage()); } -void Display::update(Thermocouple *TcPtr, Hotplate *HotpPtr) +void Ui::loop() { - switch (uiM) + uint32_t now = millis(); + if (now < _nextInterval_ms) + { + return; + } + _nextInterval_ms = now + INTERVAL_DISP; + + switch (_mode) { - case uiMode::Setup: - setupScreen(HotpPtr); - /* - // Double -> String - char cbuf[10]; - dtostrf(conf->pid_Kp, 8, 2, cbuf); - Serial.print("Before: "); - Serial.println(cbuf); - - setStdFont(); - inputPidConstants(); - - // Double -> String - dtostrf(conf->pid_Kp, 8, 2, cbuf); - Serial.print("After: "); - Serial.println(cbuf); - */ + case Mode::Setup: + displaySetupScreen(); break; default: - mainScreen(TcPtr, HotpPtr); + displayMainScreen(); } } \ No newline at end of file diff --git a/src/config.cpp b/src/config.cpp index c3bd98f..03ee30c 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -22,46 +22,43 @@ namespace Config { - Conf active; // Default config + Conf active; // Default config - void load() - { - EEPConfig eConf; - EEPROM.get(0, eConf); + void load() + { + EEPConfig eConf; + EEPROM.get(0, eConf); - uint32_t configChecksum = CRC32::calculate((uint8_t *)&eConf.conf, sizeof(eConf.conf)); + uint32_t configChecksum = CRC32::calculate(&eConf.conf, 1); #ifdef DEBUG_SERIAL - Serial.print("EEPROM CRC: "); - Serial.print(eConf.crc, HEX); - Serial.print(", Conf CRC: "); - Serial.println(configChecksum, HEX); + Serial.print("EEPROM CRC: "); + Serial.print(eConf.crc, HEX); + Serial.print(", Conf CRC: "); + Serial.print(configChecksum, HEX); + uint32_t defaultChecksum = CRC32::calculate(&active, 1); + Serial.print(", default Conf CRC: "); + Serial.println(defaultChecksum, HEX); #endif - if (eConf.crc == configChecksum) - { - active = eConf.conf; + if (eConf.crc == configChecksum && eConf.conf.version == active.version) + { + active = eConf.conf; + } } -#ifdef DEBUG_SERIAL - configChecksum = CRC32::calculate((uint8_t *)&active, sizeof(active)); - Serial.print("Default Conf CRC: "); - Serial.println(configChecksum, HEX); -#endif - } - - void save() - { - EEPConfig eConf; + void save() + { + EEPConfig eConf; - eConf.crc = CRC32::calculate((uint8_t *)&active, sizeof(active)); - eConf.conf = active; + eConf.crc = CRC32::calculate(&active, 1); + eConf.conf = active; #ifdef DEBUG_SERIAL - Serial.print("New Conf CRC: "); - Serial.println(eConf.crc, HEX); + Serial.print("New Conf CRC: "); + Serial.println(eConf.crc, HEX); #endif - // No need to compare the config checksum if it changed, as we use put() which in turn use EEPROM.update() and write only on change - EEPROM.put(0, eConf); - } + // No need to compare the config checksum if it changed, as we use put() which in turn use EEPROM.update() and write only on change + EEPROM.put(0, eConf); + } } diff --git a/src/main.cpp b/src/main.cpp index 0840383..2a8c0aa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,30 +23,14 @@ * Usage: * RAM | Flash | Comment * ---------------------------------------------------------------------- - * 71.9% 1473 91.8% 28186 0.3.0 new Bootloader - * 71.9% 1473 91.8% 28186 Removed while(true) loop in void loop() - * 72.1% 1477 92.0% 28266 One day later!? - * 72.1% 1477 90.7% 27874 Reduced open iconic to used icon - * 72.1% 1477 86.0% 26432 Reduced 8x13B font - * 72.1% 1477 85.7% 26328 Reduced fur20 font - * 78.9% 1615 86.6% 26592 Profiles, profile selection & storage, switch to 7x13B - * 77.5% 1587 86.9% 26706 + "Push to start", before global optimization - * 77.5% 1587 86.4% 26542 Moved global target to Hotplate::_setpoint and added/implemented getter and setter - * 77.5% 1587 86.3% 26518 Moved global ssrOn to Hotplate::_power and added/implemented getter and setter - * 77.1% 1579 86.0% 26418 Migrated rotary.cpp|hpp into main - * 77.1% 1579 85.5% 26280 Optimized Thermocouple and removed global mVals - * 60.8% 1246 78.7% 24170 Without DEBUG_SERIAL - * 77.1% 1580 85.6% 26296 Moved LED to class - * 77.4% 1585 85.9% 26398 Fixed shared vars from TC/Hotplate - * 75.5% 1546 87.0% 26728 Finished reflow profile - * 75.6% 1548 87.1% 26758 Changed unsigned long to uint32_t and fixed two bugs - * 62.9% 1289 82.8% 25432 0.4 without DEBUG_SERIAL + * 71.9% 1473 91.8% 28186 v0.3.0 new Bootloader + * 62.9% 1289 82.8% 25432 v0.4 without DEBUG_SERIAL + * 62.7% 1285 82.8% 25428 v0.4.0 without DEBUG_SERIAL + * 80.2% 1643 91.1% 27992 v0.5.0 */ #include #include "main.hpp" -#include "Thermocouple.hpp" -#include "Display.hpp" -#include "Hotplate.hpp" +#include "config.hpp" #include "Led.hpp" #if defined ATMEGA328_NEW_CH340_DBG || defined ATMEGA328_NEW_FTDI_DBG @@ -59,32 +43,30 @@ #endif // Init classes -Display Disp; // Constructor without parameter need to be initiated without braces. Compiler thingy -Led HotLed(LED_PIN); -Thermocouple Tc(TC_CLK_PIN, TC_CS_PIN, TC_DO_PIN); -Hotplate Hotp(SSR_Pin); +Led hotLed(LED_PIN); +Thermocouple thermocouple(TC_CLK_PIN, TC_CS_PIN, TC_DO_PIN); +Hotplate hotplate(SSR_Pin); +Profile profile; +Ui ui; // Internal vars volatile byte rotary_aValPrev = 0; // Rotary A, last level, see ISR(PCINT1_vect) volatile byte rotary_sValPrev = 1; // Rotary S, last level, see ISR(PCINT1_vect) volatile unsigned long rotary_sPressed_ms = 0; // volatile, see ISR(PCINT1_vect) -uint32_t lastMillis = millis(); -unsigned long time_disp = 0; -unsigned long time_ptc = 0; - void setup() { -#ifdef DEBUG_SERIAL - Serial.begin(115200); - Serial.println("Initializing..."); +#ifndef DEBUG_AVRSTUB + Serial.begin(115200); // TODO: -> Setup? + Serial.println("Init..."); #endif #ifdef DEBUG_AVRSTUB debug_init(); #endif - Config::load(); - Disp.initialize(); + Config::load(); + ui.setup(); + hotplate.setup(); // FIXME JE: Check/Test if the internal pull up would save the external soldered ones pinMode(ROTARY_A_PIN, INPUT_PULLUP); // Arduino Analog input 0 (PCINT8), input and set pull up resistor: @@ -110,72 +92,64 @@ void setup() void loop() { - uint32_t currentMillis = millis(); - if (currentMillis < lastMillis) - { - // skip main loop in case of millis() overflow - lastMillis = currentMillis; - time_disp = currentMillis; - time_ptc = currentMillis; - return; - } - - // main event loop actions + profile.loop(); + hotplate.loop(); + ui.loop(); + hotLed.blinkByTemp(thermocouple.getTemperatureAverage()); +} - // PTC (minimum PWM) Interval - // Use PID sample time to ensure that smaller PID output values do NOT trigger a shorter SSR-ON pules - // (Typical inrush-current of a PTC is about 0.1s) - if (currentMillis >= time_ptc + Config::active.pid_sample_ms) +/** + * @brief Start if a process like PIDTuner or ReflowProfile is idle (waiting to get started) + * + * @return true if there was an idle process + * @return false if there isn't an idle process + */ +bool startIfStandByProcess() +{ + if (hotplate.isStandBy()) { - time_ptc += Config::active.pid_sample_ms; - Hotp.compute(Tc.getTemperature()); + hotplate.setState(Hotplate::State::Start); + return true; } - - // MyDisplay Interval - if (currentMillis >= time_disp + INTERVAL_DISP) + if (profile.isStandBy()) { - time_disp += INTERVAL_DISP; - - Disp.update(&Tc, &Hotp); + return profile.startProfile(); } - - HotLed.blinkByTemp(Tc.getTemperature()); - - lastMillis = currentMillis; + return false; } void onPlusPressed() { - if (Hotp.getSetpoint() < Config::active.pid_max_temp_c) + if (hotplate.getSetpoint() < Config::active.max_temp_c) { - Hotp.setSetpoint(Hotp.getSetpoint() + 1); + startIfStandByProcess(); + hotplate.setSetpoint(hotplate.getSetpoint() + 1); } } void onMinusPressed() { - if (Hotp.getSetpoint()) + if (hotplate.getSetpoint()) { - Hotp.setSetpoint(Hotp.getSetpoint() - 1); + startIfStandByProcess(); + hotplate.setSetpoint(hotplate.getSetpoint() - 1); } } void onPushPressed() { - if (Config::active.profile != Hotplate::Profile::Manual && - Hotp.getControllerState() == Hotplate::ControllerState::off) - { // Start reflow profile - Hotp.runProfile(); - } - else + if (!startIfStandByProcess()) { - Hotp.setSetpoint(0); + hotplate.setMode(Hotplate::Mode::Manual); + hotplate.setState(Hotplate::State::StandBy); + profile.stopProfile(); + hotplate.setSetpoint(0); } } void onPushLongPressed() { - Disp.changeUiMode(Display::uiMode::Setup); + ui.changeMode(Ui::Mode::Setup); } ISR(PCINT1_vect)