Go Down

Topic: Noob with 18S20 Weirdness (Read 1 time) previous topic - next topic

Mingy

Hello and thanks for your patience. I an new to Arduino, but I did digital design and micro controller apps for over a decade ending about 15 years ago. I know c cold, but c++ is a 'work in process' at the moment.

I am trying to build a home monitoring system. I successfully downloaded and ran applications for a DHT22, and now I'm trying ot do the same for an 18S20. I have pretty much used the various application examples such as the Arduino Onewire library and the library for Dallas Temperature ICs. In the Dallas Library it says "DS18S20 - Please note there appears to be an issue with this series." but it doesn't say what that issue may be or how it presents itself.

Besides redefining the I/O pin, I added a couple lines of code to trace. This is what I get from the code

Dallas Temperature IC Control Library Demo
Locating devices...Found 1 devices.
Parasite power is: ON
Device 0 Address: 10CFDFDB01080039    Device 0 Addr[0] 10
Device 0 Resolution: 9
Requesting temperatures...DONE
Temp C: 85.00 Temp F: 185.00


The first bit of weirdness if that I have wired the device not to use Parasite Power, but it is reporting that it is using parasite power. Whether I wire it as parasitic or not and whether I 'force' the code to not use the parasite power, the reported temperature is always 85.00/185.00 (its about 25/80) in my room.

The fact the device reports an address is encouraging as it shows its not dead.

Are there any suggestions? Does anybody know what the 18S20 'issues' are?

Thanks

Mingy

Just in case anybody else comes looking, I found in another Arduino forum that the 81S20 wants a delay (used 750 mSec) between issuing the read temp command and reading it back.

I don't know why it thinks its in parasitic mode (I'm working on it) but I can now read the correct temperature.

:)

Mingy

I don't see I can edit the prior post, but the root problem comes from the fact the example sketch calls

sensors.requestTemperatures(); // Send the command to get temperatures

instead of

sensors.requestTemperaturesByAddress(insideThermometer); // Send the command to get temperatures

the 'by address' call looks at the LSB of the device address, recognizes the device as an 18S20 and inserts a 750mS delay. The sensors.requestTemperatures(); call does not do such a check as it looks at the device resolution (9 bits) and uses a 94 mSec delay

Still working on the power state misread - though it does not seem to affect the operation of the device.


nayma

Hi Mingi, last week I got to work 2 of these sensors in a single pin. I used the one wire library. I founded a post where they first searched for the unique code of each one and then with another code I could read each sensor independently.

Mingy

nayma

That's great! I only picked up one at the store, but I did get a similar Temperature/Humidity sensor. I figured once I got it to work I'd go buy some more, but then I broke my leg and I'm stuck in wheel chair for a few weeks at least :(

What type of project are you working on?

A few years ago I built a house with hydronic heating (hot water in the floor) and I want to accomplish a few things with my project:
1) Remotely monitor/alarm room temperatures and the function of the geothermal system
2) Better control the 'zoning' so I don't waste energy over heating rooms.

I figure an Arduino with an Ethernet shield, some temperature sensors, and an I/O board (opto triacs and opto isolators) should do it.



Go Up