Power

From Let's Control It
Revision as of 19:58, 24 February 2016 by BertB (talk | contribs) (→‎Capacitors)
Jump to navigation Jump to search

Under construction

The ESP8266 is not very power hungry, but it requires some special measures to operate in a predictable way and to avoid many spurious reboots.

Most disturbances are caused by problems with the power supply

First some facts:

ESP power usage.jpg

The ESP8266 uses between 50 mA and 170 mA

Since the ESP8266 is transmitting in bursts, it is easy to understand that this behavior will cause a lot of spikes and other undesired signals on the power lines and these can easily translate into unwanted resets and other disturbances. This also pops up when factory made boards like NodeMCU are being used, especially in conjunction with external devices.

What can you do?

1 - First, use a good power supply, capable to deliver 5 volt at 1 Amp.
2 - Mount capacitors across the power lines, as close as possible to the ESP8266.
3 - Mount a 10 nF (multi layer, preferably smd) capacitor from the reset terminal to ground.
4 - Use at least one 10uF (tantalum) and one 100 nF (multi layer) capacitor per externally connected device.
5 - Use a separate power supply to feed external devices.
6 - In some cases it helps to by-pass the diode on the NodeMCU board.

Power supply

Under construction

Capacitors

Under construction

Diode by-pass

Under construction

Below a part of the schematic of the NodeMCU:

NodeMCU power.jpg

Important to notice is the Diode D1, that is placed to protect the USB port and host from external power supplies. In some cases the diode is not a Schottky diode, which has a much lower forward voltage drop (Vf=0.15 ~ 0.45 volt), but a regular diode that can have a Vf of 0.6 ~ 0.9 (or even higher) volt. The actual Vf depends on the current that flows through the diode. The regulator that makes the required 3.3 volts out of the 5 volt tension from the USB port, also has a voltage drop. An AMS 1117 for example (which is on my Chinese NodeMCU board) can have a Vf of up to 1.3 volt. The SPX3819 in the schematic only needs a typical 0.34 @ 500 mA to regulate the power.

The maths show that 5 - 0.9 - 1.3 = 2,8 volt. This is not enough for the ESP8266 to work with. Even with a schottky diode, it is barely enough.

Therefore, it can help to:

- replace the diode with a schottky type or
- just short circuit the diode, but then 
be very careful not to blow up your USB host!

.