Guaranteeing Smooth Power to the esp8266

Thread Starter

DrPepper

Joined Feb 13, 2017
10
This is my first real project that I (and the rest of the internet) is building it from the ground up.
Once complete it will replace three Off/On Light Switch in the hallway and will be part of my house IoT.
The Prototype Seems to work well, but my knowledge of Power management is very limited. Any Best Practices (With Math) would be wonderful.

So the Wireless esp8266 modules control 3 relays. Thou I use a Transistor to trigger the relay, they still pull a lot of current from the 3v power supply when the coils are energized at the same time. I am fearful that the Power module will drop enough that the esp micro processer will fail.

This made me ask myself how can you determine priority within a circuit?
I want to make sure that the esp8266 is protected from voltage spikes/drops but not sure what way I can do that.

I read that a capacitor between the VCC and Ground would stop spikes and drops from effecting the esp8266, but not sure how to calculate the size?
Friends from another forum said to be careful of not over caping the power module, but not sure what math I use to do that.

this lead to even more questions:
( Question 2) Would it be better to go with a 5v 3w Power module and 5 volt relays and then step down to 3.3v for the ESP8266.
( Question 3) If I did step down, what would be best practice? A stepdown Buck, Voltage Regulator, or voltage divider ?

Here is some Reference Material

Relay Datasheet 3v
https://www.ghielectronics.com/downloads/man/20084141716341001RelayX1.pdf
http://lygte-info.dk/review/Power Mains to 5V 0.6A Hi-Link HLK-PM01 UK.html

ESP8266 – Datasheet
https://cdn-shop.adafruit.com/datasheets/ESP8266_Specifications_English.pdf

I also Included my Eagle design
relayboard.JPG
SwitchBoard.JPG
 

R!f@@

Joined Apr 2, 2009
9,918
I always use 100uf and a 100nf capacitor as close as possible to the uPC power pins
Try it first and then post back if you got problems.

These values are common and I always use them. So far so good
 

Papabravo

Joined Feb 24, 2006
21,225
There is no pat solution to the general problem that you pose. Your characterization of spikes and drops is more than a bit vague.

Let us start with spikes. Are these present on the input AC waveform from the power company? What is the magnitude and duration of these spikes? If they are significant you need to work with the utility to eliminate them. There is not much you can do downstream if you cannot characterize them and they can be unlimited in magnitude and duration. You may be able to use a common mode choke to mitigate smaller and shorter spikes.

With the DC output there is not much you can do for a dropout except provide battery backup. Depending on the load a capacitor of a given value will hold Vcc up for some defined period of time.

So give us some parameters of what you expect and we can talk about solutions.
 

Thread Starter

DrPepper

Joined Feb 13, 2017
10
I always use 100uf and a 100nf capacitor as close as possible to the uPC power pins
Try it first and then post back if you got problems.

These values are common and I always use them. So far so good
This is what I have on-hand:
100uf = Tantalum
100nf = Metallized Polyester Film Capacitor
Should I use Tantalum for both?
 

Thread Starter

DrPepper

Joined Feb 13, 2017
10
A 100uf low ESR Electrolytic.
A 100nf ceramic or monolithic ceramic or tantalum.
So I put the Cap's in last night, and Wow what a difference. Thank you so much...
To see why this makes a difference I need an Oscilloscope, Right?

Can you suggest one in the 500$ or less range?
I could use a better meter to, the one I got at Autozone is not doing the job. lol
 

R!f@@

Joined Apr 2, 2009
9,918
Yup a scope will show the spikes in Vcc when switching occurs.

I have Rigol ( May be a later model ).
And a Fluke 117C.
Scope is very recent but Fluke meter is like 7 years & damn worth it.
 

#12

Joined Nov 30, 2010
18,224
I put a whole house surge protector on my circuit breaker box and stopped getting the terminals blown off my air conditioning compressor. Cheap insurance at $40 and my opinion of a must-have, first line of defense.
 
Top