Stufin
Home Quick Cart Profile

Arduino Mega 2560+WiFi R3 ATmega2560+Node MCU ESP8266 CH340G Compatible Board

Buy Now on Stufin

Key Features

### Microcontroller (ATmega2560)

8-bit AVR microcontroller with 256KB flash memory and 8KB SRAM

16MHz quartz crystal oscillator

54 digital input/output pins (of which 15 can be used as PWM outputs)

16 analog input pins

Serial communication protocols

UART, I2C, and SPI

Operating voltage

5V

Input voltage range

7-12V

### ESP8266 Node MCU (WiFi Module)

Built-in 802.11 b/g/n WiFi module

Supports Wi-Fi Direct (P2P), Soft-AP, and Station modes

Up to 16MB of flash memory for storing WiFi firmware and user data

Integrated low-power 32-bit MCU (Tensilica L106) for WiFi processing

Supports TCP/IP, DHCP, DNS, and SSL/TLS protocols

### CH340G USB-to-Serial Chip

Converts USB signals to serial communication protocols (UART, SPI, I2C)

Supports baud rates up to 2Mbps

Compatible with Windows, macOS, and Linux operating systems

### Additional Features

USB connector for programming and communication

Power jack for external power supply (7-12V)

Reset button for resetting the microcontroller

ICSP (In-Circuit Serial Programming) header for programming the ATmega2560

LED indicators for power, WiFi, and serial communication

### Operating Modes

Arduino mode

uses the ATmega2560 as the primary microcontroller, with the ESP8266 Node MCU as a WiFi shield

ESP8266 modeuses the ESP8266 Node MCU as the primary microcontroller, with the ATmega2560 as a peripheral device

### Applications

IoT projects requiring WiFi connectivity and microcontroller functionality

Robotics and automation systems

Wireless sensor networks

Home automation and smart home systems

Wearable devices and IoT-enabled accessories

Certifications and Compliance

CE and FCC certified

RoHS compliant

Operating System

Compatible with Arduino IDE, ESP8266 SDK, and other development environments

Dimensions

Length

10.1 cm (4 inches)

Width

5.3 cm (2.1 inches)

Height

1.7 cm (0.67 inches)

Weight

Approximately 50 grams (1.76 oz)

This Arduino Mega 2560+WiFi R3 ATmega2560+Node MCU ESP8266 CH340G Compatible Board offers a powerful and versatile platform for IoT development, providing a range of features and capabilities for building innovative projects.

