Dallas 1-Wire BeagleBone Black

Thinking of replacing the dedicated microcontroller that runs my house with a BBB. Being able to read the existing 1-Wire network will be critical. Currently have 12 18B20 sensors on one bus, need more. Can the kernel module described here actually address and read multiple sensors on the same bus? Can it search and retrieve addresses from unknown sensors?

I see people selling 8-port capes, as if maybe this is a simple one device per bus routine… Wouldn’t help me!

As for the “considerations” of long buses, yes there was a learning curve. I have both active pull-up and active pull-down, with careful source-end termination. All cable is CAT-5, and all sensors are within 1m of a single linear topology installation. In several cases the bus goes out one pair of the CAT-5 to a distant sensor and comes back on another pair of the same cable to continue to the next destination. Branching.in a star fashion is death to 1-Wire. My current system works, reliably controlling serious solar hot water and outdoor wood boiler operation that could blow off expensive antifreeze fluid (a huge hassle to recharge) if anything overheated.

Great long-bus reference:
http://www.1wire.org/Files/Articles/1-Wire-Design%20Guide%20v1.0.pdf

I’ve got 3 DS18B20 sensors on my bus at the moment, providing you’ve got the sensors running in non-parasitic mode, I think you’ll be fine.

Can you post a photo of how you have them wired please?

I’ve just posted[1] updated instructions on how to use Dallas 1-wire devices on the Bone. I’m running:

bone$ uname -a
Linux yoder-debian-bone 4.4.21-ti-r47 #1 SMP Fri Sep 23 22:23:02 UTC 2016 armv7l GNU/Linux
bone$ cat /ID.txt
BeagleBoard.org Debian Image 2016-08-28

The instructions show how to deconfigure P9_12 so the 1-wire driver can run on it.

–Mark

[1] http://elinux.org/EBC_Exercise_31_Dallas_1-Wire

HI Mark,

So here: http://elinux.org/EBC_Exercise_31_Dallas_1-Wire#Reading_the_DS12B20

Shouldn’t

The t=24437 is the temperature in C times 1000. Warm up the probe and see what happens to the temp.

Be:

The t=24437 is the temperature in C times .001. Warm up the probe and see what happens to the temp.

?

I do like your courses though. Really easy for someone like me , who has yet had experience with one-wire devices.

{Crawling out of the shadows}

On Wed, 26 Oct 2016 15:20:32 -0700, William Hermans
<yyrkoon@gmail.com> declaimed the following:

HI Mark,

So here: http://elinux.org/EBC_Exercise_31_Dallas_1-Wire#Reading_the_DS12B20

Shouldn't

The *t=24437* is the temperature in C times 1000. Warm up the probe and see

what happens to the temp.

Be:

The *t=24437* is the temperature in C times .001. Warm up the probe and see

what happens to the temp.

  My interpretation would say the original is correct ... For a "real"
temperature of 24.437degC, the device returns 24437... or "C times 1000".

HI Mark,

So here: http://elinux.org/EBC_Exercise_31_Dallas_1-Wire#Reading_the_DS12B20

Shouldn’t

The t=24437 is the temperature in C times 1000. Warm up the probe and see what happens to the temp.

I believe this is stated properly, but could be confusing.

Be:

The t=24437 is the temperature in C times .001. Warm up the probe and see what happens to the temp.

?

Perhaps you mean:
Given t=24437, you can determine the temperature in C by multiplying t by .001. Warm up the probe and see what happens to the temp.

You could also say by dividing by 1000. Mark’s language was right because he was describing how t is derived from the temperature and not the other way around.

So it was a bit unclear, I only teach for a living :->. I’ve fixed it a bit.

This must be an interesting topic. Over 5000 views in this group and 100 views of the eLinux page.

–Mark

Yeah, I guess I read that wrong. Isn’t fixed point fun ?!