SOLVED: Trying to build a simple temp sensor for the pool - wont flash with sensor attached

Hi All

I’m trying to build a simple sensor for the pool, based on a Wemos D1 mini pro.
The sensor is DS18B20 with a 3 m cable.

So as I can understand it from the ESP home pages, it needs 3.3v and gnd, and of course a data.
It also needs a 4.7kOhm pull up resistor between the 3.3v and the datapin (I’ve tried using D8).
Unfortunately the local electronics pusher only had 4.64 kOhm’s, so I’m trying with that.

So I made a simple gnd, 3.3v and data connection, with the 4.64 kOhm between 3.3v and D8.

But if I have that attached, it won’t flash the D1.
I’ve now removed them, and now it will flash it, but of course it can’t find any ‘Dallas’ sensors now.

So what to do? Is the 4.64 kOhm not good enough? Has anybody toyed with this?

Resistor values are approximate. 4.64 is quite accurate actually.
Now esp modules pins are tricky specially when boot and flashing.
Try another pin on the module. Also you don’t need to have it connected to flash it. You can flash and connect it later and should work anyway.

1 Like

esphomeGuru says: no

Pin D8 (equals GPIO 15) causes a boot failure if pulled high on boot. If you use pins D1, D2, D5, D6 or D7 you wouldn’t have any problems.

The resistor is OK and should even work with a 5 meter cable (if a quality one)

So long, the Guru

2 Likes

Along with the other excellent (and probably more-correct) suggestions here, I offer the idea that perhaps the 3-5v power supply is just barely enough, and the additional load of the sensor may be pulling it too low to flash properly.

1 Like

esphome Guru says: no

Running my setup with 3.3v from a nodemcu with a 6 meter cable to ds18b20 and works just fine. Even without resistor the thing does proper measurements which are backed by a checksum on the one wire bus.

2 Likes

Wow, I’m humbled, here I am fiddling with stuff I’ve never done before, and then I get help from all you guys, thankyou very much @glmnet, @esphomeGuru, @glyndon for the great suggestions.
As esphomeguru pointed out, using D8 was not a good idea, moving it to d5, and it’s working perfectly now, Now I just need to make a watertight seal for the wire going out with the temp sensor, not a big deal, I just don’t have the part atm. Have to go for a drive tomorrow for that, again, thankyou all for your great help!

1 Like

Please let us know how you get on with waterproofing, and some pics if possible :slight_smile:

Will do :slight_smile:

For my outdoor temp/light/barometer sensor, I put the ESP and sensor inside a yellow plastic prescription bottle. Made a watertight wire exit just by caulking the wire where it passes through a small hole in the lid.
Why a yellow bottle? It’s UV-resistant, and will help keep UV from deteriorating the photo-sensor over time. (not to mention it’s free)
Just be sure to position the temp sensor below the ESP, since the ESP gives off heat which will throw the temp readings off.

:open_mouth: wow what a man!!!
Who is the guru?
We’re going to learn a lot here. Thanks!

2 Likes

Stay tuned - more is coming :sparkling_heart: (and always share the love!)

2 Likes

Completely forgot to post the tempsensor picture, but it’s never too late :grin:

3 Likes