Gas station without pumps

2014 September 14

PWM heater and fan

Filed under: freshman design seminar — gasstationwithoutpumps @ 00:18
Tags: , , , , , , , ,

Now that I have a power resistor and heatsink, and have verified that my power supply is capable of delivering 50W, I can try making a thermal control system for an incubator box as I hope to get the freshman design class to do.

Before building a complete control system and tuning a proportional, PI, or PID controller, I decided to check each of the components:

  • 1.8Ω resistor and heatsink (already characterized in still air in the previous post). Initially I was going to use the 8.2Ω resistor, but it heated so slowly once bolted to the heatsink that I wasn’t sure that students would have the patience to wait for it—they might conclude that things weren’t working.
  • NTD4858N-35G nFET for PWM control of the heater.
  • fan.  I bought a SanAce 40 109P0412P3H013 fan with PWM control and tachometer feedback, and I wanted to be sure that I could control the fan speed and read the tachometer.
  • thermistor. I had some NTCLE100E3103JB0 thermistors around that I had never used.  They’re not ideal for measuring temperature of resistors (they only go up to 125°C), but they should be find for measuring air temperature around 35°C, which is what the incubator will mainly be used at.
  • Arduino board (actually a SparkFun RedBoard, which is plug-compatible with the Uno R3, but has has a more reliable USB interface and is slightly cheaper.

I started out hooking up the nFET and the 1.8Ω resistor and making sure that the nFET did not get too hot.  It seems to be ok.  When I was using the 8.2Ω resistor, I measured the voltage drop across the resistor and the across the nFET, getting a 57.6mV drop from drain to source, with a current of about 9.024V/8.21ohm = 1.099A.  That’s about a 52mΩ on-resistance, and I was expecting more like 7mΩ–10mΩ.  My gate voltage was around 5V (bigger than the 4.5V of the data sheet), which should have given me lower on-resistance.  The only things I can think of are that I had more wiring resistance than I realized (quite likely, but not likely enough to add over 40mΩ), and that I was measuring around 1A, not around 10A, so perhaps there is a small-voltage effect that I don’t know about.

I should probably test the voltage drop again with 1.8Ω resistor, and see whether the on-resistance is still so high.  Better probe placement may get me more accurate voltage measurements also.

The fan runs fine at 9.212V at about 6850 RPM.  Setting the PWM input line of the fan to 0 drops the speed to about 710RPM, and setting the PWM duty cycle to a half sets the speed at about 4120RPM.  The fan is a bit noisy for such a tiny fan at the highest speed setting, but reasonably quiet at lower speeds.  I suspect that bolting the fan to a piece of masonite as a baffle would reduce the fan noise, as I think quite a bit of it was from vibration between the case of the fan and the metal plate it was sitting on.

The tachometer on the fan provides an open-collector output that I read with an interrupt input on the Arduino (pin 2, interrupt 0). I recorded the time between interrupts and converted it an RPM measurement.  The tachometer worked fine when I was just using the fan, or when the resistor was either completely off or completely on, but when I tried using PWM on the resistor, the tachometer readings became nonsense.

I looked at the tachometer signal with my oscilloscope and saw that the PWM transitions for the resistor resulted in huge spikes in the tachometer output that triggered extraneous interrupts.  I suspected noise coupled through the power supply. Adding a 10µF bypass capacitor to the 9V power supply to the fan reduced the problem considerably, and a 470µF aluminum polymer electrolytic cleaned up the power supply even more.  The 10µF alone was enough to eliminate the extraneous spikes in the middle.

I think that I should try adding some gate resistance to the nFET to slow down the rise and fall of the PWM signal a little, to reduce the inductive spikes and make the bypass capacitors more effective.

I noticed that I was still getting some readings that were half the duration that I was expecting.  These could have been caused by ringing at the other transition of the tachometer pulse, so I tried eliminating the ringing by adding some capacitance to the line and changing the pullup resistor.  These attempts were not very successful, so I decided that hysteresis was needed.  I put a Schmitt trigger between the open-collector output and the Arduino interrupt input, and the signal got a lot cleaner.  There were occasional double pulses at one edge, though, but I found that adding a 1nF to 10nF capacitor in parallel with the pullup resistor for the open collector output smoothed out the high frequency noise enough to get clean, single transitions out of the Schmitt trigger.

I hooked up the thermistor in a voltage divider with 5.1kΩ on the other leg (which maximizes the dV/dT sensitivity at 40.1°C). I used the parameters on the data sheet to plot a calibration curve for the thermistor:

Calibration and sensitivity curves for the thermistor.

Calibration and sensitivity curves for the thermistor, based on the data sheet and a 5.1kΩ pulldown resistor.

The maximum sensitivity of the thermistor circuit is around 33.3 degrees C (~10.4 Arduino LSB/°C).  That’s not a very high sensitivity, particularly given the noise of the ADC.  Note that maximizing the slope at 40.1 °C is not the same thing and having the maximum of the slope at 40.1°C.  If the maximum of the slope was at 40.1°C, the slope there would be less than it is in this plot.

My son wonders why I’m using the Arduino board for this project, rather than the FRDM-KL25Z board that I use for the circuits class or the Teensy 3.1 ARM development board. The ARM processors have more power, more memory, and much better analog-to-digital converters—and the KL25Z board is cheaper.  If I were doing this project for myself, I would certainly prefer the KL25Z board. But it is a little harder to get a beginner started on that board—just getting the first program onto the board is a pain if you don’t have a Windows machine (due to the broken bootloader the P&E Micro wrote).  There are instructions now for replacing the firmware from a Linux system, but I’ve not checked yet whether these instructions work from a Mac.  Even once you get working firmware onto the boards, the development environments are not beginner-friendly.  Well, that is certainly true of the MBED environment or bare-metal ARM environment for the KL25Z boards, but the Teensy 3.1 board supposedly can be programmed from a plugin for the Arduino IDE, which might be simple enough for beginners.  This is something for me to look into more.

Of course, one reason I’m using the Arduino Uno or Sparkfun RedBoard is that they are 5V processors, and most of the power nFETs I’ve looked at need 4.5V on the gate to turn on fully.  There are power nFETs now with lower gate voltages, but most of them are only available as surface-mount devices.  I don’t want to have to add an extra transistor or buffer chip as a level changer for the PWM circuit.

The problem is that these students will be brand new to programming, brand new to electronics, and brand new to engineering—and the course is only a 2-unit course, not a full 5-unit course, so the total time students are expected to spend on the course is only 60 hours. I want them to be able to design stuff quickly, without spending all their time learning to use tools or trying to find workarounds for limitations of the devices they are using. It already bothers me that they’ll probably need to use a Schmitt trigger to clean up the tachometer input, but at least hysteresis was a topic I was planning to cover! (The need for bypass capacitors bothers me less—they are so ubiquitous in electronics that I’ll have to cover them no matter what.)

It’s after midnight now, so I’m going to call it a day.  Here is my to-do list on this project:

  • Check the VDS voltage at 4A on the nFET. Is the on-resistance still much too high?
  • Try adding a 1kΩ gate resistance to slow down the transitions on the PWM, to see if that reduces the inductive spikes and the noise-coupling through the 9V power supply.
  • Write a simple control loop for the fan speed, so that the fan speed can be held constant even when the power-supply voltage changes.  This may be an opportunity to try the P/PI/PID tuning, since the control loop should be fairly fast.
  • Write a simple control loop for controlling the temperature at the thermistor, by adjusting the PWM for the resistor.  This might get messy, as the fan speed probably affects the rate of transfer from the resistor to the thermistor (the thermistor is in the air stream blown over the resistor, not touching the resistor).
  • Put the whole thing into a styrofoam box, to see whether extra venting is needed to allow things to cool down, and to see how tightly temperature can be controlled.
  • Design and build baffling for the fan to get better airflow in the box.
  • Figure out how to get students to come up with workable designs, when they are starting from knowing nothing. I don’t want to give them my designs, but I want to help them find doable subproblems.  Some of the subproblems they come up with may be well beyond the skills that they can pick up in the time frame of the course.

 

2014 September 11

Thermal models for power resistor with heatsink

Last night I fit a simple thermal model to temperature measurements of some power resistors: T(t) = PD+A+(T_{0}-PD-A)e^{-t/(DM)}, where P is the power in watts, D is thermal resistance in °K/W, M is thermal mass in J/°K, A is the ambient temperature in °C, and T0 is the initial temperature.

I ran into problems with the 1.8Ω 50W THS501R8J resistor, because it heated up very fast and I could only get a few measurements when delivering power, before I had to turn it off.  I proposed adding a heatsink, a 6″×12″ sheet of aluminum 0.063″ thick, to increase the thermal mass M and decrease the thermal resistance D.  I estimated that the thermal mass should increase by the heat capacity of that much aluminum (74.33 cm3 at 2.422 J/°K/cm3, giving 180 J/°K), but I did not have a good way to estimate the change in thermal resistance.

The 6"×12" plate is much larger than the power resistor, which is bolted in the center with M3 screws (American 6-32 screws are a little too big for the holes in the resistor).

The 6″×12″ plate is much larger than the power resistor, which is bolted in the center with M3 screws (American 6-32 screws are a little too big for the holes in the resistor). I used a thin layer of white thermal grease to get better thermal conduction between the resistor case and the aluminum plate.

I do not expect the simple thermal model to work well, because it assumes that you have an isothermal object—all the aluminum at the same temperature.  But a large flat plate is going to have significant thermal spreading resistance, so that the resistor in the center is hotter than the edges of the plate.

With a heatsink the time constant DM is about 260s, only a little faster than the 347s without the heatsink, but the thermal resistance is much lower, so the maximum temperature (PD+A) is  much lower.

With a heatsink the time constant DM is about 260s, only a little faster than the 347s without the heatsink, but the thermal resistance is much lower, so the maximum temperature (PD+A) is much lower.

As expected, the fit is not great. When cooling off, the initial temperature of the resistor is higher than of the surrounding plate, so the initial cooling at the resistor is faster than the eventual cooling, when resistor and the plate are closer in temperature, because heat is being transferred to the plate as well as to the air. The increase in thermal mass  (about 100 J/°K) was less than my crude estimate based on the heat capacity of the added aluminum (180 J/°K)—this is probably also due to the thermal spreading resistance and the non-uniform temperature of the heatsink.

resistance rated power heatsink? test power M [J/°K] D [°K/W] DM [s] T [°C]
10.10Ω 100W No 8.288W 101.7 6.38 649 75.7
8.21Ω 50W No 10.169W 32 11.58 371 143.7
1.81Ω 50W No 43.174W 31.9 10.87 347 495.8
1.81Ω 50W Yes 43.174W 131.7 1.97 260 110.3

Note: the asymptotic temperature T in the table above is with the 9V power supply I have, which does not have quite constant voltage over the range of powers tested. With a 12v supply, temperatures would be much higher: D V^2/R +A .  The asymptotic temperature is also the maximum when the resistor is sitting in still air that is unconfined.  A fan would reduce thermal resistance and make the asymptotic temperature lower, but confining the resistor in a box (like in the incubator design) would make the “ambient” temperature not be constant—the relevant thermal resistance is how slowly the air in the box loses heat, which for the thick-walled styrofoam boxes we’ll use is a very high thermal resistance.  Without a feedback loop and PWM to keep the power down, even the 10Ω resistor would get very hot in a styrofoam box.

I should probably test the 10Ω 100W resistor on the heatsink also, to see if that reduces the time constant DM.  I expect the thermal mass to go up by something between 100 and 180 J/°K, but the thermal resistance to drop to around 1–1.5 °K/W, getting DM in the ballpark of 300s.  I don’t think I’ll do that today, though, as making measurements every 20 seconds for 2000 seconds is tedious and leads to cramping in the hand that aims the IR thermometer and keeps the trigger pulled.

Which raises a pedagogical question: Should I have students do the measurements?  Should I show them how to make a recording thermometer with a thermistor first? They’ll need to figure out how to use a thermistor for measuring air temperature anyway.

The thermistors I have at home (NTCLE100E3103JB0) only go up to 125°C, and I’d want them to have one that goes to at least 175°C for this lab, which means using something like NTCLG100E2103JB (10kΩ, ±5%, ±1.3% on B-value, -40°C to 200°C), which is only 35¢ in 10s, so still cheap. I should get myself some of these higher temperature thermistors and test out the recording . (Or the tighter tolerance NTCLE203E3103SB0, which only goes up to 150°C, or the wider temperature range 135-103LAF-J01, which goes to 300°C.)

How will I attach the thermistor to the resistor for temperature measurement? tape?  (I have to be sure not to short out the thermistor leads on the aluminum case of the resistor.)

Air temperature sensing poses less of a mounting challenge, but the thermal delays will be quite large—I have to look at how difficult it will be to tune a PID or PI controller with large delays—we really don’t want huge overshoot.  If the students have multiple temperature measurements (resistor temperature and air temperature, for example), they may need a more complicated control loop than a simple 1-variable PID controller.  How much can we simplify this?  (Perhaps a PI or PID controller based on the air temperature, with over-temperature shutdown on the resistor temperature?  Then tuning the PID controller with the constraint that the gain be kept low enough to keep the over-temperature shutdown from kicking in?)

Thermal models for power resistors

Filed under: freshman design seminar — gasstationwithoutpumps @ 06:46
Tags: , , , ,

I recently bought some power resistors, to use as dummy loads for testing PWM circuits and to use as heating elements in an “incubator” design for the freshman design seminar.  I bought 3 resistors: 10Ω 100W HSC10010RJ,  8.2Ω 50W THS508R2J, and 1.8Ω 50W THS501R8J.

I want to make simple models for the thermal behavior of these resistors when they are not mounted on a heatsink, but are just sitting on a low-thermal-conductance surface.  The simple model will have two parameters: a thermal mass M (in joules/°C) and a thermal resistance D (in °C/W).  If we just had the thermal mass, we would have \frac{dT}{dt} = \frac{dE}{dt}/M = P/M, where E is the thermal energy, and P is the power delivered to the resistor, and the temperature would increase linearly: T(t) = T_{0} + Pt/M. But as the temperature increases above the ambient temperature, the resistor loses energy at a rate proportional to the temperature difference from ambient: \frac{dT}{dt} = (P - (T(t)-A)/D)/M.  We can rewrite this as a standard first-order differential equation: \frac{dT}{dt} + \frac{T(t)}{DM} = \frac{PD+A}{DM}, which has the solution T(t) = PD+A+(T_{0}-PD-A)e^{-t/(DM)}.  Note that \lim_{t\rightarrow\infty}T(t)= PD+A, independent of the thermal mass, and the cool down with P=0 is dependent only on the initial temperature, the ambient temperature, and the product DM, not on D and M separately.

To find the parameters for each resistor, I connected each to my 9V 6A power supply, and measured the temperature at regular intervals with an IR thermometer.  For the 50W resistors, I blackened the bodies of the resistors with a felt-tip pen to make the IR thermometer more accurate—I had not done that with the 100W resistor, but it took so long to make the measurements on that resistor that I did not want to go back and remeasure it.  It had a colored finish and may have been closer to being a blackbody radiator than the 50W resistors, so the errors may not be too large.The errors due to not holding the gun in a perfectly fixed position probably contribute more error.

The fits are not too bad—this simple model seems to represent the thermal behavior of the resistors fairly well.

The 100W resistor, as expected, has a very high thermal mass and fairly low thermal resistance.  With a low power input (8% of rated power), the equilibrium surface temperature is still quite low.

The 100W resistor, as expected, has a very high thermal mass and fairly low thermal resistance. It heats up and cools down slowly. With a low power input (8% of rated power), the equilibrium surface temperature is still quite low, only about 76°C—well below the 240°C melting temperature of styrofoam. Even with a 12V supply the temperature would only get up to (12V*12V/10Ω)*6.38°C/W + 25°C=117°C.

The 8.2Ω 50W resistor has a lower thermal mass but a higher thermal resistance than the 100W resistor.  It heats up much faster, and cools down somewhat faster than the 100W resistor.  It is being run at about 20% of the rated power, and it is supposed to be able to be run at up to 40% of rated power (20W) without a heat sink.

The 8.2Ω 50W resistor has a lower thermal mass but a higher thermal resistance than the 100W resistor. It heats up much faster, and cools down somewhat faster than the 100W resistor. It is being run at about 20% of the rated power, and it is supposed to be able to be run at up to 40% of rated power (20W) without a heat sink.

The 1.8Ω 50W resistor has similar thermal characteristics to the 8.2Ω 50W resistor (is is the same package in the same series), but because the power is much higher 86% of rated power, it heats up very fast and would exceed the temperature specs for the resistor if left on for more than a couple of minutes.

The 1.8Ω 50W resistor has similar thermal characteristics to the 8.2Ω 50W resistor (it is the same package in the same series), but because the power is much higher 86% of rated power, it heats up very fast and would exceed the temperature specs for the resistor if left on for more than a couple of minutes.

Adding a large heatsink would increase the thermal mass and decrease the thermal resistance of any of the resistors. If I want to use the 1.8Ω resistor, I will definitely need a heatsink! I can run the 8.2Ω resistor without a heatsink at 9V, but at 12V it would get up to 230°C, too close to the melting point of styrofoam. The 10Ω 100W resistor could be used safely even at 12V. I’ll try adding a 6″×12″ sheet of 0.063″ thick aluminum.  According to the Wikipedia article on heat capacity, the specific heat capacity of aluminum is about 2.422 J/°K/cm3, so the sheet should add a thermal mass of about 180 J/°C, but computing the thermal resistance is complicated, so I’ll just measure the temperature rise and fit the model.  Even if the heat dissipation were not increased (very unlikely), the greater thermal mass and resulting 7× slower response will make measurements easier and less likely to result in overheating the 1.8Ω resistor.

I’ve now tested that my power supply is capable of delivering 8.84V/1.81Ω = 4.88A. I still need to put the 1.8Ω and 8.2Ω resistors in parallel and see if I can get 6A from the power supply. The output impedance of the power supply seems to be about 78mΩ, given how much voltage drop there is with increasing current. Most of that may be the wiring from the power supplies to the resistor, as the power supply senses the voltage as it leaves the power supply, before the IR drop of the wiring.

2014 August 30

More on incubator design

Filed under: freshman design seminar — gasstationwithoutpumps @ 13:19
Tags: , , ,

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).

