Maker Pro
Maker Pro

Advice for temp controlled fan

Neurorad

Feb 15, 2017
7
Joined
Feb 15, 2017
Messages
7
All my EE classes from ME degree are two decades and a different career away, looking for advice on simplest solution.

Working on an audio amplifier project using an integrated class D board designed for passive cooling. The board has a nice complement of self monitoring and protection functions. One is thermal shutdown when max temp passes preset point. Another is output of current temp as a falling voltage with rising temp, from about 4V down to about 2V.

I'd like to add a fan, but don't need it to run constantly. I'd like for it to be a safety so that there is a chance to keep things cool enough before the amp shuts itself down. Probably with a bit of hysteresis so that it continues cooling until well below the point where the fan was enabled. I think the voltage at corresponding self shutdown temp is around 2.6V. So maybe fan on at below ~3V and off when above ~3.2 to 3.5V.

I have a 5V supply internal to the amp that powers the fan (its a 5V PC fan chosen because I had 5V, not 12V readily available), and can also be used for whatever control circuit or logic is needed.

What do you guys and girls suggest as a straightforward way of accomplishing this? I thought about a couple of zener diodes and latching relays, but realized my EE skills are too rusty to sort out without a lot of pain. Would this be easier to accomplish with an arduino? Never messed with one, but not afraid to learn if you think that is easier. Having a little flexibility in adjusting the set points would be nice. Probably easy with microcontroller, but was hoping this was an obvious simple circuit you could point me to.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
An analog comparator driving a relay to control the fan will work. You can use the output state of the comparator to set the trip points, implementing whatever hysteresis you desire. Unfortunately, the State of Florida (to which I have now retired) does not allow me to provide specific answers until I get my Professional Engineer (PE) license... unless this is for a defense, space, or aerospace application. See quote below.

Excerpt from Florida Statute 471:

471.003 Qualifications for practice; exemptions.—
(1) No person other than a duly licensed engineer shall practice engineering or use the name or title of
“licensed engineer,” “professional engineer,” or any other title, designation, words, letters, abbreviations, or
device tending to indicate that such person holds an active license as an engineer in this state.
(2) The following persons are not required to be licensed under the provisions of this chapter as a licensed
engineer:
... <snip irrelevant parts> ...
(j) Any defense, space, or aerospace company, whether a sole proprietorship, firm, limited liability
company, partnership, joint venture, joint stock association, corporation, or other business entity, subsidiary, or
affiliate, or any employee, contract worker, subcontractor, or independent contractor of the defense, space, or
aerospace company who provides engineering for aircraft, space launch vehicles, launch services, satellites,
satellite services, or other defense, space, or aerospace-related product or services, or components thereof.

I have queried the Florida Board of Professional Engineers (FBPE) about my participation in this forum. The reply I received indicates I should avoid specific solutions to specific problems for specific people, lest those responses be interpreted as "practicing engineering without a license" in Florida. Perhaps someone else here can chime in with a schematic and part numbers.

Hop
 

Neurorad

Feb 15, 2017
7
Joined
Feb 15, 2017
Messages
7
I think I'm heading in that direction. Was doing a bit of reading about the LM311 to see if that would fit the bill, trying to remember what all this means, and see if I could sort out a circuit. Thanks. Maybe someone else can help fill in the specifics.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
I like the LM311, but it is a bit of overkill for a simple temperature-sensing application, where the monitored value changes slowly and does not require a fast response at the trip-point levels. The ubiquitous LM741 or LMx58 series of dual op-amps will work just as well when configured as comparators.

I have never used them, but the Micrel MIC833 "Comparator and Reference with Adjustable Hystersis <sic>" might be a "drop in" solution for your application.
 

Neurorad

Feb 15, 2017
7
Joined
Feb 15, 2017
Messages
7
Thanks, I'll check them out. I read a quick overview of the LM311... looked pretty straightforward but without adjustable hysteresis. Someone somewhere on a site I was reading went theough the math and stated the baked in hysteresis was about 0.25V. Seems like that might work, but as the temp-voltage curve isn't linear it would sure be nice to play with that adjustment to make sure the fan is operating over a reasonable range. Haven't looked at cost... I'll do that now. So long as we are talking about ten or twenty bucks or less I don't care. Not trying to optimize to the penny... but I did run across an HVAC related drop in solution for near $100 - no thanks!
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
You get hysteresis in a comparator by using positive feedback from its output to the non-inverting input. This is typically implemented with a voltage divider between a reference potential and common to establish a trip-point input level, the divider output being connected to the non-inverting input. The voltage being compared connects to the other, inverting, input. Also connected to the non-inverting input is a positive-feedback resistor between the comparator output and the non-inverting input. As the comparator changes states, the current through the feedback resistor modifies the trip-point voltage supplied to the non-inverting comparator input. Use DC circuit analysis to see what happens in each of the two comparator output states.

