Gas station without pumps

2014 August 28

PWM for incubator

Filed under: freshman design seminar — gasstationwithoutpumps @ 17:15
Tags: , , , , ,

I’ve been thinking that the freshman design seminar this year might design an incubator for bacterial cultures.  The idea would be to heat the air in a styrofoam box to try to get a constant temperature (maybe 35°C).  I got some free styrofoam boxes (interior about 16.5cm×28.5cm×32cm, or 15 liters) from someone who was getting rid of them, and I could probably get more at the monthly (quarterly?) styrofoam recycling days on campus.

The basic design would be to use a resistive heating element, a thermistor, and a simple microcontroller (probably an Arduino board, maybe the Uno32 boards that they use in CMPE 12 and 13) to do PWM control of the heater.  I happen to have a 9V 6A power supply on hand for another project, so I’ll design around that—it can also be used to power the Arduino. We’ll probably want to use a 5V processor, as most of the power FETs have fairly high threshold voltages, which rules out the 3.3V Uno32 boards.

I’ve been using AOI518 nFETs in the circuits class, but they have been discontinued, so I’m thinking of switching to either the AOI516 from Digi-key or the NTD4906N-35G from Mouser.  They are fairly similar parts with 10mΩ and 8mΩ RDSon, respectively.  The AOI516 has slightly higher resistance and slightly lower gate capacitance and gate charge, and so is probably a slightly less wide channel.  Either would work fine, and they are both 55¢—60¢ in 1s, and 24¢–35¢ in 100s.

I’d also need a high-power resistor.  I’d rather not use an incandescent light bulb as the resistor (resistance varies too much with temperature, and the light might be a problem for some cultures), so I looked at power resistors:

resistance rated power power @9V cost
10Ω 20W 8.1W $1.84
10Ω 50W 8.1W $2.53
10Ω 50W 8.1W $3.64
8.2Ω 50W 9.9W $2.25
4.7Ω 20W 17.9W $2.73
3.3Ω 25W 24.55W $3.56
50W 40.5W $2.31
50W 40.5W $3.64
1.8Ω 50W 45W $4.61

Note: resistors may reach case temperatures of 275°C at rated power (TE Connectivity SQ series datasheet, which only go up to 25W), which is above the ~240°C melting temperature for styrofoam, so it would be best to keep well below the rated power.   The temperature rise is not linear with power (looks roughly like a square root).  Based on the curves on the data sheet, keeping below 100°C would mean keeping power to about 20% of rated power.  The Tyco Electronics THS Series data sheet shows a surface temperature rise of 3°C/W for the 50W series, but is explicit that this assumes a standard heatsink of 535 cm2, 1mm thick, and is probably more related to the thermal resistance of the heatsink than any properties of the resistor.  Temperature rise without a heatsink is not given, but obviously much larger—the 50W resistor is limited to 20W without a heatsink.  (Note: TE Connectivity and Tyco Electronics appear to be two different names for the same company—Tyco Electronics appears on the older datasheet.)

Power derating curves for the Tyco THS series suggest that the 20W limit means the case temperature would be around 220°C,  since that is the heatsink temperature at which the resistor would be limited to 20W.  If we naively assume a linear temperature rise with power for the surface temperature, then 8.1W would result in about a 105°C surface temperature. But if convection is being used rather than thermal conduction, we’d expect a higher temperature rise than this—maybe more like a 150°C surface temperature (assuming power goes with the square of the temperature difference from ambient). Of course, adding a heat sink or a fan would make a big difference.

For fans, 5V and 12V fans are very common, but 9V ones are rare.  It might be possible to run a 12V fan at 9V, with reduced performance, or the fan might not spin at all.  The students would probably want to design around 12V.  They might need to add a series resistor to drop the voltage a bit before powering the Arduino board.  Assuming about 35mA for the Arduino board, a resistor to drop the voltage to 8V would be around 120Ω.  The Arduino could probably draw 45mA before the IR drop would be enough to start causing problems with the LDO voltage regulator on the Arduino board.

Fans are rated by air flow and static pressure, which correspond roughly to the short-circuit current and open-circuit voltage of  a linear circuit:  putting a straight line between the air flow at 0 back pressure and the back pressure at 0 air flow gives a reasonable approximation to the behavior of the fan under different conditions.  Even a very cheap fan will provide 10.7 cu ft/min with no back pressure and 1.4 mm H2O at 0 flow running at 12V.  In reasonable units that is 5 l/s and 13Pa (a very low back pressure—this is a wimpy fan). Another cheap fan will provide 37CFM (17.5 l/s) or 0.15 in H2O (37Pa) at 12V, and its data sheet claims that it will start and can run on as little as 4.5V.

So stirring up a 15l box means a full circulation about every 1–10s—a veritable windstorm!  Even if the back pressure and low voltage cuts the flow rate to a third it is still plenty. Of course, if there is too much air flow, we could use PWM on the fan as well—full power to start it, then adjust the duty cycle to adjust the air flow. For $5.14 I could get a fan with tachometer feedback (useful for teaching students feedback control) and for $7 I can get a fan with both tachometer output and built-in driver for PWM (just needing a logic-level input).

I’ll want to order some parts to try out the designs, to see if there are some hidden problems that I’ll have to prepare students for. For power resistors, Mouser seems to have better prices than Digi-key, but Digi-key has them beat on prices and variety of fans.  DigiKey also has the better parametric search capability—I can tell the 3-wire fans (with tachometer) from the 2-wire ones at a glance or search for them, without having to click through to each fan for the spec sheet, as I would on Mouser or Jameco sites.

I think that the biggest problems for students will be in getting the control loops to work.  On-off control will have a huge swing, because of the delays in getting temperature changes at the sensor after power is applied to the resistor.  Proportional control will be a bit better, but they’ll probably have to go to PI (proportional-integral) control, which could be challenging for freshmen who’ve not finished calculus.  I don’t think we’ll even try for PID (proportional-integral-derivative), because of the difficulty of tuning the derivative term—but I’ll probably try that myself.

The project should probably start with making a thermistor-based thermometer (like in the first circuits lab) and seeing how fast the temperature rises in the box with various power levels to the resistor (probably by adjusting voltage and current, but maybe by adjusting PWM).  Seeing how fast the box cools from a given temperature would also be important.  We’d probably want the fan running continuously for these experiments, and both the fan and the resistor mounted on a piece of wood, hardboard, or MDF (medium-density fiberboard), to avoid the resistor coming into contact with the styrofoam.

Then they could try on-off control to see how much overshoot they get in response to a setpoint change, or in response to a disturbance (like opening the box and closing it again).

After that they could see whether proportional control gets less overshoot (but probably observe droop, where the setpoint is missed).  Finally we could add integral control to correct the droop.

At the same time that they are working on getting the control loop working, they can be building mechanical parts for the incubator (shelving, baffles for improving air circulation, external air for cooling?, control panel, … ).

7 Comments »

  1. Fuzzy control requires very little math, and works well.

    Comment by John Hassler — 2014 August 28 @ 18:19 | Reply

    • I looked at fuzzy control back in the late 1980s or early 1990s when it had a brief spurt of fashionability. Although fuzzy controllers are supposedly still popular in Japan, they’ve not caught on much elsewhere. It makes sense to use fuzzy control for a poorly understood system with lots of measurement variables and control variables. The rules are easy for non-mathematical people to write (though it is hard to get them right), but the underlying code that interprets the rules is messy to build compared to PID controllers. For single-measurement, single-control-variable controllers, I think that the sequence of on-off, proportional, proportional-integral, and maybe PID controller is going to be much easier for the students to implement—particularly given that most have never programmed before.

      Comment by gasstationwithoutpumps — 2014 August 29 @ 10:53 | Reply

      • I don’t remember it as being “messy,” but it’s been 25 years since I used or taught it. (One of the new faculty wanted to teach Process Control, so I moved on to Thermo and Fluid Mech. – and I’ve been retired for most of this century.) Certainly, velocity mode PI is simple to write, if not to understand, and isn’t difficult to tune.

        Since I was the “controls guy,” I set up control systems for several different research projects. I used fuzzy control for one particularly difficult system – basically a big pressure cooker with rigid temperature/time requirements and variable lags – and it was more robust than either PID or Internal Model. But as you suggest, I never used it for a simple problem.

        Comment by John Hassler — 2014 August 29 @ 17:26 | Reply

        • I think that fuzzy control systems would be a perfectly reasonable topic for a process control class and appropriate for controlling a complicated process. But I’m looking for something for freshman who have never programmed before to program on an Arduino board—even the 10 lines of code for a PID controller is going to be pushing their programming skills, and I’ll have to work up to that gradually.

          Comment by gasstationwithoutpumps — 2014 August 29 @ 18:17 | Reply

  2. […] I started thinking more about the freshman design project to design an incubator (see Temperature-control project for freshman design seminar  and PWM for incubator). […]

    Pingback by More on incubator design | Gas station without pumps — 2014 August 30 @ 13:19 | Reply

  3. […] PWM for incubator gives a bit more detail on the temperature-control project. […]

    Pingback by Putting the heater in a box | Gas station without pumps — 2014 September 17 @ 21:04 | Reply

  4. […] figuring out how to do the control loops (Temperature-control project for freshman design seminar, PWM for incubator, More on incubator design, Thermal models for power resistors, Thermal models for power resistor […]

    Pingback by More on freshman design projects | Gas station without pumps — 2015 January 19 @ 22:01 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: