Dangerous Prototypes

In development => Project logs => Topic started by: robots on February 13, 2011, 08:34:16 pm

Title: Reflow oven controller
Post by: robots on February 13, 2011, 08:34:16 pm
I have bought this oven - . The main reason for this was to bake some PCBs. As with every reflow oven, this one needs temperature control as well.
I have baked several pcb without problem with unmodified oven. But that might be luck, as the temperature profile is nowhere near perfect.
I have therefore decided to make some simple temp controller to take care of the whole soldering process. As my oven features fan, I will probably want to control it as well. The contoller should not to need any special programmer (mega can by programmed with BP) and the board should be etch-able at home.

Schematic:


There is no programming port for the atmega8. It needs to be programmed with bootloader before the max6675 is soldered. Reset and MISO pads are for this purpose.

The board:

The board is a bit larger than the lcd itself. Most difficult part is to solder the header. That needs to be replaced by smd version in next release. The board is designed to be piggibacked on the lcd. Small hack is Pot to set the lcd contrast. There was no smd pot available near, so I decided to solder miniature trimmer to the pin header directly from bottom side.
Board is single side pcb, with 2 jumper wires.

Finished board:


This board was not etched at home :-). It was made some local company that does UV etching, and they also apply silver coating to protect the copper.
There are few modifications not present in the picture above - gnd on middle pin of the thermocouple connector, voltage divider for serial port. Some parts are missing, and are not needed for lab testing (mic5205 voltage regulator, and big through-hole capacitor).

Thermocouple used is from sure electronics:

The thermocouple does take a while to cool down and I wonder if it is suitable for this purpose.

For user input I use incremental encoder, bought at local store. This seems to be not a good quality build. Tends to jump randomly back and forth.


The software:
Probably the hardest part. This part is still in development. So far the every peripheral can be controlled.
Finished is: encoder, button, display, max6675 temperature reading, PWM output, pid controller.
There are still missing parts like: ramp generation, user interface.

I will provide board/schematic files here on request. The software will be provided as well, once finshed.
Title: Re: Reflow oven controller
Post by: rsdio on February 14, 2011, 01:16:58 pm
Nice!

Did the Dangerous Toaster never get off the ground? ... or is this slightly different?  The picture of your oven did not show up, although the schematic and board do appear.
Title: Re: Reflow oven controller
Post by: sqkybeaver on February 14, 2011, 01:27:53 pm
a generic temp controller would be cool, I've been thinking about cooking sous vide in my crock pot.
Title: Re: Reflow oven controller
Post by: ian on February 14, 2011, 02:14:21 pm
Quote
I've been thinking about cooking sous vide in my crock pot

Indeed.
Title: Re: Reflow oven controller
Post by: robots on February 14, 2011, 05:44:35 pm
The picture of the oven is on my other hdd (one that failed :(, of course there is backup (-: ) *picture* is just a placeholder.

The temp controller is actually the most recent project of mine, it will be finished this week, I hope :)
Title: Re: Reflow oven controller
Post by: tayken on February 15, 2011, 10:09:00 pm
I guess I uploaded some code for the Dangerous Toaster project. It is from a PIC24 book used in my microprocessors course. Maybe they can be helpful while developing the firmware.
Title: Re: Reflow oven controller
Post by: robots on February 16, 2011, 10:26:02 am
Still have no idea what "Dangerous Toaster" is ! :-)
Title: Re: Reflow oven controller
Post by: Sjaak on February 16, 2011, 11:11:01 am
[quote author="robots"]Still have no idea what "Dangerous Toaster" is ! :-)[/quote]

You don't want to know ;)
Title: Re: Reflow oven controller
Post by: rsdio on February 16, 2011, 11:49:23 am
[quote author="robots"]Still have no idea what "Dangerous Toaster" is ! :-)[/quote]
I would have said "Dangerous Toast-R-Oven" but some U.S. company would probably have their lawyers contact me...
Title: Re: Reflow oven controller
Post by: sqkybeaver on February 16, 2011, 01:15:46 pm
sparkfun has listed their old oven,

Quote
I would have said "Dangerous Toast-R-Oven" but some U.S. company would probably have their lawyers contact me...

it is a posibility if they determine they don't like dangerous used with their trademark
Title: Re: Reflow oven controller
Post by: robots on February 16, 2011, 01:22:41 pm
becoming a bit ot ....... as it was supposed to be one of my project's log. :-P
Title: Re: Reflow oven controller
Post by: MichaelZ on February 17, 2011, 02:11:57 am
Dangerous Toaster was the name of a reflow oven controller design discussion and I have made some boards that I am testing right now. 


My intent was to keep it as simple as possible and use the power of a PC to manage profiles, data collection and plotting.  The software is a based on the software I did for the USB LCD Backpack.  The board drives a SSR or Power Switch Tail.

