i want to use Dallas One Wire Sensors DS1820 with Beaglebone. The HDQ pin seems not to be available. I have build the w1-gpio driver for the 12.26 image. This module is not initializing:
[ 8062.844312] gpio_request: gpio-265068 (w1) status -22
[ 8062.844350] w1-gpio: probe of w1-gpio.0 failed with error -22
I thin there is an problem with the pin configuration. Where i can do this?
- err = platform_device_register(pdev);
+ err = platform_device_add(pdev);
the module is loading with "modprobe
w1-gpio-custom bus0=0,1,0" but i cant loading w1-gpio, which seems to be needed.
Has anybody running 1-wire on beagebone?
Where are information about pin-mapping?
It is possible integrating 1-wire into the main distribution?
When anybody is interestet to rebuild the modules i have attached two script. The first sets up the build environment and the second builds the kernel.
i want to use Dallas One Wire Sensors DS1820 with Beaglebone. The HDQ pin seems not to be available. I have build the w1-gpio driver for the 12.26 image. This module is not initializing:
[ 8062.844312] gpio_request: gpio-265068 (w1) status -22
Huh? A 1-wire interface only requires an open collector or open drain
output with a pullup resistor which can be added externally. The rest
is just software in most systems and not a lot of that.
I've never looked at the data sheet, but none of the pins can be
configured as high impedance? If so they can be set low and the data
used to toggle the high impedance control. This works exactly like an
open drain output.
I'm connecting a 74HC595 to my bone. The chip will work with input voltage from 2 - 7 volts but needs a vcc within 20% of the signal voltage. Since the bus runs at ~3.3v, I figured that the bone would supply 3.3 from pins 3&4 on P9. Before wiring it up, I checked and found that 3&4 were supplying 5v, which is too high and not what the specs say it should be. Do I need to do something to get the pins back to 3.3?
The Dallas USB adapter (DS9490R) works fine with digitemp (http:// www.digitemp.com). I have compiled the latest on board and it works
with my 1-wire network.
I also interfaced the Dallas DS2482-100 via i2c-3 using a recent image
and tested it with OWFS. Given I needed to power it at 3.3 volts, I'm
not sure it had the ability to power the sensors and got mixed results
with many temp sensors returning 85 which is their error condition.
I'm interesetd in what you find - I'll likely continue down the USB
path for now, but may go back at the i2c approach in the future with a
level shifter so I can run at 5 volts.
I'm not aware that the bus runs at 3.3 volts. I thought it ran at 5
volts. In fact, now that I consider that I can see it would be
difficult to drive a 1-wire bus directly from the CPU since they
typically aren't 5 volt tolerant. You can use a transistor on one pin
to drive the bus and use a resistor pair as a voltage divider to a
different pin as an input, or a second transistor. I don't get why
you would want to use a 74HC595. This is a shift register that won't
be so easy to use for this. Just use transistors or perhaps an OC
buffer.
The communications is over 1-wire. A 1-wire device still needs a
ground pin. This particular device uses 1.5 mA when converting
temperature so it is best to add a power connection as well.
Koen, your patch seems to be exactly what I need since I have a DS18B20 that I want to read with the Beaglebone. I just can’t get it to work, I’m sure it is some stupid little rooky detail that I don’t get, could you please help me with a hint?
Thanks a lot!!
This is how far I did get:
root@beaglebone:/sys/bus/w1# uname -a
Linux beaglebone 3.2.16 #1 Thu May 17 11:36:05 CEST 2012 armv7l GNU/Linux
root@beaglebone:/sys/bus/w1# ls
devices drivers drivers_autoprobe drivers_probe uevent
root@beaglebone:/sys/bus/w1# ls devices -la
total 0
drwxr-xr-x 2 root root 0 Jan 1 2000 .
drwxr-xr-x 4 root root 0 Jan 1 2000 …
lrwxrwxrwx 1 root root 0 Jan 1 2000 w1_bus_master1 → …/…/…/devices/w1_bus_master1
root@beaglebone:/sys/bus/w1# cat /sys/bus/w1/devices/28-00000256073a/w1_slave
cat: /sys/bus/w1/devices/28-00000256073a/w1_slave: No such file or directory
make sure you are connecting your sensors correctly. You cannot use parasite power mode with beagle, so each sensor needs the 3.3v, gnd, and pullup between data and vcc. Also make sure you are using the correct pin (check dmesg to see which pin w1 is attached to). the ds18b20 work great with beaglebone, I have a string of 5 currently running, logging to PostgreSQL every 5 minutes, gpio’s switch SSRs to turn heating/cooling devices on or off to maintain environmental control.