Question: I am trying to build a small circuit using an ESP8288-12E, 4 5V relays and a 74HC595 shift register as the main components. To power the whole circuit I am using a Hi Link HLK 5M05 5V/5W switch power supply module.

Here is how I planned the whole circuit:

[![enter image description here](https://i.stack.imgur.com/iTD0j.jpg)](https://i.stack.imgur.com/iTD0j.jpg)

If it is difficult to see in this image then I can provide PDF as well.

I took this AMS1117-3.3 to get 3.3V from my 5V power supply. Instead of 3.3C, I am getting 4.2V on my PCB. I am not sure why this is happening.

I am attaching my EasyEDA file for the PCB design also.

[![enter image description here](https://i.stack.imgur.com/ogBMW.png)](https://i.stack.imgur.com/ogBMW.png)

One more issue I am facing is that when i take my multi-meter probes near to the circuit the relays are triggering automatically. I didn't connect the ESP8266-12E on the PCB yet, as I am not getting proper voltage on ESP8266-12E VCC pin.

Any suggestions, why this issue might be happening? Any suggestions will be helpful!

If someone wants to have an EasyEDA access I can provide for this project so can visualize the same issue more easily.

<https://oshwlab.com/nehul.splendit/shift-resistor-sn74hc595-with-4-channel-relay>

Here is the link of the same project.

Answer: 
If there is no load at all on the 3V3 regulator, it has no minimum required load so it won't output 3V3.

When there is no ESP connected, there is nothing connected on HC595 input pins, so they are floating. The input impedance is so high that taking multimeter probes nearby will cause the HC595 to see activity on input pins and it will randomly load in a data pattern to drive the relays to they will chatter on and off.

Also do note that inputs of HC595 fed with 5V is not compatible with 3.3V outputs of ESP. Either change the HC type to something else that can work with 3.3V input voltages, or change the supply of HC595 to 3V3.

Edit: Oh dear I just realized the supply that converts mains voltage to 5V is not external but onboard. The PCB layout is not safe for mains voltage at all. Not the mains input to supply, and not the relay contact wiring either. Please don't connect this to mains as it is unsafe.
Throw away that pcb before it kills you and burns down your house - I’m not joking. As others have observed, the clearance between tracks carrying mains voltages and low voltage tracks is nowhere near safe.
Have your mains wiring down one end of the pcb well away from the low voltage circuit. What current do you expect to switch with the relays? What voltage? I’d also suggest you use different relays like the omron G2R series - these are easier the design the pcb for and to ensure adequate clearance. The relays you’ve used require slots in the pcb and more care in the design. Do not use copper pours in the mains region!
Consider using a tpic6b595 instead of transistors and a 74hc595.
The esp12 module needs to be placed carefully - read the datasheet guidelines.
Throw away your current pcb before it becomes the first and last one you design.