1wire temperature sensor infrastructure using off-the-shelf products


  • Contest Winner

    Hardware
    My 1wire sensor network essentially is based on my apartment phone line.
    I have disconnected incoming phone line (who uses wired phones nowdays? 😉 ) and voila! a 1wire network with terminals in suitable places is formed.
    Splitters, and connectors can be bought in your local hardware store (RJ11/RJ12 that is) which also happens to map nicely to the bog-standard 1wire components.
    P_20140426_120543.jpg

    The sensors are bought from m.nu. I went for light and temperature sensors. The light sensors (D2Photo) are a bit more complex and come with a PCB, which suited me fine, because that provided a surface to mount the simpler DS18S20 sensors on. P_20140426_120510.jpg

    With the sensor network up, it was time to interface them to a control unit.
    I already had an Excito B3 miniserver up and running with Debian.
    As it had USB ports, I went for the DS9490R USB 1wire dongle.

    Unfortunately, the pinout of the USB dongle did not map 1 to 1 with the pinout of the 1wire sensor nodes as they ended up with in the sockets. This, I solved with a coupler which I disassembled. I then reconnected the internal wires to match the pinouts.

    Software
    The software parts went smooth. OWFS is an open source project that interfaces with an USB dongle (in my case) to read and write to the 1wire nodes. OWFS provides the nodes (as the name suggests) as a filesystem, which is mounted on the linux host. Thus, all connected sensors to the network gets displayed:

    fallberg@b3:~$ ls /mnt/1wire/
    10.04162A020800  10.83102A020800  10.F01F2A020800  12.85C01C000000  12.D04E22000000  alarm     simultaneous  system
    10.19222A020800  10.BD0E2A020800  12.3FAF20000000  12.87BF1C000000  12.EBD022000000  bus.0     statistics    uncached
    10.82032A020800  10.EF1A2A020800  12.6DD01C000000  12.AF4E22000000  81.CD6930000000  settings  structure
    

    With this in place, temploggerd can be used to monitor the 1wire nodes and store the data in a database (rrd files in this case). temploggerd also provides a web UI to present the data.

    It turned out that the light sensors did not work very well and I have not looked into how they can be tweaked because it was the temperature data I really wanted.

    Results
    I have been running this for over two years now, and it has proven very robust. I do have some emtpy parts in the history, due to the fact that I have not automated the start of the logger daemon at reboot and I sometimes forget to start it.
    The web UI provides quick links for different timespans and custom spans can be obtained as well.
    Single day: all_temperature_day.png
    Week: all_temperature_week.png
    2 years: all_temperature_2year.png

    Project sources (hardware and software)
    Mätteknik för alla (swedish)
    Claes Olsson (swedish)
    Claes Olsson (english)
    Kjell & Company (swedish)
    Excito (swedish)
    Excito (english)
    OWFS (english)
    temploggerd (english)

    Best regards,
    Patrick Fallberg



  • @Anticimex

    Interesting! Please keep informed looking forward to watching this.


  • Contest Winner

    @NotYetRated sure, there will be photos, details on the back end, infrastructure and front end. Everything is kept extremely simple so there are some rough edges, but I have had it logging for about two years now and it has proven quite reliable 😊
    A few "tags" on this is #b3 #owfs #temploggerd


  • Contest Winner

    That sums it up. Questions are welcome!


Log in to reply
 

Suggested Topics

  • 8
  • 7
  • 1
  • 1
  • 2
  • 3

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts