Shop OBEX P1 Docs P2 Docs Learn Events
Diode/ transistor temp sensor? — Parallax Forums

Diode/ transistor temp sensor?

RinksCustomsRinksCustoms Posts: 531
edited 2011-09-08 07:56 in Propeller 1
Hello all, its been a while (and a crazy few years) since I've been in here. Glad to keep tabs on the prop II, good to see the progress with the current chip ie., getting the prop to use bluetooth dongles to provide a bidirectional com link into a droid phone, awesome!

I've been looking for a cheap and somewhat accurate temp sensor. After some unsuccessful attempts with sot23 size digital sensors I searched the internet and came across a few pages that basically said that diodes and transistors can be used as temperature sensors. My question is; has anyone here done that with the prop? Certainly a 1n914a is cheaper than an lm34. Even a diode and am op-amp to amplify the millivolt changes in the diode that are proportional to the temperature change..

Posted from my DROID X2

Comments

  • LeonLeon Posts: 7,620
    edited 2011-09-07 14:20
    You also need an ADC.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-07 14:30
    Yes, the forward voltage across a diode changes 1mV / deg C, but VF isn't guaranteed at any particular temp. I'll call it a curiousity more than a reliable probe.

    An LM34 will be more stable and reliable across a temperature range.

    You can save some coin using the AN008 sigma-delta ADC.

    [It'd be nice if people could talk up the product.]
  • ercoerco Posts: 20,256
    edited 2011-09-07 14:43
    Leon's UK countrymen who make the PicAxe M2 actually have a READINTERNALTEMP command to read the voltage drop across the uC's internal diodes. They claim that its intended use is to monitor the chip temp for overheating, but users are already calibrating for room temp & making 1-chip, low power 3V temperature dataloggers. Sure would be a great feature for Prop2 !
  • LeonLeon Posts: 7,620
    edited 2011-09-07 14:53
    Some of the latest PICs have an on-chip temperature sensor that can be read with the ADC. That is presumably what the PICAXE uses.
  • jmgjmg Posts: 15,173
    edited 2011-09-07 16:02
    My question is; has anyone here done that with the prop? Certainly a 1n914a is cheaper than an lm34. Even a diode and am op-amp to amplify the millivolt changes in the diode that are proportional to the temperature change..

    The industry standard 'diode' seems to be a 2N3904 (diode connected).
    Diodes are usually (appx) -2.2mV/°C

    http://www.nxp.com/documents/application_note/AN10349.pdf

    http://www.maxim-ic.com/datasheet/index.mvp/id/3000
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2011-09-07 16:09
    Most of the many different chips I use have an on-chip temperature sensor which I mainly use to monitor equipment housing temperature. Measuring ambient might be fine if it's on a open pcb sitting on the bench. However, in a housing with other heat generating sources and especially in the hot sun it is almost vital that you know the operating temperature of the equipment. At the very least I would log this information for warranty or quality control purposes.

    Now getting back to the original post, RinksCustoms said:
    I've been looking for a cheap and somewhat accurate temp sensor. After some unsuccessful attempts with sot23 size digital sensors ...........

    I'm not sure what you mean by unsuccessful, could you elaborate?
    Anyway, I find all these kinds of chips are individually way more expensive than a micro with all of them packed in. The only disadvantage to using a micro is that you have to not only write some software but also have ICP connections. But the Silabs parts I use allow me to ICP from the Prop easily as they only need two lines, one of which I run from the I2C lines.
  • tonyp12tonyp12 Posts: 1,951
    edited 2011-09-07 16:13
    This I2C chip that comes in SOIC8 (1.27mm pin spacing) would not be to hard to solder by hand or paste+dedicated oven at home.
    http://www.mouser.com/ProductDetail/NXP-Semiconductors/SA56004ED118/?qs=sGAEpiMZZMucenltShoSngZctQqH05qEuzON%2fHckGD0%3d
    And it can monitor local and remotly(at a diode junction) at the same time too.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-07 16:24
    2mV
    (I haven't remembered that in a while.)
    And it's only as good as your current source and your calibration (ice bath, boiling water, repeat as nec.)

    What is it that you're wanting to take the temperature of?
  • RinksCustomsRinksCustoms Posts: 531
    edited 2011-09-07 16:31
    unsuccessful - I cant solder wires to the microscopic leads and have it communicate I2C to the prop, w/pullup resistors (10K), w/different pins, w/different addresses... too much of a pain in the butt to implement.

    Originally, I wanted to use the TMP75 (Texas Instruments) to mount in a drilled out 3/8" or 1/4" bolt to measure temps on an engine block (or even mounted in a screw head for things like smaller bearings and heat sinks). but since i cant get it to work even at different I2C speeds i'm giving up and going a different route. I searched the internet some and found out that you can use the Vf of a diode instead for roughly 2C accuracy... good enough for my projects. So sticking with the (diode--op amp--ADC/Delta ADC) idea, i've come across some source code, but its written in C, and it looks like gibberish to me..

    I'm not looking to use something as big as a soic8, or lm34.. but maybe the propeller comunity could be of some benifet of having a simple object to use a humble diode (which we all have probably a few hundred laying around) and at least Sigma Detla on a few extra pins to monitor temps with some degree of accuracy (~2C). Now even a surface mount diode like a 1206 could be mounted in a head of a #12 screw..

    Diode SMD ~1206 = $0.15
    Op-amp DIP = $1.45
    misc comp = ~$0.50
    functional sens = ~$2.05 using Sigma/Delta? OR for Free if you have all this stuff lying around..
  • tonyp12tonyp12 Posts: 1,951
    edited 2011-09-07 16:40
    they make soic to dip adapters.
    http://www.sparkfun.com/products/494
    http://www.schmartboard.com/index.asp?page=products_smttodip&id=448

    And you could solder the smt/regular resistors/caps between the dip pins to complete the circuit design

    but you could buy it already made.
    http://www.sparkfun.com/products/9418
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2011-09-07 17:28
    unsuccessful - I cant solder wires to the microscopic leads and have it communicate I2C to the prop, w/pullup resistors (10K), w/different pins, w/different addresses... too much of a pain in the butt to implement.

    I can't even imagine why you would say that about I2C??? There are two wires which generally are just the same lines as the EEPROM and you have an I2C object that you use so it becomes very very simple to issue a read command. I am also using a similar chip to the NXP sensor that tony mentioned and there are a lot of other registers in there that you don't even need to worry about as they are mainly for programmable overtemp alarms.

    As for the "microscopic leads" I think you are exaggerating a bit much. Components don't plug into octal sockets either anymore and I know that would make it "easy" to work with but imagine the huge pcbs we'd have if everything was through-hole! Okay for prototyping and breadboarding.
    Like getting used to anything new, once you do it's easy. So too with SMD.

    Here's a Prop pcb I did recently that uses one of the I2C sensors located right between two dual mosfets in the center-left foreground. If it wasn't for all those SMD packages there would be no way I could get this stuff into a small housing like this.
    P1105.png
    718 x 480 - 433K
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-07 18:06
    (Maybe he was meaning leading all that out for use as a remote sensor. He won't spell out what he needs. Everybody keep advocating.)
  • Mark_TMark_T Posts: 1,981
    edited 2011-09-07 18:53
    PJ Allen wrote: »
    Yes, the forward voltage across a diode changes 1mV / deg C, but VF isn't guaranteed at any particular temp. I'll call it a curiousity more than a reliable probe.

    An LM34 will be more stable and reliable across a temperature range.

    Well the basic diode or transistor is actually a pretty good temperature sensor in the short term ( - long term drift may be an issue and per-device callibration is a pain - you need a good constant-current source and amplification of the forward voltage - dual op-amp will provide this. However once you have a transistor and a dual op-amp you might as well reduce the part count and go for a purpose-designed temperature sensor. One-wire sensors are pretty nifty IMO like the well-known DS18B20 since they can be bussed easily and being digital aren't too sensitive to noise.
  • RinksCustomsRinksCustoms Posts: 531
    edited 2011-09-07 19:02
    guys, i'm not knocking I2C, or SMD.. and i'm proficient in soldering small stuff like SMD 605 LED's.. The TMP75 samples i got from Texas Instruments, cant get them to work with the prop, with NONE of the I2C objects or even a bit banged custom one which allows the exact timing of the I2C signal.. its not the prop or the objects, these crappy sot23 digital sensors just dont so anything, i tried 4 different ones, all same result... nothing..

    Just figured that for the price of one I2C sensor, i could have multiple remote "diode" temp sensors, albeit with some reduced acuracy..
  • RinksCustomsRinksCustoms Posts: 531
    edited 2011-09-07 19:03
    @ Mark T. - Roger that.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-07 19:32
    these crappy sot23 digital sensors just dont so anything ...

    I'd be reluctant to blame the sensors. After all, TI could not survive by selling Smile. Why not post your code so we can have a look at it?

    -Phil
  • RinksCustomsRinksCustoms Posts: 531
    edited 2011-09-07 21:01
    as it is, the code i had written is now over a year old, was rewritten from scratch many-o-times.. one of my PC's HDD's didn't survive the 3860mi move from NJ (hard failure).. But i will search my other drives, thumbs and netbook for traces of the code i had written.. this might take a little while. The TMP75 (SOT23) PDF did not spec a minimum freq on the I2C protocol.. is there a lower bus freq limit for something as tiny as a sot23 device?

    And yes, it's likely something i did in handling the chips or durring soldering. But i was trained in school about ESD handling and soldering techniques (EE course in VoTech school), and I do implement ESD handling/soldering practices when working with IC's..
  • RaymanRayman Posts: 14,665
    edited 2011-09-08 06:09
    If you wanted something simple, I think I'd try a thermistor and a capacitor and just use a single Prop pin to do RC time...
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2011-09-08 07:56
    Here's an article that explains how RDTS (remote diode temperature sensors) work.

    http://www.sensorsmag.com/sensors/temperature/temperature-sensor-tips-and-tricks-1439

    Ideally you would have two diode junctions with similar geometries to reduce any common mode interference, but the article explains how it can be done in 'near real time' with just one diode junction.

    The trick is to take voltage readings from two different but known precision current sources. Apply a 'relatively simple' formula based on a few known constants about the diode junction and you can determine the temperature.

    attachment.php?attachmentid=84900&d=1315493666
    360 x 176 - 25K
Sign In or Register to comment.