I'm not sure what the rules on advertising are here so mods please let me know if I'm being naughty here...davidmam wrote:Are the wee PCBs with the dual RJ45 sockets on your own design or are they available somewhere?
They look kind of just what I need for a project..
I know this isn't really much help but the kernel should support both the DS1S20 and DS18B20 and as far as I can tell your wiring is right (certainly that diagram is right).sampo wrote:Is this sensor not supported by the kernel or is there just something wrong with my wiring?
Ah! We have an existing relationship as I acquired my 1-wire sensors from you..repton wrote:I'm not sure what the rules on advertising are here so mods please let me know if I'm being naughty here...davidmam wrote:Are the wee PCBs with the dual RJ45 sockets on your own design or are they available somewhere?
They look kind of just what I need for a project..
They are my design, I run a small home business selling 1-wire products including some modules using PCBs of my own. See the website in my signature for more information.
Paul
Code: Select all
#!/usr/bin/perl
$count = 0;
open(INDEX, "cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves|");
@index = <INDEX>;
close(INDEX);
foreach (@index) {
chop;
$crc = "NO ";
while ($crc ne "YES") {
open(SENSOR, "cat /sys/bus/w1/devices/$_/w1_slave|");
@data = <SENSOR>;
close(SENSOR);
$crc = substr(@data[0], 36, 3);
$attempt++;
die if ($attempt == 25);
}
my $temp = (substr(@data[1], 29, 5)/1000.00);
my $fahr = ($temp*9.0/5.0)+32.00;
$date = `date "+%b %d %H:%M:%S"`;
chop $date;
print "$date Sensor $count C: $temp F: $fahr\n";
$count++;
}
Code: Select all
<?php
//File to read
$file = '/sys/devices/w1_bus_master1/10-000802292522/w1_slave';
//Read the file line by line
$lines = file($file);
//Get the temp from second line
$temp = explode('=', $lines[1]);
//Setup some nice formatting (i.e. 21,3)
$temp = number_format($temp[1] / 1000, 1, ',', '');
//And echo that temp
echo $temp . " °C";
?>
Do you got it fixed? I'm running into the same issue, can't find a solution.sampo wrote:Hi
I just downloaded 2012-09-18-wheezy-raspbian and put it on my SDCARD.
It has kernel:
Linux raspberrypi 3.2.27+ #160 PREEMPT Mon Sep 17 23:18:42 BST 2012
Should this kernel support DS18S20 sensor?
When I connect it to a GPIO pin 4 and then do:
sudo modprobe w1-gpio
sudo modprobe w1-therm
I got no device under /sys/bus/w1/devices/w1_bus_master1
I did the wiring like this with the difference that i have DS18S20 instead of DS18B20
http://www.cl.cam.ac.uk/freshers/raspbe ... ection.png
Is this sensor not supported by the kernel or is there just something wrong with my wiring?
Thanks!
Code: Select all
// no resistor
pi@raspberrypi /sys/bus/w1/devices $ cat 28-000002a88233/w1_slave
00 00 00 00 00 00 00 00 00 : crc=00 YES
00 00 00 00 00 00 00 00 00 t=0
// 2k2
pi@raspberrypi /sys/bus/w1/devices $ cat 28-000002a88233/w1_slave
ff 07 4b 46 7f ff 01 10 2f : crc=2f YES
ff 07 4b 46 7f ff 01 10 2f t=127937
// 4k7 or 10k
pi@raspberrypi /sys/bus/w1/devices $ cat 28-000002a88233/w1_slave
50 05 4b 46 7f ff 0c 10 1c : crc=1c YES
50 05 4b 46 7f ff 0c 10 1c t=85000
// version
pi@raspberrypi /sys/bus/w1/devices $ uname -a
Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux
rleyden wrote:Frank,Frank Buss wrote:I've applied the patch to the Raspbian kernel, this is the new repository:
Thanks for the Raspbian patch. I got my DS18B20 sensor probe working after some trial and error.
I didn’t initially add a resistor to my pre-wired probe ( http://www.ebay.com/itm/1pcs-Waterproof ... 969wt_1503 ) because the Ebay listing said “no external components required”. Without the resistor the sensor is not detected. With a 4 K ohm resistor, everything was fine.
I also tried the method in your first post (I hadn’t read to the end of this thread). There were no errors but “lsmod” showed that w1-gpio hadn’t loaded. Of course, I didn't have the resistor at that point either.
Rich
Should do - just wire it in appropriately (to GPIO4 for data, a 4.7k resistor between that and +3.3v (pin 2), and the ground to pin 6.)jon wise wrote:Where can I find a list of supported devices?
I would like to move my current greenhouse thermostat which uses DS2405 switches and DS1820 thermometers to Raspberry Pi. Will these work?
I've patched the w1-gpio driver to perform a pullup as required for parasite power mode. See https://github.com/mkj/rpi-linux/commit ... 87382b06f5 . Note that it changes the w1 API so any other w1 modules will also need recompiling.Frank Buss wrote:But the GPIO pin can't deliver enough current to power external devices and it could destroy the CPU, if you try it. It is not a high-current GPIO, as available on some AVR chips.Grey Whittney wrote:Does the bus take into account the parasitic mode requirements (such as driving the data bus during conversions)?
Hi againrayoul wrote: I've test those commands, the reading is Ok and returns:
0000000 00ff
0000001
(i think 00ff is the status of switches in binaries it's 11111111)
I'd some problems with the write command. in fact I think it's working but you need some stuff:
you need to wire pin 10 (rzst) and pin 3 (Vcc) of the ds2408 (I found that in the datasheet). and in the directory you need to do:.Code: Select all
sudo chmod og=rw output
If not you may have errors with the output file.
when I do the write command it's working but return an error (erreur d'entrée/sortie) i think it's I/O in english. but when I redo the read command 00ff change (for x01 it return 0078).
I think it could help you.
ps: sorry for my bad english!!!
Thanks Rayoul,rayoul wrote: for exemple, to switch on P1,P3,P5,P7 and switch off the others, the binary is "01010101" in text it's "U".
the command is: echo \U |dd of=output bs=1 count=1 (when you are in the folder of your device)
it return an error but if you read with "dd if=output bs=1count=1" you can read 0055, wicht is in hex to binary 01010101. with the multimetter I can test switches and P1,P3,P5,P7 are tied with the ground pin and the oters are not.
Rayoul
Return to “Interfacing (DSI, CSI, I2C, etc.)”
Users browsing this forum: No registered users and 7 guests