用DS18B20测PC CPU温度

楼主
用DS18B20测PC CPU温度
[IMGA=0,absMiddle]../../upload/2006/08/08/144128.jpg[/IMGA]

[TABLE][TR][TD][PP][B]Tutorial: Connecting DS18B20 Temperature Sensors to the 633[/B]

[HR][PP][I][B]Disclaimer: This is a fun project meant only to show a possible way of putting some temperature sensors around a typical PC's case. I do not claim to be an expert at "extreme cooling" and this is not meant to show the optimal way to cool a PC.

Use this tutorial at your own risk. If you let the magic blue smoke out of your PC, 633, DS18B20 or any thing else, that is your responsibility.

These modifications will probably "void your warranty" on a bunch of parts involved.[/B][/I]

The guys over in accounting needed another PC. Well, I had come across some of [URL=http://www.bigedtech.com/articles/147.php][COLOR=#22229c]these[/COLOR][/URL] for $35 and I had an [URL=http://www.sheller.com/ibmclassaction.htm][COLOR=#22229c]IBM 30G "deathstar"[/COLOR][/URL] laying there, so I decided to throw together a PC from scratch.

One of the first things I noticed is the apparent lack of any CPU temperature sensor:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/processor_socket.jpg[/IMGA]

My first thought was "Who cares? It is just for accounting." Then I remembered that I had just received a bag of Dallas Semiconductor [URL=http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=2812][COLOR=#22229c]DS18B20[/COLOR][/URL] temperature sensors:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/DS18B20_sensors.jpg[/IMGA]

Of course I had a [URL=http://www.crystalfontz.com/products/633/index.html][COLOR=#22229c]633[/COLOR][/URL] and [URL=http://www.crystalfontz.com/products/633bracket/index.html][COLOR=#22229c]mounting bracket[/COLOR][/URL] handy, so I thought that it would be fun to put a few temperature sensors on this ugly beast.

Here is what a DS18B20 looks like up close:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/sensor_before_clipping_leads.jpg[/IMGA]

Basically it has three terminals: +5v, Ground, and a bi-directional data pin. You can connect up to 32 of these to a 633 by just stringing all the similar signals together on a "multi-drop" bus:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/schematic.jpg[/IMGA]

In order to get a sensor under the processor, we need some fine wire:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/wire_wrap_wire.jpg[/IMGA]

Solder the fine wire up to the DS18B20:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/about_to_solder_green_to_processor_sensor.jpg[/IMGA]

Do that for all three wires:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/sensor_for_processor_after_solder.jpg[/IMGA]

Then put some small heat-shrink tubing over the connections:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/processor_sensor_b4_heatshrink.jpg[/IMGA]

And shrink the tubing:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/processor_sensor_after_heatshrink.jpg[/IMGA]

Here is the processor that I am using:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/processor_specifications.jpg[/IMGA]

Now we are ready to see where the temp sensor is going to fit on the processor:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/sensor_on_processor_test_fit.jpg[/IMGA]

There is probably some adhesive out there that is made to have high thermal conductivity. For the rest of us, there is:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/super_glue.jpg[/IMGA]

It probably is not a bad solution, since there will not be very much heat transferred between the sensor and the object it is sensing (because the sensor has a relatively low thermal mass) and since the layer of cured glue should be very thin, the overall thermal resistance of the joint should not be too great. If you are queasy about gluing something to your processor, this is probably not the project for you. Put a small drop of cyanoacrylate adhesive on the sensor and stick that baby smack dab in the middle of the processor:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/sensor_on_processor_glued.jpg[/IMGA]

Now it is time for another test fit:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/test_fit_processor.jpg[/IMGA]

I did not think about the heat-sink clip, so I had to angle the wires towards the corner of the processor to miss it:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/angled_routing_to_miss_heatsink_clip.jpg[/IMGA]

This looks like it will work OK:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/test_fit_with_wires_missing_heatsink_clip.jpg[/IMGA]

Now it is time to connect the next sensor in the string. The larger wire I use here is 24 gauge. 26 gauge would certainly be fine and be less bulky. Start by twisting the wires:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/twisting_30ga_to_24ga.jpg[/IMGA]

I found it was easiest to pre-solder the wires to each other:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/about_to_solder_blue.jpg[/IMGA]

Then solder them to the DS18B20:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/blue_soldered_heatsink_sensor.jpg[/IMGA]

Do all three, adding the heat-shrink tubing as you go:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/about_to_heatshrink_green_on_processor.jpg[/IMGA]

Then cut some larger heatshrink tubing to go over the whole assembly:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/about_to_place_outer_heatshrink.jpg[/IMGA]

And shrink it:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/heatshrink_done_heatsink_sensor.jpg[/IMGA]

Now we are ready to mount the sensor on the heat-sink:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/position_on_heatsink.jpg[/IMGA]

Drop of glue at the ready:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/ready_to_glue_to_heatsink.jpg[/IMGA]

And it is in place:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/heatsink_and_processor_with_sensors.jpg[/IMGA]

It is fairly important to twist the wires. first off, it makes them look nicer, and second off it can reduce the interference picked up on the data line from the electrically noisy PC environment. One last test-fit on the motherboard, looks OK:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/processor_mounted_in_to_motherboard.jpg[/IMGA]

Now you basically keep adding sensors along the string wherever you want to read a temperature. Same sequence of strip and solder:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/about_to_solder_black.jpg[/IMGA]

and then cover:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/placing_outer_heatshrink.jpg[/IMGA]

and shrink:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/sensor_after_heatshrink.jpg[/IMGA]

I put one on the chipset:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/chipset_sensor.jpg[/IMGA]

The video card heatsink and RAM:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/video_card_sensors_mounted.jpg[/IMGA]

The incoming airflow just after the front panel fan:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/sensor_glued_on_front_fan.jpg[/IMGA]

On the hard drive, which is probably doomed anyway:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/hard_drive_with_sensor_mounted.jpg[/IMGA]
[IMGA]http://www.crystalfontz.com/backlight/633_temperature/cables_going_to_hard_drive_sensor.jpg[/IMGA]

On the power supply. This was supposed to measure the temperature of the air going into the power supply, but I mounted it to the case of the power supply, and I think the case is heated by the big heatsinks inside the power supply, so it is really more of a "power supply case temp" sensor:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/power_supply_case_sensor.jpg[/IMGA]

Finally, there is a sensor that reads the temperature of the power supply's exhaust air:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/power_supply_outlet_sensor.jpg[/IMGA]

Then all that is left is to connect the string to the 633. You really do not want to use a "fan" connector for this, (no matter how tempting) because if you put the 12v intended for a fan onto your sensor string, you will probably toast all of your sensors.

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/sensor_string_connection_to_633.jpg[/IMGA]

I found one nifty thing about this motherbooard:

[IMGA]http://www.crystalfontz.com/backlight/633_temperature/com2_connector.jpg[/IMGA]

It has a COM2 on the [U]inside[/U] of the case. Alas, the Micron BIOS does not allow it to be enabled. I later found a BIOS that turns COM2 on, but now accounting will not let me at the machine. Ungrateful louts.

Because the 633 is mounted in a drive bay, it may be too far from the fans. Luckily I had a few 3-pin extendor cables [URL=http://www.crystalfontz.com/products/cables/index.html#WRFANX01][COLOR=#22229c]http://www.crystalfontz.com/products....html#WRFANX01[/COLOR][/URL]

[COLOR=#22229c][IMGA]http://www.crystalfontz.com/products/cables/WRFANX01.jpg[/IMGA]

[/COLOR]Now all that is left is to wire up the 633 to power. This is simple, since you just use a standard floppy power connector. If you are out of floppy connectors you can get a [URL=http://www.crystalfontz.com/products/cables/index.html#WRPWRY12][COLOR=#22229c]3-Pin to 4-Pin Adapter[/COLOR][/URL]:

[IMGA]http://www.crystalfontz.com/products/cables/WRPWRY12.jpg[/IMGA]

Well, this post covers some ideas of physically installing the temperature sensors. I plan to modify [URL=http://www.crystalfontz.com/products/633_WinTest/index.html][COLOR=#22229c]633_WinTest[/COLOR][/URL] to add temperature logging capability. When I do, I'll post the results [URL=http://www.crystalfontz.com/forum/showthread.php?threadid=560][COLOR=#22229c]here[/COLOR][/URL].

Next up is to identify how the sensors correspond to the sensor numbers used by the 633. Basically you need to hook up the 633 and 633_Wintest and have it display & update all the temperatures. Then heat (or cool) each sensor and record which temperature changes on-screen. From there you can make a table that says sensor 3 is the CPU and sensor 4 is the incoming air and so on. This will never change as long as you are using the same sensor string, but you do need to manually associate the physical sensors with the sensor numbers in the 633.

Once it was all hooked up, it did not look so bad (well, considering that it was a pretty ugly case to start with). The Micron Spitfire case has a door that covers all but the top drive bay, so I put the 633 in the top bay where it is always exposed, and then the rest of the drives are covered by the door. I used 633_WinTest to set up the 633 to continuously monitor and display the two fans along with the processor temperature sensor and one other sensor:

[IMGA]http://www.crystalfontz.com/products/633bracket/Front_shot_large.jpg[/IMGA]

[/TD][/TR][TR][IMGA]http://66.45.165.45/forum/images/statusicon/user_offline.gif[/IMGA]   [/TD][/TD][/TR][/TABLE]
1楼
高人

电脑版 Page created in 0.2031 seconds width 3 queries.