# Help designing sense circuit

Discussion in 'The Projects Forum' started by marshallf3, Sep 26, 2010.

1. ### marshallf3 Thread Starter Well-Known Member

Jul 26, 2010
2,358
203
Some time back I found an IC I'm trying to build a circuit around. The IC is somewhat specialized and perfect for my application however I've run into a heck of a problem coming up with a circuit to supply the proper input voltages to it under certain conditions. I haven't felt well the past few days so my mind just isn't working very well, figured I'd ask for some ideas from the crowd here.

Several limitations apply as to what I can use as this has to end up as rather small, inexpensive and capable of being done with simple components. The sensor itself must occupy a rather small area as well as being subject to some pretty extreme weather and vibrational conditions.

Here's the IC involved:
which you can see needs an input range of 1.2V - 2.6V to change from 0% - 100% duty cycle. Some amount of linearity would be nice but not essential.

A common NTC thermistor such as this will fit into the area I need to monitor, it has to be potted into a rather small adapter nipple with some thermally conductive epoxy.
http://www.mouser.com/Search/Produc...irtualkey64800000virtualkey81-NTSD0XH103FE1B0
http://search.murata.co.jp/Ceramy/image/img/w_hinm/S0425E.pdf

I have found this chart that shows typical values for NTC thermistors with the B curve, however I'm totally unfamiliar with the various "Constant 3350-3399K" part of the specs involved in thermistors.
http://www.alphatechnicsonline.com/b_curve_main.php

What I need is to generate an output for the IC as follows from a regulated +5V supply:
82*C (180*F) = 1.2V
99*C (210*F) = 2.6V

This will be used to control an electric fan on a motorcycle and obviously I'm trying to maintain a temperature of around 180*F HOWEVER it would be nice to have a pot in the circuit such that the low end starting point or entire range could be raised by 5 or 10*F.

I may have an area in which I could mount a slighly larger sensor but won't know until I go look closely at the bike this afternoon, it's about 1-1/2 hours out of town undergoing some final restoration and considering the way I feel it isn't going to be a fun drive.

Any and all ideas would be appreciated but remember that I live in the world of op-amps. While I'm sure one of your fancy computer boards could make this a breeze I have no way of developing such a circuit, much less programming or understanding it. The advantages to utilizing the controller chip I found are that when you hit the starting temperature it bump starts the fan with a higher PWM signal to get the DC motor moving before settling down to full temperature control. It also incorporates a /FAULT output which goes low when the PWM output hits 100%.

-------------

Why do I need the circuit? These rather old bikes originally came with a manual fan mounted directly to the camshaft. This may have been fine at the time but several problems in that design exist.

1) The original fans are made of plastic and due to their age they eventually develop cracks in the plastic, come apart and usually take the radiator out with them.
2) While replacement fans can still be found, even if they're unused old stock the plastic is already 30 years old and in people's experience they don't last long until they too start coming apart.
3) At cruising speed sufficient airspeed often exists that they're not even necessary on a cool day, this has been proven by running one without a fan so it becomes nothing more than a drain on the engine's ouput.
4) In heavy traffic or at a long stoplight they don't create enough airflow to keep the engine cool unless you manually hold your idle speed higher.

Many have already done away with the stock fan and mounted an electric one, however their best attempts at any sort of control has been to mount a bi-metal sensor on the radiator. This ends up as a fully on or off situation and due to the inherent differential in these bi-metal sensors it has proven to be a far from ideal method of control.

There is already a sensor mounted early in the water stream to drive a temperature gauge, however measurements of these have proven them to be about as accurate as the fuel gauge on a Ford Pinto. They're also in the wrong place to utilize as a sensing circuit to drive the fan as they only look at the temperature of the coolant as it exits the engine instead of what the radiator is returning.

Last edited: Sep 26, 2010
2. ### wayneh Expert

Sep 9, 2010
14,871
5,374
An LM35 will produce an output of 0.82v - 0.99v in that temperature range, or delta 0.17v. You could apply an offset to ground of the LM35 and then feed its output to an op-amp with a gain of 1.4/0.17=8.235. That would produce a swing of 1.4 volts as you want over your range. The LM35 datasheet describes for instance how to use it as a Faranheit output instead of Centigrade. Same problem: You need to apply an offset and a range control.

I haven't thought thru all the details, just an idea.

3. ### marshallf3 Thread Starter Well-Known Member

Jul 26, 2010
2,358
203
I thought about the LM35 but it seems to have some drawbacks when compared to the LM335 IC I'm accustomed to using but for this it might be the better chip.

In either case we end up dealing with tiny voltage variations at low currents so I'd have to have some pretty darn good insulation around everything due to the rain and snow one often experiences on a motorcycle. There are some other people dealing with the same problem and they live all across the world, you wouldn't believe what some of them drive to work through on a daily basis. Another thing I've been trying to do is keep the circuit as reproduceable as possible so others can build the same thing.

4. ### BillB3857 AAC Fanatic!

Feb 28, 2009
2,456
372
As a firm believer in the KISS principal, wouldn't a simple thermostat be a lot easier and more reliable?

5. ### marshallf3 Thread Starter Well-Known Member

Jul 26, 2010
2,358
203
Some people have added a simple bi-metal thermostat to control the fan modification but the only place to mount a sensor that large isn't really in the proper place, then thre's the other factor of going from 0 - 100% ends up causing a lot of fan cycling when, under a bit hotter than normal conditions, you probably only need about 20% of the fan speed.

Just a number of variables that make a continuously variable control circuit far more desireable.

6. ### marshallf3 Thread Starter Well-Known Member

Jul 26, 2010
2,358
203
Probably the best solution so in essence I'm a lot closer on the math part now.

7. ### wayneh Expert

Sep 9, 2010
14,871
5,374
I'm just a bit fuzzy on how to offset the voltage. You could do it either before or after the op-amp has applied the gain. But I'm solid on the fact that you need that gain ratio to match up the temp swing with the voltage swing.

I think you can solve the physical issues with shielding, both electrical and physical. Maybe a little JB Weld here and there.

8. ### marshallf3 Thread Starter Well-Known Member

Jul 26, 2010
2,358
203
I found this of interest:
http://www-k.ext.ti.com/srvs/cgi-bi...0-8167176a4ed9},kb=analog,case=obj(35457),new

Using a +5V reference and E24 values but I'd still need to pull exactly 0.91V off the output regardless of its value.

9. ### windoze killa AAC Fanatic!

Feb 23, 2006
605
24
Have you thought about using a K type thermocouple. Run this into an instrumentation amplifier and get the biasing right and problem solved. If it didn't breach commercial-in-confidence rules I would post the circuit we designed for our engine management. The output is from memory is between 1V and 4V over the range we needed. I can't remember exacly what the temp range was but it worked beautifully.

10. ### windoze killa AAC Fanatic!

Feb 23, 2006
605
24
PS. K type thermocouples are virtually indestructable. And the ones we used were very small and would suit your your needs.

11. ### marshallf3 Thread Starter Well-Known Member

Jul 26, 2010
2,358
203
Thought about that but of the ones I've found they're either too expensive or the change in resistance/temp ratio is still insufficicent.

I'm this close now, seems to me there's a simple way to bias an op amp where it outputs tracks as 0.91V less than what's being fed into it.

As I've mentioned, I'm still ill with the flu and my mind can't think for some reasson.

12. ### wayneh Expert

Sep 9, 2010
14,871
5,374
You could drop across a diode to knock it down ~0.7v. Not very elegant but maybe close enough, and simple.

OR, it just dawned on me, I think you could set up an op amp to deliver a steady offset. I needed one of these to use a 4-20mA meter. The offset allows you to make the 4mA of meter current when the input is zero. The offset remains constant over the operating range. I'll look it up if this sounds interesting. Again, I haven't really thought all the way through this.

13. ### marshallf3 Thread Starter Well-Known Member

