Wemos D1 Mini disconnects from WIFI (multiple sensors connected)

Hello there.

I’ve recently built a home thermostat for my heating system. It has at its base a chinese D1 Mini replica, a 5V relay, a 5V display connected to I2C (1306 i guess is the model), a temperature&humidity 3V (HDC1080) sensor and a 5V rotary encoder.

I have them connected in the following manner:

  • The Display is connected to the 5V on the board (i2c for data)

  • The temperature sensor is connected to the 3V pin on the board (i2c for data)

  • The relay is connected to the 3V pin on the board (the 5V one doesn’t seem to work is this case and GPIO for data)

  • The rotary encoder is connected to the 5V pin (GPIO for data).

The weird thig is: if i leave the rotary encoder plugged the Wemos will get random disconnects and becomes unavailable for a few seconds (3 or 5 disconnects in 60 minutes)
Ive checked the logs but i cannot seems to find anything that can point me to solving this. The only solution that ive found for now is to unplug the 5V power pin to the rotary. If i do this the thermostat works as expected.
Also i use a 5V 1A power supply and the current draw is something like 0.08A, so i don’t think its a power supply issue.

My question is: do you guys know of a limitation of the D1Mini to supply power to multiple sensors from its pins? That would explain why the board is getting disconnected (maybe the WIFI gets starved of power? idk.).

Any replay is appreciated, thanks!

Check the max power output per pin on the D1mini (authentic!) specifications. Remember you’re using a knockoff/copy D1 so there really is a possibility they’ve cut some corners. If I recall correctly you’re limited to some max output (50ma?) or something. It’s possible that the V+ side of the power regulator on the D1 is limited to 150mw or something and the Screen/Sensors/LowPowerMode of the CPU is causing the timing of these power “brownouts”.

Just an idea, but food for thought. I realize this gets deeper into the microcode of the ESP 8266 chip architecture but it may be something to consider.

LOL. I think we’re attempting to revive the dead. :headstone: :man_zombie: :coffin:

1 Like

Checked the pin outputs and the max output its not in spec, so my theory was (after looking at some logs) that the WIFI chip was starved of power in the initial setup. The solution in my case was to set delay the I2C initialization until the device gets connected to the WIFI network and also changed the frequency of the I2C (to improve the compatibility with the Display)