McZ
Title: Re: Reflow oven controller
Post by: rsdio on February 17, 2011, 02:46:52 am
Seems like the two projects (Dangerous Toaster v. Reflow oven controller) could be combined in some ways.  Rather than have the entire system be managed by the ATmega (UI and operations), or entirely managed by a connected PC, perhaps the duties could be shared.  A PC front end would allow a more comfortable user experience, but hopefully the time spent in the UI would be minimal.  The PC could then download the desired profile to the ATmega as a data set, stored in a designated area of Flash (or EEPROM), and then the oven could operate on its own.  Such a split of duties could lower the costs by alleviating the need for an LCD, but still not tie the oven to a PC 100% of the time.  The LCD would still be a nice touch as an optional confidence display, perhaps even to select among multiple profiles stored in Flash (if there is enough room).

FTDI is convenient, but I tend to prefer having local firmware under control.  It's also safer in the event that someone trips over the USB cable and unplugs the USB host during a bake.  But I'm just tossing in my two cents.  International exchange rates may vary.
Title: Re: Reflow oven controller
Post by: MichaelZ on February 17, 2011, 03:02:31 am
There are so many version on the web using either Atmel or Microchips.  I was thinking about something different.  So in the scheme of DP I was trying to KISS and keep the cost down.  I have designed many variations of the circuit some very advanced with color graphic LCDs and as simple as the FT232R. 

On the other hand if the hardware is simple the software has to be more complex.

The new BP with the PIC24FJ should be able to control this circuit through it's USB OTG.

BTW, the 555 in the circuit is a watchdog so in case you trip over the USB cable or the PC gets BSOD the relay turns off. 

McZ
Title: Re: Reflow oven controller
Post by: rsdio on February 17, 2011, 07:52:36 am
[quote author="MichaelZ"]BTW, the 555 in the circuit is a watchdog so in case you trip over the USB cable or the PC gets BSOD the relay turns off.[/quote]
That's a cool idea, but then the oven stops working.  With a PIC or AVR, the oven would continue to function unless it totally lost power, which means there's no hope of working anyway.

But I see your point - there are lots of designs out there.
Title: Re: Reflow oven controller
Post by: robots on February 17, 2011, 09:30:08 am
The software I am working on, (yet to be documented) will have everything stored in eeprom: pid settings, multiple temperature profiles. I want to make it configurable though the UI, but there will be possibility to upload the eeprom (there is bootloader capable of this).

Realtime temperature data is going to be available on the serial port, so user can graph temperatures. (not planing any frontend for this, gnuplot is good enough).

Still wonder how much program space will it take. So far 1k is taken by bootloader, and the sw that is described in the 1st post has ~3k - thats 50% already !
Title: Re: Reflow oven controller
Post by: robots on February 19, 2011, 04:36:18 pm
There was quite a bit progress in the software development. I have successfully added menu to the device.

Have few options:
- run profiled "cooking" - 2 profiles.
- run constant temperature "cooking"
- configure each profile
- configure pid parameters
- reset defaults for pid/profile1/2
- restart system (bootloader enter)



What is to be added is the actual editor for the values.

So far 5.5k of flash is used. 7k is limit. 1k is used by bootloader.

Bootloader:
bootloader is modified avr109 bootloader- also known as arduino bootloader, even though it existed long before arduino did :-). Modifications are to save some space. Byte memory access is removed completely, and only neccessary funcions are left, so that it works with avrdude. Bootloader is entered by reseting the device and user has 2 secons time to talk to the bootloader. After timeout user application starts.
Title: Re: Reflow oven controller
Post by: robots on February 19, 2011, 04:37:00 pm
BTW ... 1st post updated, pictures, pictures :)
Title: Re: Reflow oven controller
Post by: rsdio on February 20, 2011, 12:06:42 am
[quote author="robots"]For user input I use incremental encoder, bought at local store. This seems to be not a good quality build. Tends to jump randomly back and forth.

The software:
Probably the hardest part. This part is still in development. So far the every peripheral can be controlled.
Finished is: encoder, button, display, max6675 temperature reading, PWM output, pid controller.[/quote]
The poor quality performance of the encoder could be due to the software or the hardware or both.  The photo shows exposed wires, and if you touch those when rotating the encoder, it might affect the output.  Also, I believe that the scan rate of the firmware can affect whether the performance is smooth or jumpy.  Finally, you may need some kind of debounce on the encoder returns - logic bounce could be a possible explanation for the random jumps.

