andreas.schick
Posts: 1
Joined: Sun Nov 09, 2014 2:24 pm

More than 10 DS18S20

Sun Nov 09, 2014 2:36 pm

Hello,

i want to read 50 pcs. of 1-wire DS18S20.
I supply 3.3V, GND and data.
It seems the w1-gpio and w1-therm could not read them.
Has anyone tried anything like this?

Thanks for help!
Andreas

User avatar
joan
Posts: 14960
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: More than 10 DS18S20

Sun Nov 09, 2014 3:32 pm

I think the standard driver has a limit of 10 devices.

Search for danjperron and DS18B20.

In particular try the code at http://www.raspberrypi.org/forums/viewt ... 59#p594059

danjperron
Posts: 3508
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: More than 10 DS18S20

Sun Nov 09, 2014 4:51 pm

Hi,

use my routine DS18B20Scan

https://dl.dropboxusercontent.com/u/488 ... 8B20Scan.c

Code: Select all

cd
wget https://dl.dropboxusercontent.com/u/48891705/rpi/DS18B20/DS18B20Scan.c
gcc -o DS18B20Scan DS18B20Scan.c

First be sure that the GPIO you are using is not meant for something else. SPI,I2C, 1 wire , etc..

I don't know how many sensors you could put on one GPIO but you could use more GPIO using my code

To execute the program simply

sudo ./DS18B20Scan -gpio GPIOPin

Just replace the GPIOPin by the BCM GPIO id.

If you are using GPIO25, pin 22, it will be

sudo ./DS18B20Scan -gpio 25

I do have a version for read all the sensors in once but this is 1 sensor per GPIO.

Daniel

Kodie425
Posts: 19
Joined: Fri Oct 09, 2015 2:30 pm

Re: More than 10 DS18S20

Sat Oct 17, 2015 7:09 pm

I tried that software to test and it always says can't detect anything..

*** Error Unable to detect Logic level 1. No pull-up ?

I tried everything.... every single gpio number :- ) 1 though Max..

Anyways, I wasted enough of my time here, I've dedicated this Raspberry Pi B rev 1.1 to run my beer blog on, I am going to order the older version A to see if this same problem exists here and I will post back later..

I am going to hookup the solar panel to this and have it be 100% carbon-free web server :- )

Its already running and the LAMP is installed with Wordpress, its faster then my big loud workstation... and only pulling 10watts vs. 450watts on the other, so should pay for its self shortly in electric cost savings...

kodiakbrewing.com

danjperron
Posts: 3508
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: More than 10 DS18S20

Sat Oct 17, 2015 7:34 pm

I prefer using other method when you have a lot of sensors.


This is why I create this module using RS-485 with modbus protocol.

viewtopic.php?p=552882#p552882

And I create this module for wireless connection. I only need to change the battery every two, three months.
It should be possible to put small solar cell with 1F capacitor to get rid of the battery.

I do have units which ran all summer and I just replace the battery in September.
viewtopic.php?p=742704&sid=a844f1da77f1 ... ca#p742704

Return to “Interfacing (DSI, CSI, I2C, etc.)”