DIY Memo: ESP8266 v7 hookup

Same story as the last time, but with ESP8266 v7 this time.

This is the hook-up instruction for ESP-07 and how to capitalize on its GPIO pins.


Things to know:

– 3.3V power source

– Default baud rate: 115200 (programmable at 9600)

– R1, R2, R3, R4 are all 10K

– C1 is 0.1 uF (ceramic capacitor 104)

– The solder pads are slightly smaller than the standard Arduino pin’s dimension. Use a small drill, purchase specialized pins or solder wires directly.

– GPIO2 -> HIGH during startup

– GPIO0 -> HIGH (standard) or GPIO0 -> LOW (flash) during startup

– GPIO15 -> LOW (standard) or GPIO15 -> HIGH (boot from SD card) during startup

– RXD is GPIO3 and can only be used as input. Similarly, TXD is GPIO1 and can only be used as output

– Deep sleep requires connecting GPIO16 -> RST to wake up.

– A diode from RST -> GPIO16 is necessary to use wake up and reset switch at the same time. The cause is GPIO16 producing HIGH current in deep sleep and it prevents reset switch from working. A diode blocking this current solves the issue.

– ADC is the only analog pin available. It is GPIO6 or A0 (alias) in Arduino language.

ESP8266 pin I/O support
GPIO0 INPUT with pull-up, jumper and delayed hook-up via a sacrificial GPIO pin which is only grounded after boot
OUTPUT with external device between VCC and GPIO0 (GPIO0 -> HIGH, device -> LOW)
GPIO2 INPUT with pull-up and delayed hook-up via the same sacrificial GPIO pin as GPIO0
OUTPUT with external device between VCC and GPIO2 (GPIO2 -> HIGH, device -> LOW)
GPIO15 OUTPUT with external device between GND and GPIO15 (GPIO0 -> HIGH, device -> HIGH)
RST or DTR to wake up from Deep Sleep mode. Include a diode from RST -> GPIO16 if reset switch is used
GPIO6 (ADC, A0) Analog INPUT

Read more:

DIY Memo: ESP8266 v1 hookup

Tonight marks the third time I forgot how to hook up this wifi module already, I might as well leave a memo here for my forgetful future self.

This is the hookup instruction for ESP8266 v1 using CP2012 and Tera Term software


Things to know:

  • 3.3 VDC source
  • RX and TX can accept 5V logic level without problems (so far).
  • 5V output of an Arduino Uno (externally sourced) through AMS1117 provides enough current for ESP8266 boot up.
  • Default: 115200 baud rate
  • Tera Term > Setup > Terminal > New-line transmission mode: CR+RF
  • Flash mode: GPIO 0 + RESET -> GND then RESET -> float and finally GPIO 0 -> float
ESP8266 CP2012 / Source
GND GND (common to CP2012)

Technical aspects of computer visual system

Here’s a few technical aspects of computer visual system I wrote two months ago in response to a complaint regarding scroll bars in wiki articles on wide screens.

First, we have the sampled image dimension in pixel resolution. Then, we have the physical dimension of the monitor in inches. Finally, we have the all-so-important parameter no one gives a damn about called “dpi” or “dots per inch”.


Each inch of the screen consists of a number of dots. Each pixel of the digital image is physically displayed using a cluster of dots. Dpi value links the virtual dimension of an image to the physical dimension of a screen.

For example, 1024×768 pixels can be displayed using 1024×768 discrete dots and if we have the dpi to be 64, it will translate into a 16″ x 12″ (or a 20″ screen, diagonally). Increase the dpi to 128, it will become a 10″ screen.

In this manner, I can ramp up the dpi to 256 or higher and get things displayed in a 5″ monitor. However, I won’t be able to see a damn without a magnifier as the image’s details will be really small. Hence, to the user, the physical dimension (measured in inch) of the screen matters the most and is the determining factor whether I want to view the web page at 100%, 120% or 150% zoom ratio.

Zoom ratio:

Because physical devices don’t just shrink or expand, we invented the scroll bars to emulate expansions in physical dimension. Instead of having two 5″ screen side-by-side to double the area, we have one 5″ screen and a 50% scroll bar. In principle, the zoom ratio ties the emulated dimension to the actual dimension.

A screen at 200% zoom ratio will measure an image in inches the same as a 100% zoom screen of twice the physical size will. Arguably the resolution will seem lower if the screen didn’t have enough (or small enough) dots to meet dpi requirement. The effect is that we have lower resolution at a certain dpi above a certain zoom ratio.

Try this one exercise:

Adjust the browser’s zoom ratio and see the scroll bars:

1) Appears or widens when zoom out (smaller image, less scrolling)

2) Shrinks when zoom in (larger image, more scrolling).

Human perception has its limits, plus, some people are more impaired than others, they have their own preferences when it comes down to zoom ratio of the browser, which affects the interpretation resolution of the displayed image.

That’s why people who have 20″ screens will likely to view at 100% zoom (since the image resolution won’t be so small) and people who have 10″ screens will likely to zoom out to 200%  in order to emulate the effect of viewing a 1024×768 px image in 512×384 px (by design) monitor.

A common misconception I have seen over and over again is the rated p value of a monitor. When a monitor is rated at 1080p, it means we have 1920×1080 dots (or any multiple of the resolution) across your screen and it is fully capable of producing full HD images. It says nothing about the physical size of the hardware (or the actual size of the dots for the matter).

For this reason, it’s incorrect to assume a $100 monitor won’t get scroll bars and weird stuffs. It does, just as others do with $20 tiny monitor, at a certain zoom ratio. And since zoom ratio is dictated by the viewer’s eyesight, two same screens might not see the same layout the same. Saying the layout is uniformed across devices, even among those with the same dimension, is naive.