I spent a bit of time today, working out how i will describe the Reflow curve. I've decided i'll represent it in JSON. This makes it very easy to tweak and change, and add additional curve points if required, without adjusting the main code.
Everything shoudl be pretty straight forward to undersand. Looprate is in Hz.. This means we'll read the temp, and adjust the the PID settings 10times a second. We'll interpolate the values between the stated points.
{
"name": "SAC305_LS230",
"description": "Reflow profile for Frying Pan"
"looprate": 10,
"heating_max_duty_cycle": 100,
"cooling_min_ontime": 1
"profile":
{
"p1": {
"time": 120,
"temp": 150
}
"p2": {
"time": 180,
"temp": 160
}
"p3": {
"time": 220,
"temp": 230
}
"p4": {
"time": 260,
"temp": 230
}
"p5": {
"time": 240,
"temp": 200,
}
"p5": {
"time": 300,
"temp": 80
}
"p6": {
"time": 360,
"temp": 40
}
}
}