Reflow Oven
Introduction - Reflow ovenThis project got started after I saw a video describing how to connect via-holes on a home made PCB with solder paste and a reflow oven. Being short of a real SMT oven and not having the financial motivation to buy one. I did as many before me, modifying a toaster oven or in my case a mini oven. The mini oven I found has a max power of 1380 Watts and an 18 liters cavity volume. There are 4 heater elements, 2 are placed at the top and the others at the bottom.In a updated version, the two lower heaters are moved to the upper configuration to increase the temperature ramp during reflow.http://circuitbox.net/electronics/reflow/images/front_small.jpghttp://circuitbox.net/electronics/reflow/images/inside_small.jpgOperationOverviewThe idea was to remove the mechanical control parts from the oven and replacing them with a microcontroller to get the necessary control features. The microcontroller and the peripheral parts are placed on a PCB and mounted inside the oven. There is also a LCD and a pulse encoder mounted in the front panel of the oven, making interaction possible. Heating shields and a fan are implemented to keep the temperature low for the electronic components.
The working process of the oven is; you load the oven with a PCB. Select the reflow profile and set the time and temperature needed for your solder. When you press start the oven will go through the reflow process. When its finished, you open the door to increase the cooling process. Pressing the pulse encoder after the reflow process is done will set the oven into default mode and a new solder process can be started.
Configuration interfaceTo interact with the oven the pulse encoder is turned left or right, this will make it jump between menu selections displayed on the LCD. When pressed, a selection is made. This feature is also used when changing the time and temperature for the reflow process. Turning right will increase the value and turning left will decrees the value. Pressing the pulse encoder will select the current displayed value.
External communicationThe oven uses the RS-232 interface to communicate with a PC. This communication is mainly used for sending oven-data to a monitor application, but can also be used to reprogram the microcontroller if the oven is started in programming mode.
Hardware and Firmware descriptionOverviewTo create the circuit diagram and PCB layout for this project an EDA tool called KiCad was used. This is an open source software which is fairly intuitive and easy to use. This tool can be used in the whole process from drawing schematics to PCB layout.
The firmware is written in C and the compiler used is the AVR-GCC. The software is based around the main loop, which handles the update of temperature readings and LCD display. The firmware also utilized interrupts and timers for periodical running service routines.
MicrocontrollerThe controller circuit is base around ATmega324p running at 7.3728 MHz. This microcontroller is fairly big, with lots of memory space and I/O pins. The idea of using a microcontroller of that size is to make the build more strait forward and not worrying of running out of memory if new features are added in the future.
LCD display and front panelThe LCD is a 3x16 text display from the EA DOMG series and is mounted on the front panel PCB. This module is connected to the microcontroller by the SPI interface. The PCB also contains three LEDs, representing power-on and activity on heater element 1 and 2.
Pulse encoderThe pulse encoder is used when navigating through the menu options and changing values. This encoder is connected to port-A on the microcontroller. The signals are pulled high with external pull-up resistors.
Interrupt routines and timersThe pulse encoder is interrupt driven and uses the pin change interrupt on port-A to read the signal input. When an interrupt occur the service routine decodes if the encoder was pushed, turned right or left. After the decoding is done the routine updates an event variable that is read with a function from the main loop.
There are three hardware timers utilized in this project. An RTC timer is used for keeping track of passed time, when the oven is running a profile. The second timer is used as a general microsecond delay function. The last timer is utilized by the heater control to update impulses sent to the heaters elements.
Menu handlerThe menu handler contains a set of functions that generates the text layout and functionality with the ovens LCD. The menu system enables the time and temperature to be edit before a profile run.
Power supplyThe power is transformed down from 230 volts AC to 12 volts. The 12 volts then goes through a diode bridge making it unregulated direct current.The DC power drives the cooling fan and a 5 volts DC regulator (LM7805) that powers the microcontroller and surrounding parts.
Temperature measurement and regulationTemperature measurementTo measure the temperature a technique called cold junction compensation (CJC) is utilized. The idea behind this technique is that you use two measuring points where one of them is known (the cold junction point), and the other is the temperature that should be measured (the hot end). The steps required to get the thermocouple temperatures are as follows:
[*]Read the cold junction temperature.
[*]Calculate or use a table to get the cold junction voltage.
[*]Read the thermocouple voltage (Seebeck voltage).
[*]Add the cold junction voltage to the thermocouple voltage.
[*]Calculate or use a table to get the temperature for the adjusted
thermocouple voltage.
The temperature measurement circuit is inspired from a designed from Parallax and their thermocouple kit. This project uses a chip called DS2764BE which is equipped with a 2-wire interface. This circuit is a high-precision Li+ battery monitor, but can be used to measure voltage from a thermocouple due to its sensitive voltage input. In this project a K-type thermoprobe is used in the hot end to get the oven temperature. The K-probe sensitivity is approximately 41 uV/degC. The voltage measured from the probe is converted to a temperature using a predefined table. The cold junction temperature is fetched from the DS2764BE embedded temperature sensor.
Heater control and regulation In the updated version of the oven, all the heater elements are place in the topof the oven. These are connected in two groups and are controlled separately with two triac circuits. The control circuit consists of a triac that handles the load and a opto-triac driver with "zero voltage crossing" that operates the actual triac. The opto-triacs are connected to port-D on the microcontroller and uses two output pins for the control.
By using a opto-triac with internal zero crossing the option of phase control for the load is removed. This due to the power is only applied directly after a zero crossing point. This resulting in a resolution of a half-cycle or two times per cycle.Instead a numeral-impulse control method is utilized for the control of the heaters. In this case 100 half-cycles are used to set the span of the power load. 100 half-cycles representing 100 % power and 1 half-cycle representing 1 % power to the heaters. This is the same as 100 control points every second as the frequency of the AC power is 50 Hz.
In order to distribute the power over the entire pulse span and to avoid ending up with the whole load in the beginning or at the end, a variation of the Bresenhams algorithm is utilized. The implemented algorithm is for drawing slanting lines in raster graphics and gives good distribution of the power over the whole control period.
The oven heaters are regulated by a PID controller found in Atmels application note "AVR221- Discrete PID controller". Recalculation of the error value is done every second.As of firmware version 0.17 the reference temperature is set to follow a linear curve. This to get a better control over the temperature rise during a reflow process.
Serial Communication Serial data and communication protocolThe ovens RS-232 interface is provided by MAX202ECSE. This chip has two separate transmit and receive units, only one of them is used in this project. The TTL/CMOS side is connected to Tx0 and Rx0 on the microcontroller and the output is connected to a 9-pin DSUB.
The current implementation of the serial communication is to send oven-data to a monitor application running on a computer. The transmission is done every 100 ms. The structure of the message format is as follows:
Message frame:
1 byte1 byte16 byte1 byte1 byte2 byte
HeaderFlagData msgData sizeTailCRC
Data message:
1 byte8 byte4 byte1 byte2 byte
Oven stateActive profileTempHeater usageTimer
Firmware updateBootloader and programming modeThere are mainly two ways to program the microcontroller, if a bootloader is installed the RS-232 interface can be used to program the flash memory. If there is no bootloader present the 10-pin ISP interface can be used in the programming process.
The implemented bootloader is found in Atmels application note "AVR109 - Self-programming". Minor variablename changes had to be made to make it work with the ATmega324p microcontroller. The programmer I used is the avrdude with the programming device "avr109". The programming baud rate is set to 9600.
To set the oven in programming mode the pulse encoder needs to be pressed when power is applied. This will initialize the RS-232 interface (USART) and set the oven in a listening loop waiting for communication.
Todo List
[*]Temperature probe calibration.
[*]External CJ temperature sensor.
PC SoftwareMonitor applicationThe monitor application is written in Python and utilizes the PyQT framework for its GUI interface. It is a fairly simple implementation using the serial port to receive the oven-data and displaying it on the computer screen. The reason for this software is to make it easy to follow the reflow process and be able to track the temperature during the whole solder process.
http://circuitbox.net/electronics/reflow/images/monapp1_small.jpghttp://circuitbox.net/electronics/reflow/images/monapp2_small.jpg
DownloadMonitor application
感谢楼主提供这么好的东东
页:
[1]