How to organize a stable power to the esp8266 and the relay coil to 12V from 220V?

Hello, everyone! There is a diagram of a wireless relay on the basis of wifi module ESP8266. The power supply is implemented using the AC/DC Converter LNK306 that outputs 12V, and the integral stabilizer AMS1117-33. Rated voltage of relay coil to 12V it receives from LNK306. The problem is that the ESP8266 is fine stitched and according to the log starts to run the program but immediately gives memory errors (something like stack exception (2)). I found that this is due to the power as when you connect the ESP to an external power source with the same regulator AMS1117-33 everything works fine and stable. In General, how to organize a stable power?
July 9th 19 at 13:19

Find more questions by tags Electronic componentsElements of supplyPower supply unit