Do any of the Dangerous Prototypes projects have firmware with support for rotary encoders?
Title: Re: Reflow oven controller
Post by: MichaelZ on February 20, 2011, 03:08:08 am
I have used several routines for reading rotary encoders.  The one that has work well for me is at Rotary Encoder Demonstration (http://http://www.waitingforfriday.com/index.php/Rotary_Encoder_Demonstration).  I have used it with the SparkFun Rotary Encoder (http://http://www.sparkfun.com/products/9117) without any issues.
Title: Re: Reflow oven controller
Post by: robots on February 20, 2011, 10:59:49 am
[quote author="rsdio"]
The poor quality performance of the encoder could be due to the software or the hardware or both.  The photo shows exposed wires, and if you touch those when rotating the encoder, it might affect the output.  Also, I believe that the scan rate of the firmware can affect whether the performance is smooth or jumpy.  Finally, you may need some kind of debounce on the encoder returns - logic bounce could be a possible explanation for the random jumps.

Do any of the Dangerous Prototypes projects have firmware with support for rotary encoders?[/quote]

Scan rate is not a problem.  Encoder is hooked to interrupts, so every transition is caught  Problem is that the encoder is mechanical, and has similar problem as bouncing buttons. And also it is not brand new, and has been played with. So the mechanics might be a bit loose.

I will probably add some external capacitors for the debouncing.
Title: Re: Reflow oven controller
Post by: NashblackCat on February 23, 2011, 02:30:55 pm
Wonderfully done project so far! I've been looking for a simple solution to my lack of a reflow controller and this looks to be the first real project to solve it. I take it this will become a kit after final testing is done? ;)  I sure hope so.
Title: Re: Reflow oven controller
Post by: rsdio on February 24, 2011, 12:09:24 am
[quote author="robots"]I will probably add some external capacitors for the debouncing.[/quote]
Sounds promising.  Let us know how that turns out.
Title: Re: Reflow oven controller
Post by: robots on March 21, 2011, 08:25:41 pm
I found it ! (the time to have some more fun with this project)

So I added 100n capacitor to each encoder output, and now the glitches are gone. Makes me happier to be with one less problem to solve :-)

So the TODO list is:
- add parameter setting menu
- test pwm outputs
- test on real toaster.
- test, tune, test, repeat as necessary :)
Title: Re: Reflow oven controller
Post by: NashblackCat on March 21, 2011, 10:36:38 pm
[quote author="robots"]I found it ! (the time to have some more fun with this project)

So I added 100n capacitor to each encoder output, and now the glitches are gone. Makes me happier to be with one less problem to solve :-)

So the TODO list is:
- add parameter setting menu
- test pwm outputs
- test on real toaster.
- test, tune, test, repeat as necessary :)[/quote]

:D w00t! Glad to hear of the encoder issues are gone.
Title: Re: Reflow oven controller
Post by: robots on March 22, 2011, 12:17:56 am
Note to self: I do hate cpus with 2 separate address spaces !

I have finished the parameter setting menu. Parts of the menu have been moved to program space to save ram.

It does make pretty nice errors once you start messing with the stack :)
Title: Re: Reflow oven controller
Post by: robots on March 25, 2011, 09:41:21 am
I have finished the firmware. Now it is time to put the electronics inside the oven.

It seems that Chinese manufacturers like screws with triangle head. :-(

There is a github repository for this project, you can have a look at the source code.
https://github.com/robots/reflow-oven (https://github.com/robots/reflow-oven)


Update: 1st post is updated with picture.
Title: Re: Reflow oven controller
Post by: NashblackCat on March 25, 2011, 12:01:01 pm
:D A friend of mine sent me a set of security bits that is handy to have. If it is just a flat triangle you can use a blade tip that is the same size as one of the flat sides. I have removed them before this way.
Title: Re: Reflow oven controller
Post by: cbrandtner on September 27, 2011, 02:59:10 am
i try to build a reflowovencontroller  with your software and i try to understand your PID implementation. I am experimenting with the parameters to get a temperturecurve as for reflowprocess nessesary.
Is it possible that there is an mistake in parameter editroutine?
in pid.c is
int16_t pid_limit_default[4][2] PROGMEM = {
   {-256, 256},
   {-256, 256},
   {-512, 512},
   {0, 4095},<--- low/hight Limit
in menu.c you edit as follows
 .text1 = "Set high",<<<<--------I think this must be "Set low"
.text2 = " O limit",
.type = MENU_VAL_I16,
.p = &pid_limit[LIMIT_O][0],<<<----- high should be [1]

Is it possible that the other PID limitparameters have the same problem in the Editparameter menu?
Do you have from your own experiance parameters that i can try to use? with the default parameters it is not really working with my oven.

Christian
Title: Re: Reflow oven controller
Post by: robots on September 27, 2011, 11:28:26 am
Well the software was never really put to test, I have locked out my mega8 on the controller (due to relatively high voltage 8v) and i have had no time to replace it yet :-)

Default parameters were NOT tested in reflow oven, they were just tested with blinking led as "heater".

And yes there might be some errors in the menu. I haven't tested the controller much. I have had no time last few months, and my reflow oven is just collecting dust :(

If you have any patch for the source I would be glad to accept it ;)
Title: Re: Reflow oven controller
Post by: PPA94 on June 18, 2014, 03:15:50 pm
Old project, but:
The MAX6675 has no polynomial compensation, I don't know where you got that...
IMHO Also a very expensive chip for a hobby board.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01542177816session_write_close ( )...(null):0
20.01572309408ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01572310184Database_MySQL->query( ).../DatabaseHandler.php:119
40.05872448912Database_MySQL->error( ).../Db-mysql.class.php:273