<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.baszerr.eu/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>BaSzErr - blog:2011:06:03</title>
        <description></description>
        <link>https://www.baszerr.eu/</link>
        <lastBuildDate>Wed, 06 May 2026 09:38:14 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://www.baszerr.eu/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>BaSzErr</title>
            <link>https://www.baszerr.eu/</link>
        </image>
        <item>
            <title>1</title>
            <link>https://www.baszerr.eu/doku.php?id=blog:2011:06:03:1</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;temperature_measurement&quot;&gt;2011.06.03 - temperature measurement&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
today i&amp;#039;ve built my first digital thermometer connected to linux. it is based on the &lt;a href=&quot;http://pdfserv.maxim-ic.com/en/ds/DS18S20.pdf&quot; class=&quot;urlextern&quot; title=&quot;http://pdfserv.maxim-ic.com/en/ds/DS18S20.pdf&quot; rel=&quot;ugc nofollow&quot;&gt;ds18b20&lt;/a&gt; IC – digital thermometer connected via &lt;a href=&quot;https://en.wikipedia.org/wiki/1-Wire&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/1-Wire&quot;&gt;1-Wire&lt;/a&gt; communication bus. it appears that it can be easily connected to &lt;a href=&quot;https://en.wikipedia.org/wiki/RS232&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/RS232&quot;&gt;RS232&lt;/a&gt; using &lt;a href=&quot;http://kml.jogger.pl/2009/10/29/termometr-cyfrowy-ds18b20-na-rs232-com-i-usb&quot; class=&quot;urlextern&quot; title=&quot;http://kml.jogger.pl/2009/10/29/termometr-cyfrowy-ds18b20-na-rs232-com-i-usb&quot; rel=&quot;ugc nofollow&quot;&gt;ds9097&lt;/a&gt; adapter. it is supported by &lt;a href=&quot;http://www.digitemp.com&quot; class=&quot;urlextern&quot; title=&quot;http://www.digitemp.com&quot; rel=&quot;ugc nofollow&quot;&gt;digitemp&lt;/a&gt; out of the box.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;2011.06.03 - temperature measurement&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;temperature_measurement&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-504&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;hardware&quot;&gt;hardware&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
since RS232 to 1-Wire would require voltage converter (for example &lt;a href=&quot;http://www.datasheetcatalog.org/datasheet/texasinstruments/max232.pdf&quot; class=&quot;urlextern&quot; title=&quot;http://www.datasheetcatalog.org/datasheet/texasinstruments/max232.pdf&quot; rel=&quot;ugc nofollow&quot;&gt;max232&lt;/a&gt;) and then some uC to translate between protocols it is best to use well checked ds9097 adapter with above mentioned digitemp package. note that is you&amp;#039;re &lt;a href=&quot;http://www.debian.org&quot; class=&quot;urlextern&quot; title=&quot;http://www.debian.org&quot; rel=&quot;ugc nofollow&quot;&gt;debian&lt;/a&gt; or &lt;a href=&quot;http://www.ubuntu.com&quot; class=&quot;urlextern&quot; title=&quot;http://www.ubuntu.com&quot; rel=&quot;ugc nofollow&quot;&gt;ubuntu&lt;/a&gt; user you have this package already available in your distro&amp;#039;s repos (&lt;em&gt;apt-get install digitemp&lt;/em&gt;).
&lt;/p&gt;

&lt;p&gt;
here is the electrical view. notice that rs232 is regular 9-pin connector, mail-sided on the computer (i.e. schematic shows how it should look, if you&amp;#039;d solder straight to the PC&amp;#039;s mail connector).
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=blog%3A2011%3A06%3A03%3A1&amp;amp;media=blog:2011:06:03:ds1820_sch.jpg&quot; class=&quot;media&quot; title=&quot;blog:2011:06:03:ds1820_sch.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?media=blog:2011:06:03:ds1820_sch.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;ds1820 connection via ds9097 adapter (original image taken from http://mod-planet.com/modules/subjects/pages/termometr/zdjecie01.jpg)&quot; alt=&quot;ds1820 connection via ds9097 adapter (original image taken from http://mod-planet.com/modules/subjects/pages/termometr/zdjecie01.jpg)&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
notice that you can also connect multiple devices to this bus without need of changing anything. cables are said to work for up to 100 meters&lt;sup&gt;&lt;a href=&quot;#fn__1&quot; id=&quot;fnt__1&quot; class=&quot;fn_top&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;hardware&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;hardware&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;505-1542&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;software&quot;&gt;software&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
using the digitemp software is a bit tricky at first so i&amp;#039;ll spear you searching and give ready-to-go solution. first thing is to determine serial port to use. typically this is /dev/ttyS0 is you&amp;#039;re using raw RS232. in my case i used USB to RS232 adapter, thus  my device was /dev/ttyUSB0. first thing to do is check if the software sees the device(s) connected:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;digitemp_DS9097 -s /dev/ttyUSB0 -q -w&lt;/pre&gt;

&lt;p&gt;
at this moment you should see your device(s) list. now comes the tricky part – save this list along with other configurations to file:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;digitemp_DS9097 -s /dev/ttyUSB0 -q -i&lt;/pre&gt;

&lt;p&gt;
now file ~/.digitemprc has been generated for you. from now on you can query all of the sensors by simply typing:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;digitemp_DS9097 -a&lt;/pre&gt;

&lt;p&gt;
notice that you not need device names any more!
&lt;/p&gt;

&lt;p&gt;
as you can see the tool is made the-unix-way, so it allows easy integration with other scripts and data collection mechanisms. example on-screen monitoring can just run forever displaying measurements every 2 seconds:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;digitemp_DS9097 -a -q -n 0 -d 2&lt;/pre&gt;

&lt;p&gt;
see the command&amp;#039;s manual for more details.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;software&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;software&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;1543-2624&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;final_notes&quot;&gt;final notes&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
looks cool for me. now i think about spreading few such a sensors through my home to monitor temperature in key points (server&amp;#039;s “closet”, room, outdoors, and so on…). integration with data visualization would be nice too. i already use &lt;a href=&quot;http://ganglia.info&quot; class=&quot;urlextern&quot; title=&quot;http://ganglia.info&quot; rel=&quot;ugc nofollow&quot;&gt;ganglia&lt;/a&gt; for load and PC&amp;#039;s temperatures monitoring. why not extend it to house temperatures as well.
&lt;/p&gt;

&lt;p&gt;
recently &lt;a href=&quot;http://www.wcss.pl&quot; class=&quot;urlextern&quot; title=&quot;http://www.wcss.pl&quot; rel=&quot;ugc nofollow&quot;&gt;at my work&lt;/a&gt; i&amp;#039;ve wrote pluin for &lt;a href=&quot;http://www.nagios.org&quot; class=&quot;urlextern&quot; title=&quot;http://www.nagios.org&quot; rel=&quot;ugc nofollow&quot;&gt;nagios&lt;/a&gt; - &lt;abbr title=&quot;Application Programming Interface&quot;&gt;API&lt;/abbr&gt;&amp;#039;s nice. can be an option as well, though ganglia is probably more straight forward solution.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;final notes&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;final_notes&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;2625-&amp;quot;} --&gt;&lt;div class=&quot;footnotes&quot;&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__1&quot; id=&quot;fn__1&quot; class=&quot;fn_bot&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; 
&lt;div class=&quot;content&quot;&gt;i haven&amp;#039;t checked it yet.&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 15 Jun 2021 20:09:34 +0000</pubDate>
        </item>
    </channel>
</rss>
