j1wire

(last updated: 2005/08/01)

Purpose

: Provides a PC interface program for capturing and displaying data from Dallas 1wire sensors.

Overview

Dallas Semiconductor (now part of Maxim) makes semiconductor sensor devices that provide a digital communication interface called the 1wire (OneWire) protocol. J1wire is a Java application that collects data from these sensors. The PC that runs j1wire must be connected to a 1wire adapter, a device that acts as a bridge between the PC's serial or USB port and the 1wire bus.

The data can be saved to a file, either in its raw form, or it can be exported to human readable comma delimited format. The main intent of this project is to provide a simple interface to the 1wire sensors and also as a learning exercise. j1wire is not a robust program so it may contain bugs that were not found during the minimal testing that was performed (there are no known bugs).

See the User Guide for more information.

Highlights of the Java application:

- Collects data from A/D converter (DS2450), temperature sensors (DS18S20, DS1920), and PIO (DS2405, DS2406)

- Loads and displays a preexisting image for the graph.

- Plots (draws) lines on the image that represent the collected data.

- Plotting is animated by updating the image as new data is captured (uses double-buffering for image rendering – BufferedImage class).

- Interfaces to the 1wire hardware adapter using the 1wire Java API

- Shows how to bring up a configuration dialog box.

- Shows how to use a JScrollBar, JMenuBar, and JToolBar

- Shows how to create a right-click pop-up menu.

- Lots of swing components.

- File saving and loading.

- Captures the plot image and saves to jpg file.

- Shows how to use the Properties class to keep track of configuration.

- Plots up to four analog items and four digital inputs.

- Analog items can be any of the 4-channel A/D device or temperature sensors.

- JBuilder 2005 project.

- jdi194 project used as the base for this design.

- Not related to Ted Kosan’s j1wire, “Introduction to Java, 1-Wire device programming and TINI”.

My Setup:

- PC running Jbuilder 2005 Foundation with j1wire project

- DS9097U adapter

- DS2450, DS18S20 (2), DS2405 (2), DS2406 (2)

Downloads (see Attachments)

j1wire - Source code + JBuilder project + User Guide.

Terms of Use

Home

Copyright Steven R. Nickels, 2008. All rights reserved.