Skip to content

Remote temperature control system for professional pizza ovens using Raspberry Pi with dual-zone PID control.

Notifications You must be signed in to change notification settings

francescopace/pizza-oven-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pizza Oven PID Controller

Remote temperature control system for professional pizza ovens using Raspberry Pi with dual-zone PID control.

Project Overview

This project provides remote control and monitoring for a modified Effeuno P134HA professional electric pizza oven. The system adds two programmable PID controllers to independently manage:

  • Deck heating element (bottom/platea)
  • Ceiling heating element (top/cielo)

This dual-zone control allows precise temperature management for optimal pizza baking results.

Project Photos

Oven Setup 1 Oven Setup 2 Oven Setup 3

Hardware Components

Required Hardware

  • Raspberry Pi (any model with GPIO pins)
  • 2x MAX6675 thermocouple amplifier modules
  • 2x K-type thermocouples
  • 2x Solid State Relays (SSR) - rated for your heating elements
  • Modified Effeuno P134HA pizza oven with accessible heating elements
  • Appropriate power supply for Raspberry Pi

GPIO Pin Configuration

MAX6675 Thermocouples

  • CS1 (Deck sensor): GPIO 4
  • CS2 (Ceiling sensor): GPIO 5
  • SCK (Clock - shared): GPIO 24
  • SO (Serial Out - shared): GPIO 25

Solid State Relays

  • SSR Deck: GPIO 17
  • SSR Ceiling: GPIO 21

Installation

1. Clone the Repository

git clone https://github.com/francescopace/oven.git
cd oven

2. Install Python Dependencies

pip3 install RPi.GPIO simple-pid

3. Enable SPI Interface (if needed)

sudo raspi-config
# Navigate to: Interfacing Options -> SPI -> Enable
sudo reboot

Configuration

Edit parameters in test.py to match your oven requirements:

sample_time = 4      # Sampling interval in seconds
setpoint = 28        # Target temperature in °C (adjust for pizza baking)

# PID tuning parameters (Kp, Ki, Kd)
pidA = PID(5, 0.01, 0.1, setpoint=setpoint)  # Deck controller
pidB = PID(5, 0.01, 0.1, setpoint=setpoint)  # Ceiling controller

# Power distribution (should sum to 100%)
percentageA = 50     # Deck power percentage
percentageB = 50     # Ceiling power percentage

PID Tuning Tips

  • Kp (Proportional): Increase for faster response, decrease if oscillating
  • Ki (Integral): Eliminates steady-state error, increase slowly
  • Kd (Derivative): Reduces overshoot, helps stabilize

For pizza ovens, typical setpoints are 300-450°C depending on pizza style.

Usage

Run the Controller

sudo python3 test.py

Expected Output

Thermocouple A Temperature: 350.0°C, control: 45%
Thermocouple B Temperature: 348.5°C, control: 47%

Stop the Controller

Press Ctrl+C to safely shutdown and cleanup GPIO pins.

Project Structure

oven/
├── max6675.py      # MAX6675 thermocouple interface library
├── ssr.py          # Solid State Relay control library
├── test.py         # Main control program with PID logic
├── .gitignore      # Git ignore rules
└── README.md       # This file

File Descriptions

max6675.py

Library for reading temperature from MAX6675 thermocouple amplifiers.

  • Supports multiple chip select pins for multiple sensors
  • Returns temperature in raw value, Celsius, or Fahrenheit
  • Handles SPI communication via GPIO bit-banging

ssr.py

Simple library for controlling Solid State Relays via GPIO pins.

  • set_pin(CS): Initialize SSR control pin
  • on(cs_no): Turn on heating element
  • off(cs_no): Turn off heating element

test.py

Main control program implementing dual-zone PID temperature control.

  • Reads temperatures from both thermocouples
  • Calculates PID control output for each zone
  • Uses PWM-like control by cycling SSRs on/off within sample period
  • Allows independent power distribution between zones

How It Works

PID Control Loop

  1. Read Temperature: Both thermocouples are sampled every sample_time seconds
  2. Calculate Error: PID controller computes difference from setpoint
  3. Generate Control Signal: PID output (0-100%) determines heating duty cycle
  4. Apply Power Distribution: Control signal is scaled by zone power percentage
  5. Actuate SSRs: Relays are switched on for calculated portion of sample period

Time-Proportional Control

Instead of true PWM, the system uses time-proportional control:

  • If control signal is 60%, SSR stays on for 60% of sample_time
  • This provides smooth temperature control without rapid switching
  • Protects SSRs and heating elements from excessive cycling

Safety Considerations

⚠️ IMPORTANT SAFETY WARNINGS ⚠️

  • This system controls high-voltage heating elements - ensure proper electrical isolation
  • Use appropriately rated SSRs for your heating element power requirements
  • Install proper thermal fuses and safety cutoffs in your oven
  • Never leave the system unattended during operation
  • Ensure thermocouples are properly positioned and secured
  • Test thoroughly at low temperatures before full operation
  • Monitor for any signs of malfunction or overheating
  • Have a manual emergency shutoff readily accessible

Troubleshooting

Temperature Reading Issues

  • Verify thermocouple connections and polarity
  • Check SPI wiring (CS, SCK, SO pins)
  • Ensure MAX6675 modules have proper power supply
  • Error code (negative CS number) indicates thermocouple fault

Control Issues

  • Verify SSR connections and power ratings
  • Check GPIO pin assignments match your wiring
  • Tune PID parameters for your specific oven thermal mass
  • Adjust sample_time if control is too slow or unstable

Temperature Oscillation

  • Reduce Kp (proportional gain)
  • Increase Kd (derivative gain)
  • Increase sample_time for slower, more stable control

Future Enhancements

Potential improvements for this project:

  • Web interface for remote monitoring and control
  • Temperature logging and graphing
  • Multiple temperature profiles for different pizza styles
  • Automatic preheat sequences
  • Mobile app integration
  • Safety interlocks and alarms

License

This project is open source. Please use responsibly and ensure all electrical work complies with local codes and regulations.

Acknowledgments

  • Built for controlling a modified Effeuno P134HA professional pizza oven
  • Uses MAX6675 library for K-type thermocouple reading
  • PID control via simple-pid Python library

Contact

For questions or contributions, please open an issue on GitHub.


Buon appetito! 🍕

About

Remote temperature control system for professional pizza ovens using Raspberry Pi with dual-zone PID control.

Topics

Resources

Stars

Watchers

Forks

Languages