Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Profiles and Temp Holding (wip) #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sschueller
Copy link

@sschueller sschueller commented Oct 24, 2020

Please do not merge this yet. I still need to test it as my oven is not quite finished yet (waiting for parts). However I wanted to make you and others aware of my changes in case someone wants to also help or give input.

Changes:

  • Added ability to add multiple Profiles
  • Each stage now has a time step increase and a hold time. This allows for slow heating or cooling for applications like plastic annealing.
  • Moved code base into VS Code for easier workflow
    • Added version 1 and version 2 environments to platform.ini so both version can be built at the same time
  • Removed library dependencies for version that don't need them
  • Code moved into src/main.cpp
  • Moved LCD messages out of SRAM

TODO:

  • Test that Profiles and stages work correctly (I did some initial testing but I need to finish my oven and test a complete cycle)
  • Test V1 can be flashed from VS Code and works (if someone withe V1 can test this it would be great. I only have V2)
  • More docs on how to configure Profiles
  • Make sure reflow profiles are correct and match the previous versions defaults

@geekbozu
Copy link

geekbozu commented Jan 18, 2021

I am looking for these features in my oven, Can you put together some quick better documentation on the setting up of profiles.
I mostly am looking to add a "bake" profile of sorts but am confused as to how your configuring steps and similar
Thanks!

@sschueller
Copy link
Author

I have some docs at https://github.com/sschueller/TinyReflowController. Do you have a specific question regarding the configuration?

For each profile you need to add a line as such:

const char profilename_4[] PROGMEM = "Bake";

Then you need to add it to profileNames

const char *const profileNames[] PROGMEM = {profilename_0, profilename_1, profilename_2, profilename_3,profilename_4};

Then you need to add an additional column to each line in the stages following. So for example pre-heat

// preheat temp
const float profilePreHeatTemps[] PROGMEM = {Profile 0, Profile 1, Profile 2, Profile 3, Profile 4 .... etc.};

So like this:

// pre-heat
const float profilePreHeatTemps[] PROGMEM = {150, 150, 63, 177, 200};
const uint32_t profilePreHeatMTime[] PROGMEM = {0, 0, 120000, 120000, 0};
const int profilePreHeatTStep[] PROGMEM = {120, 120, 1, 1, 120};
const uint32_t profilePreHeatHoldTime[] PROGMEM = {0, 0, 0, 0, 0};
const float profilePreHeatKP[] PROGMEM = {100, 100, 100, 100, 100};
const float profilePreHeatKI[] PROGMEM = {0.025, 0.025, 0.025, 0.025, 0.025};
const float profilePreHeatKD[] PROGMEM = {20, 20, 20, 20, 20};

Do this for all Stages.

Bake would be similar to "Annealing" but without the set time on how slow/fast it should heat up to the "Bake" temp or cooldown.

@geekbozu
Copy link

My question pertains to how to setup the steps and timing and better definitions of the values in the stage arrays,
Like you have some explanations of what each step/Profile line item is but I am failing to link the difference between hold steps etc. Like MTim is 0 step is 120 but you flip that for the Annealing ones?
I'm sure its plenty logical I just am missing the connection :(

@sschueller
Copy link
Author

sschueller commented Jan 19, 2021

Looking at it myself after months it's confusing me as well :)

Let me try to explain:

  • profilePreHeatTemps: Set Temperature in C, temp we want to reach in this stage. If we want heat up to 150 we set 150
  • profilePreHeatMTime: Milliseconds until the next temp change. If this is set to for example 120000, after 120 seconds the temp set point is changed to TEMPERATURE_ROOM (because there is no previous stage) plus profilePreHeatTStep. This repeats every 120s and adds another profilePreHeatTStep to the previous set point. If this is set to 0 the set temperature would be profilePreHeatTemps and the oven heats at max speed. Once profilePreHeatTemps is reached it will start counting down the profilePreHeatHoldTime before going to the next stage
  • profilePreHeatHoldTime: This is the time in Milliseconds the profilePreHeatTemps should be held until going to the next stage. If set to 0 it will go to the next stage as soon as profilePreHeatTemps is reached.
  • profilePreHeatKP, profilePreHeatKI, profilePreHeatKD: have to do with the PID controller: https://robotics.stackexchange.com/questions/9786/how-do-the-pid-parameters-kp-ki-and-kd-affect-the-heading-of-a-differential

When we want to cooldown slowly the profilePreHeatTStep is negative since I want to remove degrees from the current set point to reach the profilePreHeatTemps which is lower than the last stage. So I'm at 200C and I want to go to 50C with steps of -1C every profilePreHeatMTime

I may make a small JavaScript script to calculate these values so you can specify total time you want instead having the manually figure out the temp step and mtime.

How exactly would you want your bake profile to look?

@geekbozu
Copy link

geekbozu commented Jan 19, 2021

That java-script thing would be super nice actually
That makes way more sense. Thank you a ton for the explanation.
I'm looking at implementing a pretty standard part bake 125C for 6-12 hours depending on a few factors. I work in a production environment where we need to make sure we don't have our parts popcorn during assembly.

As for the PID stuff I know that is oven dependent...really need to spend the time to tune those heh....I wonder if this could eventually get an auto tuner like a lot of 3d printers lately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants