help!!! temperature controlled fan  - Page 1
Forum section: electronics / projects

author: raybies999
author_rank: Newbie
timestamp: February 10, 2013, 12:06:50 am
content: Hey, I've managed to get this thermistor controlled fan to work on circuit wizard but I cant seem to make it on a breadboard. The motor is a 6v motor and turns on at 23 degrees. Is there anyone who could please create it on a breadboard take a picture and show me how to wire it up? I will be so grateful. I've got to help one of my students and I just can't do it. I'm getting very worried as it is for their exams. Please help!

author: Rerouter
author_rank: Super Contributor
timestamp: February 10, 2013, 12:25:01 am
content: what is the resistance of your T5? as until that goes over 22K it will not turn off, other than that, i cannot see why it should not work,

author: IanB
author_rank: Super Contributor
timestamp: February 10, 2013, 12:29:52 am
content: Have you built it up piece by piece on the breadboard and debugged it as you go?I would start with R5 alone and check the resistance with a multimeter at different temperatures to confirm it is what you expect. You may need to adjust R2 or other resistors to get the switching point at the temperature you want.Then I would build just the op amp part of the circuit around IC1 and leave off the transistors and the right hand portion of the circuit. But make sure you include C1 and put it as close as possible to IC1's power pins.Debug just the op amp and check with your meter that the output turns on and off appropriately when you adjust R5. You might want to replace R5 temporarily with a pot to help with this testing.Then add the transistors (no motor yet) and see if Q2 turns on and off when it should. Perhaps replace MT1 temporarily with a lamp for convenience.By a methodical process of testing and debugging you should be able to narrow down the problem.

author: fcb
author_rank: Super Contributor
timestamp: February 11, 2013, 09:18:23 pm
content: If your clever with a feedback resistor (and small filter capacitor) from the output of the final power transistor, you'd get a crude temperature-dependent variable-speed fan control.

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: February 11, 2013, 09:42:13 pm
content: Indeed you can have that evenwith just two transistors.

author: 6502nop
author_rank: Regular Contributor
timestamp: February 14, 2013, 02:26:02 pm
content: Sorry I didn't get to this sooner.I slapped this thing together and ran into a few problems, too. So, I plugged the schematic into gEDA and made a series of slides, outlining my diagnosis in a page-by-page format (as IanB suggests).I don't have any NTCs or PTCs on hand, so I just used a pot to simulate it. Although the motor I used was the right voltage range (6-12V), the current draw was too much for the small transistor I was using. Adding the TIP31 or subbing both with the TIP120 did the trick. So, if you have no luck with circuit #7, then stick with #6 (both using the LM324). If you must use the 741, think about using a split supply, as noted in the slide show.You mentioned that this was for an exam (op-amps 101?), so I stuck with using that, even though 0xdeadbeef's two-transistor solution is very elegant.I'm sure that there are still some things that could use tweaking, but the final two circuits work well on my breadboard using automotive lamps (T194s), and work fine using the Darlington with the actual motor.So... it works.nop

author: ignator
author_rank: Regular Contributor
timestamp: February 14, 2013, 05:39:53 pm
content: 6502NOP, I think you just helped a con-artist student I think, but that's my non trusting side, as I see this on other blogs, but mainly kids from India looking for homework answers.

author: mrflibble
author_rank: Super Contributor
timestamp: February 14, 2013, 05:48:15 pm
content: Heh, that post also triggered my Lazy Bastard Detector.We can only hope 6502nop put in an easter egg for educational purposes. XD

author: WV1800es
author_rank: Contributor
timestamp: February 14, 2013, 06:01:14 pm
content: This article really tells it like it is - regarding modern capacitor construction, tolerances, and operation. Hope you find it as enlightening as I did!http://www.edn.com/design/analog/4402049/2/Temperature-and-voltage-variation-of-ceramic-capacitors--or-why-your-4-7--F-capacitor-becomes-a-0-33--F-capacitorAmazing what a little heat and voltage can do-

author: 6502nop
author_rank: Regular Contributor
timestamp: February 15, 2013, 03:14:28 pm
content: @ignatorNot to worry. Hopefully, I presented my solution(s) in a manner that doesn't give away too much, yet provides enough detail for the student to actually come up with their own answers. Those answers may even be right. One can hope.@mrflibbleYeah, my LBD was in the yellow range, but a few things were phrased that made me think, "What the hell...?"1) Mentioned it was forone of his/her students(and pending exam).2) Used circuit wizard (whatever that is*), but couldn't get it going on a breadboard (how many times has that happened this year alone?).3) Had a clever user name (but isn't Wil Wheaton).4) Never gave any indication of whether the circuitwasthe exam, or if it was being used to cool off theactualproject/design that was being graded.Again, I put enough in there to hash out the problem(s), but not enough info to directly apply to anything I perceived as answering a text/exam question. Sorry, no hidden Easter eggs. I did contemplate showing how to use the 741 with an offset supply (to get the output down to near/at GND level to turn Q1 off), but figured raybies would reply if he/she were desperate enough.Lastly, raybies asked for a picture of it on a breadboard - something Idid notdo, as that would've been able to be sent in as proof he/she did their homework to an online school (like the crappy Phoenix University or the incredibly redundantly-named "University of {Somewhere} College University" that's been advertising lately).@WV1800esErrr... Whut?I think you've replied to the wrong thread (in the wrong tab in your browser?).nop* For those wondering, I use gEDA (gSchem, PCB, NGSpice, and GTKwave), all part of the Fedora Electronics Lab (FEL), a free downloadable "spin" fromhttp://spins.fedoraproject.org/fel/-note that this spin is an older version of Fedora (12) - they're up to 18 as of this post!

author: ignator
author_rank: Regular Contributor
timestamp: February 15, 2013, 03:39:31 pm
content: The original OP had the schematic drawn in an unreadable representation.This looks like something that came out of my former companies PC drafting organization, as they did not hire technicians to do schematic entry, they typically were admins that applied for the job.You had to spend some time redrawing this.I like the LMX24 opamps (substitution for 741), just don't use the ones from Texas Instrument, they in no way represent the National parts. Especially if you are doing this circuit configuration, where you want the transistor switch off when output is zero. TI don't meet spec. and will turn the open collector xistor on and in linear mode (they don't saturate all that close to the ground rail of the opamp).They (LMX24) really make a stupid proof design as they mimic a perfect OPAMP pretty close, no need to trim stuff for the offsets unless your doing microvolt. You know all this. This writing is for the kid or instructor, that appears to be ignorant to this sort of design.I did lots of 6502 code assembly in the day, but this now is "obsolete for new design" and non procurable, at least that's what I've been told.

author: mrflibble
author_rank: Super Contributor
timestamp: February 15, 2013, 06:38:45 pm
content: Quote from: ignator on February 15, 2013, 03:39:31 pmWell darnit! When you say "don't meet spec", how bad is it? I just ordered some LM324's ... from TI. As long as it goes down to say 20 mV above ground and gets to 1.5 Volt below the positive rail (as per the datasheet) then things should be dandy. Are you saying it doesn't get down to 20 mV, assuming you meet the Rload requirement?I don't really need it to go to all the way down to 20 mV, but it would be handy to know what to look out for.

author: smashedProton
author_rank: Frequent Contributor
timestamp: February 15, 2013, 07:37:51 pm
content: Is the darling ton pair really necessary? Why can't you just multiply it back up after the divider?

author: ignator
author_rank: Regular Contributor
timestamp: February 15, 2013, 08:29:09 pm
content: Quote from: mrflibble on February 15, 2013, 06:38:45 pmForgive my bad memory, I think the spec for the LM124 was 50mv, I don't recall the pullup load spec. But my application was a comparator, in a similar configuration. The output of the amp was connected to a 2n2222 base via a 10K resistor. Emitter to gnd. This was a open collector switch, with a 100K pullup to +12VDC. It was this collector that was not allowed to float to the +12 when comparator output was supposed to be less then 50mv. My memory was this was around 180mv. Probably not the best circuit but it worked from 1988 to 2004 without issue. My memory from the production test measurement (the amp output was connected to a test connector) was good parts were around 10mv from ground. This is within the error of using cables from the test station to the UUT test setup.The original design used the Nation part, then procurement did a consolidation and contract buy with TI. The company puts a 10digit part number to control every vendor component, and have a paper spec, which was a piss poor copy of the original data book info. But this original spec said "do not use TI for this part". And it was written circa 1984 or so.The TI problem was found in 2004 (again), the product immediately failed production test, so a special part number that called out the national semi part was made and revised the production drawings to call out this new part number. Many months ago, national semi announced last time buy on the part, which our procurement folks ignored as TI was a direct replacement in our data bases (you can't capture everything). And no one with memory knew that TI would not work. And production asked why the old part number was not in the drawing as an alternate part number (should have put in a note, but note this: production never reads notes). So I did my normal email dissertation of the problem and have not heard a word, and I'm now in my second week of retirement. I was an odd duck, as I kept collateral support of most everything I did from 1984 to date. Give these new kids about 3 years and they move on before seeing how crappy their designs are in the field, and never get the lessons of how to design better.Sorry for this long rant.One fix may be to put a zener or extra diode drops between the amp output and base in series with the base current limit resistor. Then again, you might get parts from some other vendor that work in your application.

author: 6502nop
author_rank: Regular Contributor
timestamp: February 16, 2013, 06:10:24 pm
content: @smashedProtonYes... and no.The uA741 should be kept to an output below ~10mA (for the LM324, about 40mA). My rule-of-thumb is to use an output transistor if it's above 5mA, so as not to overdrive the 741. Since this circuit is just a simple comparator, that output transistor will operate in saturation mode (on or off). So, the four main parameters I consider are: max current (Icmax), max voltage (Vce), max power (Pdiss), and Hfe (or Beta).If we're just driving an LED, then the opamp can pretty much handle that without issue. But, we're not driving one, are we? What we've got is an unspecified load - we only know it's a motor with a 6V rating (most motors can handle running down to about half the voltage rating up to about 1.25x). This means we have no idea how much current is going to run through it, nor do we know if that will vary based on startup surge, torque changes, or internal circuitry to maintain a stable RPM (Hall effect, etc.).Now, a typical brushless DC fan motor will pull about 100-500mA @6V. So, if we look at that 2N2222, we'll find that:Icmax = 800mA, Vce = 30V, Pdiss = 500mW, and Hfe = 100.So, on paper, this all looks good. Since we're operating in saturation mode, the power on this thing will be the voltage drop (typically .7V) times the current being run through it. Assuming the full 500mA fan, this means we'll see about 350mW on that little TO-92, which is just a shade under it's max. Great. Now, all we have to do is figure for the Hfe...Hfe, or Beta, for those who are following this and don't know that, is the amplification (gain) factor of the transistor. Shariar over at TheSignalPathBlog on YouTube does a great job explaining some of these parameters while designing a simple amplifier.TL;DR version: Whatever you shove into the base will be amplified, by the Hfe factor, across the collector-emitter of the transistor.So, if we send that 5mA from the 741 into the 2N2222's base, it should bump it up by a factor of 100, to give us about - by golly! - 500mA to drive the motor. In this case, it looks as if the 2N2222 is all we'll need...Sort-of. Again, this is great on paper. In the real world, as ignator points out, that part may not match the datasheet. That motor mayrunat 500mA, but the startup might be a real bitch. This thing is designed to cool things down, so we can guess it's going to be hot in there, and may very well have enough heat already on it, that when the extra 350mW gets to it, she burns up. Since that motor really has no known value other than "6V", we, as designers, have to design for a worst-case scenario.Assume 1 or 2 amps for the motor, a watt or two on the transistor, and an opamp that can only spit out a milliamp or two. When I see that, I immediately think "Darlington". It doesn't matter if it's two individual transistors (as shown in "741motor6.png"), or the all-in-one TIP-120 (741motor4.png), the effect is the same:TIP-120: Icmax = 5A, Vce = 60V, Pdiss = 2W (65W with heatsink), and Hfe = 1000.Now we're cookin' with gas!Punching the numbers back into this: 1mA (741) x 1000 (Hfe) = 1A. The expected ~5mA will allow the full 5A to the load. However, pulling 5A across that .7V drop will put 3.5W into the package, so we'll need a heatsink. If we plan on only 2 amps, then power will be 1.4W, no heatsink required.^The above is a simple (believe it or not!) run-through-your-head or back-of-envelope calculation. So, if the load is light, then just the 2N2222 can be used (as shown in "741motor7.png"). If the load is heavier, or you need the extra power dissipation, then go straight to the Darlington.Another note: Since we're using relatively low voltages here, then dropping the value of the base resistor (R5) from 1K to 100-510R may help if you can't get the 2N2222 to pull the current for a light load. However, this may draw too much from a uA741, so only do this with the LM324.@mrflibble, ignatorWhen using my TI uA741CN (1982, 14th week), the output was 1.8V when low (!), and about 1.6V below Vcc (I used a 9V battery, so it tended to drop voltage as the motor kicked in). Of course, this resulted in the damn thing not shutting off. Once I switched to my LM324 (Raytheon Corp, 1980, 12th week -damn, I've got some old-ass mother-suckling chips!), the output went down to (IIRC) ~30mV low, and about 1.2V from Vcc.QuoteYup. Except for that whole "Let's put the V+ at the bottom row, and the ground at the top!" thing. Note to chip designers: If you're dead-set on swapping simple things like where the traditional power rails go, then for Pasta's sake, put some damn reverse-protection on the forking pins!QuoteWhat's a 6502?Just kidding. And you'd better tell the folks at Western Design - they just got done launching a newer series of 65xx chips designed for higher speeds (14MHz). Man, it's impressive seeing what my C64s can do at 1MHz. It'd be darn near pornographic to re-engineer one with the new WD chips, y'think?nopBoy, that got off-topic in a hurry, huh?

author: ignator
author_rank: Regular Contributor
timestamp: February 17, 2013, 01:02:35 am
content: Quote from: 6502nop on February 16, 2013, 06:10:24 pmEven if your doing homework for the kid, your teaching, and I applaud the info. I hope whomever looks at the spec for the op amp, and the internal schematic and see how it works.Good to hear about the 6502, last one I used was a 65C102 (added hardware integer multiply) at a whopping 2Mhz clock ~1984. It went non procurable, and VHDL core was purchase to emulate it. Only problem was it burned lots more power in a CPLD, and also a PITA as it was a FAA regulatory product and some anal customers didn't want to use the new design in their fleet of products, as there would be no part number change to track what was inside the (flight control computer) box. Last time buy, and they never buy enough parts.The one improvement would be to make the X and Y registers 16 bit, as I was always exceeding the max pointer size when used for offset memory access. But then you would have to deal with overflow, unless you made a 32 bit program counter, heck I could live with that improvement also.But with 56 opcodes, it was a breeze to learn and code in assembly with.

author: mrflibble
author_rank: Super Contributor
timestamp: February 17, 2013, 05:46:18 pm
content: Quote from: 6502nop on February 16, 2013, 06:10:24 pm1.8 Volt ... ouch! Yeah that might cause some issues if you were expecting something near ground.QuoteThose numbers sound more like it. Anyways, if these TI LM324's get to about 100 mV above ground and 1.7 below Vcc then I'm happy.QuoteI'm sure our one-post student won't mind. He's probably busy doing more homework by proxy.

author: viperidae
author_rank: Frequent Contributor
timestamp: February 18, 2013, 02:11:29 am
content: Quote from: 6502nop on February 16, 2013, 06:10:24 pmExcept the Collector-Emitter saturation voltage for the TIP120 darlington has a max of 4V at 5A, which is 20W. At 3A, its max is 2V, so 6W, you'll still need a heatsink.Darlinton's tend to have a higher Vce than a plain old transistor, as the extra base current (along with it's minimum saturation voltage) for the power transistor comes from the Vce drop.