The box they’ll be using has a capacity of about 15l, which at 25°C is about 18g of air, and dry air has a heat capacity of about 1J/g/°C, so to heat the air to 37°C would take about 12°C * 1J/g/°C * 18g = 216J.  A 10W heater would get there in about 22 seconds, so the students are unlikely to need anything beefier than 10W. Too powerful a heater would be difficult for them to control, as the delay from changing the power input to the temperature of the air changing could be a long time, and a lot of heat would get stored in the resistor and heat sink, continuing to heat the air well past the set point.

I’ve been thinking of using a 9V supply, because I happen to already have a 9V/6A supply, but I could use 12V supply also (I have a 12V/2A supply, and beefy 12V supplies are readily available).  Power resistors rated at 50W are fairly cheap (particularly from Mouser), but ones rated at 100W start getting pricey. The advantage of the higher power resistors is that they can be used without a heatsink at the lower power will be using them, and their surface temperatures don’t get as high (reducing the hazard of the students setting things on fire).

resistance rated power power @9V power @12V cost
20Ω 50W 4.05W 7.2W $3.78
18Ω 50W 4.5W 8W $2.43
15Ω 50W 5.4W 9.6W $2.38 or $3.78
12Ω 50W 6.75W 12W $2.31
10Ω 50W 8.1W 14.4W $2.53 or $3.64
10Ω 100W 8.1W 14.4W $9.78
8.2Ω 50W 9.9W 17.56W $2.25
50W 16.2W 28.8W $3.64
3.3Ω 50W 24.55W 43.64W $2.53
3.3Ω 100W 24.55W 43.64W $10.86
50W 27W 48W $3.64
100W 27W 48W $10.76 or $11.74
50W 40.5W 72.2W $2.31 or $3.64
100W 40.5W 72.2W ($7.15 + $2.98 bracket)
1.8Ω 50W 45W 80W $2.53 or $4.61
1.5Ω 100W 54W 96W $10.76

