Hi,
I’ve connected d1mini with 8 channel relay board as output (TX, RX, D0, D3, D4, D5, D6, D7) and connected it’s D1 and D2 to MCP23017 I2C GPIO extender as inputs (to use momentary switches). When I connected to power, it’s not booting up. When I remove VCC of relay board, it’s booting and then I re-connect the relay board VCC and I can use as usual. Please find the below esphome yaml code
Hey,
I’ve checked this board before assigning those pins. This is the reason I’ve left D8 as it’ll cause boot failure when pulled high. But I don’t understand one thing.
mode: INPUT_PULLUP
inverted: True
I’ve programmed all pins to pull high.
The documentation shows inverted ( Optional , boolean): If all read and written values should be treated as inverted. Defaults to False .
But I don’t understand this. Is inverted: True makes the pin to pull low?
facing same issue. Looks like it’s an issue with resistance of relay.
Relay light always turned on (less bright) for D7(GPIO13) which is not programmed and TX(GPIO1) randomly turning on and off and it’s responding when I use switch 1 to toggle relay which is connected to D0(GPIO16).
Later changed output to D5(GPIO14), same weird issue with relay connected to TX(GPIO1).
Though I removed all switches and relays, it was same. Later flashed complete code with all 7 relays and switches, board was normal (removed relay board while boot and connected after boot). But unable to boot while connected to relays.
No issue when rebooted from home assistant and booted normal.
I’m using another chip with tasmota connected to 4 relay board with momentary switches. I thought this may work, but haven’t calculated the voltage for all 8 relays.
So, if I use a logic-level converter, can I able to make it work?
like this one.
I’ve connected 5V 1A power supply and all relays turning on without any issue (tested with 5V 700mA power supply without any issue)
Using same 5V and ground pins to relays which is also connected to d1mini.
yes, the bootup issue still not fixed.
Wanted to change input to d1mini and relay output connections to MCP extender board. I know GPIO extender only provides 3.3v in logic level. As per the seller MCP23017 supports voltage between 1.8 to 5.5V.
Low Standby Current: 1 A (max.)
Operating Voltage:
1.8V to 5.5V @ -40°C to +85°C
2.7V to 5.5V @ -40°C to +85°C
4.5V to 5.5V @ -40°C to +125°C
Can I use 5v line to MCP board? So that I can disconnect relay board direct connection with d1mini. As MCP sends 3.3v there won’t be any issue with SDA and SCL pins right?
Removed all I2C and switches components. Nothing controlling I2C inputs and relay outputs. But relay board still acting weird. Looks like the issue is not with relays.
I just remembered when I accidentally put 5V on one of the D1 mini GPIOs. It didn’t damage it but it wouldn’t boot either. If the inputs to your relay board have pull up resistors putting 5V on the D1 pins this could be the issue. In which case the level shifter should fix the problem.
After all trials, I’ve changed both relay outputs and input switches to GPIO extender. Initially I have doubts on it’s voltage limitation. But after connecting both, all 8 relays and switches working without any issues. As it was connected to D1 and D2 of d1mini, all other pins are not connected to anything. However, I’ll get a logic level shifter just in case anything happen abnormally.
It seems like the issue with GPIO pins of d1mini that connected to relay. As I removed all other output pins from d1mini, not facing any boot up issue. However, it’s just a work around, but not a solution.