NodeMCU devkit V1 deep sleep

Low cost implementations of the NodeMCU devkit V1.0 abound on eBay, and are featured in lots of projects.

Deep sleep mode is used in a lot of projects, the MCU is but into sleep mode and it requires circuitry so that the  from the /WAKE pin (D0, GIO16) can pull the /RST pin to wake the processor up.

The problem

The common schematics as above simply wire /WAKE pin (D0, GIO16) to /RST (yellow wire), but this disrupts operation of the reset circuit, which degrades development productivity.

The reason

Above is the reset circuit.

NodeMCU custom build by
branch: master
commit: b96e31477ca1e207aa1c0cdc334539b1f7d3a7f0
SSL: false
modules: adc,dht,file,gpio,mqtt,net,node,ow,tmr,uart,wifi
build     built on: 2017-03-21 20:27
powered by Lua 5.1.4 on SDK 2.0.0(656edbf)

In the version of NodeMCU that I am testing, the /WAKE pin is driven high and so when GPIO16 is connected directly to nRST, the button KEY_RST/USER cannot pull nRST low through the 470Ω resistor.

The solution

Had the firmware configured the GPIO16 pin to operate in open collector mode, would not drive high and the reset button could pull nRST down. This might get fixed sometime.

A workaround is to synthesise the open collector connection by connecting /WAKE to /RST using a small signal diode (in34A, in5711) cathode to /WAKE and anode to /RST.

Above is the circuit for a devkit using a CP210x USB-serial chip. The DTR line can be used to reset the processor, assert DTR and release it. This is equivalent to pressing the on board RESET button and releasing it.

The RTS line can similarly control GIPO which is used by the board’s FLASH button.

Above a 1206 Schottky diode is fitted on the pads for R10 (in the first schematic), cathode to the right in the above pic. It is the third component from the top in the middle column. It doesn’t sit quite flat on the board, there was a lot of solder on the pads and I chose not to remove it, so the diode did not pull flat onto the board when heated with hot air.

An easier way to fit the diode to a devkit board is to wire a leaded one to the pins of the ESP8266 module.