Even a fan in the box is likely to add significant heat (1—2W), so it may be necessary to add a (controllable?) cooling port to let in cooler air, otherwise the box would heat up at about 7°C/minute, until the temperature was high enough for there to be significant heat loss through the thick styrofoam walls (which is probably past the point where the fan overheats or the inner surface of the styrofoam melts).

If they use a fan with a tachometer (usually 2 or 4 pulses per revolution), then they can’t use an nFET to switch the ground, as the tachometer is referenced to ground.  But even a high-side switch for PWM control of the fan causes problems, because the tachometer uses a Hall-effect device that is powered by the same power as the fan.  Although there are tricks you can use (like pulse stretching—temporarily using 100% duty cycle on the PWM to read a few pulses from the tachometer), the programming gets beyond what I’d want to be handing to the freshmen.  Changing the control input to make measurements in a servo loop is also rather inelegant—changing the frequency with which you make measurements changes the behavior of the system because of the change in the average control value.

So it looks like I need to use 4-wire fan that has a separate PWM input.  I could have them use something like AUB0812L-9X41, which is a 12V motor with open-collector tachometer output and PWM input.  The threshold on the PWM input (VIH > 2.8V) is low enough that one can control the fan from a 3.3V processor (though we’ll need a 5V processor for low-side switching of the heater).  One problem is that the motor does not run below about 10.8V, so I can’t run it off my 9V power supply.  All the PWM control fans I’ve seen have a minimum voltage over 10V, which would mean not running them on my 9V supply.

Also the fans with PWM inputs are fairly heavy-duty (1.08W or more), but this application really calls for a very low-power fan to keep the the air stirred up for uniform temperatures without warming the box.  The lowest-power PWM fans I’ve found are the AUB0812L-9X41,from Digikey@1.08W and 9GA0812P6M001 from Mouser @700mW (but that’s a $20 fan).  Both require over 10V (10.8V for the Delta Electronics fan from Digikey, 10.2V for the Sanyo Denki fan from Mouser). The Sanyo Denki fans are a bit unusual, in that 0% duty cycle on the PWM control does not correspond to the fan being off, but running at a low speed.  Most of the other fans will stall below about 30% duty cycle, but can be turned off completely at 0%.

Fans with tachometer but not PWM go as low as 0.1W for 3V fans, 0.25W for 5V fans, or 0.36W for 12V fans).  Many of them have a high minimum voltage also, but the very cheap ME40101V1-000U-G99 by Sunon is rated for 4.5V–13.8V and starts at 4.5V.  It even has a locked-rotor feature with automatic restart.

I have several choices: a beefy 12V supply for the heater and fan,  running a fan continuously without speed control, using separate power supplies for the fan and the heater, doing pulse stretching with an ordinary 12V fan + tachometer (to read the tachometer speed), or switch to a 5V PWM fan.  Hmm, 4-wire 5V fans don’t seem to be available, so that option is out. I was hoping to use the 9V/6A supply that I already have to test stuff out this summer, to see how hot the resistors get and how fast temperature rises with different power levels (partly through using different size resistors, but mainly through PWM). I want to test out the power supply also, as I want it for another project, and need to see how hot it gets under heavy load.

