1-wire and humidity


I read 1wire sensors “DS18S20Z+” temperatur and all works fine.

But now I need to read the “DS2438” with the “HIH-5030” for humidity.

The beagle found the 1-wire sensor … but the temperatur from the “DS18S20Z+” I can read with:
cat /sys/devices/w1_bus_master1/28-00000bef6cc1/w1_slave

but with the “DS2438” I has no w1_slave file … how can I read the humidity?

Thank you!

1) According to the spec sheet, the Dallas Semi/Maxim DS2438 does NOT
have humidity sensing (it appears to have temperature, voltage, and current
sensors for battery packs). So you will NEVER actually read humidity using
a DS2438.
  http://rants.dyer.com.hk/rpi/humidity_1w.html appears to rely on using
a DS2438 input to act as an ADC -- needed as the R-Pi does not have native
ADC inputs.

  2) The Honeywell HIH-5030 is a completely different chip, using a
completely different protocol. Based upon the spec sheet
, this chip emits an ANALOG VOLTAGE proportional to the measured humidity.

  So reading the HIH-5030 requires configuring an ADC input -- WARNING:
Beaglebone ADC inputs are limited to 1.8V! The spec sheet shows voltages
based on 3.3V -- you will need to implement a level shifter/voltage divider
to convert the chip's 3.3V output to a 1.8V peak.

  Then, when reading the ADC, you will have to map the digital sample
back into the equation of humidity vs voltage. Note that this conversion is
temperature dependent (the voltage for a given humidity differs based upon
temperature) so you'll likely need to build interpolation tables that take
into account a temperature reading.

  3) Getting a DS2438, itself, to appear requires having a compatible
kernel module loaded. http://rants.dyer.com.hk/rpi/1wire2019.html is,
again, R-Pi based, but specifies a w1-ds2438 kernel module. You'll have to
see if that is available on the Beagle.

Based upon:

debian@beaglebone:~$ apt search ds2438
Sorting... Done
Full Text Search... Done

the module is NOT available as such for Beaglebone.

http://klaus.ede.hih.au.dk/index.php/BBB_and_OneWire implies that one has
to define a device tree overlay for the sensor (in this case it was a

  I haven't located a native one-wire device tree in the Beagle -- what
did you have to do to get the 18S20 to show up?

https://github.com/beagleboard/linux/issues/142 implies that
/lib/firmware/BB-W1-P9.12-00A0.dtbo is the only predefined one-wire device

Hello Dennis,

yes, the DS2438 is a analog input. I made a PCB with all components. Based on this:


I hope this is working. The Beaglebone detect the “DS18S20Z+” and the “DS2438”.
And of course I have to calculate the humidity from the anlog input.

But the “DS2438” should have a temp sensor and anlog input … but how I get this info?

I use this devicetree:



I read now, that the rw is to read? This is possible with my sensor, but the output was not ASCII

Have you read
(Look at page 23 for a command sequence for temp and ADC read -- NOTE: that
page assumes only one DS device is on the bus since it uses the SKIP ROM
command; if you have more than one device on the bus, you'll need to send
the correct MATCH ROM command for the desired device)

  The rest of the document shows the format for the binary data you get
out of the registers. {In comparison to the 18B20, the temperature
resolution is different, so the hex representation is shifted leftward]