My ESP8266 controls a pump and a fluorescent lamp through a two-channel 5 V relay module. With no load connected everything is stable. With the mains loads connected, the ESP sometimes reboots or loses Wi-Fi, or the second relay chatters, at the moment a relay opens. The board is powered from a 5 V phone charger and the relay module shares that supply.
What causes this, and what is the correct way to suppress it without compromising mains safety?