I could handle the extra programming needed to do pulse stretching for a more ordinary 12V fan and tachometer run at 9V, though I wouldn’t ask it of the students. I also have a somewhat wimpier 12V/2A supply that might be enough for the incubator, so maybe I should try doing everything with a 12V supply and a 12V PWM fan—perhaps the small, cheap Sanyo Denki 109P0412P3H013, though I can’t find a datasheet that tells me how much power it takes. If I’m guessing correctly about their part-numbering system, it is probably the same as 109P0412H3013, but with PWM circuitry added.  It has the right flow rate, but the noise rating is higher than Mouser claims for the 109P0412P3H013, which is unbelievably low.  (Mouser has a problem with sloppy data entry in their tables, so I never trust their numbers unless confirmed by the manufacturer’s data sheet.) It is strange that the official Sanyo Denki site does not admit the existence of the 109P0412P3H013 part.    The underlying fan runs down to 7V, so it might be worth seeing if the PWM version also runs at that low a voltage.

Even if the PWM fan doesn’t run at 9V, I can still use the power resistors to test whether the 9V supply really delivers what it claims, which is my other reason for wanting the power resistors.

Of course, I’ll need a big heat sink for the resistors—their power rating is based on their being attached to a big hunk of metal, and the 50W resistors can only go up to 20W without a heatsink.  I’m thinking of getting a piece of  6″ × 12″ sheet aluminum (maybe 1/16″ or 1.6mm thick) to mount the resistor on, to spread out the heat over the bottom of the incubator box.  I could mount the fan and baffle on the same piece of metal, if I add some angle brackets.

For the lab, the students will have access initially to an adjustable bench supply, which could deliver 0—25V @1A and could be set to 12V (so a 12Ω resistor would dissipate 10W and a 20Ω resistor would dissipate 7.2W), but they wouldn’t be able to deliver more than 12W at 12V with that power supply.  If it turns out that more power is needed, they’ll have to buy a power supply.

 

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, … ).

« Previous Page

%d bloggers like this: