DIY编程器网

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 2878|回复: 1
打印 上一主题 下一主题

Reflow Oven

[复制链接]
跳转到指定楼层
楼主
发表于 2013-9-11 07:51:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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.
OperationOverviewThe 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 top  of 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.

DownloadMonitor application

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏1 分享分享 支持支持 反对反对
沙发
发表于 2015-10-22 21:51:43 | 只看该作者
感谢楼主提供这么好的东东
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|文字版|手机版|DIY编程器网 ( 桂ICP备14005565号-1 )

GMT+8, 2024-11-23 04:52 , 耗时 0.107504 秒, 17 个查询请求 , Gzip 开启.

各位嘉宾言论仅代表个人观点,非属DIY编程器网立场。

桂公网安备 45031202000115号

DIY编程器群(超员):41210778 DIY编程器

DIY编程器群1(满员):3044634 DIY编程器1

diy编程器群2:551025008 diy编程器群2

QQ:28000622;Email:libyoufer@sina.com

本站由桂林市临桂区技兴电子商务经营部独家赞助。旨在技术交流,请自觉遵守国家法律法规,一旦发现将做封号删号处理。

快速回复 返回顶部 返回列表