1DS2438(3) One-Wire File System DS2438(3)
2
3
4
6 DS2438 - Smart Battery Monitor
7
9 Temperature Voltages and Current.
10 26 [.]XXXXXXXXXXXX[XX][/[ CA | EE | date | disconnect/date | discon‐
11 nect/udate | endcharge/date | endcharge/udate | IAD | offset |
12 pages/page.[0-7|ALL] | temperature | latesttemp | udate | VAD | VDD |
13 vis | address | crc8 | id | locator | r_address | r_id | r_locator |
14 type ]]
15
16 Humidity sensor
17 26 [.]XXXXXXXXXXXX[XX][/[ HIH4000/humidity | HIH5030/humidity |
18 HTM1735/humidity | DATANAB/reset | DATANAB/humidity | humidity | tem‐
19 perature ]]
20
21 Barometer
22 26 [.]XXXXXXXXXXXX[XX][/[ B1-R1-A/pressure | B1-R1-A/gain |
23 B1-R1-A/offset | ]]
24
25 Light
26 26 [.]XXXXXXXXXXXX[XX][/[ S3-R1-A/current | S3-R1-A/illuminance |
27 S3-R1-A/gain ]]
28
30 26
31
33 pages/page.0 ... pages/page.7 pages/page.ALL
34 read-write, binary
35 Memory is split into 8 pages of 8 bytes each. Only the pages 3-7 are
36 really available, and some of that appears to be reserved. See the
37 datasheet for details.
38 ALL is an aggregate of the pages. Each page is accessed sequentially.
39
40 temperature
41 read-only, floating point
42 Temperature read by the chip at high resolution (~13 bits). Units are
43 selected from the invoking command line. See owfs(1) or owhttpd(1) for
44 choices. Default is Celsius. Conversion takes ~20 msec.
45
46 latesttemp
47 read-only, floating point
48 Latest measured temperature. Reading this node will never trigger a
49 temperature conversion. Intended for use in conjunction with /simulta‐
50 neous/temperature.
51
52 VAD VDD
53 read-only, floating point
54 Voltage read (~10 bits) at the one of the chip's two supply voltages.
55 Range VDD= 2.4V to 10V, VAD=1.5 to 10V.
56
57 vis
58 read-only, floating point
59 Current sensor reading, as a voltage difference. Value is in volts.
60 Actual current depends on Rsens resistor (see datasheet).
61 The formula for current is I = vis / Rsens
62 with units in Amps and Ohms.
63 Current measurement will be temporarily enabled (see Ienable ) if not
64 currently enabled (pun intended) for this reading.
65
67 CA
68 read-write, yes-no
69 Current Accumulator Configuration flag bit. If "on" (1) current is
70 stored in page 7 bytes 4-7. If "off" (0) that page can be used for gen‐
71 eral storage. See the datasheet for more information.
72
73 EE
74 read-write, yes-no
75 Current Accumulator Shadow flag bit. If "on" (1) current reading is
76 stored to EEPROM. If "off" (0) that data will be lost when chip loses
77 power. See the datasheet for more information
78
79 IAD
80 read-write, yes-no
81 Current A/D Control flag bit. If "on" (1) current measured at 36.41 Hz.
82 If "off" (0) current measurements won't be made. See the datasheet for
83 more information.
84
86 date
87 read-write, ascii
88 26 character date representation of the counter value. Increments once
89 per second.
90 Setting date to a null string will put the current system time.
91 Accepted date formats are:
92 Sat[urday] March 12 12:23:59 2001
93 Apr[il] 4 9:34:56 2002
94 3/23/04 23:34:57
95 current locale setting (your system's format)
96
97 disconnect/date
98 read-write, ascii
99 26 character date representation of the disconnect/udate value. Time
100 when the battery pack waws removed from the charger. Format is the same
101 as the date property.
102
103 disconnect/udate
104 read-write, unsigned integer
105 Representation of disconnect/date as a number. See udate for details.
106
107 endcharge/date
108 read-write, ascii
109 26 character date representation of the endcharge/udate value. Format
110 is the same as the date property.
111
112 endcharge/udate
113 read-write, unsigned integer
114 Representation of endcharge/date as a number. See udate for details.
115
116 udate
117 read-write, unsigned integer
118 Time represented as a number. udate increments once per second.
119 Usually set to unix time standard: number of seconds since Jan 1, 1970.
120 The date field will be the unix representation (ascii text) of udate
121 and setting either will change the other.
122
124 HIH4000/humidity
125 read-only, floating point
126 Relative humidity, as percent (1-100 scale).
127 This value is for a design based on Honeywell's HIH-4000 humidity sen‐
128 sor.
129
130 HIH5030/humidity
131 read-only, floating point
132 Relative humidity, as percent (1-100 scale).
133 This value is for a design based on Honeywell's HIH-5030/5031 humidity
134 sensor.
135
136 HTM1735/humidity
137 read-only, floating point
138 Relative humidity, as percent (1-100 scale).
139 This value is for a design based on Humirel's HTM-1735 humidity sensor.
140
141 DATANAB/humidity
142 read-only, floating point
143 Based on DataNAB's humidity sensor. It uses a HIH-4000 sensor and the
144 current sensning rather than voltage readings from the DS2438. Calibra‐
145 tion values are stored on chip, and a check field is stored in chip
146 memory.
147
148 DATANAB/reset
149 write-only, yes-no
150 Used to read calibration values and set the chip to current reading
151 more. Should be automatically called when a humidity reading is
152 requested.
153
154 humidity
155 read-only, floating point
156 Relative humidity, as percent (1-100 scale).
157 The DS2438 actually does not read humidity, but a widely available and
158 publicised circuit based on the chip, does. This design is for the com‐
159 mon Honeywell HIH-3610 humidity chip. The mostly compatible HIH-4000
160 chip uses different temperature compensation, so is better read from
161 the HIH4000/humidity value. See the datasheets for details.
162 If the chip is instead a DATANAB design, the DATANAB/humidity value
163 will be automatically used.
164
166 B1-R1-A/pressure
167 read-only, floating point
168 Pressure reading, as milli-bars, or other unit depending on set‐
169 tings/units/pressure_scale.
170 This value is for the B1-R1-A barometer from Hobby-Boards, and assumes
171 the standard calibration.
172
173 B1-R1-A/gain
174 read/write, floating point
175 Calibration of pressure gain, as signed number, expressed as the same
176 units as B1-R1-A/pressure per volt.
177 This value will be multiplied with the measured voltage to get the
178 B1-R1-A/pressure reading. It may have to be fine tuned for calibration
179 purposes, although with the standard sensor, it will often be good
180 enough to keep it as is.
181
182 B1-R1-A/offset
183 read/write, floating point
184 Calibration of pressure offset, as signed number, same units as
185 B1-R1-A/pressure.
186 This value will be added to the B1-R1-A/pressure reading. The default
187 value is 904.7 millibars, which may be altered to to compensate for
188 elevation.
189
191 S3-R1-A/current
192 read-only, floating point
193 Photo-diode current, in micro-amperes.
194 This value is for the S3-R1-A solar radiation sensor from Hobby-Boards.
195 Due to noise and offsets, this value may read as a negative number in
196 low light conditions. The offset register can be modified to reduce
197 the offset as much as possible.
198
199 S3-R1-A/illumination
200 read-only, floating point
201 Illumination, in lux. Always a positive number.
202 This value is the lux reading from the solar sensor, taking
203 S3-R1-A/gain into consideration.
204
205 S3-R1-A/gain
206 read/write, floating point
207 Calibration of photo-diode gain expressed as lux per micro-amperes.
208 The default value is for the SFH203P photo-diode from Osram, used bare.
209 A different gain may be used for instance to compensate for an inte‐
210 grathing, white sphere placed over the diode.
211 This value is for the S3-R1-A solar radiation sensor from Hobby-Boards,
212 using the SFH203P photo-diode from Osram.
213
215 MultiSensor/type
216 read-only, ascii
217 For iButtonLink's MultiSensor line of 1-wire devices, give the specific
218 configuration based on a data byte set in memory. (Byte 0 of page 3).
219 This can help interpretation of the sensor values, distinguishing, cur‐
220 rent from water from light.
221
222 offset
223 read-write, integer
224 Correction for current readings. A value between -256 and 255. See the
225 datasheet for details. Should be set to the negative of a true zero
226 current reading.
227
229 address
230 r_address
231 read-only, ascii
232 The entire 64-bit unique ID. Given as upper case hexidecimal digits
233 (0-9A-F).
234 address starts with the family code
235 r address is the address in reverse order, which is often used in other
236 applications and labeling.
237
238 crc8
239 read-only, ascii
240 The 8-bit error correction portion. Uses cyclic redundancy check. Com‐
241 puted from the preceding 56 bits of the unique ID number. Given as
242 upper case hexadecimal digits (0-9A-F).
243
244 family
245 read-only, ascii
246 The 8-bit family code. Unique to each type of device. Given as upper
247 case hexadecimal digits (0-9A-F).
248
249 id
250 r_id
251 read-only, ascii
252 The 48-bit middle portion of the unique ID number. Does not include the
253 family code or CRC. Given as upper case hexadecimal digits (0-9A-F).
254 r id is the id in reverse order, which is often used in other applica‐
255 tions and labeling.
256
257 locator
258 r_locator
259 read-only, ascii
260 Uses an extension of the 1-wire design from iButtonLink company that
261 associated 1-wire physical connections with a unique 1-wire code. If
262 the connection is behind a Link Locator the locator will show a unique
263 8-byte number (16 character hexadecimal) starting with family code FE.
264 If no Link Locator is between the device and the master, the locator
265 field will be all FF.
266 r locator is the locator in reverse order.
267
268 present (DEPRECATED)
269 read-only, yes-no
270 Is the device currently present on the 1-wire bus?
271
272 type
273 read-only, ascii
274 Part name assigned by Dallas Semi. E.g. DS2401 Alternative packaging
275 (iButton vs chip) will not be distiguished.
276
278 None.
279
281 1-Wire
282 1-wire is a wiring protocol and series of devices designed and manufac‐
283 tured by Dallas Semiconductor, Inc. The bus is a low-power low-speed
284 low-connector scheme where the data line can also provide power.
285
286 Each device is uniquely and unalterably numbered during manufacture.
287 There are a wide variety of devices, including memory, sensors (humid‐
288 ity, temperature, voltage, contact, current), switches, timers and data
289 loggers. More complex devices (like thermocouple sensors) can be built
290 with these basic devices. There are also 1-wire devices that have
291 encryption included.
292
293 The 1-wire scheme uses a single bus master and multiple slaves on the
294 same wire. The bus master initiates all communication. The slaves can
295 be individually discovered and addressed using their unique ID.
296
297 Bus masters come in a variety of configurations including serial, par‐
298 allel, i2c, network or USB adapters.
299
300 OWFS design
301 OWFS is a suite of programs that designed to make the 1-wire bus and
302 its devices easily accessible. The underlying principle is to create a
303 virtual filesystem, with the unique ID being the directory, and the
304 individual properties of the device are represented as simple files
305 that can be read and written.
306
307 Details of the individual slave or master design are hidden behind a
308 consistent interface. The goal is to provide an easy set of tools for a
309 software designer to create monitoring or control applications. There
310 are some performance enhancements in the implementation, including data
311 caching, parallel access to bus masters, and aggregation of device com‐
312 munication. Still the fundamental goal has been ease of use, flexibil‐
313 ity and correctness rather than speed.
314
315 DS2438
316 The DS2438 (3) is a more complete form of the DS2436 battery chip. Cur‐
317 rent sensing is available, but not implemented. The major advantage
318 compared to the DS2436 is that two voltages can be read, allowing one
319 to correct circuit measurements for supply voltage and temperature. A
320 better comparison is the DS276x family of chips.
321
323 All 1-wire devices are factory assigned a unique 64-bit address. This
324 address is of the form:
325
326 Family Code
327 8 bits
328
329 Address
330 48 bits
331
332 CRC 8 bits
333
334 Addressing under OWFS is in hexadecimal, of form:
335
336 01.123456789ABC
337
338 where 01 is an example 8-bit family code, and 12345678ABC is an example
339 48 bit address.
340
341 The dot is optional, and the CRC code can included. If included, it
342 must be correct.
343
345 http://pdfserv.maxim-ic.com/en/ds/DS2438.pdf
346 http://pdfserv.maxim-ic.com/en/an/humsensor.pdf
347 http://goo.gl/o9DH0 (Redirects to 009012_2.pdf PDF file on honey‐
348 well.com website)
349 http://www.phanderson.com/hih-4000.pdf
350 http://www.humirel.com/product/fichier/HTM1735%20RevG%20.pdf
351
353 Programs
354 owfs (1) owhttpd (1) owftpd (1) owserver (1) owdir (1) owread (1)
355 owwrite (1) owpresent (1) owtap (1)
356
357 Configuration and testing
358 owfs (5) owtap (1) owmon (1)
359
360 Language bindings
361 owtcl (3) owperl (3) owcapi (3)
362
363 Clocks
364 DS1427 (3) DS1904 (3) DS1994 (3) DS2404 (3) DS2404S (3) DS2415 (3)
365 DS2417 (3)
366
367 ID
368 DS2401 (3) DS2411 (3) DS1990A (3)
369
370 Memory
371 DS1982 (3) DS1985 (3) DS1986 (3) DS1991 (3) DS1992 (3) DS1993 (3)
372 DS1995 (3) DS1996 (3) DS2430A (3) DS2431 (3) DS2433 (3) DS2502 (3)
373 DS2506 (3) DS28E04 (3) DS28EC20 (3)
374
375 Switches
376 DS2405 (3) DS2406 (3) DS2408 (3) DS2409 (3) DS2413 (3) DS28EA00 (3)
377
378 Temperature
379 DS1822 (3) DS1825 (3) DS1820 (3) DS18B20 (3) DS18S20 (3) DS1920 (3)
380 DS1921 (3) DS1821 (3) DS28EA00 (3) DS28E04 (3) EDS0064 (3) EDS0065 (3)
381 EDS0066 (3) EDS0067 (3) EDS0068 (3) EDS0071 (3) EDS0072 (3) MAX31826
382 [1m(3)
383
384 Humidity
385 DS1922 (3) DS2438 (3) EDS0065 (3) EDS0068 (3)
386
387 Voltage
388 DS2450 (3)
389
390 Resistance
391 DS2890 (3)
392
393 Multifunction (current, voltage, temperature)
394 DS2436 (3) DS2437 (3) DS2438 (3) DS2751 (3) DS2755 (3) DS2756 (3)
395 DS2760 (3) DS2770 (3) DS2780 (3) DS2781 (3) DS2788 (3) DS2784 (3)
396
397 Counter
398 DS2423 (3)
399
400 LCD Screen
401 LCD (3) DS2408 (3)
402
403 Crypto
404 DS1977 (3)
405
406 Pressure
407 DS2406 (3) TAI8570 (3) EDS0066 (3) EDS0068 (3)
408
409 Moisture
410 EEEF (3) DS2438 (3)
411
413 http://www.owfs.org
414
416 Paul Alfille (paul.alfille@gmail.com) Egil Kvaleberg
417
418
419
420OWFS Manpage 2003 DS2438(3)