Pi Zero

OS:
Fresh Flashed the latest up to date Rasparian image fully updated…

I have been trying to get DS18B20 working on Pi0w GPIO but missing out something… I have extensive experience and success with single and multiple DS18B20 that I find work very well on any version of Pi hardware. I can make it work on Pi B, B+ new Pi A Pi 3 and 3B+

I can swap the same ciruit(s) and uSD card between almost all these above models but = NO-GO on a few Pi0w I have here. Works fine and ‘Auto Installs Widget’ brilliantly as ever when uSD and Circuit moved to any other Pi.

I may yet have missed something basic / electrical but wonder if anyone else is having issues or managed to get DS18B20 working on the GPIO pins of these cute little Pi. They are Great ! Multi industrial DS18B20 1w 1m and 3m leaded probes + a Pi zero with wifi makes this a very nice project for school classrooms etc.

I am using up a bin of old Pi B and USB dongles for now :slight_smile:

Will update this if the obvious becomes visible…
( Yes the 4k7 resistor is there )

Thanks

~ Andrew

Similar but always been puzzled by these settings:
image

  • When do you use them
  • Is this a hang over from webiopi days
  • Is the One-wire for the DS18B20 ? In this screen shot from a different pi to the above issue I have three probes working even though One-wire is ‘disabled’ / grey out.
    Just curious thanks
    ~ Andrew

can you enable 1-wire from sudo raspi-config and give it a try.

Tried the raspi-config to toggle the 1w bus on in the rasparian settings and this made no difference. The raspi-config from the cmd line ap and the Start > Pref > Config > Interfaces respond but the Cayenne Dashboard config 1w indicator does not change state.

I did the Honest thing and tried a FRESH install of Rasparian latest / update / upgrade and added this as a new device Pi0w install to Cayenne: = It works :slight_smile:

My Bad = being a bit impatient and ambitious swapping cards and DS18B20 over between types of Pi…

image
The 1w switch indicator still grey and is perhaps misleading ?

Thanks for the input.

I am next going to test adding a Pi0w with latest Rasparian LITE into Cayenne and loading it up with multi parallel DS18B20.

Will let you know how this goes.

~ Andrew

Success:


Latest Rasparian LITE image.
Quite Fast to setup and DS18B20 smooth auto detect of 3 to 4 in parallel at the same time. Thanks for such a smart system.
~ Andrew

Glad to hear it is working now. it is always good to start with a fresh system.

Still no success with DS18B20 + bare bones Rasparian ‘Lite’ at the cmd line level. I tried the raspi-config enable 1w under interfaces + reboot but still nothing comes up.

Interesting that it is ‘trying’ at least:
image
This shows the device has appeared but still no connection with Cayenne.

I have tried to manually ‘Add Device’ with similar cred format e.g. spoofing the general dev:00000XXXXXXX type channel number format with the correct serial number (0000019e6be4)

I will try manually running some python script to test the device is there and working…

~ Andrew

image
It seems it is there and working…
~ A

is it is working or not?

It is not working on the Cayenne Dashboard
The above cmd line test was just to prove that it is electrically there and responding to a python script
Rbooted and re connected the DS18B20 but still does not come up on the Cayenne Dashboard.

~ A

see if there is any error in log tail -f /var/log/myDevices/cayenne.log

Sorry i trashed the not working setup before recovering the log.
From memory it was not updating and seemed locked after about line 12. Other thing I noticed was the reset and shutdown dashboard buttons were also not working. Perhaps a bad / junked install ? I just noticed on this latest attempt the 5V uUSB DC input is faulty, Green LED comes and goes…

So all good on the latest repeat clean install of Lite; clean format, latest Rasparian, raspi-config, apt-get update / upgrade it decided to work

2019-10-01 17:48:43 - myDevices - INFO - Sensors info:
2019-10-01 17:48:46 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 34.2}, {‘sys:cpu;temp’: 39.546}, {‘sys:ram;usage’: 110399488}]
2019-10-01 17:48:59 - myDevices - INFO - Temperature - DS18B20(slave=28-0000019e6be4) 0000019e6be4 added
2019-10-01 17:49:00 - myDevices - INFO - Sensors info: [{‘channel’: ‘dev:0000019e6be4’, ‘value’: 19.0, ‘type’: ‘temp’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’}]
2019-10-01 17:49:03 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 0.0}, {‘sys:cpu;temp’: 37.932}, {‘sys:ram;usage’: 110727168}, {‘sys:storage:/;usage’: 1465872384}, {‘sys:net;ip’: ‘10.255.134.149’}, {‘dev:0000019e6be4’: 19.0}] + sys:gpio

I am repeating an install + ADD DS18B20 and see if all good, stable and repeatable.

Thanks for help, will update progress…

~ A

2 Likes

Success:
image
Can confirm adding multiple DS18B20 self install and set themselves up on Rasparian Lite 2019-09-26-raspbian-buster-lite.img. Always impresses people. Great stuff.
I think we can consider this misadventure resolved / case closed
Thanks
~ A

1 Like

Hi…people have found a bug in the USB stack of the Raspberry PI image.
Using an USB analyser we have found that sometime the Raspberry Pi Zero send USB packets with Invalid CRC.
The things that is strange is that this issue only affect Raspberry Pi Zero with Raspbian image after March 2016.
the same image work perfectly on a Raspberry Pi 2 or 3.

bittele

Aside from the above Lite + Multi DS18B20 above (resolved) I have a little run list for Rasparian Lite That I use to get the BYOD + Python + Serial Port working. I will see if there are any USB issues with the leads I use (FTDI) but generally I find the Idea of using USB is a great breakout for super low level hacking and tinkering on breadboards and bare LoRa modules etc. The USB leads I use have 4 pins Tx Rx +ve and -ve and have never glitched on the low level slow stuff I do. Best of all on ALL Pi they make projects with this standard Power + serial Data a very stable and stanhdard ‘Plug and Play’ project concept that always pops up at tty USB0.
~ A