This circuit can be tricky to design, because the set-point voltage (from the voltage divider) interacts with the positive feedback voltage from the comparator output. You need the comparator output to switch between two stable voltage levels to provide a reliable and deterministic hysteresis.

Some designs use the comparator output to select one of two trip-points with switching transistors connected to reference potentials, applying the selected trip-point voltage as a comparator input, with our without additional hysteresis from a positive feedback resistor. This has the advantage of implementing independently adjustable trip-points at the expense of somewhat greater complexity. It's a fun circuit to play with.

This forum is (partly) all about DIY projects, so you should find a design you think will serve your purpose and breadboard a prototype. If you have problems getting the prototype to work, please post a schematic (NOT a picture of your breadboard layout!) with annotated parts descriptions so we will know how to refer to the components by name... e.g. R1, 10 kΩ, 1/4 w, metal film resistor. NOT just "10 K" scrawled on the drawing next to a resistor. Photographs of hand-drawings are okay if well lighted and legible. Pretty-print from a schematic capture program is okay too, but look for free ones if you don't already have one. Texas Instruments (TINA) and Linear Technology (LTSpice) are popular, but there are others.
 

Neurorad

Feb 15, 2017
7
Joined
Feb 15, 2017
Messages
7
Thanks, you guys did exactly what I was hoping - point me in a general good direction. I think I can sort out a circuit from here, test it, and will post back when (!) it doesn't work. :)

I was doing a little reading on hysteresis in a single comparator. Seemed complicated. Your post confirmed that (to me, at least). I thought a little about using two separate comparators to set high and low trip points without worrying about hysteresis. Now just have to put a little thought into whether those could cooperatively to do what I need, maybe series or parallel relays. Will have to draw that out.

I looked at the MIC833 briefly. Looks interesting. Seems a little different in operation, instead of comparing two provided voltage to each other, it compares to a set internal reference. 1.2V it seems. I wondered about using voltage dividers to take my sensor output range of ~2-4V and bracketing the reference, say from 1-1.5V. Seems like that should work.

OK, it's about time I order a few parts and start having fun. Thanks guys!
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
I vote for 1/2 of an LM393 for an open-collector output or LM358 for a true totem-pole output. Both are designed specifically for single 5 V operation, unlike the LM741 opamp, and are ultra-rugged.

What is the fan current at 5 V? That determines what you need to drive it.

ak
 

Neurorad

Feb 15, 2017
7
Joined
Feb 15, 2017
Messages
7
I'd have to look to make sure, I think its less than .5A... 200mA I think. More to read about, thanks!
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
I vote for 1/2 of an LM393 for an open-collector output or LM358 for a true totem-pole output. Both are designed specifically for single 5 V operation, unlike the LM741 opamp, and are ultra-rugged.

What is the fan current at 5 V? That determines what you need to drive it.

ak
Right, as usual, Kid. I assumed he just wants to drive a relay or an SSR from the comparator output, and size either one appropriate to whatever auxiliary fan he decides will work, but it would be possible to drive a small 5 V computer fan directly, or with a small transistor buffer. This is a mod to existing equipment to provide "just in case" operation. Depending on the Class D output load, the fan may never come on, assuming the mode is implemented properly. I think I would isolate the fan (and its inductance) from the comparator output with either a BJT or a logic-level MOSFET of appropriate rating.

@Neurorad on hysteresis and comparators: Hysteresis is both unavoidable and necessary to the proper operation of a comparator. Without hysteresis the comparator could oscillate at a high frequency (limited mainly by its slew rate) whenever the signal being compared came close to being equal to the trip-point. Why? Because of the inevitable noise present on any real-world signal and the finite open-loop gain of the comparator. You want a clean and permanent transition of the comparator output when the trip-point is reached.

To achieve this, positive feedback ensures a fast, clean, transition while hysteresis ensures the change of state is permanent until the input signal level changes by an amount equal to or greater than the hysteresis. You can combine the two, as I tried to describe in post #6, or you can separate the hysteresis provided by the positive feedback.from the hysteresis provided by changing the trip-point reference voltage as a function of comparator state. Either way, hysteresis must occur to prevent spurious oscillations in the comparator output when the input signal is nearly equal to the trip-point reference.

The MIC833 seems to do both hysteresis and two trip-points all in one package. It is now available from Microchip, the same company that makes and sells PIC (Programmable Interface Controller) microprocessor components, for about $0.96 with a minimum-quantity order of five devices. It may also be available from distributors. Microchip also adds a $9.99 "partial reel" fee if you order less than 3000 (one reel) units. If you do order a reel (maybe share the cost with friends on Facebook?), the price per unit drops to about $0.73 and the "partial reel" fee is avoided. Shipment is from Thailand stock and takes about a six days.

Here is a link to the Microchip on-line ordering page. Just type in MIC833 and click on the full part number that appears below what you typed. Enter at least "5" for quantity. I didn't continue through to checkout (you have to register on their site), so I don't know what the shipping charges would be.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
200 mA is too much for either chip directly, and too much for a 2N7000 small MOSFET transistor driver. But an LM358 can make enough output current to drive a small power transistor like a TIP29 or TIP31. I'd stay away from a Darlington unless you don't need full speed from the fan. Plus, I just don't like mixing FETs and inductors (motors, relays, whatever) at the home/hobbiest level. I'm not dissing the TS; MOSFETs need special, experienced handling and an ESD protected workspace, something hard to do at home when the relative humidity is low.

ak
 

Neurorad

Feb 15, 2017
7
Joined
Feb 15, 2017
Messages
7
Thanks again guys. I ordered a couple of dozen MIC833 from microchipdirect, if it works I'll make a few of these, and if paying the partial reel fee and shipping already, why not. Price just .80 each.

I think I'm headed in the right direction with small pots in voltage dividers to high and low inputs to bracket the 1.2V Vref.

I have two fans I'm deciding between based on small noise and cfm differences. One says 40mA load, the other 250mA. Hard to believe that's correct for two 5V fans of the same size. I planned on isolating the fan with appropriate relay. I think.

Actually, I have two boards in a single chassis using one fan. Each has independent temp monitoring and reporting. I'm sure there is a fancy way of using and/or logic to drive a single relay, but I thought I'd just put two relays in parallel, each controlled by one board and comparator. Either board goes hot, fan on, stays on until both cool and both relays open.

I understand that some hysteresis needs to be in any such circuit to avoid oscillation. The. 25V in the LM311 might have been just right... it might not. Figuring out how to correctly modify that seemed more complicated to me than independent dividers for the MIC833. Hope that wasn't a bad assessment.

Anyway, thanks a million guys. This forum is awesome. Just what I needed... something to suck more of my time away! I'll try to post back in the future with an update, even if everything works right (and especially if it doesn't).
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
I thought I'd just put two relays in parallel, each controlled by one board and comparator. Either board goes hot, fan on, stays on until both cool and both relays open.
That sounds reasonable. Glad you are making progress! You could put both comparators on the same board with the two relays and run wiring to the temperature sensing outputs of the existing two boards. But if you want to build two boards, each with a comparator and a relay, you would have a general-purpose solution applicable to future projects.

If I am not mistaken, the MIC833 only comes in an SMD package so you will need some skills in attaching it to a circuit. Suggest you make a small circuit board to which you can solder the device to provide access to the device pins by means of larger pads for prototyping. These "adapter" boards are also available commercially, but you will have to Google for them as I have always received them as "freebies" as part of a set of manufacturer device samples.
 

Neurorad

Feb 15, 2017
7
Joined
Feb 15, 2017
Messages
7
Thanks for the tip. I have a decent Hakko but have never had to deal with SMD. Good thing I ordered plenty. :)
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Thanks for the tip. I have a decent Hakko but have never had to deal with SMD. Good thing I ordered plenty. :)
Yeah, I was intimidated for years by the prospect and pre-conceived difficulty of working with SMD. But once I actually got involved about two years ago, it did not appear impossible. Just different tools and techniques. Fortunately, there are lots of YouTube videos for training purposes.

Some of the next items on my wish-list are a re-flow oven (that I plan to make from a commercial toaster oven); a variable-magnification, long working distance, zoom microscope (that I hope to find used, but in good condition, on eBay); and a vacuum/hot-air re-work station that doesn't require a second mortgage on my house to purchase.:eek: It's a bitch living on a fixed income, whereas in the past I lived on a fixed income, but it was much higher.:(

A long term, perhaps "blue sky" goal, is to build a CNC XYZ vacuum pick-and-place tool to aid in the assembly of small circuit boards. That could also be used (if built sturdy enough) to route traces and drill holes. A lot of folks here are into 3D printing, and some have built their own 3D printers, so it's not such a stretch.

And, yes, it is a "Good Thing" you ordered plenty. This hobby can be very addictive. Never in my wildest dreams did I ever see me ordering capacitors, resistors, diodes, transistors, integrated circuits, etc. in hundred or even thousand lot quantities because the shipping cost is about the same as the component cost.o_O
 
Top