Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-S2 not finding DS18B20 #245

Open
DrBwts opened this issue Aug 8, 2023 · 10 comments
Open

ESP32-S2 not finding DS18B20 #245

DrBwts opened this issue Aug 8, 2023 · 10 comments

Comments

@DrBwts
Copy link

DrBwts commented Aug 8, 2023

Using an Adafruit QTPy ESP32-S2 and Arduino IDE 2.0.0,
DS18B20 non-parasitic, wired with 4.7K pull up on DQ
Compiles & uploads fine but just keep getting the No more addresses. message over & over.

@RobTillaart
Copy link
Contributor

Have you tried the example sketch (Simple one)?
Does it also give that output?

@DrBwts
Copy link
Author

DrBwts commented Aug 9, 2023

Just ran the Simple.ino code and get,

Requesting temperatures...DONE
Error: Could not read temperature data

@RobTillaart
Copy link
Contributor

So it looks like a hardware problem
Q1: What is the cable length?
Q2: Are there noise generating wires nearby
Q3: Can you make the pull up 2K2 or 1K?
Q4: Do you power the sensor with 3V3 or 5V?

@DrBwts
Copy link
Author

DrBwts commented Aug 17, 2023

Sorry for the delay, been on holiday.

Q1: It's all on a breadboard at the moment so no wires longer than 5cm
Q2: QtPy, PC & monitor are the only other things on the bench, no power cables near by.
Q3: Will try that, just realized I have no 1K on hand.
Q4: powered from the 5V output form the QtPy which in turn is powered via USB

@RobTillaart
Copy link
Contributor

Q3: Will try that, just realized I have no 1K on hand.

A few 4K7 in parallel mode will lower the effective R too

@freman
Copy link

freman commented Apr 12, 2024

I have been having weird problems on my esp82666 and I honestly put it down to 3.3v, I swapped pins off D0 to D15.

These are purchased from an extremely reputable supplier so I'm fairly sure they're genuine. Some times one would be found, sometimes all 5, sometimes only 4, often zero.

I have however found a work around that works very reliably for myself.

	sensors.begin();  // Start up the library
	delay(100);
	sensors.begin();  // REStart up the library

I tried a whole bunch of other things like manually querying the bus for the first device then resetting the search and that was somewhat reliable but still wouldn't always return 5 devices. I suspect my 3.3v rail isn't actually that stable but adding 100 uf didn't help at all.

@RobTillaart
Copy link
Contributor

Do you have a pull up on the data line?
That improves the signal quality.

@freman
Copy link

freman commented Apr 12, 2024

I do a 4.7k, this isn't my first go at 1-Wire, I still have some original in sample packaging devices around here somewhere from back before redis was a thing :D.

Once I order my PCBs I'll be inclined to swap more around but I gave up entirely on the breadboard and I cbf swapping it on the prototyping board, I will also have new esp's coming with hopefully more stable 3.3v rails from a more reputable non-ebay supplier. I got around to plugging it into my scope and watching it.

I was just offering up my work around for the other fella to see if that helped his situation.

@madmacks59
Copy link

madmacks59 commented Jul 13, 2024

I have been having basically the same problem with the sensors not starting. I thought it might be a timing issue after the "sensors.begin()" so I added a "delay(500);" and that didn't solve anything. I then added a " Serial.print(sensors.getDeviceCount(), DEC);" after the "sensors.begin()" and things worked. I found this ticket and changed the print to another "sensors.begin()" and that worked as well. Wonder what is going on...

@RobTillaart
Copy link
Contributor

@madmacks59
Cause is still not found (as far as I know), however your post might give a hint to the cause (initialization of the oneWire bus).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants