I am using a Wemos D1 Mini (Cheap clone) to control a 5V Songle relay. I have pin D4 set as an output and it is connected to the Base of a 2N3903 NPN BJT, through a 1KOhm resistor. The Emitter of the BJT is connected to ground, and the Collector is connected to +5V through a Songle relay coil (I measured 70Ohms for the coil). I also have a flyback diode across the relay coil.
When I RESET the Wemos board, even without commanding the D4 output, the D4 pin, as well as the 3.3V pin oscillate between 0 and 3.3V. This happens also if I keep the Collector unconnected to anything.
Does anyone have an idea about what the problem might be? I did some tests on the side, and with this setup, the BJT should consume about 2.5mA at the base (3.3V through 1KOhm resistor to the base). So even though I am using a cheap Wemos with a crappy 3.3V regulator, 2.5mA *should be* low enough not to cause any trouble.
Any help would be appreciated!
zouje.