DS18b20 only working on GPIO 2?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ewaldharmsen
Normal user
Posts: 66
Joined: 16 Feb 2017, 09:23

DS18b20 only working on GPIO 2?

#1 Post by ewaldharmsen » 14 Mar 2017, 17:05

Hi All,

I have esp easy buil 147 RC8 running on a sonoff SV.
And I love it.

But I cannot get a DS18b20 working on it.
The same device works fine on a GPIO 2 of ESP8266 ESP-01 chip, but not on the Sonoff SV.
It has GPIO1,3,4,5, and 14 available, but none of them work.

When I add the device it gets as port "0-0-0-0-0-0-0-0" and as value "nan"
I added it correctly, te sameway as I did on the ESP-01.

Does anybody know how I can get it t work?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: DS18b20 only working on GPIO 2?

#2 Post by Shardan » 14 Mar 2017, 19:55

Hello,

can't say what's going wwrong with your sonoff.
I have DS18B20's working on different GPIO's without problem on my ESP's.

Did you put a pull up resistor from the GPIO to 3,3V? (10 KOhm)

If you use GPIO 4 or 5 there might be the I2C active on these pins.
You may set the I2C pins in the "Hardware" Tab of ESPEasy.

Regards
Shardan
Regards
Shardan

ewaldharmsen
Normal user
Posts: 66
Joined: 16 Feb 2017, 09:23

Re: DS18b20 only working on GPIO 2?

#3 Post by ewaldharmsen » 14 Mar 2017, 19:57

thanks for the answer.
Ic2 is turned off completely.

Yes there is a 4.7 K resistor between the data and the VCC

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: DS18b20 only working on GPIO 2?

#4 Post by Shardan » 14 Mar 2017, 20:11

hm...

maybe the DS-sensor is broken?
Try another one or connect it to another ESP for testing.
Regards
Shardan

ewaldharmsen
Normal user
Posts: 66
Joined: 16 Feb 2017, 09:23

Re: DS18b20 only working on GPIO 2?

#5 Post by ewaldharmsen » 14 Mar 2017, 20:15

Did an interesting test.
Powered the ESP-01 from an usb to serial adapter, plugged in to socked, the sensor works fine.

Powered the ESP-01 from the Sonoff SV: ESP-01 runs fine, but the sensor not, althugh still attached to the ESP-01

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: DS18b20 only working on GPIO 2?

#6 Post by Shardan » 14 Mar 2017, 21:09

Ooooops?

hm... does the Ds still get power?

Maybe put a capacitor around 100µF near the sensor between 3,3V and ground.
The DS takes around 5 µW so it is not likely it overloads the power supply of the sonoff.
Maybe the 3,3V line isn't really "clean".
Regards
Shardan

ewaldharmsen
Normal user
Posts: 66
Joined: 16 Feb 2017, 09:23

Re: DS18b20 only working on GPIO 2?

#7 Post by ewaldharmsen » 20 Mar 2017, 18:43

Very strange,
I applied an external power 0f 3.27V but it does not help, I still get nan and address 0-0-0-0-0-0-0-0.
So plus and minus to external power supply, data to GPIO pin, 4.7K resistor between data and plus.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: DS18b20 only working on GPIO 2?

#8 Post by Shardan » 20 Mar 2017, 21:33

sounds a bit like a lost or bad ground connection.
Regards
Shardan

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 28 guests