Showing posts with label Thermometer. Show all posts
Showing posts with label Thermometer. Show all posts

4/22/2013

Arduino and DS18B20 1-wire digital thermometer





Finally got this DS18B20 working. Actually three of them. And in two modes. Parasite power mode and main mode.
A 4.7K ohm resistor is the key.

Starting with the main mode, three wires are needed, as this sensor has three pins.
Data sheet is here : http://www.hqew.net/product-data/DS18B20

Connection is almost simple.
Pin 1 to Arduino ground
Pin 2 to Arduino digital input
Pin 3 to Arduino 5V
And a 4.7K resistor between pin 2 and pin 3

Works with three wires, as seen on the following illustration.



Parasite mode eliminates one wire.
Pin 1 to Arduino ground
Pin 2 to Arduino digital input
Pin 3 to Arduino ground (same as pin 1)
And a 4.7K resistor from pin 2 to 5V

Maybe following illustration helps.



Of course multiple DS18B20-s or different one wire devices can connected together like so:

Here comes the beauty of using digital thermometers. One pin on Arduino can be used for multiple devices, working together over one wire. Much like ethernet actually. Each device has its own unique address.
Second, a two wire cable can be used. Those are usually much easier to find than three wire cables. Also digital 1-wire thermometers work on longer cables. A simple test is cable-length-for-lm35-and-ds18b20.

Some words of caution:
No pins on DS18B20 should be left unconnected. Sometimes it works this way, sometimes it does not.
If using one should avoid mixing main mode and parasite mode thermometers on the same pin. Sometimes it works, sometimes it does not.

DS18B20 can also be installed outside. Some kind of protection is advisable.  I had one sensor outside, minimum temperature about -30° C, maximum about +35° C, protected like this. No problems so far.

Working with three DS18B20 thermometers for a year now – sometimes those thermometers do not get initialized correctly. Specially after power fluctuations. Hard reset helps in that case.



A1015         CP2102          DS18B20             AD620




2/02/2013

CPU-Thermometer Übertakten ohne Überhitzen




Wer die CPU seines PC übertaktet, lebt in ständiger Angst vor deren Hitzetod. Eine permanente Überwachung der CPU-Temperatur beruhigt die Nerven ungemein ...
Wer aus einem älteren PC etwas mehr an Geschwindigkeit herauskitzeln will, kann versuchen, die CPU und/oder die peripheren Bauteile mit einer höheren Taktfrequenz zu betreiben als vom Hersteller vorgesehen. Dazu muß kein neuer Quarz eingelötet, sondern einfach ein paar Jumper (in üblicherweise zwei Jumper-Blöcken) auf dem Motherboard umgesteckt werden. An einem stellt man den Systemtakt (zum Beispiel auf 50, 55, 60 ... MHz) ein, der für den gesamten Chipsatz gilt, am zweiten einen Multiplikator (1,5 2 2,5 3). Aus externem Takt und Multiplikator berechnet sich die CPU-Taktfrequenz.


Elko C2 ist falsch gepolt gezeichnet. Der Minuspol muss an Pin 26 von IC2 liegen und der Pluspol an Masse. Bei dem als Diode geschalteten Transistor T1 muss die Basis natürlich mit dem Kollektor verbunden sein und nicht mit dem Emitter.
Der im Text als Alternative für den ICL7107CPL angegebene ICL7106CPL ist keine Alternative, weil er sich nur für LC-Displays eignet. Die CPU-Thermometerschaltung funktioniert nur mit dem ICL7107CPL und Displays mit gemeinsamer Anode .