Categories: BeagleBone Black : GPIO : Software :

Re: Dallas 1-Wire BeagleBone Black

Showing 1-13 of 13 messages
Re: Dallas 1-Wire BeagleBone Black pe...@icecavern.com 5/29/13 4:34 AM
Yes I'm also interesting in this.

dmesg | grep w1 doesn't show anything so I'm guessing it's not compiled into the kernel. I'm working on finding out why but this is my first venture into linux so it's slow going learning where everything is.



On Wednesday, May 1, 2013 9:21:39 PM UTC+1, J.J. Boyd wrote:
I am attempting to get the Dallas ds18b20 going on the BeagleBone Black and I can't seem to get this going. I am assuming this is due to the fact the emmc is on the same pin this w1 driver was originally compiled for.  I do not currently have the skills to move this w1 driver to another pin unless someone helps me :) I would enjoy learning how to cross compile the kernel after changing the gpio pin. Thanks in advance for any advice on this matter. 
Re: Dallas 1-Wire BeagleBone Black J.J. Boyd 6/17/13 7:56 AM
Thanks! This worked like a charm! I too found it necessary to use use bone_capemgr.9


On Wednesday, May 29, 2013 8:35:29 AM UTC-4, cwrse...@gmail.com wrote:


On Wednesday, May 1, 2013 9:21:39 PM UTC+1, J.J. Boyd wrote:
I am attempting to get the Dallas ds18b20 going on the BeagleBone Black and I can't seem to get this going. I am assuming this is due to the fact the emmc is on the same pin this w1 driver was originally compiled for.  I do not currently have the skills to move this w1 driver to another pin unless someone helps me :) I would enjoy learning how to cross compile the kernel after changing the gpio pin. Thanks in advance for any advice on this matter.
 
This works with the release version of Angstrom.  You have to reload
the capemanager after every boot, unless you decompile, update and
recompile the arm device tree used on boot - I've forgotten the name.

The data pin is 8_11 - you need the full three wire bus with a 4.7K
pullup to get a reading.  And don't do as I did, and plug the power
line into the P9 5v supply by mistake.

The dts file is:

/*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
/plugin/;

/ {
   compatible = "ti,beaglebone", "ti,beaglebone-black";
   part-number = "BBB-W1";
   version = "00A0";

   fragment@0 {
       target = <&am33xx_pinmux>;
       __overlay__ {
            w1_pins: pinmux_w1_pins {
                pinctrl-single,pins = <
                    0x34 0x37     /* gpmc_ad13.gpio1_13, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE7 - w1-gpio */
                >;
            };
       };
   };

   fragment@1 {
       target = <&ocp>;
       __overlay__ {
           onewire@0 {
               compatible      = "w1-gpio";
               pinctrl-names   = "default";
               pinctrl-0       = <&w1_pins>;
               status          = "okay";

               gpios = <&gpio2 13 0>;
           };
       };
   };
};


The build script is:

#!/bin/bash
# Build the one-wire dtb file.
dtc -O dtb -o w1-00A0.dtbo -b 0 -@ w1.dts
# Copy dtbo file into /lib/firmware

The install script is:

#!/bin/bash
# Initialise one wire (may use bone_capemgr.9)
echo w1 >/sys/devices/bone_capemgr.8/slots

Will

Re: Dallas 1-Wire BeagleBone Black Stephen Johnson 7/18/13 10:30 AM
I'm glad to have found this post as I literally just broke out my breadboard and noticed the DS1820 on it.  Having just received by BeagleBone Black last week, I was thinking about connecting it to a gpio...  So I'm glad that I searched here first and hopefully headed off some difficulties.

I was thinking that I'd be writing a driver for the 1-wire ... but it's nice to know one already exists.
Re: Dallas 1-Wire BeagleBone Black John Laurence Poole 8/11/13 3:55 AM
If you are considering something beyond just a breadboard, like putting temperature monitors all over your house, you will have consider a host a consideration that are introduced when you have long lines and more than one sensor on the wire. A must read: http://www.1wire.org/Files/Articles/1-Wire-Design%20Guide%20v1.0.pdf 

In theory 1-wire lets you have several sensors on a bus line, but after you read or skim the Wire Design Guide you'll see there are several restrictions on possible network topologies.  The complexity about 1-wire design for anything beyond 10 feet quickly makes it a very expensive deployment -- probably have to have intermediary multiplexers, a single line for each sensor, and patch connectors at the multiplexer station.

It almost makes wireless nodes such as Zigbee back in the running simply based on expense.  I wish I had studied carefully the network topology gotchas before even thinking about 1-wire of dreaming of a project that would monitors many stations to create a thermal mapping.


On Wednesday, May 1, 2013 1:21:39 PM UTC-7, J.J. Boyd wrote:
I am attempting to get the Dallas ds18b20 going on the BeagleBone Black and I can't seem to get this going. I am assuming this is due to the fact the emmc is on the same pin this w1 driver was originally compiled for.  I do not currently have the skills to move this w1 driver to another pin unless someone helps me :) I would enjoy learning how to cross compile the kernel after changing the gpio pin. Thanks in advance for any advice on this matter. 
Re: Dallas 1-Wire BeagleBone Black Loren Amelang 12/3/13 5:13 PM
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:
Re: Dallas 1-Wire BeagleBone Black Doug Edey 12/4/13 5:51 AM
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.
Re: Dallas 1-Wire BeagleBone Black godsf...@gmail.com 1/19/14 5:42 PM
Can you post a photo of how you have them wired please?
Re: Dallas 1-Wire BeagleBone Black Mark A. Yoder 10/26/16 7:23 AM
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

Re: [beagleboard] Re: Dallas 1-Wire BeagleBone Black William Hermans 10/26/16 3:20 PM
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.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/6a937fdb-7316-48b0-8b84-543757958c8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Dallas 1-Wire BeagleBone Black Dennis Lee Bieber 10/27/16 5:16 AM
{Crawling out of the shadows}

On Wed, 26 Oct 2016 15:20:32 -0700, William Hermans
<yyr...@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".
--
        Wulfraed                 Dennis Lee Bieber         AF6VN
    wlf...@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Re: [beagleboard] Re: Dallas 1-Wire BeagleBone Black Jason Kridner 10/27/16 7:38 AM


On Oct 26, 2016, at 3:20 PM, William Hermans <yyr...@gmail.com> wrote:

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. 

Re: [beagleboard] Re: Dallas 1-Wire BeagleBone Black Mark A. Yoder 10/27/16 7:44 AM
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
Re: [beagleboard] Re: Dallas 1-Wire BeagleBone Black William Hermans 10/27/16 11:59 AM
Yeah, I guess I read that wrong. Isn't fixed point fun ?!