Page 6 of 9

Re: Reflow Fred Style! :-)

Posted: Mon May 07, 2012 3:57 am
by johntramp
AbeFM wrote:I'm not getting why you need a controller if you're just turning it on full for a bit then turning it off? That's not a controller, that's a timer.
This is, if you like, the step response of the oven. From there you can get the transfer function of the system (or plant) to be controlled.

Image

I am guessing this is something like what Fred is planning. I could be wrong.

Re: Reflow Fred Style! :-)

Posted: Mon May 07, 2012 5:40 am
by AbeFM
That's what I was getting at. If he's just measuring it to develop that, then he's right on track. Just somehow in my roll-outta-bed-read-hungover-while-gathering-wits-needed-to-urinate state I read it in, it sounded like he plans on doing just that to do his soldering: Bring it up @ full power, turn it off, open door, done.

Re: Reflow Fred Style! :-)

Posted: Mon May 07, 2012 7:35 am
by Fred
You rough bastard! :-p

Re: Reflow Fred Style! :-)

Posted: Tue May 08, 2012 5:34 pm
by Fred
Time to do some control:

European power is @ 50Hz
Maximum Turn-on Time: 1/2 Cycle + 1 ms
Maximum Turn-off Time: 1/2 Cycle + 1 ms

= 100 opportunities to change state per second.

2.56 seconds for 8 bit control
10.24 seconds for 10 bit control

8 bits is probably fine enough, and 10 seconds is probably too slow.

Data sheet also specifies that it can push 10A up to 40C ambient without a heatsink, so I'm fine at ~4A and 20-30C ambient with a small poorly attached one.

PWM settings:

For testing: PWMDTY2 = ATD0DR2 >> 2; // scale raw adc to a duty, pot attached to TPS input.
For real use: PWMDTY2 = output of control algorithm

PWMPOL x = 1 (duty is the high portion)
PWMCLK x = 0 for A/B or 1 for SA/SB
PWMPRCLK a and b = bus to bus/128 at slowest
PWMSCLA/PWMSCLB = S clock = main clock / 2 - 512 at slowest

40MHz bus, div 128, div 512 = 610.3515625 Hz

255 / 610 = 0.417792s period, which, hilariously, is too fast. IE, I'm wasting my time trying to PWM it using HW and should do it with software instead, or use 16 bit mode, and use it coarsely.

16 bit = slowest of 107.372544s, feasible of 65535 / ((40000000 / 128) / (2 * 6)) = 2.516544 seconds.

We'll see how easy a solid SW PWM is, might be simpler/better. New post soon on that.

Fred.

Re: Reflow Fred Style! :-)

Posted: Tue May 08, 2012 8:00 pm
by Fred
Precision software 2.56 second period PWM is in action and working well.

OK, the controller needs to be asymmetrical in nature.

Any amount over the target has to = off initially, fading back to base "feed forward" value after some inertia tuned period of time.

Power has to be completely cut just prior to target temp, too, as, otherwise, it WILL overshoot by some amount.

Full power, then cut at exactly the right time is going to give the fastest and most precise rise time.

Thinking about this more, from what I've already measured, I can approximately know the thermal mass and insulation resistance. The missing link being the thermal inertia carried in the hot element. But it's not worth the time spent analysing it further when I can get an excellent result with a much much simpler approach.

It's looking like around 11.24% duty is enough to maintain 120C.

Time to take a stab at the kill temp for ~230 ceiling... hmmm.... I'm guessing 210 or so. Full power and nothing for about 5 seconds, knee point of maybe 8 seconds, then fast rise. Cut it at 215, watching... ahh, it only overshot by 5 degrees, and not for very long. Thus 225 or 230 itself and go a little higher overall, may be the plan. Tested! 228 or 229 will be sufficient to hit 230 fairly cleanly.

So no PID, then, tuning it would be more painful than writing a custom algorithm.

FULL power
cut at X < 120C and start timer
hold with 11% at Y > 120C
on timer finish, full power
at 229C cut power
30 seconds later open door
Z minutes later close door?
W minutes later remove and begin testing the parts

KISS.

I need to let it cool and find X and Y and eventually Z.

Fred.

Re: Reflow Fred Style! :-)

Posted: Tue May 08, 2012 9:03 pm
by Fred
Cut at 110 produces 126. Thus we could set X at 110, Y as 122C and duty at 12%, time as 120 seconds. Then it's just a matter of opening the door at a good time. I'll implement that tonight, fix my TA card's reference and bake the first important board tomorrow with it. I'll record a datalog of the different parameters, IE, heater duty, chamber temperature, marks for melting and door opening.

Re: Reflow Fred Style! :-)

Posted: Wed May 09, 2012 10:22 pm
by Fred
Today I've been working on a control strategy, watching Vaya Semanita videos, and contemplating life. But because only one of these things matters to this thread and most of the readers of it, that is what I'll present here:
  1. Attempt one shows the effect of some broken logic that put the element on hold setting too early
  2. Attempt two shows having no hold setting and a wrong approach to measuring the soak time
  3. Attempt three shows my final effort: full power, off at 110C, timer start at 120C, full power again at 2 minutes, off again at 229C, open door 20 seconds later.
1.

Image

2.

Image

3.

Image

The two minutes, 20 seconds, peak temp, hold temp and timer start threshold can all be tuned, though I like where they're at.

Tomorrow I bake something important.

Fred.

Re: Reflow Fred Style! :-)

Posted: Wed May 09, 2012 10:28 pm
by Fred
Obviously this can be improved with:

1) MORE POWER
2) MORE (cooling) POWER

However, it's good enough for the time being. It'd be nicer to ramp up more quickly and ramp down more consistently/smoothly, but it's more than good enough to get fully professional results from.

Fred.

Re: Reflow Fred Style! :-)

Posted: Wed May 09, 2012 10:32 pm
by Fred
I just remembered that I still owe you all some photos of the insulation installation carnage :-) Tomorrow! If I don't, bug me to death...

Re: Reflow Fred Style! :-)

Posted: Sun May 13, 2012 10:32 pm
by Dan
Fred wrote:I just remembered that I still owe you all some photos of the insulation installation carnage :-) Tomorrow! If I don't, bug me to death...
bugging you to death on this one! I want to see those photos! :-)