Shop OBEX P1 Docs P2 Docs Learn Events
Lots of Temperature sensors to monitor — Parallax Forums

Lots of Temperature sensors to monitor

prof_brainoprof_braino Posts: 4,313
edited 2014-06-21 21:39 in General Discussion
The request is to monitor temperature for a composting system.

EDIT - Originally I asked about THERMISTORS. Now it seems I should also consider other sensor options.

There would be 10 to 30 locations to monitor. They might be as close as 1 meter or as far as several meters.

I arbitrarily picked up 10k thermistors, but could use 100k or anything else if it was more appropriate.

Initially I though to use sigma delta directly from prop pins, but considering the distance this might not be an optimal solution.

Also, we might have to use pins for other purposes; other sensors, control, etc. So there is motivation to use lest possible pins for temperature monitoring.

I started looking at 8 channel ADC chips, but I don't know about these yet.

Any suggestions/recommendations?
«13

Comments

  • ElectricAyeElectricAye Posts: 4,561
    edited 2013-09-05 07:53
    Have you considered one of the "one-wire" type of solutions? Off the top of my head I'm thinking about the DS18B20. Kinda pricey, perhaps, but if you're going down the ADC route, maybe do a cost benefit check?
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2013-09-05 07:54
    How about 1-wire, DS18B20, on a single buss? Obex objects, e.g. #82.

    I've made rugged probes from the LM34 (10mV/°F) and from the AD592 (1µA/K), and have DIY instructions on my web site. Those do take an ADC and multiplexer.
  • ctwardellctwardell Posts: 1,716
    edited 2013-09-05 08:27
    I like the solution suggested by ElectricAye and Tracy.

    The sensor cost is higher, but you gain the benefit of being able to run all the devices from a single buss.

    The cost savings in wire and connectors should significantly offset the higher sensor cost.

    He is some info on multiple devices on long cables:

    http://www.maximintegrated.com/app-notes/index.mvp/id/148

    C.W.
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-09-05 08:54
    DS18B20. Kinda pricey

    DS18B20 is $4.25 per sensor. So $42 for 10 sensors.
    LM34 (10mV/°F) and from the AD592 (1µA/K),

    http://www.ebay.com/itm/10pcs-LM34DZ-LM34-Precision-Fahrenheit-temp-sensors-/280689647505 $19.35

    http://www.ebay.com/itm/AD592AN-AD592-Temperature-Transducer-3-pin-TO-92-IC-/200330338679 $7.95 * 10 = $79

    Total $100

    So the MCP3208 ADC from http://forums.parallax.com/showthread.php/137657-help-with-8-channel-ADC-and-BS2-interface
    and the http://www.parallax.com/product/604-00062 MCP3202,3204,and 3208
    would not be a good fit for this?

    Is it because the wires would be too long?

    I had expect the answer to be "Two MCP3208 will easily cover this". Good thing I checked!
  • pjvpjv Posts: 1,903
    edited 2013-09-05 09:00
    Prof_Braino;

    I would use the very inexpensive (< 50 c) TI430 chips as a sensor node. They have an A/D converter built in, and draw almost no power. You could then "roll your own" 1Wire-like comms system at your own preferred data rate that then also powers the sensors. Each node has its own unique device address. The Master ontroller/interrigator of course is a Prop. I have done this for industrial applications, and it works great.

    Cheers,

    Peter (pjv)
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2013-09-05 09:25
    What chip is that, Peter, typo? TI430 draws a blank.

    Prof, There is nothing wrong with thermistors. You can get decent accuracy at low cost. Thermistors are best served by a ratiometric ADC, that is, the excitation voltage to the thermistor is the same as the reference for the ADC. You might come up with a scheme that uses only one ADC and one reference resistor, and switches in each thermistor in turn. However, on the down side, there is potential for noise pickup on long wires, and shielding adds to cost, and there are bound to be headaches with marginal connectors and such. Burial in compost will call for rugged packaging!
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-09-05 09:30
    Sounds like a job for the Propeller 2 with all its ADC i/o. You could even use PropForth.

    You could use the LM331 to convert voltage into frequency for transmission over distance.. and then a mutiplexed Propeller 1 could do it.
  • RDL2004RDL2004 Posts: 2,554
    edited 2013-09-05 09:35
    TI msp430

    Famous for the MSP430 LaunchPad, which initially sold for $4.30
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2013-09-05 11:01
    Another digital option is the TMP06 from Analog Devices (~$2). It has a PWM output, that is, the temperature is encoded in the ratio of high time to low time. A Propeller could easily read it. You'd have to deal with the SC70-5 or SOT23-5 package, but only three wires are required. It even has a clever daisy chain mode.
  • kwinnkwinn Posts: 8,697
    edited 2013-09-05 11:33
    THermistors and a single mcp3204/8 with cat5/6 cable could also work. Connect the thermistors in a 4 x 3 array with rows going to transistors that apply power to each row, and each column going to an input on the adc. I can post a wiring diagram this evening if you are interested.
  • dgatelydgately Posts: 1,633
    edited 2013-09-05 12:01
    Have you considered one of the "one-wire" type of solutions? Off the top of my head I'm thinking about the DS18B20. Kinda pricey, perhaps, but if you're going down the ADC route, maybe do a cost benefit check?

    One-wire solution (10 pieces, $21.87 including shipping): http://www.ebay.com/itm/10pcs-DS18B20-Waterproof-Digital-Thermal-Probe-or-Sensor-DS18B20-NEW-/121111705251?pt=LH_DefaultDomain_0&hash=item1c32d1f6a3 AFAIK: Each sensor can have its own address, so only 1 I/O may be needed as a bus for all sensors...

    Check out this demo from the OBEX: http://obex.parallax.com/object/306

    I'm testing several of these in a weather station... No ADC needed!

    dgately
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-09-05 13:02
    Some MSP430s include a built-in temp sensor, so no external sensor needed -- just power and comms.

    -Phil
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-09-05 13:21
    kwinn wrote: »
    THermistors and a single mcp3204/8 with cat5/6 cable could also work. Connect the thermistors in a 4 x 3 array with rows going to transistors that apply power to each row, and each column going to an input on the adc. I can post a wiring diagram this evening if you are interested.

    If its no trouble I would appreciate it.
    dgately wrote: »
    One-wire solution (10 pieces, $21.87 including shipping): AFAIK: Each sensor can have its own address, so only 1 I/O may be needed as a bus for all sensors...
    I'm testing several of these in a weather station... No ADC needed!

    Thanks for this. It is also a contenter.

    I'm on a steep learning curve here...
  • LawsonLawson Posts: 870
    edited 2013-09-05 15:15

    I had expect the answer to be "Two MCP3208 will easily cover this". Good thing I checked!

    Actually two MCP3208's will work well, but you'll want to use 1K thermistors and 0.1% resistors with a low temperature coefficent to load each thermistor. (the LTC1863 is another nice ADC) The low resistance will reduce the effect of ADC loading and reduce the effect of any stray leakage currents from wet wires/connectors. The precision resistors with low temperature coefficient will insure that you're only measuring the temperature of the sensor. I'd also put a 0.1uF or bigger capacitor on each input to the ADC. This will function as an anti-aliasing filter and further reduce error due to ADC loading.

    I've used an identical circuit to get 0.1 degree Celsius precision right off the ADC and 0.01 degree Celsius precision after oversampling and averaging. (i.e. capture 64x faster and average) At speeds significant to temperature measurement, I'd expect twisted pair to be enough to keep the temperature signals clean for 5-10 meters. Assuming, the wet compost doesn't cause a few micro-amps of leakage between the thermistor wires.

    Marty
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-09-05 15:27
    Some MSP430s include a built-in temp sensor, so no external sensor needed -- just power and comms.

    I have a couple of MSP-EXP430G2 Launch pad kits they sent out. But I never did get around to installing the dev tools. It may turn out to be time to get started with these.
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-09-05 15:39
    Lawson wrote: »
    Actually two MCP3208's will work well, but you'll want to use 1K thermistors and 0.1% resistors with a low temperature coefficent to load each thermistor. (the LTC1863 is another nice ADC) The low resistance will reduce the effect of ADC loading and reduce the effect of any stray leakage currents from wet wires/connectors. The precision resistors with low temperature coefficient will insure that you're only measuring the temperature of the sensor. I'd also put a 0.1uF or bigger capacitor on each input to the ADC. This will function as an anti-aliasing filter and further reduce error due to ADC loading.

    I've used an identical circuit to get 0.1 degree Celsius precision right off the ADC and 0.01 degree Celsius precision after oversampling and averaging. (i.e. capture 64x faster and average) At speeds significant to temperature measurement, I'd expect twisted pair to be enough to keep the temperature signals clean for 5-10 meters. Assuming, the wet compost doesn't cause a few micro-amps of leakage between the thermistor wires.

    Marty

    Hey! Thanks! I thought there would be some soultion like this, thanks for the detail. Of course the thermistors I bought turn out to be the wrong value, but they were cheap and at least got me to start my investigation.

    Now I just have to go through and figure what the cost and effort trade off are for each suggestion.

    Thanks to contributors for all you insights!
  • kwinnkwinn Posts: 8,697
    edited 2013-09-05 17:05
    Here is the wiring diagram for reading up to 32 thermistors with an MCP3208. I built a circuit similar to this, however I only needed 12 inputs and had only 3 ADC input channels available so it was 4 3906's driving the rows and 3 columns in to the ADC. The thermistors I used were 10K, and the resistors were all 10K as well.

    You could use the prop to drive the transistors directly if V+ is 3.3V and you have the pins to spare, otherwise you could use a '595.
    1024 x 486 - 71K
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2013-09-05 17:13
    One option would be to use 555/556/558 timers with a pair of thermistors in each timer circuit. That way, with a single I/O pin, you can measure two thermistors. Just independently read the high time and low time of the wave produced, and you can get your resistance values from that.
  • kwinnkwinn Posts: 8,697
    edited 2013-09-05 17:44
    Marty has a good point regarding precision. The circuit I built provided slightly better than 1 degree C precision after calibration. It was used for monitoring various temperatures in a greenhouse automation system so that good enough. If you need higher precision using better components in the circuit I posted would help, but I do not think it would reach the precision levels Marty is talking about. As always it is a tradeoff between cost, complexity, and precision.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-09-05 18:41
    I like the MCP3208 multiplexing approach, but I see that distance could be an issue making it susceptible to noise.

    Using a 555 would help against noise if the source oscillation can be kept local to the thermistor..... combining two thermistors into one 555 circuit is also unique, but it doesn't solve having a ratiometric output.... which was mentioned earlier in the thread.

    Using a schmitt trigger to generate a PWM signal locally to each thermistor would allow a ratiometric response at least to a known resistor value.

    In the schematic below, the 74HC132 could be replaced with just about any other schmitt trigger gate. In place of the POT, a thermistor would be placed on one half of the wiper, while a fixed 10k (or that matching the Thermistor at 25 Deg C) would be placed on the other half of the wiper. The result is a square wave with 50/50 duty cycle at room temp, but a disproportionate duty cycle above and below 25 Deg C. The resulting PWM, can then be multiplexed further down the line into a microprocessor. The ratiometric approach also helps to negate against ambient temperature changes that may affect the oscillator and component tolerances.

    http://web.archive.org/web/19991012070557/http://ionet.net/~bschwabe/BasicStampII/pwm.gif
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2013-09-05 18:50
    The 555 can basically be used as a schmitt trigger in the same way as that schematic. Connect pins 2 and 6, 3 is your output, and ignore pin 7.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-09-05 18:55
    The schmitt trigger just adds a little hysteresis to the circuit to prevent bounce..... not necessary with a 555, but I would stay away from combining two thermistors into one 555.... instead use one 555 per thermistor, but also implement the diode approach in the schematic I posted to get PWM as an output from the 555.


    Here is a link to using a single 555 for PWM ... http://www.reuk.co.uk/LED-Dimmer-Circuit.htm ... For this application however the 50K pot would have the Thermistor on one side of the wiper leg, and a fixed 10k resistor on the other side of the wiper leg.
  • ercoerco Posts: 20,257
    edited 2013-09-05 20:55
    I still like thermistors. Some new wave guy will soon coin the term "TDR=Temperature Dependent Resistor", Ugh. I had a project many moons ago to monitor many pots using one ADC pin. I had it "all worked out" in my mind to use a 4066 quad bilateral switch I found in a Forrest Mims book. That chip would connect four (or more, multiplexed) sensors to one pin. In retrospect, I probably liked it because it's kind of like 4 SSRs in a DIP package. On resistance is ~80 ohms per channel, almost negligible with a 10K pot. Never finished it, but I still think that's a cool chip; for me, a solution in search of the right problem.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2013-09-05 21:03
    PWM is basically what the TMP06 or TMP05 does, with less fuss. The '06 has an open-drain output, so multiple sensors could be muxed to one prop pin by supplying power to one at a time. That is, insofar as the length of the cable doesn't skew the timing. Still analog at that level.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-05 21:59
    I like the MCP3208 multiplexing approach, but I see that distance could be an issue making it susceptible to noise.

    The main concern is having the analog lines line correct? What about using a cheap ADC chip with one or two thermistors and running the SPI lines back to the Prop? I think the SPI signals should be good for at least a few meters.

    If 10-bits is enough precision, the MCP3002 could be used. It's $2.07 in qty 10. I personally like the MCP3002. It doesn't seem to mind high impedance sources as much as the MCP3208.

    Edit: I think I'm late to the game. I think this sort of approach as already been mentioned.

    Edit again: The MCP3002 could share the data and clock pins on the Prop. Each chip would need its own select line. If one were running out of pins, then the trick used by the C3 could be used to cycle through the select pins.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-09-05 22:17
    "The main concern is having the analog lines line correct?" - Yes... PWM is a trick to move the signal into the digital domain

    "What about using a cheap ADC chip with one or two thermistors and running the SPI lines back to the Prop?" - Yes, that will work also, but the PWM still keeps the number of signal lines down .... unless you go 1-wire
  • LawsonLawson Posts: 870
    edited 2013-09-05 22:33
    kwinn wrote: »
    Here is the wiring diagram for reading up to 32 thermistors with an MCP3208. I built a circuit similar to this, however I only needed 12 inputs and had only 3 ADC input channels available so it was 4 3906's driving the rows and 3 columns in to the ADC. The thermistors I used were 10K, and the resistors were all 10K as well.

    You could use the prop to drive the transistors directly if V+ is 3.3V and you have the pins to spare, otherwise you could use a '595.

    Nice circuit. I think if Fets with less than a 0.1 ohm Rds(on) were used for the row select and op-amp buffers added between the thermistors and the MCP3208 that circuit should do 0.1 [C] precision as well. I suspect cross talk via the row select transistors and the MCP3208's multiplexed sampling capacitor killed the precision. The main remaining weakness is aliasing. And aliasing can be minimized with a fast scan rate and a software anti-aliasing filter. (aka just average a bunch of samples)

    Marty
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-09-06 03:20
    There is a very real trade off in trying to cost this out with the cheapest components and getting a reliable network at the distances involved.

    One-wire temperature sensors were proven useful over a decade ago in temperature monitoring at multiple locations in grain silos. They have the ability to provide both the data and the distances.

    If you insist on using thermistors, you have to provide the additional distance communications services and that likely means a microcontroller and a board at the distance with associated power supply.

    I suspect that one-wire is really the only cost effective solution, and it would work well with a Propeller managing the network.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2013-09-06 06:02
    Hi kwinn;
    kwinn wrote: »
    Here is the wiring diagram for reading up to 32 thermistors with an MCP3208. I built a circuit similar to this, however I only needed 12 inputs and had only 3 ADC input channels available so it was 4 3906's driving the rows and 3 columns in to the ADC. The thermistors I used were 10K, and the resistors were all 10K as well.

    You could use the prop to drive the transistors directly if V+ is 3.3V and you have the pins to spare, otherwise you could use a '595.
    Now wait a minute, that circuit can't work. There is no isolation between the 16 thermistors.
    Essentially, the NON selected thermistors are shunting across the inputs to the AtoD.

    Or am I missing something here?

    Duane J
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-09-06 06:10
    I finally changed the title of the thread. Initially I had my VOM with the thermistor temperature probe in front of me, and that limited my thinking. After the discussion so far I am reminded that my first guess is usually not so close, and I should consider other options beside thermistors. So I would like to specifically open the conversation of other sensor options,

    The requirement is temperature monitoring over reasonable distance, in this case about a couple meters. The process being monitored is some kind of composting, so the accuracy should be degrees or tenths of a degree; the frequency should be from at least once per second to once per minute. There should be minimum 8 sensors. Minimum cost and effort, maximum reliability, are the only other factors at this point.

    For now I will eliminate the requirements for "fewest pins", "more than two meters", "up to 28 sensors", and "allow other devices on unused prop pins". These can be brought back as requirements after the basic temperature measurement is successful.

    Thanks for all the input so far!
Sign In or Register to comment.