Posts Tagged Reflow Oven

A Time Out for Documentation

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:

While I am at it, I decided to document the schematic. Here it is as of today: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.

, , ,

Leave a comment

Reflow Oven PID

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.

The PID algorithm didn’t depart too much from the classic model.The PID 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:

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.

	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;

The prop was scaled to a non oscillation value once I thought the diff scalers were good.
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.

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.

    pid = constrain(pid,1,1000);
	// turn on pwm
	digitalWrite(pwmOut, HIGH);
    if (pid<1000) {digitalWrite(pwmOut, LOW);}
    ingr_last = ingr;
    temp_last = temperature;
    ref_last = reference;

    //update Plot then loop again

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.

, ,

Leave a comment

Reflow: Maximum Burn

I managed to get the Thermocouple Amplifier (MAX6675) breakout board – v1.0 from Adafruit working without issue. I downloaded the library they had stashed at GitHub and everything went according to plan. I played a bit with the ‘bake’ and ‘toast’ settings of the oven. Bake only powers the bottom heating element while toast powers both. The heating slew rate  needed to follow the reflow profile would only be supported by the toast setting so I went with that.

The Setup

I had the end of the K-type thermocouple fastened to a piece of pcb material with kapton tape and placed that about is the x-y center of the oven. The oven was set to maximum (no regulating yet). The blue plot was just wire rack shelf closest to the bottom of the oven. The red plot was with the broiling pan on top of the wire rack. You can see the one with the pan was slower to rise and fall. The sudden change in the downslope is where the door was opened and the tray pulled out.

Thank you Coolterm!

At first I was unable capture data for plotting. It was frustrating when I went to go copy and paste it out of the terminal window. For some reason the Arduino IDE doesn’t do this.  After cruizing the web for solutions I found a good one. I was able to record time and temperature by printing them out with the serial command and capturing the output with CoolTerm. Cool Term is a very nice terminal program that allows you to copy & caste captured serial data as well as capture it to a file.

Maximum Burn


Now that I had the data I wanted to plot it out so I could see how fast the temperature was changing. I tried Google and Open Office spreadsheet programs to do this. I don’t know what I was doing wrong but it was difficult to get the temperature on the X-Axis. All columns wanted to be on the Y axis and I couldn’t find an option to change this. Then I remembered that I had MathCad on an old laptop. I was able to import the data and make a graph comparing the 2 runs.


It looks like this toaster oven will work.  For small boards, some sort of aluminum tray or plate will be needed to prevent the boards from falling through the wire rack.  I don’t think the broiling pan will do as it has an uneven surface. 

Next Steps:

  • Buy a solid state relay
  • Write the Arduino code for the temperature profile
  • Find a better plotting solution for looking at the temperature vs time.

, ,

Leave a comment

The Island of Misfit Toaster Ovens

So I went by “Wally World” and looked at toaster oven that may fit my project. I found this one:

The misfit Toaster

Reflow Toaster Oven


It was the last of it’s kind in the store. The box was crunched and opened previously. The price was right- only $20 after tax. The next one up was $60 and was twice the size and had a fan inside. This one said 1000W so I snagged it. It is in sad shape. It was probably headed to the island of misfit toaster ovens. The back is all dented up as seen in this photo. The cord is only about 2ft long. A bunch of the screw were loose and some don’t have any bite into metal.

I plugged it in and power it up. It has plenty of heating capability. It has a few different settings that I will try out and an always on position on the timer switch.

I have a Thermocouple Amplifier (MAX6675) breakout board – v1.0 that I will be using to sense the temperature with the arduino. I guess I should get that built and working next.

, ,

Leave a comment

Reflow Oven

I think a good first embedded project would be a reflow oven. I’m sure that I will learn a bunch on this project.

I hope to make the reflow oven out of a cheap but capable toaster oven where the temperature will be controlled to follow a reflow temperature profile.

As I see it now will be composed of the following major components:

  • Toaster Oven
  • Arduino controller
  • Temperature Sensor
  • Solid State Relay
  • LCD display
  • User Interface buttons (as required)
As I become more project savvy I’m pretty sure this lis will change but I need something to aim at to begin with.
Here are some links that inspired this project:
There are more but these are a good start for the basic idea of what a reflow oven is for and how others have approached this project.