Skip to content

timbitss/reflow-oven-controller

Repository files navigation

Reflow Oven Controller

PCB designers today often utilize SMD components to minimize the physical size of the circuit board. The industry standard of soldering SMD components is through reflow soldering using a reflow oven. Hobbyists, however, often perform SMT soldering using a hot air gun, a hot plate, a soldering iron, or combination thereof due to cost. Reflow ovens on the market currently range from $300 CAD up to $1500 CAD, not including necessary modifications. Since reflow soldering is the most time-efficient, reliable, and safest method of SMT soldering, a Nucleo-L476RG PID reflow oven controller was designed to transform any low-cost, convectional toaster oven into a full-fledged reflow oven.

Reflow test

For individual module descriptions, please view the wiki.

Table of Contents

Installation and Setup

  1. Clone this repository using git clone https://github.com/timbitss/reflow-oven-controller.git.
  2. Install and open an STM32CubeIDE instance.
  3. Import the project to the current workspace by selecting File->General->Existing Projects into Workspace.
  4. Build the project. If no build errors exist, flash the project using the run command.

Real-time Plotting using Python

  1. Create a virtual environment in the project repository.
  2. Install the necessary packages in the new virtual environment by entering python3 -m pip install -r requirements.txt for Unix/macOS users or py -m pip install -r requirements.txt for Windows users.
  3. Create two folders in the root directory, one for CSV files and the other for temperature plots, and update the csv_path and plot_path variables in plot_temp.py to match their respective path.

Usage

Materials Required

Component Qty
>1000 W Convection Oven1 1
Male-Female Jumper Wires 7
K-Type Thermocouple 1
SparkFun Thermocouple Breakout 1
STM32 Nucleo-L476RG Board 1
IoT Power Relay 1

1 It is recommended to purchase a used toaster oven to save on costs.

Connections (based on configuration file)

Thermocouple Breakout Nucleo-L476RG
GND GND
VCC 3V3
SCK PB10
SO PC2
CS PC4
K-Type Thermocouple Thermocouple Breakout
Chromel (yellow) +
Alumel (red) -
IoT Relay Nucleo-L476RG
+ PA6 (PWM Output)
- GND

PID Tuning

Test runs should be performed before using the oven for reflow soldering. The aim is to achieve an oven temperature profile that closely matches a standard leaded or lead-free solder profile, depending on the user's application. An example of a reasonably-tuned reflow profile is shown below (P = 225, I = 0, D = 500, Tau = 1):

Temperature Plot

The PID tuning process is outlined below:

  1. Power the Nucleo board using a USB connected to a PC or laptop.
  2. Place the 'hot' end of the thermocouple inside the oven.
  3. Turn the oven temperature knob to its maximum bake temperature.
  4. Run the real-time plotting script, plot_temp.py, and let the reflow process complete.
  5. Tune one or more PID parameters based on the system's response using the reflow set CLI command (see Reflow Commands).
  6. Repeat steps 3 and 4 until a reasonable reflow thermal profile is achieved.

Once the PID tuning process is complete, the oven is ready for reflow applications. The user should keep a record of the final PID settings, as they must be manually inputted again if the Nucleo board resets or powers off.

Command-line Interface

Users may access the CLI using a serial terminal with the serial line configured for 115200 baud rate, 8 data bits, 1 stop bit, and no parity.

To toggle logging on and off, press the Tab key.

To see the commands that are available, enter help or ?.

Help Command

To get help on a specific command within a module, enter <module> <command> help or <module> <command> ?. E.g. entering log set help produces the following message:

Module Help Command

UART Commands

To view performance measures related to the UART module, enter uart pm.

uart pm

To clear performance measures related to the UART module, enter uart pm clear.

Log Commands

To display log levels at the global and module scope, enter log status.

Log status

To set a module's log level, enter log set <module tag> <level>.

  • Acceptable log levels are OFF, ERROR, WARNING, INFO, DEBUG, VERBOSE.
  • This command accepts a wildcard (*) for the <module tag> argument.

Reflow Commands

To view relevant information about the reflow oven controller, enter reflow status.

Reflow Status

To start the reflow process, enter reflow start.

  • The oven temperature must be less than the reach temperature of the cooldown phase to start the reflow process, otherwise an error message is shown.

To stop the reflow process and turn PWM off at any point in time, enter reflow stop.

To set one or more PID parameters (Kp, Ki, Kd, Tau), enter reflow set <param> <value> [param2 value2 ...].

  • Note: PID parameters adjusted using the reflow set command are not saved in flash memory and are overwritten to their default values upon reset.

User Safety

Safety must be a priority when using this project. Please do not leave the reflow oven unattended during the reflow process. In addition, the following safety measures are included within the software:

  • The reflow process starts only when the thermocouple reads a valid temperature below the cooldown temperature (default value = 35°C).
  • If the controller reads an invalid temperature at any point in the reflow process, the process shuts down and the relay is turned off.
  • Users can manually turn off the reflow process by entering reflow stop from a serial terminal (see Reflow Commands).
  • The real-time plotter, plot_temp.py, will automatically transmit reflow stop to stop the reflow process when either the data can not be parsed or the user closes the animation window.

Credits

Additional Resources

About

A reflow oven controller for the Nucleo-L476RG board.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages