Stufin
Home Quick Cart Profile

ESP-12 D1 Mini V2 Board

Buy Now

Operating frequency

80 MHz to 160 MHz

Flash memory

4 MB (30 MHz crystal oscillator)

  • Wi-Fi:

IEEE 802.11 b/g/n Wi-Fi protocol support

Wi-Fi direct (P2P) and soft-AP modes

WPA/WPA2 encryption support

  • Peripheral Interfaces:

UART (Serial Communication)

SPI (Serial Peripheral Interface)

I2C (Inter-Integrated Circuit)

I2S (Inter-IC Sound)

  • Power Management:
GPIO (General Purpose Input/Output) pins11
Analog-to-Digital Converter (ADC) inputs1

Onboard voltage regulator (3.3V, 1A)

  • Dimensions and Package:
Power-saving modessleep, deep sleep, and hibernate

Dimensions

25.6 mm x 34.2 mm

Package

DIP-16 (Dual In-Line Package)

  • Operating Conditions:

Operating temperature

-20C to 85C

Storage temperature

-40C to 125C

  • Certifications:

FCC (Federal Communications Commission) certified

CE (Conformit Europene) certified

Advantages

Compact size and low power consumption make it suitable for battery-powered devices

Highly integrated SoC reduces the need for external components

Supports a wide range of development platforms, including Arduino and MicroPython

Affordable and readily available

Applications

IoT projects

home automation, wearable devices, smart sensors, and more

Robotics

robotic arms, robotic platforms, and autonomous vehicles

Wearable devices

smartwatches, fitness trackers, and health monitors

Industrial control systems

remote monitoring, automation, and control

By leveraging the ESP-12 D1 Mini V2 Board's features and capabilities, developers can create innovative and connected devices that can interact with the internet and other devices, enabling a wide range of IoT applications.

Pin Configuration

  • ESP-12 D1 Mini V2 Board Pinout Explanation
  • The ESP-12 D1 Mini V2 Board is a popular IoT development board based on the ESP8266 microcontroller. It has a total of 20 pins, which are divided into two rows of 10 pins each. Here's a detailed explanation of each pin:
  • Row 1 (top row)
  • 1. 3V3: This pin provides a 3.3V power supply output from the onboard voltage regulator. It can be used to power external components or sensors.
  • 2. RX: This pin is the receive (RX) pin for serial communication (UART). It's connected to the ESP8266's UART receiver.
  • 3. TX: This pin is the transmit (TX) pin for serial communication (UART). It's connected to the ESP8266's UART transmitter.
  • 4. D3: This pin is a digital input/output pin (GPIO3) that can be used for various purposes such as connecting sensors, LEDs, or buttons.
  • 5. D4: This pin is a digital input/output pin (GPIO4) that can be used for various purposes such as connecting sensors, LEDs, or buttons.
  • 6. D5: This pin is a digital input/output pin (GPIO5) that can be used for various purposes such as connecting sensors, LEDs, or buttons.
  • 7. D6: This pin is a digital input/output pin (GPIO6) that can be used for various purposes such as connecting sensors, LEDs, or buttons.
  • 8. D7: This pin is a digital input/output pin (GPIO7) that can be used for various purposes such as connecting sensors, LEDs, or buttons.
  • 9. D8: This pin is a digital input/output pin (GPIO8) that can be used for various purposes such as connecting sensors, LEDs, or buttons.
  • 10. GND: This pin is a ground pin and provides a reference point for the circuit.
  • Row 2 (bottom row)
  • 1. VIN: This pin is the input voltage pin for the onboard voltage regulator. It should be connected to an external power source (e.g., a battery or a wall adapter) with a voltage between 3.5V and 6V.
  • 2. EN: This pin is the enable pin for the ESP8266. It's used to reset the chip when connected to GND.
  • 3. RST: This pin is the reset pin for the ESP8266. When connected to GND, it resets the chip.
  • 4. D0: This pin is a digital input/output pin (GPIO0) that can be used for various purposes such as connecting sensors, LEDs, or buttons.
  • 5. D1: This pin is a digital input/output pin (GPIO1) that can be used for various purposes such as connecting sensors, LEDs, or buttons.
  • 6. D2: This pin is a digital input/output pin (GPIO2) that can be used for various purposes such as connecting sensors, LEDs, or buttons.
  • 7. SCL: This pin is the clock pin for I2C communication. It's connected to the ESP8266's I2C clock line.
  • 8. SDA: This pin is the data pin for I2C communication. It's connected to the ESP8266's I2C data line.
  • 9. SCK: This pin is the clock pin for SPI communication. It's connected to the ESP8266's SPI clock line.
  • 10. CS: This pin is the chip select pin for SPI communication. It's connected to the ESP8266's SPI chip select line.
  • Connecting the pins:
  • When connecting the pins, ensure you use the correct polarity and voltage levels to avoid damaging the board or the connected components. Here are some general guidelines:
  • Use a breadboard or a PCB to connect components to the ESP-12 D1 Mini V2 Board.
  • Use jumper wires or PCB tracks to connect the pins to the desired components.
  • Ensure the voltage levels of the connected components match the voltage levels of the ESP-12 D1 Mini V2 Board (3.3V or 5V).
  • Use pull-up or pull-down resistors as necessary to stabilize the signal lines.
  • Consult the datasheet of the connected components to ensure proper connection and operation.
  • Remember to handle the board with care, as it's a sensitive electronic component. Avoid touching the pins or components to prevent damage from static electricity.

Code Examples

ESP-12 D1 Mini V2 Board Documentation
Overview
The ESP-12 D1 Mini V2 Board is a compact, low-cost, and highly-integrated Wi-Fi System on a Chip (SoC) board based on the ESP8266EX chip. It is a popular choice for IoT projects due to its small size, low power consumption, and ease of use.
Hardware Specifications
Microcontroller: ESP8266EX
 Wi-Fi: 802.11 b/g/n
 Flash Memory: 4MB
 SRAM: 520KB
 Interfaces: UART, SPI, I2C, I2S, SDIO, GPIO
 Operating Voltage: 3.3V
 Operating Current: 150mA (average)
Code Examples
### Example 1: Wi-Fi Connection and HTTP Request
Description: This example demonstrates how to connect the ESP-12 D1 Mini V2 Board to a Wi-Fi network and send an HTTP request to a web server.
Code:
```c
#include <WiFi.h>
// Wi-Fi credentials
const char ssid = "your_wifi_ssid";
const char password = "your_wifi_password";
// HTTP request URL
const char url = "http://example.com";
void setup() {
  Serial.begin(115200);
// Connect to Wi-Fi
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to Wi-Fi...");
  }
Serial.println("Connected to Wi-Fi");
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());
}
void loop() {
  // Send HTTP request
  WiFiClient client;
  HTTPClient http;
http.begin(client, url);
  int httpResponseCode = http.GET();
if (httpResponseCode > 0) {
    String response = http.getString();
    Serial.println(response);
  } else {
    Serial.println("Error sending HTTP request");
  }
http.end();
  delay(5000);
}
```
### Example 2: GPIO Output Control
Description: This example demonstrates how to use the ESP-12 D1 Mini V2 Board's GPIO pins to control an LED.
Code:
```c
const int ledPin = 2;  // GPIO2
void setup() {
  Serial.begin(115200);
  pinMode(ledPin, OUTPUT);
}
void loop() {
  digitalWrite(ledPin, HIGH);
  Serial.println("LED on");
  delay(1000);
  digitalWrite(ledPin, LOW);
  Serial.println("LED off");
  delay(1000);
}
```
### Example 3: I2C Communication with a Sensor
Description: This example demonstrates how to use the ESP-12 D1 Mini V2 Board's I2C interface to communicate with a BMP180 temperature and pressure sensor.
Code:
```c
#include <Wire.h>
#define BMP180_ADDRESS 0x77
void setup() {
  Serial.begin(115200);
  Wire.begin();
// Initialize I2C communication
  Wire.beginTransmission(BMP180_ADDRESS);
  Wire.write(0x00);
  Wire.endTransmission();
}
void loop() {
  // Read temperature and pressure data
  int tempData = readI2CReg(BMP180_ADDRESS, 0x00);
  int pressData = readI2CReg(BMP180_ADDRESS, 0x01);
float temperature = (tempData / 16.0) - 273.15;
  float pressure = (pressData / 256.0) + 300;
Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.println(" C");
  Serial.print("Pressure: ");
  Serial.print(pressure);
  Serial.println(" mbar");
  delay(1000);
}
int readI2CReg(int address, int reg) {
  Wire.beginTransmission(address);
  Wire.write(reg);
  Wire.endTransmission();
Wire.requestFrom(address, 2);
  int data = (Wire.read() << 8) | Wire.read();
  return data;
}
```
These examples demonstrate the basic functionality of the ESP-12 D1 Mini V2 Board and its potential applications in IoT projects.