ESP8266 NodMCU starts new ones if DS18b20 are connected

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Dondolo
Normal user
Posts: 77
Joined: 03 Jul 2019, 06:56
Location: Germany

ESP8266 NodMCU starts new ones if DS18b20 are connected

#1 Post by Dondolo » 27 Mar 2021, 18:50

Hi,

the ESP8266 NodMcu reboots after a minute when I connect the DS18B20 sensors.
To clarify, I have shown the layout with FRITZING.
At first I did without rules.

Does anyone have any idea why the ESP keeps restarting?
Firmware
Build:⋄ 20112 - Mega
System Libraries:⋄ ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support
Git Build:⋄
Plugin Count:⋄ 47 [Normal]
Build Origin: Travis
Build Time:⋄ Feb 23 2021 12:29:15
Binary Filename:⋄ ESP_Easy_mega_20210223_normal_ESP8266_4M1M
Build Platform:⋄ Linux-5.4.0-54-generic-x86_64-with-glibc2.29
Git HEAD:⋄ mega-20210223_9054eb3
gartenhaus_relais_Steckplatine.jpg
gartenhaus_relais_Steckplatine.jpg (1.53 MiB) Viewed 5541 times
Last edited by Dondolo on 28 Mar 2021, 07:41, edited 2 times in total.

Dondolo
Normal user
Posts: 77
Joined: 03 Jul 2019, 06:56
Location: Germany

Re: ESP8266 NodMCU starts new ones if DS18b20 are connected

#2 Post by Dondolo » 27 Mar 2021, 18:52

Heck, I can't get the picture uploaded.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 NodMCU starts new ones if DS18b20 are connected

#3 Post by TD-er » 27 Mar 2021, 20:41

Maybe a bad connection?
Do you have the resistor present?
Which pin do you use?

Dondolo
Normal user
Posts: 77
Joined: 03 Jul 2019, 06:56
Location: Germany

Re: ESP8266 NodMCU starts new ones if DS18b20 are connected

#4 Post by Dondolo » 27 Mar 2021, 23:53

Hello Td-er,

I have three relays on GPIO 15,13,12 and 2 DS18b20 each with a 4.7kOhm resistor
on GPIO 14 and 2 respectively. Unfortunately, I don't get the picture displayed, on which it was quite easy to see.

What is wrong with the url (see above)? What do I have to do so that the picture is uploaded?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 NodMCU starts new ones if DS18b20 are connected

#5 Post by TD-er » 28 Mar 2021, 00:03

You have to attach an image via the "attachments" tab below the reply text field of this forum.
Your image was located on your C-drive, not hosted online. By attaching it to a forum post, you place it also on the server where this forum is hosted.

Why do you use 2 GPIO pins for the Dallas sensors?
The whole idea of the 1-wire bus used by the Dallas sensors is that you can use a single pin for all Dallas sensors. (it is a bus)
Better use GPIO-14 since GPIO-2 does have special needs regarding its state at boot of the ESP.

Image

Dondolo
Normal user
Posts: 77
Joined: 03 Jul 2019, 06:56
Location: Germany

Re: ESP8266 NodMCU starts new ones if DS18b20 are connected

#6 Post by Dondolo » 28 Mar 2021, 07:49

Thanks TD-er,
I was totally blind, have now uploaded the picture.
You have to attach an image via the "attachments" tab below the reply text field of this forum.
Your image was located on your C-drive, not hosted online. By attaching it to a forum post, you place it also on the server where this forum is hosted.
Why do you use 2 GPIO pins for the Dallas sensors?
The whole idea of the 1-wire bus used by the Dallas sensors is that you can use a single pin for all Dallas sensors. (it is a bus)
Better use GPIO-14 since GPIO-2 does have special needs regarding its state at boot of the ESP.
My measuring point is about 15 m away and I wanted to use four Dallas sensors at the measuring point.
I found the solution with the wire hub (see link) very interesting.
But it only led to a constant reboot.

