http://code.google.com/p/mikrowerk/wiki/USBTemp

Project Logo
                
Search Search within:  All wiki pages  Featured pages  Current pages  Deprecated pages for

Updated Feb 04, 2010 by dalheimer
USBTemp  

USBTemp measures the temperature and connects via USB to your computer.

Introduction

USBTemp provides a thermometer. It is based on the DS18S20 digital thermometers. In addition, the thermometer connects to an USB port - you can read the temperature using a commandline tool. In combination with RRDTool you can easily create temperature graphs:

This is a live graph of the temperature in Kaiserslautern, Germany - at least if my server at home is up and running. I describe my setup at home here: USBTemp: Continuous Temperature Monitoring.

Features

At this time, USBTemp provides these features:

Download

The current version can be downloaded from the "Download" page. The tarball contains the firmware, the host software and the schematic.

Hardware

The hardware consists of an ATMega168, the DS18S20 temperature sensors and some support elements. It is described on the USBTempHardware page.

Software

The host software uses libusb to connect to the hardware. You can query the device for available temperature sensors:

$ ./usbtemp sensors
2 sensor(s) found, querying
sensor 0: ID 9F17A5010800 type: (DS18S20)
sensor 1: ID B46865010800 type: (DS18S20)

The IDs are the actual unique hardware IDs of the DS18S20 sensors. Afterwards you can use the ID to query a sensor:

/usbtemp temp B46865010800
searching sensor with id B46865010800 - using sensor handle 1
reading sensor 1 C): +1.1875

If you want to use the raw temperature value in a script, simply discard stderr:

$ ./usbtemp temp B46865010800 2>/dev/null
+1.0000

The host software only depends on libusb and has been tested on Linux and Mac systems. With libusb-win32 it should be possible to compile it on Windows as well - but this is currently untested.

Building the software

TODO.

Credits

The microcontroller firmware uses several libraries:


Comment by josheeg, Aug 11, 2009

so did you get the mega168 working? Would the new arduino mega3xx work it is similar to the 168? If so is it a usb keyboard? that would be easy to get keys in c. What speed logging? I have a 24 bit adc at 10ksps



Reply via email to