# KS5014 Keyestudio 2560 WIFI PLUS Main Board ![](media/image-20260210100459595.png) ## 1. Introduction Keyestudio 2560 WIFI PLUS Main Control Board adopts two MCU including ATmega 2560 and esp8266, containing all functions of Arduino Mega 2560and ESP8266 development board. The two MCU combination is suitable for the development of the Internet of Things, networking functions, and independent wireless network construction. The download function of the serial port is controlled by the toggle switch, and the codes of the two MCU can be burned separately by using a USB interface so that two development boards can be used alone or combined. It is very convenient when using. ## 2. Parameters | Working Voltage | USB/5V; DC/7-16V **advice DC9V**(Esp8266/3.3V; ATmega 2560/5V) | | ------------------------------ | ------------------------------------------------------------ | | Working Current | Maximum output 3.3V/800mA or 5V/1.6A | | Maximum Power | 8W | | Working Temperature Range | -10~50 °C | | Dimensions | 103 * 53.5 * 13mm | | Environmental Attributes | ROHS | | ATmega 2560 Digital I/O | 54 pin (15 for PWM output; D20,D21 as regular I2C) | | ATmega 2560 PWM Digital I/O | 15 pin | | ATmega 2560 Analog Input Pin | 16 pin | | DC of each ATmega 2560 I/O Pin | 20mA | | ATmega 2560 flash | 256KB(8KB used for bootloader) | | ATmega 2560 SRAM | 8KB | | ATmega 2560 EEPROM | 4KB | | ATmega 2560 Clock Speed | 16MHZ | | Esp8266 Digital I/O | 9 on-board pin | | Esp8266 PWM Digital I/O | 4 pin (IO4,IO12,IO14,IO15) | | DC of each Esp8266 I/O Pin | 20mA | | Esp8266 flash | 2MB | | Esp8266 SRAM | 50kb | | Esp8266 Clock Speed | 26MHZ | | Esp8266 Radio Frequency | 2.4GHZ Receiver and Transmitter | | Wifi | ESP8266EX supports TCP/IP protocol and 802.11 b/g/n WLAN MAC protocol. Supports Basic Service Set (BSS) STA and SoftAP operation under Distributed Control Function (DCF). Enables optimization of active hours by minimizing host interaction for power management. | ## 3. Interfaces and Components Description ![](media/image-20260210100641182.png) ## 4. Special Function Interface | **Serial Communication** | Port 0 D0(RX) and D1(TX) Port 1 D19(RX) and D18(TX) Port 2 D17(RX) and D16(TX) Port 3 D15(RX) and D14(TX) | | -------------------------- | ------------------------------------------------------------ | | **External Interrupt** | D2(Interrupt 0), D3(Interrupt1), D18(Interrupt5), D19(Interrupt4), D20(Interrupt3) and D21(Interrupt2) | | **PWM Interface** | D2-D13 and D44-D46 | | **SPI Communication** | D53(SS), D51(MOSI), D50(MISO), D52(SCK) | | **IIC Communication** | D20(SDA), D21(SCL) | | **ICSP Interface** | ATMEGA2560-16AU Interface for burning firmware | | **USB Interface** | downloading programs and serial port debugging | | **DC Power Interface** | able to connect to DC7V-16V,**advice DC9V** | | **Power Output Interface** | 3.3V/5V output, often used for external power supply or common ground processing | | **Analog Interface** | A0-A15 | **ESP8266 pin** (Logo of the board as the positive direction, pin attributes from left to right) ![](media/image-20260210100806028.png) **DIP Switch Description (ON/OFF)** ![](media/1.png) ## 5. Software Download Open the browser and search: https://www.arduino.cc/en/software, we will take WINDOWS system as an example to show you how to download and install. ![](media/1.gif) You just need to click JUSTDOWNLOAD,then click the downloaded file to install it. And when the ZIP file is downloaded,you can directly unzip and start it. ![](media/2.gif) ## 6. Driver installation The driver is usually installed automatically when the board is connected to the computer. When the Arduino IDE can recognize the board port and upload the program, it proves that the installation has been completed automatically, so there is no need to carry out the operation of the tutorial in this section. If you can't recognize the board port and upload the program, please refer to the tutorial to install the driver manually. ### 6.1 Windows System **Checking the driver** 1. Connect the motherboard to the computer. 2. Open Device Manager,Open the device manager, if the prompt **"USB-SERIAL CH340(COMX)"** appears to prove that the driver has been installed, please skip the **"Driver installation"** part. ![](media/1-1770690058242-3.gif) **Manual driver installation** 1. Driver download - Windows System: [Windows System driver](./Windows.7z) 2. Connect the motherboard to the computer, open the device manager, if there is a yellow exclamation mark in front of the driver in the picture, it proves that the driver is not installed, please download the driver and install it manually. ![](media/2-1770690068970-5.gif) ### 6.2 MAC System **1 Checking the driver** Connect the development board to the computer, according to [Tools] ---> [Port] to select the development board port (Note: If you can not confirm which port is the development board, please connect the motherboard to take pictures to record all the ports, and then unplug the development board to re-take pictures to record all the ports, and then compare to find the disappeared ports, and then unplug the motherboard after the disappeared ports is the port of the board, and then select the port on the line)If you can not recognize the port, please replace the computer USB port or around the phone cable to re-recognize the port, if it still does not work refer to the following steps to install the driver. ![](media/image-20260210102148929.png) **2 Manual driver installation** 1. Driver download ​ Mac System: [Mac System driver](./Mac.7z) 2. double-click to decompress the downloaded driver zip package ![](media/4.gif) ## 7. Installing the ESP8266 with Arduino Double-click the icon of Arduino software downloaded well, you will get the interface shown below. ![](media/image-20260210102943085.png) Then open the Arduino IDE, click the “File” to select the “Preferences”. ![](media/image-20260210103205866.png) The pop-up interface is shown below. See the “Additional Boards Manager URLs”, copy and paste the link below: http://arduino.esp8266.com/stable/package_esp8266com_index.json. and then click "OK". ![](media/image-20260210103225950.png) After that, click “Tools”, for “Board”, enter the "Boards Manager", it will automatically download the relevant file. Shown below. ![](media/image-20260210104230103.png) Pop up the following window: ![](media/image-20260210104403997.png) ## 8. Select the Board and Serial Port To avoid any errors while uploading programs to the board, we must choose the correct **Arduino board name and COM port** which matches the board connected to your computer. Shift to Tools→Board, and choose your board. 2560 WIFI PLUS main control board is able to used as![image-20260210113751036](media/image-20260210113751036.png)and![](media/image-20260210113758708.png). When uploading the programs, please toggle the DIP switch. For details, please refer to (7,Projects) . ![](media/image-20260210114943046.png) ![](media/image-20260210114951588.png) The COM port of the main control board could be checked at Device Manager of your computer (You will see the corresponding COM port after the driver is successfully installed). ![](media/image-20260210115314279.png) ## 9. Projects Download code : [code](./code.7z) ### 9.1 Arduino 2560 Burn Test Program ①Connect PLUS main control board to computer with USB cable. Taking Keyestudio LOGO as a reference, toggle the switch to the left for on and right for off. The positions of the 16-pin DIP switch and the 6-pin DIP switch are shown below: ![](media/image-20260210115721598.png) ②Open![](media/image-20260210115733718.png)under code\2560. ![](media/image-20260210115749706.png) Choose the development board![](media/image-20260210115801368.png)and port. ![](media/image-20260210115813483.png) ③ Click![](media/image-20260210115824419.png)to upload the program to PLUS main control board, and wait for a prompt of successful uploading in the lower left corner. Then click![](media/image-20260210115842271.png)to open the watch window and set baud rate at 115200; send sequentially: - a: lighting test (D13) - b: memory test - c: pin test ![](media/image-20260210115915839.png) ### 9.2 ESP8266 Burn Test Program ①Connect PLUS main control board to computer with USB cable. Taking Keyestudio LOGO as a reference, toggle the switch to the left for on and right for off. The positions of the 16-pin DIP switch and the 6-pin DIP switch (toggle to serial port 1) are shown below: ![](media/image-20260210120218438.png) ② Open ![](media/image-20260210120230576.png)under code\esp8266, and turn on the WIFI network sharing of the mobile phone or computer and set the name and password to be consistent with those in the program. ![](media/image-20260210120248518.png) Choose the development board ![img](media/wps1.jpg) and port. ![](media/image-20260210120307944.png) ③Click![](media/image-20260210120320843.png)to upload the program to PLUS main control board, and wait for a prompt of successful uploading in the lower left corner. If the upload fails, unplug the USB cable and reconnect it before uploading. NOTE: Before each programming of esp8266, the switch must be toggled at GND-GPIO0, and it can be used as a normal IO port if turn it off after programming. ![](media/image-20260210120341854.png) ④Test result The positions of 16-pin and 6-pin DIP switch are shown below: ![](media/image-20260210120457271.png) Click![](media/image-20260210120508210.png)to open the watch window and set baud rate at 115200. After the ESP8266 of the main control board is connected to WIFI, the IP address is printed out on the monitoring serial port (Press RESERT button if not). ![](media/image-20260210120527115.png) ### 9.3 TEST_MEGA-ESP Remote Control ①Upload the project on Chapter 7.2, and choose the development board when uploading. ②Upload ![](media/image-20260210120601003.png)to the main control board and choose the development board![](media/image-20260210120616537.png).For detailed operation please refer to Chapter 7.1. ③After successful uploading. Toggle the switch to the position shown below: ![](media/image-20260210120641054.png) ④ Open Hotpot and connect ESP8266 to WIFI network. And open the serial port after successful connecting, IP address will be displayed. Open this address of 8266 on any browser, the [ON] [OFF] of LED state will control the onboard LED on 2560 and ESP8266. ![](media/image-20260210120654460.png) ![](media/image-20260210120700980.png)