Esp8266 and ds18b20 not working with wall supply

Everything about esp8266 and more.

Moderator: leecollings

Post Reply
juuzo
Posts: 20
Joined: Monday 15 October 2018 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Esp8266 and ds18b20 not working with wall supply

Post by juuzo »

I have stange problem with my power supply. I have esp8266 connected with two ds18b20 sensors. Data line has 100k pull up resistor. I have ht7333 regulator with capasitors to power whole thing. I have soldered usb cord so i can supply whole thing anywhere. My problem is that I can read sensors only if usb cord is connected to laptop. If I try to supply with 2A wall power supply the sensors fails to read and i get only -127c readings. I assume that my code is totally fine cause it works with laptop power but I have no idea why it’s not working with wall supplies. I have tried with four different wall supplies with no success. Any idea?
gerardvs
Posts: 81
Joined: Sunday 04 January 2015 0:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest-1
Location: /dev/null
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by gerardvs »

Most likely the power is despite the capacitors still not stabilized enough. Try a larger cap. Also a 100k pull-up seems a bit high.
Please share the schematic so we could get a better picture.
randytsuch
Posts: 90
Joined: Sunday 20 March 2016 18:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: LA, Ca USA
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by randytsuch »

Did you try a different power supply?

I've had problems with cheap Chinese USB power supplies.

You might need to put a cap on the power line to the 18b20s. Maybe try shorter wires to the 18b20 to see if that makes a difference.

Randy
juuzo
Posts: 20
Joined: Monday 15 October 2018 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by juuzo »

Hi, I have tried with ipad power supply wich I think is good quality. Still not working. Here is shematic (some internal components definitely missing but you get the point). Cables to ds18b20 sensors are 1m long so I don't think those are problem. Is 1000uf capacitor too small?
Attachments
esp_ds18b20.JPG
esp_ds18b20.JPG (74.55 KiB) Viewed 2757 times
gerardvs
Posts: 81
Joined: Sunday 04 January 2015 0:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest-1
Location: /dev/null
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by gerardvs »

R1 is a bit high. Try a 4K7 resistor.
juuzo
Posts: 20
Joined: Monday 15 October 2018 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by juuzo »

But I don't understand why resistor would be problem if system works with laptop usb connector. I will try smaller resistor.
gerardvs
Posts: 81
Joined: Sunday 04 January 2015 0:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest-1
Location: /dev/null
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by gerardvs »

This is called a "process of elimination" ;)
juuzo
Posts: 20
Joined: Monday 15 October 2018 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by juuzo »

Ok, i tried with 4,7kohm and two 4,7kohm resistors paraller but no succes. What would be next method of elimination? Sometimes I get readings out of one of the sensors but not both.
gerardvs
Posts: 81
Joined: Sunday 04 January 2015 0:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest-1
Location: /dev/null
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by gerardvs »

4,7k is the normal value so you can eliminate that.

Hopefully you have a oscilloscope on hand to check how "clean" the 3.3V is. If not you could set you DM on AC and see if there is some ripple. If there is a high freq. ripple, only a cap is not enough, you have to add a small coil to get an LC drain.

Also the ESP8266 can use more than 200mA when connected. The max current of the HT7333 is 250mA so you are really on the limit. Not sure but also something you could check of test another regulator.

It is a step by step process. The circuit is really simple. I have many esp8266 with 1820 running on old scrap mains adapters. They all work well but they all use a 500-1000mA regulator (to be on the safe side).

Good luck, it must be something simple :-)
juuzo
Posts: 20
Joined: Monday 15 October 2018 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by juuzo »

That regulator thing is good point. I bought ht7333 just because of battery powered sensors but with wall supply I can use some other regulator. I will buy few regulators that can supply more current and test with those.
juuzo
Posts: 20
Joined: Monday 15 October 2018 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by juuzo »

I tried to power ds18b20 sensors straight from 5v usb line and ht7333 only supplying esp8266. So problem is not ht7333. Still sensors reading -127c... I have no clue what I try next...
juuzo
Posts: 20
Joined: Monday 15 October 2018 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by juuzo »

I made another esp for my co worker and it works flawlessly with 8 ds18b20 installed to it. I think that my problem must be the sensors itself. I have to try with other sensors now.
gerardvs
Posts: 81
Joined: Sunday 04 January 2015 0:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest-1
Location: /dev/null
Contact:

Re: Esp8266 and ds18b20 not working with wall supply

Post by gerardvs »

Thanks for reporting back on this.
Maybe the sensor is a bit sensitive on 3.3v. Most likely a Chinese clone(?) These components usually work fine unless you are on the boundary of the specs.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest