0
\$\begingroup\$

I am looking for some advice or pointers as to whether I need to solve this problem and if so how difficult it is to do so. I have read a post which made an off the cuff remark about needing to using an OP-AMP to be able to use the full range of an ADC is certain circumstances. I think I am in this situation but I have never used an OP-AMP before.

I have a temperature sensor (thermistor I guess) that I am reusing from a pool heating system. I have tested and measured the resistance of the thermistor at 2deg C at around 493k and at 72deg C at 398k. When I hooked it up to my little voltage divider circuit that will feed into a MCP3002 ADC I used a 1M ohm resistor and this gave me 2.21V at 2deg C and 2.36V at 72deg C.

So the issue is that I will only be using a small amount of the ADC range. Using online calculators and reading other posts I see I should drop the fixed resistor to around 450k which I will do but this only increases the voltage range by a small amount.

I can probably get by with this range as I don't need much more than 2 degrees of precision but I thought if it isn't too difficult I might see if I can add to my currently simple circuit (voltage divider and ADC) to increase the used range of the ADC. Clearly I am new at this so please be gentle with your explanations! Thanks!

\$\endgroup\$
  • \$\begingroup\$ What are you using for a voltage reference for the ADC? \$\endgroup\$ – ThreePhaseEel Sep 25 '16 at 15:06
  • 1
    \$\begingroup\$ Op amps are quite easy to understand and incredibly useful, so worth learning about whether you use one in this project or not. \$\endgroup\$ – Ian Bland Sep 25 '16 at 15:17
  • \$\begingroup\$ @ThreePhaseEel 3.3V from a Raspberry Pi \$\endgroup\$ – Gavin Sep 25 '16 at 22:46
1
\$\begingroup\$

You can use an op amp to boost the voltage. You could, for instance, have the op amp set to amplify the voltage by 2. In the case of your example this would have the voltage go from 4.42V to 4.72V. This may or may not help you all that much.

This website has a nice explanation of how to configure an op amp: http://www.electronics-tutorials.ws/opamp/opamp_3.html.

I would suggest that you probably need to get a different thermistor that is designed to have larger variability in the resistance over the temperature range in which you are interested.

Here is a recommendation that I have used and works well - https://learn.adafruit.com/thermistor/overview. It is advertised as having "100 ohms or more of change per degree" So with a 10k or so resistor you should be able to measure everything you need pretty easily.

\$\endgroup\$
  • 1
    \$\begingroup\$ Also Texas Instruments has an awesome book of op-amp applications as well called the Handbook of Operational Amplifier Applications. Its a great reference. \$\endgroup\$ – crowie Sep 25 '16 at 15:30
  • \$\begingroup\$ Thanks. I will look more into these links. I might just have to work with what I have got though for reasons which I outlined in other replies. I think from what I have read the doubling the voltage would be good but it would have to be offset back down into the 3.3 V range I expect, something else which I don't know how to do! \$\endgroup\$ – Gavin Sep 25 '16 at 23:00
  • \$\begingroup\$ @crowie Thanks I have downloaded that book and will take a look. \$\endgroup\$ – Gavin Sep 25 '16 at 23:33
  • \$\begingroup\$ I see. If you want to keep the current thermistor you could choose a bigger bias resistor so that the minimum end of the output voltage range is lower, say from 2.21 to close to 0. Then calculate the maximum voltage you will get and divide 3.3 V by that number. This is then the maximum gain you can have and still be within the 3.3V limit of your ADC. You can then use an op amp with the calculated gain to boost the signal. I think this is what you are probably looking for. This will probably introduce some noise as well though. \$\endgroup\$ – rtclark Sep 26 '16 at 4:45
  • \$\begingroup\$ Yes I see what you are suggesting. However, I have discovered the large resistor values have caused the problem mentioned here: raspberrypi.org/forums/viewtopic.php?f=42&t=41194 I am solving this by using the capacitor trick mentioned in that post which seems to be working. I will probably get a working solution of sorts but I think the best option is to get one of those Adafruit thermistors. I will persist for the academic value at the moment though! \$\endgroup\$ – Gavin Sep 26 '16 at 12:22
2
\$\begingroup\$

Thermisters are generally used for rough measurements around a narrow operating temperature. If you are willing to build an OP-AMP circuit why not just purchase an MCP9700? This is a nice linear temperature sensor in a TO-92 (or SMT) package which is pre-calibrated and outputs a temperature proportional to the voltage. For example .82V = 82degF.

\$\endgroup\$
  • \$\begingroup\$ Thanks please see my constraints with replacements in my answer to @Transistor \$\endgroup\$ – Gavin Sep 25 '16 at 22:55
2
\$\begingroup\$

Thermistors are problematic in calibration, linearisation and replacement, should one fail. I recommend a semiconductor sensor instead.

enter image description here enter image description here

Source: Arduino-info.

The LM35 is a very simple temperature sensor with 10.0 mV/°C output.

See the datasheet Figure 2 for details on extending the range to -55°C.

Should the sensor fail or get damaged it can simply be replaced and calibration will be guaranteed.

\$\endgroup\$
  • \$\begingroup\$ This thermistor is on the roof of the house with 25m of twin core cable. So not impossible to replace but a hassle. It was previously used for exactly the same purpose as I want to use it for - measuring the roof temperature to aid in the decision about whether to turn on the solar heating pool pump. In my testing so far the response is exactly linear so that doesn't seem to be a problem with is particular one just the resistance range seems small. I am also conscious of the need for this device to be able to withstand being outside on the roof something which the current one is designed for. \$\endgroup\$ – Gavin Sep 25 '16 at 22:53
  • \$\begingroup\$ That clears things up. You basically need a threshold detector not necessarily an accurate temperature sensor. What will the final output of this device be? Does it close a contact to the pool heater? I would use a comparitor which drives a relay to send the signal to the pool heater. check out this schematic: i.stack.imgur.com/bvfib.png \$\endgroup\$ – Neelix Sep 26 '16 at 3:20
  • \$\begingroup\$ The plan is that a Raspberry Pi is receiving the temp info via an ADC. The code then compares pool desired temp, actual pool temp (different thermistor) and roof temp to decide whether to turn the pool pump on. The actual turning on of the relay is done via the GPIO on the Raspberry Pi. So yes I don't need a super accurate roof temp. The ADC is accurate to .003V per step but my current setup (70degrees/0.176V) is only 0.002V per degree so I will only be within 1.5 degrees of actual which is fine I was just wondering if I could do better without too much effort? I assume my thinking is right? \$\endgroup\$ – Gavin Sep 26 '16 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.