Gas station without pumps

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

2014 August 19

Two papers submitted

I got two papers with a co-author finished and submitted today.

One of them is based on the segmenter algorithms that I wrote up in this blog (with some improved parameterization): Segmenting noisy signals from nanopores, Segmenting filtered signals, and Segmenting noisy signals revisited.

The other one is an HMM paper that uses the automatic segmentation and an HMM that models the DNA motor behavior to do the same analysis that was done by hand in an earlier paper “Error Rates for Nanopore Discrimination Among Cytosine, Methylcytosine, and Hydroxymethylcytosine Along Individual DNA Strands” in PNAS.  The automatic HMM method was more accurate than the hand curation and feature extraction followed by sophisticated machine learning methods like support vector machines and random forests—I think that we were limited before by the biases of the hand curation and feature extraction.

Unfortunately, we were not able to do side-by-side comparison on exactly the same data, as the original data for the PNAS paper was lost in a 2-drive failure on a RAID that had not been properly backed up.

The paper writing did not take much of my time this summer, as my co-author did a lot of the writing and kept me from procrastinating too much.

I’ve also been working on my book, tentatively titled Applied Electronics for Bioengineers, but without a co-author to keep me honest, I’ve been doing a lot of procrastinating.  Yesterday I had planned to show the waveform of the gate signal on a nFET being used for pulse-width modulation, to show the “flat spot” that results from feedback through the gate-drain capacitance.  I fussed with that for quite a while, but never got a recording I liked the looks of—so ended up getting nothing written on the book.  I’ll probably try again tomorrow, but with a backup plan of working on a different section if that one gets too frustrating, or of writing some of the text that will go around the figure, once I get a figure I can use.

The book is currently 215 pages, but that includes the front matter and back matter.  The core of the book is only about 188 pages, with 74 figures.  I probably need a bunch more figures (schematics, graphs, photos, …), but those are what take the longest to produce.  There’s a little over a month left until classes start, but I don’t see myself finishing by then.

2014 August 17

New bedroom furniture

Filed under: Uncategorized — gasstationwithoutpumps @ 12:58
Tags: , , , ,

I’ve added some new furniture to the bedroom:

My new 42" rolling cabinet tool box.

My new 42″ rolling cabinet tool box. The plastic tool box on the top is my son’s.

For several years I’ve been planning to clean up the garage, put up shelving, and get all the “stuff” in the garage organized. It has been a firm commitment each summer, and each summer nothing happens (well, one year I got some nasty old shelving taken down and everything put into boxes, but that was sort of negative progress, as I never got new shelves put up).

Part of the plan was to get all (or most) of my tools into a rolling tool box, so that I could have easier access to them. I’ve often ended up buying a new hand tool because I couldn’t find what I was looking for in the garage. This summer I finally bought a 42″ rolling tool box from Harbor Freight for $370, after giving up on finding anything locally. The shipping from southern California added another $97 to the price (shipping weight is 289 pounds). Because most of the tools get used in the house, not the garage, I decided to keep the toolbox in the house. I’m planning to clear my son’s stuff out of the living room and into his bedroom when he leaves for college (so the robotics table, scroll saw, and drill press would move out of the living room, restoring it to a more livable space), so I didn’t want to put the tool box in the living room. Since I want the tools to be readily available when I’m working on electronics stuff, I ended up putting the tool box in my bedroom, which has gradually been becoming my workshop for computer and electronics stuff.

My wife has been patient with the gradual conversion of our bedroom into a workshop, but I think that we could make the room more comfortable by rearranging the furniture. I hope to get the floor of the bedroom mostly cleared of junk before school starts, though that may require getting some shelving that fits under the window to tidy up the junk that has accumulated while still leaving it mostly accessible. I’ll probably have to buy the new bed she wants, though this will require some careful selection, as there won’t be room for bedside tables and our current bedside lamps are not tall enough to work with a conventional bed.

I spent some time yesterday getting the tool box into the house—the delivery service wouldn’t even put it on the porch, so I had to uncrate it on the driveway, remove all the drawers, then get my son and my wife to help me put it up the front steps. While I had all the drawers out, I lubricated the slides with paraffin (the T9 lubricant I use on my bike chain). I then spent most of the afternoon unearthing tools in my garage and organizing them in the tool box. I couldn’t get all the hand tools into the toolbox, but most of them fit.

At the end of the day, I had my son go through his tool box and mine, selecting what he would take to college. He ended up with a somewhat smaller set of tools than the rather large list I had put together, rejecting the socket wrench set and the screwdriver security bit set as too big.

  • metric Allen wrenches (from a set from Harbor Freight, I’ll keep the English and star bits)
  • screwdrivers (he already had a handle and bit set)
  • claw hammer (he already had one)
  • mini hammer with screwdrivers
  • mini level (which comes with a warning for people with pacemakers, which is pretty silly considering how weak the magnet on it is)
  • adjustable wrench (an 8″ one with a 1″ jaw opening, the second smallest of the set of laser-marked ones from Harbor Freight)
  • measuring tape (he’s only taking one of the two 25′ ones he already had)
  • razor knives
  • Leatherman pocket tool (which he already had)
  • zip ties
  • velcro cable straps
  • needle nose pliers (2, which he already had)
  • diagonal cutters (which he already had)
  • end nippers (which he already had)
  • self-adjusting wire strippers
  • electrical tape
  • multimeter (from his chemistry lab kit)

There were also several leftovers from my first prototype run of the circuits course:

We still have some things not added to his tool box, which is already full:

  • bike patch kit
  • stainless steel bike tire levers
  • needles and thread
  • tweezers
  • Arduino and Freedom KL25Z boards
  • power supply for Arduino boards?
  • Ethernet cable
  • USB cables
  • soldering iron and stand (my old Unger iron, or perhaps he’ll take the one bought for his company)
  • Power strip with surge protector
  • solder
  • 22-gauge wire for breadboarding
  • first aid kit: band aids, larger gauze pads, antibacterial ointment, paper tape, medic scissors, thermometer, ibuprofen, antacid, simethicone

We’ll have to go over the previous list to check for other things he might need, but I think this list has most of the things I’m responsible for.  We might make a trip to Home Depot on move-in day to pick up a few other things.



Oregon Shakespeare Festival

I’m a little envious of my son—he’s gotten to go to Ashland twice this year to see plays at the Oregon Shakespeare Festival.  He’s seen nine different plays there this year, two of them twice.

For the first trip this year he went with Alternative Family Education, as part of their Dramatic Literature course in spring semester.  They teach the course each year around the plays that they’ll be seeing in Ashland—he’s taken the course three times and enjoyed it each time (except for some of the written assignments).  The first time he went, I was on sabbatical, so took the time to travel with the group as a “chaperone”—we’d had to fly to Ashland separately, rather than travel with them on the bus, because the trip left the day of the state science fair, though we both rode the bus home.  Since then he’s been able to travel both ways with the school group, but I’ve always had a heavy teaching load in the spring, and couldn’t justify skipping class for a pleasure trip to Ashland.

Last week, he traveled with a group from West Performing Arts.  This is the first time that WEST has done an Ashland trip, and it was planned at the last minute, so they were not able to get enough tickets or transportation for parents to accompany the group. It was a smaller group than the AFE—only ten teens and two adults. They were originally planning to see five plays, but while they were in Ashland they managed to get the last twelve standing-room tickets to Into the Woods, so they ended up seeing six plays—a pretty intense schedule with only three hotel nights!  They didn’t do as many workshops as the AFE group, but a lot of the workshops are aimed at general school groups, not at kids who had as much theater training as this group.  I don’t think that the teens minded not having a lot of workshops—most of them had just finished a two-week intensive Shakespeare conservatory, and all of them had done at least one of the Shakespeare conservatories (either this year or in a previous year).  It was an older group than the AFE trip also, as three of the teens were 18 or older and had graduated from high school.

I had some time this summer and could have gone myself, but arranging my own transportation and lodging at the last minute did not appeal to me, and my wife was not particularly interested in going there. She would travel to see world-class opera, particularly if the destination also had great art museums, but not for theater—the local productions are high enough quality for her and not much trouble to attend.  We had season tickets for Santa Cruz Shakespeare this year (as we did for Shakespeare Santa Cruz most previous years), and we’ve got season tickets for next year’s Jewel Theatre season.  We’ll also go to 8 tens at 8, an annual production of 8 new (or fairly new) ten-minute one-acts, and probably the best of the rest, a staged reading of another 8 from the pool considered for 8 tens at 8.  We also usually see the Shakespeare To Go performance, though not together—my wife sees it when they tour to her school, and I see the last performance they do, up on the UCSC campus. We’ll probably also go to the WEST Ensemble Players performances and the summer teen show by WEST. Though our son won’t be in them any more, we still know a number of the actors and they kids usually do a good job (tickets are cheap also).  If Santa Cruz Shakespeare puts on a holiday pantomime this year, we’ll probably go to that to, and possibly go to see the long-form improv group Freefall at one of their shows.

We’ll be going to one more WEST Performing Arts performance this year—a fund-raiser for their scholarship program this Friday.  This is not a rehearsed production—they’ve just requested a number of their more reliable actors to do monologues or sketches.  So my son will have one last chance to perform at West End Studio Theatre, though he hasn’t decided what he’ll do yet.

So with 14 or 15 theater events a year, and more available if we wanted them (UCSC stages several plays every quarter, but we rarely go to any of them), it isn’t as if I was starving for theater. My wife doesn’t get to anywhere near that number of operas (a few in San Jose and a few in San Francisco) and has to make do with broadcasts in the movie theater—and I wasn’t counting the broadcasts of National Theatre London that we see at the movie house, so I shouldn’t count opera broadcasts either. I’ve no cause for complaint.

Still, the Oregon Shakespeare Festival has a bigger budget than anything in Santa Cruz and produces some pretty impressive shows—I would like to see them again. Maybe next year.

Next Page »

%d bloggers like this: