LZ: Temperature Sensor


[Prev][Next][Index][Thread]

LZ: Temperature Sensor



I2C Temperature Sensor
By:  Ed Plese, Jr.  (eplese@lnd.com)


Thanks to Per Finander for the basic layout of the schematic and for his 
I2C ASM routines.


The parts needed for the Temperature Sensor are a capacitor, two diodes, 
the IC and half of a link cord.  The capacitor can be just about any value 
above 1uF.  I have tried 2.2uF, 10uF and 100uF capacitors and they have all 
worked equally well.  I would recommend a smaller one (around 2.2uF) 
because I think the larger ones have more of an internal leak so they would 
draw more power from the link port.  I wouldn't go much above 100uF because 
then the capacitor will draw a lot of current through the port and possibly 
damage the link port.  Also, the smaller you go, the easier it is to buy a 
surface mount one.  I plan to make the whole thing a surface mount module 
and maybe it will be small enough to fit inside the calculator.  You also 
can use just about any kind of small switching diodes for the two in the 
schematic.   I haven't tried any other than the 1N914 type that I used in 
my prototype.  The IC is the LM75CIM-5 by National Semiconductor.  They can 
be ordered from their web page at www.national.com.  For the link cord, I 
used the half of my link that remained from when I made my calculater to 
computer link.  In order to make this, you must etch your own PCB or find a 
carrier board for it.  For my prototype I just made it so each lead of the 
IC went to a wire.  This way I could connect the wires to a breadboard for 
testing.  You could either do that or make a PCB and solder everything to 
that.  Please note that in the schematics, the chip is upside down with pin 
1 being in the upper right as opposed to the lower left.


The connections to the chip are as follows:
1.  SDA (bi-directional data line)
2.  SCL (serial clock)
3.  O.S. (no connection in the circuit but has other uses)
4.  GND
5.  A2
6.  A1
7.  A0
8.  +Vs


A0-A2 are address bits used for the chips address.  In the schematic all of 
these inputs go to GND and are therefore a logical 0.  If you want, you can 
change these because the software will allow you to change what one it 
looks for.  This also allows you to have multiple temperature sensors on 
the same bus if they are all different.  For more information about the 
LM75CIM-5, there is an Acrobat Reader file on their web site that tells ALL 
about it.


The schematics are in the included .GIF file.


If you cannot view this attachment, email me and I'll send you a different 
format.


 


begin 600 sensor.gif
M1TE&amp;.#=A)P+.`8 ``````/___RP`````)P+.`0`"_XR/J<OM#Z.<M-J+L]Z\
M^P^&amp;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