Pin Configuration

  • Arduino Mega 2560+WiFi R3 ATmega2560+Node MCU ESP8266 CH340G Compatible Board Pinout Guide
  • The Arduino Mega 2560+WiFi R3 ATmega2560+Node MCU ESP8266 CH340G Compatible Board is a microcontroller board based on the ATmega2560 and ESP8266 chipsets. It features 54 digital input/output pins, 16 analog inputs, 4 UARTs (hardware serial ports), and a range of other peripherals. Here's a breakdown of each pin and its functions:
  • Digital Pins (54)
  • 1. Digital Pin 0 (RX0): UART0 receive pin, used for serial communication.
  • Connection: Connect to the transmit pin of a serial device (e.g., GPS, Wi-Fi module).
  • 2. Digital Pin 1 (TX0): UART0 transmit pin, used for serial communication.
  • Connection: Connect to the receive pin of a serial device (e.g., GPS, Wi-Fi module).
  • 3. Digital Pin 2: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 4. Digital Pin 3: General-purpose digital input/output pin, also used as an interrupt pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices. Can also be used as an interrupt pin.
  • 5. Digital Pin 4: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 6. Digital Pin 5: General-purpose digital input/output pin, also used as an PWM (Pulse Width Modulation) output.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices. Can also be used as a PWM output for controlling DC motors, LEDs, etc.
  • 7. Digital Pin 6: General-purpose digital input/output pin, also used as an PWM output.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices. Can also be used as a PWM output for controlling DC motors, LEDs, etc.
  • 8. Digital Pin 7: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 9. Digital Pin 8: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 10. Digital Pin 9: General-purpose digital input/output pin, also used as an PWM output.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices. Can also be used as a PWM output for controlling DC motors, LEDs, etc.
  • 11. Digital Pin 10: General-purpose digital input/output pin, also used as an SPI (Serial Peripheral Interface) CS (Chip Select) pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices. Can also be used as an SPI CS pin for communicating with SPI devices.
  • 12. Digital Pin 11: General-purpose digital input/output pin, also used as an SPI MOSI (Master Out Slave In) pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices. Can also be used as an SPI MOSI pin for communicating with SPI devices.
  • 13. Digital Pin 12: General-purpose digital input/output pin, also used as an SPI MISO (Master In Slave Out) pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices. Can also be used as an SPI MISO pin for communicating with SPI devices.
  • 14. Digital Pin 13: General-purpose digital input/output pin, also used as an LED pin (connected to an onboard LED).
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices. Can also be used to control the onboard LED.
  • 15. Digital Pin 14 (RX1): UART1 receive pin, used for serial communication.
  • Connection: Connect to the transmit pin of a serial device (e.g., GPS, Wi-Fi module).
  • 16. Digital Pin 15 (TX1): UART1 transmit pin, used for serial communication.
  • Connection: Connect to the receive pin of a serial device (e.g., GPS, Wi-Fi module).
  • 17. Digital Pin 16: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 18. Digital Pin 17: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 19. Digital Pin 18: General-purpose digital input/output pin, also used as an I2C SDA (Serial Data) pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices. Can also be used as an I2C SDA pin for communicating with I2C devices.
  • 20. Digital Pin 19: General-purpose digital input/output pin, also used as an I2C SCL (Serial Clock) pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices. Can also be used as an I2C SCL pin for communicating with I2C devices.
  • 21. Digital Pin 20: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 22. Digital Pin 21: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 23. Digital Pin 22: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 24. Digital Pin 23: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 25. Digital Pin 24: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 26. Digital Pin 25: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 27. Digital Pin 26: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 28. Digital Pin 27: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 29. Digital Pin 28: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 30. Digital Pin 29: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 31. Digital Pin 30: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 32. Digital Pin 31: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 33. Digital Pin 32: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 34. Digital Pin 33: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 35. Digital Pin 34: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 36. Digital Pin 35: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 37. Digital Pin 36: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 38. Digital Pin 37: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 39. Digital Pin 38: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 40. Digital Pin 39: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 41. Digital Pin 40: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 42. Digital Pin 41: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 43. Digital Pin 42: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 44. Digital Pin 43: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 45. Digital Pin 44: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 46. Digital Pin 45: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 47. Digital Pin 46: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 48. Digital Pin 47: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 49. Digital Pin 48: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 50. Digital Pin 49: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 51. Digital Pin 50: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 52. Digital Pin 51: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 53. Digital Pin 52: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • 54. Digital Pin 53: General-purpose digital input/output pin.
  • Connection: Can be used as a digital input or output for sensors, actuators, or other devices.
  • Analog Pins (16)
  • 1. Analog Pin 0: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 2. Analog Pin 1: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 3. Analog Pin 2: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 4. Analog Pin 3: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 5. Analog Pin 4: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 6. Analog Pin 5: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 7. Analog Pin 6: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 8. Analog Pin 7: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 9. Analog Pin 8: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 10. Analog Pin 9: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 11. Analog Pin 10: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 12. Analog Pin 11: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 13. Analog Pin 12: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 14. Analog Pin 13: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 15. Analog Pin 14: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • 16. Analog Pin 15: Analog input pin, connected to an internal voltage reference.
  • Connection: Can be used as an analog input for sensors, potentiometers, or other analog devices.
  • ESP8266 Pins
  • 1. ESP8266 RX: Receive pin for ESP8266 communication.
  • Connection: Connect to the transmit pin of a serial device (e.g., Wi-Fi module).
  • 2. ESP8266 TX: Transmit pin for ESP8266 communication.
  • Connection: Connect to the receive pin of a serial device (e.g., Wi-Fi module).
  • 3. ESP8266 VCC: Power pin for ESP8266.
  • Connection: Connect to a 3.3V power source.
  • 4. ESP8266 GND: Ground pin for ESP8266.
  • Connection: Connect to a common ground.
  • 5. ESP8266 EN: Enable pin for ESP8266.
  • Connection: Connect to a digital output pin or a logic level converter.
  • 6. ESP8266 RST: Reset pin for ESP8266.
  • Connection: Connect to a digital output pin or a reset button.
  • CH340G Pins
  • 1. CH340G RX: Receive pin for CH340G communication.
  • Connection: Connect to the transmit pin of a serial device (e.g., computer).
  • 2. CH340G TX: Transmit pin for CH340G communication.
  • Connection: Connect to the receive pin of a serial device (e.g., computer).
  • 3. CH340G VCC: Power pin for CH340G.
  • Connection: Connect to a 5V power source.
  • 4. CH340G GND: Ground pin for CH340G.
  • Connection: Connect to a common ground.
  • Power Pins
  • 1. VIN: Input voltage pin for the ATmega2560.
  • Connection: Connect to an external power source (e.g., battery, wall adapter).
  • 2. 5V: Regulated 5V output pin from the on-board voltage regulator.
  • Connection: Can be used as a power source for external devices.
  • 3. 3.3V: Regulated 3.3V output pin from the on-board voltage regulator.
  • Connection: Can be used as a power source for external devices.
  • 4. GND: Ground pin.
  • Connection: Connect to a common ground.
  • Note: Make sure to follow the pinout diagram and datasheet of each component to ensure correct connections and avoid damage to the board or components.

Code Examples

Arduino Mega 2560+WiFi R3 ATmega2560+Node MCU ESP8266 CH340G Compatible Board Documentation
Overview
The Arduino Mega 2560+WiFi R3 ATmega2560+Node MCU ESP8266 CH340G Compatible Board is a microcontroller board that combines the functionality of the Arduino Mega 2560 and the Node MCU ESP8266. This board features the ATmega2560 microcontroller, Wi-Fi capabilities through the ESP8266 module, and a CH340G USB-to-serial converter. It provides a powerful and flexible platform for IoT projects, robotics, and automation.
Specifications
Microcontroller: ATmega2560
 Wi-Fi Module: ESP8266
 USB-to-serial converter: CH340G
 Operating Voltage: 5V
 Input Voltage: 7V-12V
 Digital I/O Pins: 54
 Analog Input Pins: 16
 Flash Memory: 256 KB
 SRAM: 8 KB
 EEPROM: 4 KB
Programming
The board can be programmed using the Arduino Integrated Development Environment (IDE) version 1.8.x or later. The ESP8266 module can be programmed using the ArduinoWiFi library.
Code Examples
### Example 1: Wi-Fi Connectivity and LED Control
This example demonstrates how to connect to a Wi-Fi network and control an LED using the ESP8266 module.
```c
#include <WiFi.h>
const char ssid = "your_wifi_ssid"; // Replace with your Wi-Fi SSID
const char password = "your_wifi_password"; // Replace with your Wi-Fi password
WiFiServer server(80);
void setup() {
  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
  server.begin();
}
void loop() {
  WiFiClient client = server.available();
  if (client) {
    Serial.println("Client connected");
    String request = client.readStringUntil('
');
    if (request.indexOf("led=on") != -1) {
      digitalWrite(LED_BUILTIN, HIGH);
      client.println("HTTP/1.1 200 OK");
      client.println("Content-Type: text/html");
      client.println();
      client.println("<html><body><h1>LED is ON</h1></body></html>");
    } else if (request.indexOf("led=off") != -1) {
      digitalWrite(LED_BUILTIN, LOW);
      client.println("HTTP/1.1 200 OK");
      client.println("Content-Type: text/html");
      client.println();
      client.println("<html><body><h1>LED is OFF</h1></body></html>");
    }
    client.stop();
  }
}
```
### Example 2: Reading Analog Input and Sending Data to a Server
This example demonstrates how to read an analog input from a sensor and send the data to a remote server using the ESP8266 module.
```c
#include <WiFi.h>
#include <WiFiClient.h>
const char ssid = "your_wifi_ssid"; // Replace with your Wi-Fi SSID
const char password = "your_wifi_password"; // Replace with your Wi-Fi password
const char serverUrl = "http://your_server_url.com/data"; // Replace with your server URL
WiFiClient client;
void setup() {
  Serial.begin(115200);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
}
void loop() {
  int sensorValue = analogRead(A0);
  String data = "sensorValue=" + String(sensorValue);
  client.setServer(serverUrl, 80);
  client.println("POST " + String(serverUrl) + " HTTP/1.1");
  client.println("Host: " + String(serverUrl));
  client.println("Content-Type: application/x-www-form-urlencoded");
  client.println("Content-Length: " + String(data.length()));
  client.println();
  client.println(data);
  client.stop();
  delay(1000);
}
```
### Example 3: Robotics Control using Motor Shield
This example demonstrates how to control a motor using the Arduino Mega 2560 and a motor shield.
```c
#include <Arduino.h>
#include <AFMotor.h>
AF_DCMotor motor(1, MOTOR12_64KHZ); // Replace with your motor shield pin connections
void setup() {
  Serial.begin(115200);
  motor.setSpeed(150); // Set motor speed
}
void loop() {
  motor.run(FORWARD); // Run motor forward
  delay(2000);
  motor.run(BACKWARD); // Run motor backward
  delay(2000);
  motor.run(RELEASE); // Release motor
  delay(1000);
}
```
These examples demonstrate the board's capabilities in various contexts, including Wi-Fi connectivity, analog input, and motor control. The Arduino Mega 2560+WiFi R3 ATmega2560+Node MCU ESP8266 CH340G Compatible Board is a versatile platform for IoT projects, robotics, and automation applications.