Edit – I spent the day making sure I have the DS18b20 circuit right. Pretty sure I have it. Have used these before. This is a log report from the April reading 2 thermistors (sense pins 2/8 and anything present on UART57), device #/count on UART57 varies as I plug/unplug individual maxim chips from the 1-wire bus (breadboard)…but device log always lists all UART devices as all same temp and serial number, yet with differing “device id”. I would post the code for reading the ds18b20’s but, to spare you, it’s the same code as in the tutorial (“multiple devices” code, see link in post below). I did add the sleep every minute part, and some code to send to xively by device id, but that’s about it.
2014-05-10 23:50:02 UTC-4 [Device] -----START of Code----------------------------------------------------
2014-05-10 23:50:02 UTC-4 [Device] SSID:netgear432 MAC Address:0c2a69000a72 BSSID:d850e6af798c
2014-05-10 23:50:02 UTC-4 [Device] Power Save:true Wake Interval:1(mins) Unique ID:23625f4cead3dbee
2014-05-10 23:50:02 UTC-4 [Device] Signal Strength: -72dBm (4 bars - Comment: Wow, Not Bad at All)
2014-05-10 23:50:02 UTC-4 [Device] firmware: af0f28a - release-27.10 - Fri Dec 13 11:08:38 2013
2014-05-10 23:50:03 UTC-4 [Device] UART57 Device: 01 Family: 28 Serial: 000005440bf0 Temp: 72.95
2014-05-10 23:50:03 UTC-4 [Device] UART57 Device: 02 Family: 28 Serial: 000005440bf0 Temp: 72.95
2014-05-10 23:50:03 UTC-4 [Device] UART57 Device: 03 Family: 28 Serial: 000005440bf0 Temp: 72.95
2014-05-10 23:50:03 UTC-4 [Device] UART57 Device: 04 Family: 28 Serial: 000005440bf0 Temp: 72.95
2014-05-10 23:50:03 UTC-4 [Device] Thermistor (Sense Pin 2) Temp (F):73.62
2014-05-10 23:50:03 UTC-4 [Device] Thermistor (Sense Pin 8) Temp (F):73.25
2014-05-10 23:50:03 UTC-4 [Device] sleeping until 1399780261000
2014-05-10 23:50:03 UTC-4 [Status] Device disconnected; 1600 bytes sent, 0 received, 1600 total
2014-05-10 23:50:03 UTC-4 [Agent] maximtemp_0 Posted to Xively:72.95, return code:200, msg:
2014-05-10 23:50:04 UTC-4 [Agent] maximtemp_1 Posted to Xively:72.95, return code:200, msg:
2014-05-10 23:50:04 UTC-4 [Agent] maximtemp_2 Posted to Xively:72.95, return code:200, msg:
2014-05-10 23:50:05 UTC-4 [Agent] maximtemp_3 Posted to Xively:72.95, return code:200, msg:
2014-05-10 23:50:05 UTC-4 [Agent] Thermistor_Pin2 Posted to Xively:73.62, return code:200, msg:
2014-05-10 23:50:05 UTC-4 [Agent] Thermistor_Pin8 Posted to Xively:73.25, return code:200, msg:
I want to thank @smittytone @theo and anyone else responsible for the recent 1-wire tutorial placed at the Dev Center.
http://forums.electricimp.com/discussion/2547/1-wire-on-the-imp#Item_2
I was up and reading DS18B20’s in no time. It was amazing.
However, I’m having trouble with the “Multiple Devices” code. I think the BUS recognizes when I have multiple devices plugged-in, but posts them in the log as the same serial number and temp. See attached picture. Could it be I’m not understanding how to wire multiple devices on the breadboard? I can post how I’m wiring this if it helps?
Anyway, I guess my question is if any one else has had luck with the multiple devices code (and reading multiple DS18B20’s) in the tutorial? If so, that would confirm that the problem is on my end…and that I need to think a little harder about this circuit (and understand it better).