OW-Demo for DS18B20
KenFordham
Posts: 12
Does anyone know if this object will work correctly for a DS18B20?
I was able to get the OW-SearchDemo to recognize it by adding the line to the PUB Main code as noted below:
$01: term.str(@ds2401_name)
'$05: term.str(@ds2405_name)
$10: term.str(@ds1820_name)
$22: term.str(@ds1822_name)
$28: term.str(@ds18B20_name) 'added this line
other: term.str(@unknown_name)
And I added the one line as noted below:
DAT
ds2401_name byte "DS2401 ", 0
ds2405_name byte "DS2405 ", 0
ds1820_name byte "DS1820 ", 0
ds1822_name byte "DS1822 ", 0
ds18B20_name byte "DS18B20 ", 0 'Added this line
unknown_name byte "Unknown ", 0
However, when running OW-Demo, it constantly reports a temperature of 85 C and 185 F no matter what. Has anyone else experienced this problem?
The 18B20 is connected to Pin 15 (yes, I changed OW_DATA to 15) in the parasitic power mode. GND and Vdd on the 18B20 are connected to Vss on the Propeller Proto board. DQ on the 18B20 is connected to P15 which is also connected to Vdd on the Proto board through a 4.7K resistor.
I was able to get the OW-SearchDemo to recognize it by adding the line to the PUB Main code as noted below:
$01: term.str(@ds2401_name)
'$05: term.str(@ds2405_name)
$10: term.str(@ds1820_name)
$22: term.str(@ds1822_name)
$28: term.str(@ds18B20_name) 'added this line
other: term.str(@unknown_name)
And I added the one line as noted below:
DAT
ds2401_name byte "DS2401 ", 0
ds2405_name byte "DS2405 ", 0
ds1820_name byte "DS1820 ", 0
ds1822_name byte "DS1822 ", 0
ds18B20_name byte "DS18B20 ", 0 'Added this line
unknown_name byte "Unknown ", 0
However, when running OW-Demo, it constantly reports a temperature of 85 C and 185 F no matter what. Has anyone else experienced this problem?
The 18B20 is connected to Pin 15 (yes, I changed OW_DATA to 15) in the parasitic power mode. GND and Vdd on the 18B20 are connected to Vss on the Propeller Proto board. DQ on the 18B20 is connected to P15 which is also connected to Vdd on the Proto board through a 4.7K resistor.
Comments
Includes full CRC checking of the communications and extended precision output on top of the standard 9 bit output.
It's also non-blocking, so you start the conversion and then poll for completion.
It detects the power method (3 wire or Parasite) and adjusts the conversion completion accordingly.
However, its only built for a single sensor on a pin. Could be modified otherwise I guess, but I did not need it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
Ken