Arduino-Temperature-Control-Library icon indicating copy to clipboard operation
Arduino-Temperature-Control-Library copied to clipboard

ESP32-S2 not finding DS18B20

Open DrBwts opened this issue 10 months ago • 8 comments

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.

DrBwts avatar Aug 08 '23 12:08 DrBwts

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

RobTillaart avatar Aug 08 '23 15:08 RobTillaart

Just ran the Simple.ino code and get,

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

DrBwts avatar Aug 09 '23 11:08 DrBwts

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?

RobTillaart avatar Aug 09 '23 15:08 RobTillaart

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

DrBwts avatar Aug 17 '23 09:08 DrBwts

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

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

RobTillaart avatar Aug 17 '23 11:08 RobTillaart

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.

freman avatar Apr 12 '24 13:04 freman

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

RobTillaart avatar Apr 12 '24 14:04 RobTillaart

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.

freman avatar Apr 12 '24 15:04 freman