Building the wire bus twice was just an emergency solution to prevent rebooting.





https://pvlng.com/1-Wire_Hub

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 NodMCU starts new ones if DS18b20 are connected

#7 Post by TD-er » 28 Mar 2021, 10:24

You're using a step-down converter with what looks like a LM2596 or something similar.
Can you try the setup with only the Dallas units connected on a different power supply?
For example start with powering it via USB or some lab power supply, or move the switching power supply away from the long wires of the Dallas units.
A switching power supply may produce high frequency noise which can be picked up on long wires.

Also there are lots and lots of reports online about counterfeit Dallas sensors being sold, which do act a bit strange in some setups. (although most of them do not show issues when used with 1 or 2 in a chain)

Make sure the Dallas sensors all have their pins well connected, or else they may want to operate in "parasitic" mode, which is not supported by ESPEasy.

I do have a setup here on my bench running for months now with 12 of the cheapest Dallas sensors I could find (thus very likely not genuine parts) and those run very stable for months.
So I guess it is probably something related to external noise, bad contacts or unstable power supply. (voltage drop when switching a relay using thin wires carrying power for example)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 NodMCU starts new ones if DS18b20 are connected

#8 Post by TD-er » 28 Mar 2021, 10:31

Just another note.
Since you're using long cables, you may want to power the Dallas sensors on 5V but connect the pull-up resistor to 3v3, like discussed here: https://www.raspberrypi.org/forums/view ... 6#p1468562

In the link you gave for the wiring of the Dallas sensors over longer distances, there was a diode included.
I don't see that in your Fritzing image.
I can imagine that may help on longer cables to reduce the noise.

Dondolo
Normal user
Posts: 77
Joined: 03 Jul 2019, 06:56
Location: Germany

Re: ESP8266 NodMCU starts new ones if DS18b20 are connected

#9 Post by Dondolo » 28 Mar 2021, 13:07

You're using a step-down converter with what looks like a LM2596 or something similar.
Can you try the setup with only the Dallas units connected on a different power supply?
For example start with powering it via USB or some lab power supply, or move the switching power supply away from the long wires of the Dallas units.
A switching power supply may produce high frequency noise which can be picked up on long wires.
Yes this is a LM2593, do you have a better recommendation?
I had the ESP with 3 Dallas sensors on the USB port and supplied it with 3.3V,
no problem. With a fourth sensor, the data stopped sporadically.
Just another note.
Since you're using long cables, you may want to power the Dallas sensors on 5V but connect the pull-up resistor to 3v3, like discussed here: https://www.raspberrypi.org/forums/view ... 6#p1468562
I have now exchanged the cables, 3 sensors, cable ~ 15 m, 3x1.5mm2, 5V + 4.7kOhm, with level shifter.

Is currently running stable

I do have a setup here on my bench running for months now with 12 of the cheapest Dallas sensors I could find (thus very likely not genuine parts) and those run very stable for months.
So I guess it is probably something related to external noise, bad contacts or unstable power supply. (voltage drop when switching a relay using thin wires carrying power for example)
Which cable cross-section do you use in your own setup?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 NodMCU starts new ones if DS18b20 are connected

#10 Post by TD-er » 28 Mar 2021, 13:40

The cable diameter only matters when you draw some current as the voltage drop over the cable is proportional to current and resistance.
Those 'breadboard jumper cables' do have a significant voltage drop if you draw a few-100 mA or more.

For the Dallas sensors you don't need thick cables as they really don't draw much current.

My test setup with 12 Dallas sensors is on a small breadboard close to the ESP. (30 cm cable max)

When running into problems with >3 Dallas sensors in the same setup, you very likely have counterfeit sensors.
And not all counterfeit sensors are equal.

With recent changes in ESPEasy's Dallas support, you can have upto 4 sensors in a single task.
This also means those sensors used in the same task are read at the same time. Maybe that's working better with your sensors as it is different from reading 4 sensors from 4 tasks.

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests