GithubHelp home page GithubHelp logo

bitbangingds18b20's People

Contributors

danjperron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitbangingds18b20's Issues

Issues reading multiple 5m cable DS18B20 sensors

Hi Dan,

I tested your read10.py script on a Raspberry Pi 3 with six DS18B20 (each 1 m cable). This works flawlessly. However, when I connect DS18B20 sensors with 5 m cable each, I can only read up to three sensors. If I connect four or more sensors, the script detects 0 sensors. Note that I am able to find all (3+) sensors in the ls /sys/bus/w1/devices/w1_slave/ folder. I can also read all of them individually using the Adafruit code, I'm just not able to read 3+ sensors with 5 m cables simultaneously anymore using your script.

Any idea what's causing my issue and how to solve it? I'm running the DS18B20s in normal power mode (no parasitic).

Best wishes,
Ralf

Parasitic mode

I have a solar heating project where I'm migrating to using a raspberry pi to control the pump. However, issues with the 1 wire temperature sensors are causing the built in drivers to lock up. As the system must work to prevent overheating this is of some concern. The only solution I can find is to power off the pi for a minute which seems to suggest a problem with the 1w devices. This power off can be automated by powering the devices off by using GPIO which seems to work.

So I decided to use your driver as I have more control of the issue and may be able to get to the bottom of the issue.

As an alternative I was contemplating running the devices in parasitic mode which would also enable me to power them off simply by programming the GPIO.

So to my question: Running DS18B20Scan against a device in parasitic mode allows me to see the one device but the temperature is always 85. Two devices prevents both devices from working.

Obviously as it almost works it seems like a timing issue(?) but extending the wait time for conversion is of no help. Any other ideas? I realise parasitic mode is not recommend but it would be nice to try it. The pin GPIO is pulled up.

Python.h: No such file or directory

I read some DS18B20 sensors using w1 on raspberry pi 3 B+.
However, the /sys/bus/w1/devices/28-* directories suddenly disappear within a few hours after boot and I need to unplug the power to reset. It only happens with one raspi and not with others. I could not find out the reason which may be in sensors or raspbian stretch...
Now I'm considering to use BitBangingDS18B20.
I could compile and run the command, it works!
$ ./DS18B20Scan -gpio 10
28-0310979469A4 : 12 bits Temperature: 25.62 +/- 0.06 Celsius
28-030897940675 : 12 bits Temperature: 25.19 +/- 0.06 Celsius

Then I tried to install python add-on but an error occured.
Please tell me how to fix it.

python3 setup.py install

running install
running build
running build_ext
building 'DS18B20' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-6waWnr/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/us

r/include/python3.5m -c DS18B20.c -o build/temp.linux-armv7l-3.5/DS18B20.o
DS18B20.c:12:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

Can't work with DS18B20

Hello.
I use file DS18B20Scan.c and file configDS18B20.c My sensor's id is 10-000802da8f1d. When I run compiled files with connecting sensor, I don't get any result with suggestion to enter resolution (9bits and etc.). In addition I don't get any result with scan file. Even if I print -f filename.txt (which contains id) nothing happens. It is possible because id usually starts with "28" instead "10" like I have. Is it possible to modify your files and change resolution? I use Raspberry Pi 2 Model B.

many sensors

with two sensors all work corectly if i connect 7 sensors i have unclear response

./DS18B20Scan -gpio 4

28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 69.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 21.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius
28-0000090E6B5A:09 bits Temperature: 85.00 +/- 0.50 Celsius

python.h not found

sudo python setup.py install
running install
running build
running build_ext
building 'DS18B20' extension
creating build
creating build/temp.linux-armv6l-2.7
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-InigCj/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c DS18B20.c -o build/temp.linux-armv6l-2.7/DS18B20.o
DS18B20.c:12:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

Stops working after several days

Maybe not a bug in the code itself but I have no clue at the moment and maybe someone can help me tracking down the problem.
I'm reading six DS18B20 sensors using this library with the standard 3 pin wiring including external 5k pullup resistor. Everything works flawlessly at the beginning. However after a few days errors while reading start to occur such as None being returned from read (in Python) or not all sensors being found by the scan routine any more. This gets worse and worse until at some point no sensors can be read any more. I did some measurements and once I'm at that stage the data pin is pulling down the signal (to ~1.8V) so that I don't have the 3.3V any more which explains why reading doesn't work any more.
Then I switch to a different GPIO pin and the same story repeats itself: no issues in the first few days, then errors start to occur until nothing can be read any more. Not even a reboot fixes it.
Any clues what might be the problem or how I can narrow it down?
I have some basic C and Python experience so I can experiment myself a bit but I would need some pointers first.

Changes Back to 12 Bits

Hey!
I have a pi 3 model B which I am trying to update the resolution to 10 bits instead of the default 12.

I got your script, and updated the BASE to 0x3F000000.
The script ran fine and I saw that the w1_slave file has been updated correctly.

The problem comes in after reading the temp for a few seconds, it always switches back to 12 bit.

Any ideas on why it is not staying set? The first couple of seconds it works as expected.

Thanks!

Permament change of resolution only once

Hi,
I have five DS18B20s hooked up to my RPi via w1 (yes, I know some of these codes don´t work with w1 but hear me out) with a resolution of 12 bits. Since reading all the Sensors takes a while and the measurements don´t have to be too precise I wanted to reduce the resolution in the hopes of accelerating the whole process.
I did so using the configDS18B20.c code and changed the resolution to 11 bits. It stayed at 11 bits when I turned the RPi off and on again, however every time I tried changing the resolution since it got changed back to 11 after a reboot. Which seems weird to me since the first time I didi it the change was permanent. Additionally I only get the code to work some of the time, when I execute sudo ./configDS18B20 most of the time I only get:

GPIO 4
BCM GPIO BASE= 3f000000
. . . . . .50 05 FF FF F FF 5F 10 09
. . . . . .50 05 FF FF F FF 5F 10 09
. . . . . .50 05 FF FF F FF 5F 10 09
. . . . . .10 01 FF FF F FF 5F 10 21
. . . . . .10 01 FF FF F FF 5F 10 21

Only very rarely do I get the option to set the resolution and as mentioned beforehand that change isn´t permanent.
Does anybody have an idea where my mistake is or how I can once again change the resolution permanently?
Thank you and best regards
Paul

Does not work on 64bits

Hello,

Thanks for this really helpful lib!

I've tested it on RPI 2,3,4 with buster 32bits, it works fine.
But on buster 64bits, at best it does nothing, at worse its stuck the whole system.

Is there a way to make it compliant with 64bits ?
Thanks you.

Compile error

I'm getting an error when I compile it on a Raspberry PI 2

gcc: error: unrecognized option ‘-rlt’

Can you point me to the right direction?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.