Jul 26, 2010
2,358
203
That might help. As you can tell from my limited range it's hard to just stuff anything in there and maintain the range.

Then again I'm almost close enough that I could up the gain a bit more then put the output through a divider, I'd have to play around with the numbers though to see if that would come out nearly acceptable enough.

14. ### wayneh Expert

Sep 9, 2010
14,871
5,374
It's simpler than I was thinking. As I understand it, you need a way to get 1.2v out from 0.82v when the LM35 sees 82°C, and then 2.6v when it sees 99°C and is putting out 0.99v. So as we saw before, your gain needs to be ∆Vout/∆Vin (those should be delta symbols) = 1.4/0.17=8.235. That fixes the slope. The intercept needs to be 1.2v/8.235 = 0.1457v from 0.82v. So you need to trim off 0.82-.1457=0.647 volts at the input.

Instead of referencing the op-amp to ground at the inverting input, set up a resistor divider to give you 0.647v at the inverting input of the op-amp. Since you've got a regulated 5v supply, this should be a snap. The op-amp will try to hold the output at the low rail until voltage climbs above 0.647v (at 64.7°C). Output will rise to the needed 1.2 volts when the input hits 0.82v, and continue on up at the 8.235 factor until you approach the upper rail at ~5/8.235 = 0.607 input, which would happen at 0.607+0.647 = 1.254v from the LM35, or over 125°C. That should cover the useful range. If you get hotter than that, you have bigger problems.

15. ### marshallf3 Thread Starter Well-Known Member

Jul 26, 2010
2,358
203
Sound right to me, and simpler, thanks. I've got some parts coming so I'll try it out when they make it.

16. ### marshallf3 Thread Starter Well-Known Member

Jul 26, 2010
2,358
203
Well rats, now offsetting the inverting input is upsetting my gain calculations, mainly because I'd like the capability of trimming the offset voltage a bit. Might have to do it with two op amps or wait until I can think a bit more clearly, these antihistamines are getting into the way of thinking.

The more I think about it two op amps such as a TL082 isn't going to kill me, I can configure the first one to take care of the offset and the second one to take care of the gain - or is it the other way around?

Last edited: Sep 29, 2010
17. ### marshallf3 Thread Starter Well-Known Member

Jul 26, 2010
2,358
203
Well, now I'm seeing this:

(0.820 - 0.647)(8.235) = 1.424655 V
(0.990 - 0.647)(8.235) = 2.824605 V

so the 0.647 should really be 0.674

(0.820 - 0.674)(8.235) = 1.20231 V
(0.990 - 0.674)(8.235) = 2.60226 V

Perfection, just too many numbers to keep track of.

By using two op amps I could also include a small trimmer adjustment for the offset &/or a small trimmer adjustment for the spread if needed in actual practice. One never knows how a circuit will behave until it's under actual conditions.

Thanks for all your help! Now on to choosing values and some other parts.

Last edited: Sep 29, 2010
18. ### wayneh Expert

Sep 9, 2010
14,871
5,374
My bad, so sorry. At least I get partial credit for showing my work.

And I really think you'll do fine with a single op-amp with a fine tuning pot for the offset. The amp itself will have an offset of a few mV. Picking the right resistors for the feedback should make a pot there uneccesary, IMHO. Maybe an error of a degree or two isn't critical for the application.

 Oops, forget that bit about a single op-amp. I agree now that you should use one op-amp to trim off an offset from the input level - and another to give the gain.

Last edited: Sep 30, 2010
19. ### marshallf3 Thread Starter Well-Known Member

Jul 26, 2010
2,358
203
Yea, and they're always on a 2 for 1 sale in the DIP-8 package, unless you want those extra pesky leads.

Seems I did use a TL081 for something once, can't recall why though.

It's actually a good thing those numbers were transposed, actually made me have to get my calculator out and use it, found that I really would want the capability to adjust the offset.

Amp came out easy enough too with common 1% values of 115K and 15.8K, error = 0.53%