zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Your own weatherstation

April 12, 2011 by Igor Drobot 4 Comments


Create a own weather station or temperature monitoring using a tiny digital temperature sensor.

I use this setup to monitor a server room, and outdoor temperature and as a weather station.

This project consists of interface between RS-232F and the Dallas one Wire system.

You need:
– Some linux skills
– Basic soldering and some electronics skills to find where is plus and minus;)

Components:
1 500mW, 6.2V Zener diode -> D4
1 500mW, 3.9V Zener diode -> D2
2 Schottky diodes or SB130 -> D1 and D3
1 0,25W, 1.5 kOhm resistor -> R1
1 D-sub 9 female connector
1 small piece of perfboard or carton
One or more digital thermometer sensors DS1820 or DS18s20

The complete circuit: – Click to resize

Transistor overview: – Click to resize

The simplest way to control the one wire system is to use Digitemp, I used it on Debian and Ubuntu, installable from repositories:

1
apt-get update && apt-get install digitemp

apt-get update && apt-get install digitemp

Of course you can get it for Windows too, all version are already compiled download and try it out;)

Command usage:
Initialize the wire:

1
digitemp_DS9097 -i -c /etc/digitemp.conf

digitemp_DS9097 -i -c /etc/digitemp.conf

The configuration will be written to: /etc/digitemp.conf

You should get a output like this one:

1
2
3
4
5
6
7
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers
Searching the 1-Wire LAN
107DCD16020800EF : DS1820/DS18S20/DS1920 Temperature Sensor
ROM #0 : 107DCD16020800EF
Wrote /etc/digitemp.conf

DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane GNU Public License v2.0 - http://www.digitemp.com Turning off all DS2409 Couplers Searching the 1-Wire LAN 107DCD16020800EF : DS1820/DS18S20/DS1920 Temperature Sensor ROM #0 : 107DCD16020800EF Wrote /etc/digitemp.conf

Receive data from sensor:

1
2
3
4
digitemp_DS9097 -c /etc/digitemp.conf -a
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Sensor 0: 23.38

digitemp_DS9097 -c /etc/digitemp.conf -a DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane GNU Public License v2.0 - http://www.digitemp.com Sensor 0: 23.38

Great it’s: 23.38°

Some photos: – Click to resize

The next step could be a plugin for Nagios or Icinga to monitor the status and receive notifications.

Have you some wishes or questions? let me know:)

Filed Under: Bash, Debian, DIY, Fun, Linux Tagged With: 1.5 kOhm resistor, 3.9V Zener diode, 6.2V Zener diode, digitemp, DS1820, DS18s20, RS-232

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Comments

  1. zeldor says

    December 31, 2013 at 18:32

    Should work too.

  2. T says

    December 30, 2013 at 12:29

    Can i use 40V Schottky diodes ?

  3. zeldor says

    November 25, 2012 at 21:55

    Please visit http://www.digitemp.com for more information. Its a program to read serial port with one wire sensor. You will find some downloads for Windows

  4. NS says

    November 24, 2012 at 22:31

    Hi
    Great article, I have a question please. I don’t use Linux but do write code in Windows C#, can I just read e.g COM1 , or do I need some other libraries, not sure I understand the digitemp.conf part of you article. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok