ESP8266 Power Supply 220V->5V crashes

I have some projects where I am controlling a 220V socket via a relay.
Normally I used a power adapter for the ESP and 220V plug for the socket and it works.

Now I found power adapter to built on the board:
I used this in several different projects now and it worked directly when connecting the output to VIN and GND.

BUT! After some time now one after the other is no more working and in every case it was the power adapter. There was no more output.

When searching for that issue, it seems I am the only one with this issue :frowning:

Does anybody have an idea, why this is happening?
Is it necessary to protect the module from voltage peaks?

Thanks & Regards,

Hi @,
you did not inform what type of load the relay operates.
But anyway I would test using snubber on the relay contacts.
Relay contacts usually cause spikes, which cause problems with microcontrollers, and snubbers greatly reduce this type of problem.

RV mineirin

thanks for your reply!
Does this mean that the cable which is controlled by the relay goes also through the snubber?
And do you have a link for an example which I can use?
This one e.g. BIlinli RC Absorption/Snubber Circuit Module Relay Contact Protection Resistance Surge : Baumarkt?
The devices are machines from my garage.
Thanks, Roger

Ahhh simply putting the snubber also in into the relay clamps?


One last question:
One of my projects is without relay. The socket is wired in parallel to the power adapter.
Makes it also sense to put a snubber before the Vin+ of the power adapter?

Hi @rogiknaupi ,
I suggest yes, because this issue of electrical noise interfering with microcontrolades does not depend on whether they use transmissions or not.

RV mineirin

Hi @rogiknaupi ,
Another recommendation, when using microcontrollers with relays, is to set as OUTPUT all the pins of the controller that are not being used, avoiding an "input port" of electrical noise.

RV mineirin

That supply is rated at 5V 3W so 3/5 = 0.6A or 600mA

What is your total load on the 5V output?

A circuit diagram and a picture of your project would help.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

uuhhh embarrassing...
I am not a micro electronic professionel and here they very often blame the fritzing. But I can't provide anything else... :frowning:

One project is for my garage (master/slave solution based on WiFi):

Another one is some kind of thermostat for a caravan (power supply and relay have the same source and the relay controls a small heater):

I want to mention here again. No electric parts crashed but the power supply adapter - nothing else. Therefore my question: Can I save the power supply adapter from peaks?

Thanks, Roger

What do you have connected to the socket?
What is the load?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

In the first project machines like drilling machine, router, jigsaw.
And in the second project a heater: Berger Keramik-Heizlüfter Plus - Fritz Berger Campingbedarf

Most of those are an inductive loads, so will produce spike problems.
The heater will probably have a high surge current on startup as the element will be of a low resistance initially.

We really need a circuit diagram of your project, and if possible some pictures of your project so we can see your component layout.

What relays are you using?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:
PS. I'm off to bed, just after midnight here... :sleeping: :sleeping: :sleeping:

Thanks so far and have a good night!

I think you need to have some sort of protection on the input of the module. When I think of all the power supplies I've seen (open frame) there was always a series fuse and a MOV across the input power before the supply.
An MOV is a special resistor who's resistance varies with voltage. It varies sharply at a voltage specified by the mfg.
Its function is to clip off high voltage spikes.
I can't provide a part number off hand but any mfg will have information for 220VAC circuits.


That sounds really promising!
I will give it a try.
Thanks a lot...

Good luck :slight_smile:


I don't think so. Are you confusing this with an incandescent light bulb?

Inductive loads are what create spikes if a snubber isn't used.

If I don,t know the load, (usually) I guessed maybe.... understood?