Skip to main content
Topic: Reflow Oven (Yet another) (Read 24046 times) previous topic - next topic

Re: Reflow Oven (Yet another)

Reply #15
Air Flow /Fans
I have seen success without a fan but that doesn’t mean it wouldn’t be better with one. As far as needing a fan I’m not sure. I don't have a feel for how the heat is distributed throughout the oven.

If there were to be a fan I think the motor would have to be on the outside with the shaft going through the wall and the fan blade inside. If not, the internals of the fan would most likely de-solder unless it is rated for high temps. The motor could be a simple 5V or 12 V variety. The side with the oven controls on it might be big enough to house the motor.

Another option could be an external heat gun blowing into the compartment some how. I wouldn't use this option unless the bulk and volume could be reduced some how.

Another way to move the air is with convection. Perhaps little heat sinks on the bottom of the oven with vertical fin might move the air enough. Though, adding too much thermal mass might slow down the ovens rise and fall times.

Hmmm... I will ponder on this awhile.

How many sensors ?
Quote
Is it worth monitoring the temp top/mid/bot ?
I wouldn't think so unless you are planning to put boards under reflow at those locations. I've been thinking about one or a small number of boards at one height level within the oven. I suppose you could have different sensors across that level but if your not planning on acting on those sensors then they are not very useful. If you are controlling different heating elements independently base on the different sensors input then they might be helpful.

Plotting
My search for a plotting solution lead me to look into Python matplotlib and pySerial to plot the temperature and see some internal variable such as the PID in action. I found this via the Arduino Play ground. I’ll be looking into this to see if I can fit it to my needs. It would be a handy interface for future projects as well.
http://www.blendedtechnologies.com/real ... python/231

Soild State Relay
I have this one on order: Foteck SSR-40 DA
http://www.amazon.com/25A-Solid-State-R ... 004HZLMTW/
this one had “free” shipping for me because of Amazon Prime.

Re: Reflow Oven (Yet another)

Reply #16
For the fan: I have a small 'convection' toaster over with a fan built into the side. I guess the fan makes it convection. Is that not a generally available thing? I think it was $50, and I have replaced it 2 times with the same model over the last ~7 years.
Got a question? Please ask in the forum for the fastest answers.

Re: Reflow Oven (Yet another)

Reply #17
[quote author="ian"]...Is that not a generally available thing? ...[/quote]

I would think it should be but I still have to look some more. Most of what I found to too big for my oven. One thing that is in the back of my mind is that I want parts for my project to be ubiquitous. I want other people to be able to do what I have done. There's no sense in making an open design if it can't be or has the perception that it can't be completed with out a an exotic widget. So far I'm ok with everything I have in my project except for the fan. I would like to come up with something as simple as a 5 or 12V motor with a 1/2" long shaft and  fan blade I make with a template and a tin can. Mounting it may be the tricky part.

Re: Reflow Oven (Yet another)

Reply #18
Lately I have been working on the reflow plot profile and how it could be implemented within the arduino controller.I have consolidated the reflow profile information so I could wrap my head around what the oven needs to do.[attachment=1] My plan right now is to have the Arduino hold a number of different profiles in EEPROM. These stored profiles will be user selectable and adjustable using the LCD screen and user input.
I have made a function that outputs a waveform of this shape.  All of the twists and turns are built with adjustable parameters.

Code: [Select]
int SnPbProfilePoint(unsigned long theTime) {
// each count is 1/4 degC, time count are milliSeconds
// pre-heat, flux activation, reflow, cooling
// profile for SnPb (Tin-Led)
// wetting time is duration spent above 183degC

// Pre-Heat: 0-110sec
// raise the temperature up from 25degC to 110degC over 100sec
// preheat = Time*(110-25)degC/100+25 =
// Time*(phMaxT-ambT)/phTime+ambT
unsigned long  phMaxT = 440; //4 * 110
unsigned long  ambT = 100; // = 4 * 25
unsigned long phTime = 100000; //=100*1000

// Flux Activation: 100-160sec
// raise the temperature up from 110degC to 125degC over 60sec
// =110+(125-110)*(Time-100)/60 =
// phMaxT+(faMaxT-phMaxT)*(Time-phTime)/faTime
unsigned long  faMaxT = 500; //(4*125)
unsigned long faTime = 60000;//(1000*60)

// Reflow: 160-250sec
// raise the temperature up from 125degC to 240degC over 90sec
// = 125 + (250 -125)* (Time -100-60)/90
// faMaxT + (rfMaxT-faMaxT)*(Time-phTime-faTime)/rfTime
unsigned long  rfMaxT = 960;//(4*240)
unsigned long  rfTime = 90000;//(1000*90)

// Cool Down: 250sec+ 6deg/sec max rampdown
// 240-5deg/sec*(time-90-100-60)
// rfMaxT - cdSlope*(Time-rfTime-phTime-faTime)
unsigned long  cdSlope =16;//(4*4)
unsigned long sp;

 sp = 0;
  if (theTime < phTime){
    sp = ambT + (theTime*(phMaxT - ambT))/phTime;
  }
  else if (theTime < (phTime+faTime)){
      sp = phMaxT + ((faMaxT-phMaxT)*(theTime-phTime))/faTime;
  }
  else if  (theTime < (phTime+faTime+rfTime)){
      sp = faMaxT + ((rfMaxT-faMaxT)*(theTime-phTime-faTime))/rfTime;
  }
  else if (theTime < phTime+faTime+rfTime+1000*(rfMaxT-ambT)/cdSlope){
    sp = rfMaxT - (cdSlope*(theTime-rfTime-phTime-faTime))/1000;
  }
  else {
    sp=ambT ;
  }
return int(sp);
}

With a lot of head scratching and some luck I was able to alter the python code to accept both  X and  Y values (instead of just Y). This allowed me to output a plot from the arduino through the serial port.
[attachment=0]

There are some issues with the plotting code that I need to address before I get into trying to tune a PID for the oven. The software is very heavy on my laptop. I don't think it should be, but it is. I think it might have something to do with the threading going on involving the serial port. Also, sometimes I can't get the plotting software to stop and close. It just likes to take over all of the CPU cycles. That's not very efficient considering that I am sending one point a second. I would like to configure it to detect and accept multiple traces based on what the Arduino sends it. I have some ideas on how to do this but will take some additional python research as I am not a programmer by trade.

Re: Reflow Oven (Yet another)

Reply #19
Hi,

You probably want to look at my code, that i have written for my reflow oven (one of the supposedly abandoned projects, more like "I have no time" project :-).

The code can be found here
https://github.com/robots/reflow-oven/tree/master/main

It contains the "ramp" generator written in more "general" way. All parameters are stored in eeprom, and loaded on demand, before reflowing is started. Each part of the profile is defined by time it takes, and target temperature. The slope is calculated on-the-fly, to make it simpler for user.

Whole project has  been tested and only needs some parameter tweaking (pid, ramp parameters, pwm period). And it fits into atmega8 nicely (with bootloader, and 0.5kB free space :-).

Re: Reflow Oven (Yet another)

Reply #20
[quote author="robots"]Hi,

You probably want to look at my code, that i have written for my reflow oven (one of the supposedly abandoned projects, more like "I have no time" project :-).[/quote]

Wow, it seems like you are almost there. Thank you for sharing.

I have to admit when it comes to AVR-GCC I still ride that bike using training wheels and a helmet. Do you have a blog or website that describes what the code is doing? What's the hardware like?

Re: Reflow Oven (Yet another)

Reply #21
There is a thread about my project:

viewtopic.php?f=56&t=1848

Re: Reflow Oven (Yet another)

Reply #22
Quote
There is a thread about my project:

viewtopic.php?f=56&t=1848

Thanks!

I look forward to reading through it.

Re: Reflow Oven (Yet another)

Reply #23
is it possible to make one with lot of strong IR leds ?

Re: Reflow Oven (Yet another)

Reply #24
I seriously doubt it can be very effective moneywise .. it would be seriously cheaper to get a professional unit. Do you have an idea how many ir leds you need to hold the temprature at 350C ?!?

Re: Reflow Oven (Yet another)

Reply #25
Progress
Wow, it has been a busy week but not without something to show for it. I have working on the reflow oven project on two major fronts. The first was to create a python plotting interface such that I could plot out the PID varibles over time. The second was tuning the PID for the reflow oven. I had pretty good success on both accounts. This post will just be talking about the success of the PID and some of the non conventional stuff put in place to make it that way.

PID
The PID algorithm didn’t depart too much from the classic model.The PID right now is in the main loop() of the Arduino code. It will be in it’s own subroutine later. Here is the heart of the code:
Code: [Select]
int error, pid, diff, ingr, prop;
...

//calculate PID
time = millis();
reference = SnPbProfilePoint(time);
    //reference =500;
   
    for (i=0;i<4;i++){
        temperature += thermocouple.readQtrCelsius();
        temperature /= 2;
    }
In order to keep the calculations for SnPbProfilePoint(time) and the PID variables in integer math (avoiding floating point math) temperature is left in its native scale of 1/4 degC per count. I added a method called readQtrCelsius() to the MAX6675 class to read back this raw data. Time is left in milliseconds to keep as much accurracy as possible. I averaged the temperature with four readings to help with noise. I tried up to eight but anything over four didn’t seem to make a difference.
Code: [Select]
error = reference-temperature;
prop = 32*error;
diff = 128*(temperature-temp_last)-256*(reference - ref_last);

ingr = error/24+ingr_last;
if (error>0){ingr+=1;}
if (error<0) {ingr-=10; }
       
ingr = constrain(ingr,0,1000);

pid = prop + ingr - diff;
P
The prop was scaled to a non oscillation value once I thought the diff scalers were good.
D
The differential variable is generated with a couple of twists. Instead of basing it off of the difference in error it is calculated with a change in temperature reading and the change in reference. Doing it this way helped it keep up with the changing reference. It is also weighted heavily when compared to the P and the I variables.

I
The ingr was the wimp of the three. I found that turning the scaler down so low most of the time resulted in a 0 contribution. So to keep some in there I added or subtracted some based on the sign of the error. For a constant reference, this will still zero out error over time. Since the oven is quick on the rise in temperature but slow on the fall (no active cooling) it was give a faster integration in the negative direction. Finally it was constrained between 0 and 100% duty cycle because beyond these extremes would add response delay.
Code: [Select]
   pid = constrain(pid,1,1000);
// turn on pwm
digitalWrite(pwmOut, HIGH);
    delay(pid);
    if (pid<1000) {digitalWrite(pwmOut, LOW);}
    delay(1000-pid);
    ingr_last = ingr;
    temp_last = temperature;
    ref_last = reference;

    //update Plot then loop again
PWM
The duty cycle is proportional to pid. pid =1000 is 100% pwm. pid was constrained between 1 and 1000. The minimum of 1 was because delay(0) turns out to be a very looooong delay.

I am quite pleased with the results! Next I will tackle the LCD and the menu system and then start putting all these pieces together into a complete system.
[attachment=0]

Re: Reflow Oven (Yet another)

Reply #26
Great response.

Few questions
 - how many measurement points you have in the oven?
 - fan?
 - have you tried empty oven and oven containing object with a large thermal mass inside (for e.g. a 500g copper or al clad inside)?
 - do you have a way of pushing air from outside in to the oven (something I'm thinking about so that I can get output of pid to go -20 to +100 where negative values would actually push air from outside in to the oven - but I'm not sure how good of an idea is it)?

Re: Reflow Oven (Yet another)

Reply #27
Quote
Few questions
- how many measurement points you have in the oven?
Just one type of K themocouple
Quote
- fan?

Not yet. I am aiming first at a bare bones system and then adding things like a fan if needed.

Quote
- have you tried empty oven and oven containing object with a large thermal mass inside (for e.g. a 500g copper or al clad inside)?
I did try this bit it made no difference because it depends on the thermal energy absorption rate(1/thermal resistance) which is much slower than the 1000watt or so delivery so unless it is in contact with what ever you are trying to reflow it wont be a problem.  The oven is a big thermal mass itself and competeing with that would be hard. Idid try out some different thermal massed in contact with the thermocouple.

Here is a one penny mass test.
[attachment=2]
Here is a two penny sandwich test
[attachment=1]
Here is a M5 scew bolt and washer
[attachment=0]

Data points are taken one per second with no PID parameters changed.

Quote
- do you have a way of pushing air from outside in to the oven (something I'm thinking about so that I can get output of pid to go -20 to +100 where negative values would actually push air from outside in to the oven - but I'm not sure how good of an idea is it)?

I have been thinking of something like this. It would be good to match the slope in the negative direction to cool those parts at the rate of the down slope.
I was thinking of a servo that would open the oven door and slide out the rack with a little fan to blow air.

Re: Reflow Oven (Yet another)

Reply #28
[quote author="eeAlchemist"]
Quote
- have you tried empty oven and oven containing object with a large thermal mass inside (for e.g. a 500g copper or al clad inside)?
I did try this bit it made no difference because it depends on the thermal energy absorption rate(1/thermal resistance) which is much slower than the 1000watt or so delivery so unless it is in contact with what ever you are trying to reflow it wont be a problem.  The oven is a big thermal mass itself and competeing with that would be hard. Idid try out some different thermal massed in contact with the thermocouple.
[/quote]

Your test show exactly what I was afraid of. The heating is unaffected but the cooling is affected significantly even with one penny and adding a second penny made again a noticeable difference. That's why I think I'll have to deal with cooling too as for my project the cooling down is also very important (if my chamber stay too hot too long the plastic shrinks)

[quote author="eeAlchemist"]
I have been thinking of something like this. It would be good to match the slope in the negative direction to cool those parts at the rate of the down slope.
I was thinking of a servo that would open the oven door and slide out the rack with a little fan to blow air.[/quote]

similar thoughts .. I was thinking about a servo opening and closing some fins + a fan blowing in at different speed ... on another hand I have cca 500W of peltier's here so there's a big chance I use them too (temps in this chamber go from 30C to 150C so peltier elements work, for reflow oven they don't help too much as it gets too hot for them, blowing in outside air seams to be the only way)

Re: Reflow Oven (Yet another)

Reply #29
I coming back from 2 weeks of vacation and trying to get back into the swing of things. I decided now would be a good time to post some documentation of where thing are on the reflow oven. I have decided to use a joystick and an RGB LCD for the menu system. Right now the goal is to be able to select from different reflow profiles stored in EEPROM and run them. Here is a flow diagram of the menus system as of today:
[attachment=1]
While I am at it, I decided to document the schematic. Here it is as of today:
[attachment=0]
I may still add in an air stirring fan, and a servo and fan that opens the door and blows air  to help cool the PCBs. I’ll be trying these things out once I have all these parts integrated into one sketch. I know these are a bit rough but I thought I share some things now and clean them up later as thing progress.