Loading the figure…
A cheap Wi-Fi board: the ESP8266 on a breadboard-friendly carrier with USB
Each lesson runs your own code on the board. Finish its checks to tick it off.
Build the board in the right order, then power it up and check it, as on the bench.
0 of 9 stepsTake every part off. What is left is the two-layer board: black mask, white silkscreen, the pads of 38 parts and the two rows of header holes.
Each fault really happens in the simulation. Trigger one, watch the figure, then read why.
The NodeMCU DevKit v1.0 (sold as "Amica", often called V2) puts an Ai-Thinker ESP-12E module on a 25.4 x 48.3 mm board with a CP2102 USB-serial chip, a 3.3 V regulator and two buttons. The ESP8266EX inside runs at 80 MHz with 4 MB of flash and 2.4 GHz Wi-Fi. Everything is 3.3 V. The silkscreen names D0-D8 are not the GPIO numbers (D4 is GPIO2), both blue LEDs light when their pin is LOW, and three pins decide at reset whether the sketch runs at all. The wider LoLin "NodeMCU V3" clone (CH340G) has the same pin map but covers a whole breadboard.
| Header | Pin | Name | Functions | Level | Max current | Notes |
|---|---|---|---|---|---|---|
| J1 | 1 | A0 | ADC0 via the 220 k / 100 k divider (0-3.2 V) | 3.2 V | – | The only analog input. The board's 220 kΩ / 100 kΩ divider scales 0-3.2 V down to the chip's 0-1.0 V, so analogRead(A0) returns 0-1023 for 0-3.2 V. 5 V here just reads 1023 and is out of spec. |
| J1 | 2 | RSV | TOUT, straight to the ADC (0-1.0 V) | 1 V | – | Wired straight to the chip's TOUT pin, past the divider: 0-1.0 V only. Leave it free and use A0. The bottom silkscreen prints NC here, but the copper is connected. |
| J1 | 3 | RSV | – | – | – | Not connected on this board. On the wider LoLin V3 clone this position is VU, the USB 5 V before the diode. |
| J1 | 4 | SD3 | GPIO10, SDIO DATA3, flash /WP | 3.3 V | – | GPIO10, the flash chip's /WP line. Part of the SPI flash bus: do not use. |
| J1 | 5 | SD2 | GPIO9, SDIO DATA2, flash /HOLD | 3.3 V | – | GPIO9, the flash chip's /HOLD line. Driving it low freezes the flash and crashes the chip: do not use. |
| J1 | 6 | SD1 | GPIO8, SDIO DATA1, flash DI (MOSI) | 3.3 V | – | GPIO8, flash data in. SPI flash bus: do not use. |
| J1 | 7 | CMD | GPIO11, SDIO CMD, flash /CS | 3.3 V | – | GPIO11, flash chip select. SPI flash bus: do not use. |
| J1 | 8 | SD0 | GPIO7, SDIO DATA0, flash DO (MISO) | 3.3 V | – | GPIO7, flash data out. SPI flash bus: do not use. |
| J1 | 9 | CLK | GPIO6, SDIO CLK, flash SCLK | 3.3 V | – | GPIO6, flash clock. SPI flash bus: do not use. |
| J1 | 10 | GND | – | – | – | Ground (square pad). |
| J1 | 11 | 3V3 | regulator output | 3.3 V | – | 3.3 V from the regulator. The ESP8266 and the CP2102 already take 100-250 mA of it. |
| J1 | 12 | EN | CH_PD chip enable, 12 k pull-up R3 | 3.3 V | – | Chip enable (CH_PD), held high by R3. Pull it low and the ESP8266 switches off. |
| J1 | 13 | RST | EXT_RSTB, 12 k pull-up R4, RST button | 3.3 V | – | Reset, held high by R4 and pulled low by the RST button. For deep sleep, wire D0 to this pin so the wake pulse can reset the chip. |
| J1 | 14 | GND | – | – | – | Ground (square pad). |
| J1 | 15 | Vin | regulator input, USB 5 V after D1 | 5 V | – | Regulator input. On USB it sits at about 4.65 V (5 V minus the SS14 drop); you can feed 5-9 V here instead. The silkscreen says 5-12 V, but at 12 V the regulator overheats under Wi-Fi load. Not protected against reverse polarity. |
| J2 | 1 | D0 | GPIO16, WAKE, LED_BUILTIN_AUX (LED1) | 3.3 V | 12 mA | GPIO16 and the board's blue LED (LED1, lit when LOW). PWM through analogWrite() works (core 3.x, not MicroPython), but no interrupts and no pull-up (only INPUT_PULLDOWN_16). It is also the deep-sleep wake output. |
| J2 | 2 | D1 | GPIO5, SCL (Wire) | 3.3 V | 12 mA | GPIO5, the default I2C SCL for Wire. Quiet at boot, so a good first choice for outputs. |
| J2 | 3 | D2 | GPIO4, SDA (Wire) | 3.3 V | 12 mA | GPIO4, the default I2C SDA for Wire. Quiet at boot. |
| J2 | 4 | D3 | GPIO0, FLASH button, boot strap (HIGH to run), Strapping pin | 3.3 V | 12 mA | GPIO0 and the FLASH button, pulled up by R1. It must be high at reset or the chip starts the ROM bootloader instead of your sketch. After boot it works as a button input. |
| J2 | 5 | D4 | GPIO2, TXD1 (Serial1), LED_BUILTIN (module LED), boot strap (HIGH at boot), Strapping pin | 3.3 V | 12 mA | GPIO2: the module's blue LED (LED_BUILTIN, lit when LOW) and UART1 TX. It must be high at reset (R2 pulls it up) and it flickers while the ROM prints its boot log. |
| J2 | 6 | 3V3 | regulator output | 3.3 V | – | 3.3 V output. |
| J2 | 7 | GND | – | – | – | Ground (square pad). |
| J2 | 8 | D5 | GPIO14, HSPI SCK | 3.3 V | 12 mA | GPIO14, hardware SPI clock (SCK). Quiet at boot. |
| J2 | 9 | D6 | GPIO12, HSPI MISO | 3.3 V | 12 mA | GPIO12, hardware SPI MISO. Quiet at boot. |
| J2 | 10 | D7 | GPIO13, HSPI MOSI, RXD2 (Serial.swap), CTS0 | 3.3 V | 12 mA | GPIO13, hardware SPI MOSI; Serial.swap() moves UART0 RX here. Quiet at boot. |
| J2 | 11 | D8 | GPIO15, HSPI SS, TXD2 (Serial.swap), RTS0, boot strap (LOW at boot), Strapping pin | 3.3 V | 12 mA | GPIO15, SPI chip select, pulled down by R5. It must be low at reset: a module or pull-up that holds it high stops the board from booting. |
| J2 | 12 | RX | GPIO3, RXD0 (Serial) | 3.3 V | 12 mA | GPIO3, UART0 RX, fed by the CP2102 through a 470 Ω resistor. Using it as a GPIO breaks Serial and uploads. |
| J2 | 13 | TX | GPIO1, TXD0 (Serial) | 3.3 V | 12 mA | GPIO1, UART0 TX to the CP2102. It carries the boot log, so it toggles at power-up. |
| J2 | 14 | GND | – | – | – | Ground (square pad). |
| J2 | 15 | 3V3 | regulator output | 3.3 V | – | 3.3 V output. |
Sensors and actuators this board drives, with the real connections.
A 220 Ω resistor gives a red LED about 6 mA from a 3.3 V pin: (3.3 V - 2.0 V) / 220 Ω.
| Part pin | Board pin |
|---|---|
| anode (long leg), through 220 Ω | D1Wire colour orange |
| cathode | GNDWire colour black |
Never connect an LED without a resistor: the pin is rated 12 mA. Blue and white LEDs need about 3 V and stay dim on 3.3 V.
Use pinMode(D5, INPUT_PULLUP); the pin reads LOW while the button is pressed.
| Part pin | Board pin |
|---|---|
| leg 1 | D5Wire colour white |
| leg 2 | GNDWire colour black |
Not on D3, D4 or D8: a pressed button or an external pull resistor there changes the boot mode. D0 has no pull-up.
Ends to 3V3 and GND, wiper to A0. The top 0.1 V of travel reads 1023 because A0's full scale is 3.2 V.
| Part pin | Board pin |
|---|---|
| end 1 | 3V3Wire colour red |
| wiper | A0Wire colour yellow |
| end 2 | GNDWire colour black |
LDR from 3V3 to A0 and 10 kΩ from A0 to GND: more light gives a higher reading.
| Part pin | Board pin |
|---|---|
| LDR leg 1 | 3V3Wire colour red |
| LDR leg 2 + 10 kΩ to GND | A0Wire colour yellow |
Runs from 3.3 V (2.7-5.5 V). 0.5 V means 0 °C and each 10 mV is 1 °C: °C = (raw x 3.2 / 1023 - 0.5) x 100.
| Part pin | Board pin |
|---|---|
| +Vs | 3V3Wire colour red |
| Vout | A0Wire colour yellow |
| GND | GNDWire colour black |
tone(D6, 440) works on any GPIO except D0; the ESP8266 makes the square wave in software.
| Part pin | Board pin |
|---|---|
| + | D6Wire colour purple |
| - | GNDWire colour black |
Servo library, signal on D5. The 3.3 V signal is enough for an SG90.
| Part pin | Board pin |
|---|---|
| orange (signal) | D5Wire colour orange |
| red (+) | VINWire colour red |
| brown (GND) | GNDWire colour brown |
Power it from Vin (about 4.65 V on USB), never from 3V3. Its stall current (several hundred mA) drags the supply down and resets the board, so give it its own 5 V supply with a shared GND for real work.
Trig on D5, Echo on D6, pulseIn() measures the echo. It needs 5 V, so take VCC from Vin.
| Part pin | Board pin |
|---|---|
| VCC | VINWire colour red |
| Trig | D5Wire colour green |
| Echo, through 1 kΩ / 2 kΩ divider | D6Wire colour yellow |
| GND | GNDWire colour black |
Echo is a 5 V signal and the ESP8266 is not 5 V tolerant: put a 1 kΩ / 2 kΩ divider (or a level shifter) between Echo and D6.
I2C OLED at address 0x3C: Wire.begin() uses SDA on D2 and SCL on D1.
| Part pin | Board pin |
|---|---|
| VCC | 3V3Wire colour red |
| GND | GNDWire colour black |
| SCL | D1Wire colour yellow |
| SDA | D2Wire colour blue |
I2C at 0x68 on D2 (SDA) and D1 (SCL).
| Part pin | Board pin |
|---|---|
| VCC | 3V3Wire colour red |
| GND | GNDWire colour black |
| SCL | D1Wire colour yellow |
| SDA | D2Wire colour blue |
GY-521 boards have their own 3.3 V regulator; fed with 3.3 V the sensor gets a little less, which it tolerates (2.375-3.46 V).
AO to A0, powered from 3V3 so the output never exceeds the 3.2 V range. Power it only while measuring to slow corrosion.
| Part pin | Board pin |
|---|---|
| VCC | 3V3Wire colour red |
| GND | GNDWire colour black |
| AO | A0Wire colour yellow |
Drives a 28BYJ-48 stepper from four GPIOs; the motor takes its current from Vin.
| Part pin | Board pin |
|---|---|
| IN1 | D1Wire colour orange |
| IN2 | D2Wire colour yellow |
| IN3 | D5Wire colour green |
| IN4 | D6Wire colour blue |
| + (5-12 V) | VINWire colour red |
| - | GNDWire colour black |
The ULN2003 inputs work from 3.3 V logic, but the motor supply must not come from 3V3. Use pins that stay quiet at boot (D1, D2, D5, D6) so the motor does not twitch at power-up.