Home :: News archive

News Archive

02/04/2013
Easter Weekend Project: PID Peking Duck

Most electric ovens, even modern ones, use simple thermostat temperature control. When the temperature in the oven is below the desired set point, the heating element is turned on. The temperature rises until it's above the set point. The heating element is then turned off and the oven slowly cools as it loses heat.

The problem with this system is that the temperature is constantly shooting up over the set point, and falling below it. The amount of overshoot and undershoot forms the hysteresis band. In the case of the old oven in the apartment I rent, the hysteresis band was around 70 ºC. That is, with the oven set to 180 ºC, the temperature inside would vary between about 230 ºC and cool down to 160 ºC.

The girlfriend and I decided to try our hand at crispy Peking duck on the weekend. Never one to let an opportunity go to waste and in a quest for the perfect crispy duck, I decided it'd be good to try supplanting the thermostat control of the oven with PID control.

A PID controller, unlike the thermostat controller, uses PWM to give a fully-variable output. The power going in to the oven is controlled so that when the oven temperature is a long way from the set point (say, when you've just opened the door), the heat is turned on full power. As the temperature rises up closer to the desired temperature, the power is backed off gradually, preventing overshoot and resulting in much tighter control.

The Plan

The first step was to investigate how possible it'd be. I pulled the oven out of place as was delighted to find this:

Not many appliances come with their circuit diagrams these days. A quick examination confirmed what I was hoping for: there were no smart electronics that were going to get upset by what I had planned. I didn't even have to take the covers off the oven. I could just turn its stock thermostat up to 100%, and have the PID controller limit the power going in to the oven at a convenient junction box in the adjacent cupboard.

The Parts:

The parts I used were:

The N1020 with RS-485 would have worked just as well, but we only had the version without RS-485 on the shelf on Thursday before the weekend. I borrowed the N1100, SSR and heatsink from a little toaster oven we have set up for reflowing surface mount PCBs.

The Novus PID controllers can take a wide range of temperature sensor inputs. I chose the straight tube J type T/C because it's rated to 400 ºC, is sealed with a rugged cable and was close to hand on Thursday.

The oven heating element is about 1800 W, so the 40 A SSR would be easily capable of driving the load without the heatsink. If you're running an SSR without a heatsink, you should at least mount it on a metal surface. If you're putting the project in a box, for example, you could use a metal enclosure or a metal backplate.

Tuning:

The N1100 controller, like almost all our PID controllers, has automatic tuning. The controller sets the PID constants by driving the oven up and down and measuring the temperature response. This can be done entirely from the controller, but having ViewPID hooked up with live monitoring made it much easier to see what was going on.

The oven was pre-heated to about the operating temperature and the controller set to 180 ºC. Auto tuning was enabled and the controller took about 10 minutes to characterise the oven and set its PID constants.

In Operation:

When it came time to cook the duck, I plugged the computer in again to have a look at the response.

The red line is the set point (120 ºC at the moment). The green is the temperature in the oven, which is rising slightly because the door had just been opened and closed, and the controller was bringing the temperature back up. The blue is the output in percentage. As the temperature drops back down to the set point, the controller increases the output to catch it. With the PID controller, the temperature in the oven was always within about 5 ºC of the set point.

The duck came out of the oven beautifully cooked. There are still some tricks to be learnt before we can say we're up to the standard of Simon's Peking Duck in Box Hill but I'm looking forward to the practice.

-NJ

Categories