Ks0173 keyestudio Nano ch340: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(66 intermediate revisions by the same user not shown)
Line 3: Line 3:
<br>
<br>
==Introduction==
==Introduction==
The keyestudio Nano CH340 is a small, complete, and breadboard-friendly board based on the ATmega328P-AU. Compared with ARDUINO NANO, the USB-to-serial port chip used in keyestudio Nano is CH340G, so that the using method is the same except the driver installation file. <br>
 
It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 8 analog inputs, a 16 MHz quartz crystal, a mini USB port, an ICSP header and a reset button. <br>
The processor core of Keyestudio Nano CH340 is atmega328p-au. It is as same as the official Arduino Nano in addition to driver file and USB to serial chip (CH340G).
Note that ICSP (In-Circuit Serial Programming) header is used to program the firmware to ATMEGA328P-AU, but generally the chip have been preburned before leave the factory. So use it less.<br>
It also has a 14 digital input / output interfaces (6 of which can be used as PWM output), 8 analog input interfaces, 1 16MHz crystal oscillator, 1 mini USB port, 1 ICSP interface, and a reset button.<br>
The keyestudio Nano can be powered via the Mini-B USB connection, or female headers Vin/GND (DC 7-12V).
The ICSP interface is used to burn firmware to Atmega328P-Au. Since this chip we burn firmly in front of the factory, it is generally not available. When using the Mini USB cable, we can use the VIN GND (DC 7-12V) to power.<br>
What’s more, you can burn the firmware for Atmega328P-Au through the built-in ICSP port. The firmware of this chip is burnt well before delivery, therefore, you don’t need to burn the firmware.<br>
The power can be supplied through USB cable, port 5V , GND(DC 5V), as well as Vin GND (DC 7-12V).<br>


<br>
<br>
==TECH SPECS==
 
==Specification==
{| class="wikitable" cellpadding="1" cellspacing="1"
{| class="wikitable" cellpadding="1" cellspacing="1"
|-
|-
Line 51: Line 54:


<br>
<br>
==Details==
* PCB Dimensions: 18mm x 45mm
* Weight: 7g
<br>[[Image:ks0173 size.jpg|700px|frameless]]<br>


<br>
==Element and Interfaces==
==Element and Interfaces==
Here is an explanation of what every element and interface of the board does:
Here is an explanation of what every element and interface of the board does:
<br>[[Image:ks0173 pinout.jpg|800px|frameless]]<br>
<br>[[Image:ks0173 pinout.jpg|800px|frameless]]<br>
<br>[[Image:0173=图片3.png|700px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 160: Line 159:
|}
|}


==Nano Back View==
<br>
<br>[[Image:KS0173-1.png|700px|frameless]]<br>


<br>
==Specialized Functions of Some Pins==
==Specialized Functions of Some Pins==
* '''Serial communication:''' 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
* '''Serial communication:''' 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
Line 172: Line 168:
* '''IIC communication:'''  A4 (SDA); A5(SCL)
* '''IIC communication:'''  A4 (SDA); A5(SCL)


==Tips==
* '''Automatic (Software) Reset:'''
Rather then requiring a physical press of the reset button before an upload, the Arduino Nano is designed in a way that allows it to be reset by software running on a connected computer.


<br>
== Windows System==


==Detailed Use with ARDUINO Software as follows==
===Download the Arduino IDE===
===Step1 | Download the Arduino environment (IDE)===
When getting this control board, we need to install Arduino IDE. <br>
When you get the UNO development board, first you should install the Arduino software and driver. <br>
We usually use the Windows software Arduino 1.5.6 version. You can download it from the link below: <br>
https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x<br>
Or you can browse the ARDUINO website to download the latest version from this link, https://www.arduino.cc, pop up the following interface.
<br>[[Image:KS0313-1.png|600px|frameless]]<br>


Then click the '''SOFTWARE''' on the browse bar, you will have two options ONLINE TOOLS and DOWNLOADS.  
Enter the website https://www.arduino.cc/,click[[Image:0173--1.png|600px|frameless]] and [[Image:0173--2.png|600px|frameless]] <br>
<br>[[Image:KS0313-2.png|600px|frameless]]<br>
[[Image:0173--3.png|600px|frameless]]


Click '''DOWNLOADS''', it will appear the latest software version of ARDUINO 1.8.5 shown as below. 
Select versions you want to download, the latest version could be downloaded.<br>
<br>[[Image:KS0313-3.png|600px|frameless]]<br>
[[Image:0173--4.png|600px|frameless]]


In this software page, on the right side you can see the version of development software for different operating systems. ARDUINO has a powerful compatibility. You should download the software that is compatible with the operating system of your computer.<br>
Alternatively, you could select previous release.<br>
We will take '''WINDOWS system''' as an example here. There are also two options under Windows system, one is installed version, the other is non-installed version.  
In this project, we use 1.8.12 version.<br>
For simple installed version, first click '''Windows Installer''', you will get the following page.<br>
[[Image:0173--5.png|600px|frameless]]
<br>[[Image:KS0313-4.png|600px|frameless]]<br>
<br>[[Image:KS0313-5.png|600px|frameless]]<br>


This way you just need to click JUST DOWNLOAD, then click the downloaded file to install it. <br>
For non-installed version, first click Windows ZIP file, you will also get the pop-up interface as the above figure.<br>
Click JUST DOWNLOAD, and when the ZIP file is downloaded well to your computer, you can directly unzip the file and click the icon of ARDUINO software to start it.  <br>


Click[[Image:KS0173----13.png|600px|frameless]] to view the below page<br>
[[Image:KS0173----14.png|600px|frameless]]<br>


====Installing Arduino (Windows)====
Install Arduino with the exe. Installation package downloaded well.
<br>[[File:Arduino Setup 1.jpg|800px|frameless|thumb]]<br>


Click“I Agree”to see the following interface.
<br>[[File:Arduino Setup 2.jpg|800px|frameless|thumb]]<br>


Click “Next”. Pop up the interface below.  
Click [[Image:0173--6.png|600px|frameless]]to download an installer of Arduino 1.8.12 version,which needs to be installed manually. When you tap
<br>[[File:Arduino Setup 3.jpg|800px|frameless|thumb]]<br>
[[Image:0173--7.png|600px|frameless]]a zip file of Arduino 1.8.12 version will be directly downloaded, and you only need to unzip it to finish installation.<br>
[[Image:0173--8.png|600px|frameless]]


You can press Browse… to choose an installation path or directly type in the directory you want.<br>
Click icon[[Image:0173--9.png|600px|frameless]]to download Arduino IDE.<br>
Then click “Install” to initiate installation.
<br>[[File:Arduino Setup 4.jpg|800px|frameless|thumb]]<br>


Wait for the installing process, if appear the interface of Window Security, just continue to click Install to finish the installation.
=== Download Driver of CH340 ===
<br>[[File:Arduino1.5.6- setup 5.png|800px|frameless|thumb]]<br>


https://fs.keyestudio.com/CH340-WIN


====Installing Driver====
===Installing the Driver===
Next, we will introduce the driver installation of UNO R3 development board. The driver installation may have slight differences in different computer systems. So in the following let’s move on to the driver installation in the WIN 7 system. <br>
The driver will be installed after downloading Arduino IDE.
The Arduino folder contains both the Arduino program itself and the drivers that allow the Arduino to be connected to your computer by a USB cable. Before we launch the Arduino software, you are going to install the USB drivers.<br>
<br>[[Image:KS0001-1.jpg|600px|frameless]]<br>
Plug one end of your USB cable into the Arduino and the other into a USB socket on your computer.
When you connect UNO board to your computer at the first time, right click the icon of your “Computer” —>for “Properties”—> click the “Device manager”, under “Other Devices”, you should see an icon for “Unknown device” with a little yellow warning triangle next to it. This is your Arduino.<br>
<br>[[Image:Driver 1.png|600px|frameless]]<br>
Then right-click on the device and select the top menu option (Update Driver Software...) shown as the figure below.. 
<br>[[Image:Driver 2.png|600px|frameless]]<br>


It will then be prompted to either “Search Automatically for updated driversoftware” or “Browse my computer for driver software”. Shown as below. In this page, select “Browse my computer for driver software”.
If your system is Windows 10, the computer will automatically install driver.<br>
<br>[[Image:Driver 3.png|600px|frameless]]<br>
For other systems, like Windows7, we need to install driver manually.<br>
The USB to serial chip of control board is CH340G, therefore, we will install the driver(usb_ch341_3.1.2009.06) for it.<br>
Connect control board to computer with USB cable.<br>
Click Computer----- Properties----- Device Manager, as shown below:<br>


After that, select the option to browseand navigate to the “drivers” folder of Arduino installation.
<br>[[Image:ks0354 driver 1.png|600px|frameless]]<br>
<br>[[Image:Driver 4.png|600px|frameless]]<br>


Click “Next” and you may get a security warning, if so, allow the software to be installed. Shown as below.  
Then right-click on the device and select the top menu option (Update Driver Software...) shown as the figure below. 
<br>[[Image:Driver 5.png|600px|frameless]]<br>
<br>[[Image:ks0354 driver 2.png|600px|frameless]]<br>
 
Then it will be prompted to either “Search Automatically forupdated driversoftware” or “Browse my computer for driver software”. Shown as below. In this page, select “Browse my computer for driver software”.
<br>[[Image:ks0354 driver 3.png|600px|frameless]]<br>
 
After that, select the option to browseand navigate to the “drivers” folder of usb-ch341 installation.
<br>[[Image:ks0354 driver 4.png|600px|frameless]]<br>


Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.  
Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.  
<br>[[Image:Driver 6.png|600px|frameless]]<br>
<br>[[Image:Ks0354 driver 5.png|600px|frameless]]<br>


Up to now, the driver is installed well. Then you can right click “Computer” —>“Properties”—>“Device manager”, you should see the device as the figure shown below.   
Up to now, the driver is installed well. Then you can right click “Computer” —>“Properties”—>“Device manager”, you should see the device as the figure shown below.   
<br>[[Image:Driver 7.png|600px|frameless]]<br>
<br>[[Image:KS0173----1.png|600px|frameless]]<br>
 
<br>


===Select the Arduino Board ===


====Introduction for Arduino IDE Toolbar====
Click[[Image:Ks0313图片1.png|300px|frameless]] icon to pen Arduino IDE.
Double-click the icon of Arduino software downloaded well, you will get the interface shown below.
<br>[[Image:Ks0313图片1.png|600px|frameless]]<br>
('''Note:''' if the Arduino software loads in the wrong language, you can change it in the preferences dialog. See [https://www.arduino.cc/en/Guide/Environment-Languages the environment page] for details.)
<br>[[Image:717.png|600px|frameless]]<br>
<br>
The functions of each button on the Toolbar are listed below:
<br>[[Image:IDE.png|600px|frameless]]<br>


{| class="wikitable" cellpadding="1" cellspacing="1"
|-
!scope="row" |[[Image:IDE 1.png|600px|frameless]] Verify/Compile
| Check the code for errors
|-
!scope="row" |[[Image:IDE 2.png|600px|frameless]] Upload
| Upload the current Sketch to the Arduino
|-
!scope="row" |[[Image:IDE 3.png|600px|frameless]] New
| Create a new blank Sketch
|-
! scope="row" |[[Image:IDE 4.png|600px|frameless]] Open
| Show a list of Sketches
|-
! scope="row" |[[Image:IDE 5.png|600px|frameless]] Save
| Save the current Sketch
|-
! scope="row" |[[Image:IDE 6.png|600px|frameless]] Serial Monitor
| Display the serial data being sent from the Arduino
|-
|}


Open the Arduino IDE, you’ll need to click the “Tools”, then select the Board that corresponds to your Arduino.


===Step2| Installing the Driver===
<br>[[Image:0085=14.png|600px|frameless]]<br>
The USB to serial port chip of this control board is CH340G. So you need to install the driver for the chip. You can click the driver file here [https://drive.google.com/open?id=1ssALY3RCks_VnWJJ-TuBczs28s2gimEI usb_ch341_3.1.2009.06] to download it.<br>
In different systems, the driver installation is similar. Here we start to install the driver on the Win7 system.<br>
Plug one end of your USB cable into the Keyestudio ESP8266 WI-FI board and the other into a USB socket on your computer. <br>
When you connect the ESP8266 WI-FI board to your computer at the first time, right click your “Computer” —>for “Properties”—> click the “Device manager”, under Other devices, you should see the “USB2.0-Serial”.
<br>[[Image:ks0354 driver 1.png|600px|frameless]]<br>


Then right-click on the device and select the top menu option (Update Driver Software...) shown as the figure below.. 
When downloading the sketch to the board, you must select the correct name of Arduino board that matches the board connected to your computer. As shown below;
<br>[[Image:ks0354 driver 2.png|600px|frameless]]<br>


Then it will be prompted to either “Search Automatically forupdated driversoftware” or “Browse my computer for driver software”. Shown as below. In this page, select “Browse my computer for driver software”.
<br>[[Image:KS0173----2.png|600px|frameless]]<br>
<br>[[Image:ks0354 driver 3.png|600px|frameless]]<br>


After that, select the option to browseand navigate to the “drivers” folder of usb-ch341 installation.
Then select the correct COM port (you can see the corresponding COM port after the driver is successfully installed).
<br>[[Image:ks0354 driver 4.png|600px|frameless]]<br>


Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.  
<br>[[Image:0173-----2.png|600px|frameless]]<br>
<br>[[Image:Ks0354 driver 5.png|600px|frameless]]<br>
<br>[[Image:0173-----3.png|600px|frameless]]<br>
<br>[[Image:0173-----4.png|600px|frameless]]<br>


Up to now, the driver is installed well. Then you can right click “Computer” —>“Properties”—>“Device manager”, you should see the device as the figure shown below.  
* A- Used to verify whether there is any compiling mistakes or not.
<br>[[Image:Ks0354 driver 6.png|600px|frameless]]<br>
* B- Used to upload the sketch to your Arduino board.
* C- Used to create shortcut window of a new sketch.
* D- Used to directly open an example sketch.
* E- Used to save the sketch.
* F- Used to send the serial data received from board to the serial monitor.


<br>


===Step3| Connect the board===
=== Setting IDE for new bootloader===
Connect the NANO board to your computer using the USB cable. The power LED should go on.
<br>[[Image:KS0173-2.png|600px|frameless]]<br>


Arduino Nano board could burn new and old bootloader. New bootloader is only compatible with 1.8.9 IDE and above. Yet the old one is compatible with all versions.


===Step4| Select the Arduino Board ===
<br>[[Image:KS0173----3.png|600px|frameless]]<br>
Open the Arduino IDE, you’ll need to click the “Tools”, then select the Board that corresponds to your Arduino.
<br>[[Image:Ks0313图片1.png|600px|frameless]]<br>
<br>[[Image:ks0173- board.png|600px|frameless]]<br>


===Select your serial port===
Select the serial device of the Arduino board from the Tools | Serial Port menu.  <br>
'''Note:''' to avoid errors, the COM Port should keep the same as the Ports shown on Device Manager.
<br>[[Image:KS0173----1.png|600px|frameless]]<br>
<br>[[Image:KS0173----5.png|600px|frameless]]<br>


===Step5| Select your serial port===
<br>
Select the serial device of the Arduino board from the Tools | Serial Port menu.  Note: to avoid errors, the COM Port should keep the same as the Ports shown on Device Manager.
<br>[[Image:KS0173-3.jpg|600px|frameless]]<br>
<br>[[Image:ks0173- port.png|600px|frameless]]<br>


===Hello World!===
Copy the following code in the Arduino IDE.


===Step6| Upload the Code===
Below is an example code for displaying the Hello World!<br>
Copy and paste the code to the Arduino environment IDE.<br>
<pre>
<pre>
int val;  
int val;  
Line 342: Line 295:
}
}
</pre>
</pre>
<br>[[Image:ks0173- code.png|600px|frameless]]<br>


<br>[[Image:KS0173----6.png|600px|frameless]]<br>
<br>
Then click verify button to check the errors. If compiling successfully, the message "Done compiling." will appear in the status bar.
Then click verify button to check the errors. If compiling successfully, the message "Done compiling." will appear in the status bar.
<br>[[Image:ks0173 图片1-compile.png|600px|frameless]]<br>
<br>[[Image:KS0173----7.png|800px|frameless]]<br>
<br>[[Image:KS0173----8.png|800px|frameless]]<br>
<br>
After that, click the “Upload” button to upload the code. If the upload is successful, the message "Done uploading." will appear in the status bar.  
After that, click the “Upload” button to upload the code. If the upload is successful, the message "Done uploading." will appear in the status bar.  
<br>[[Image:ks0173 图片1-upload.png|600px|frameless]]<br>
<br>[[Image:KS0173----9.png|800px|frameless]]<br>
<br>[[Image:KS0173----10.png|800px|frameless]]<br>


Then click [[Image:0486-26.png|300px|frameless]] to open serial monitor and set the baud rate to 9600, enter an “R” and click Send, that is, the computer will send the character R. When NANO board receives it, you should see the RX led on the board flash once, and then D13 led flash once; when keyestudio NANO board sends "Hello World!" to the computer, finally you should see the  "Hello World!" is showed on the monitor, and TX led on the board flash once.


===Step7| Open the Serial Monitor===
<br>[[Image:KS0173----12.png|800px|frameless]]<br>
After that, click the button to open the serial monitor.
<br>[[Image:ks0173- monitor 1.png|600px|frameless]]<br>
Then set the baud rate to 9600, enter an “R” and click Send, that is, the computer will send the character R. When NANO board receives it, you should see the RX led on the board flash once, and then D13 led flash once; when keyestudio NANO board sends "Hello World!" to the computer, finally you should see the  "Hello World!" is showed on the monitor, and TX led on the board flash once.
<br>[[Image:ks0173- monitor 2.png|600px|frameless]]<br>


<br>
== MAC System ==
=== Install Arduino IDE on MAC System ===
The installation instruction is as same as the chapter 5.1, as shown below:
<br>[[Image:图片8883.png|600px|frameless]]<br>
=== Download the Driver of CH340 ===
https://fs.keyestudio.com/CH340-MAC
=== How to Install teh Driver of CH340 ===
Please refer to the following link:
https://wiki.keyestudio.com/Download_CH340_Driver_on_MAC_System
=== Setting Arduino IDE ===
The setting method is as same as the chapter 5.6 except from COM port, as shown below:
<br>[[Image:0173+图20.png|600px|frameless]]<br>


==Package Included==
==Package Included==
Line 361: Line 341:
* 30cm mini USB cable * 1pcs
* 30cm mini USB cable * 1pcs
<br>[[Image:KS0173-4.jpg|600px|frameless]]<br>
<br>[[Image:KS0173-4.jpg|600px|frameless]]<br>


==Resource Links==
==Resource Links==
You can download the datasheet from the link:<br>
https://fs.keyestudio.com/KS0173
https://drive.google.com/open?id=1z4-9cVEQ8I4JIBqw2QsaLjp3i2TUa6wZ
 
 


<br>


Download the CH340 Driver File:<br>
==Troubleshooting==
https://drive.google.com/open?id=1MEES7PWMN1aaqZ7wzcxIkv21xYf3CNNi
If you have problems, please see the [http://arduino.cc/en/Guide/Troubleshooting troubleshooting suggestions].




You might also want to look at:<br>
the reference for the Arduino language;


Download ARDUINO Software:<br>
https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x


==Get One Now==
*[https://www.keyestudio.com/free-shipping-1pcs-keyestudio-ch340-nano-controller-board-usb-cable-for-arduino-diy-programing-p0366.html  '''Official Website''']


==Troubleshooting==
*[https://www.amazon.com/dp/B01FSDVZ98  '''Shop on Amazon''' ]
If you have problems, please see the [http://arduino.cc/en/Guide/Troubleshooting troubleshooting suggestions].


*[https://www.aliexpress.com/store/product/Free-Shipping-1pcs-Keyestudio-CH340-Nano-Controller-Board-USB-cable-For-Arduino-Programing/1452162_32668552468.html?spm=2114.12010612.8148356.16.b9182ca4qjhxEx    '''Shop on AliExpress''' ]


*[https://www.ebay.co.uk/itm/163201658773  '''Shop on eBay''']


==Get One Now==
'''Official Website''' <br>
http://www.keyestudio.com/keyes-ch340-chip-nano-3-0-development-board-with-usb-cable-for-arduino.html


'''Amazon'''<br>
https://www.amazon.com/Keyestudio-Atmega328P-Development-Compatible-Arduino/dp/B01FSDVZ98/ref=sr_1_fkmr0_1?ie=UTF8&qid=1479106705&sr=8-1-fkmr0&keywords=KEYES+CH340+chip+Nano+3.0+Development+Board+with+USB+cable+for+arduino


[[Category: Arduino Board]]
[[Category: Arduino Board]]

Latest revision as of 14:23, 29 April 2021

Keyestudio Nano ch340


Introduction

The processor core of Keyestudio Nano CH340 is atmega328p-au. It is as same as the official Arduino Nano in addition to driver file and USB to serial chip (CH340G). It also has a 14 digital input / output interfaces (6 of which can be used as PWM output), 8 analog input interfaces, 1 16MHz crystal oscillator, 1 mini USB port, 1 ICSP interface, and a reset button.
The ICSP interface is used to burn firmware to Atmega328P-Au. Since this chip we burn firmly in front of the factory, it is generally not available. When using the Mini USB cable, we can use the VIN GND (DC 7-12V) to power.
What’s more, you can burn the firmware for Atmega328P-Au through the built-in ICSP port. The firmware of this chip is burnt well before delivery, therefore, you don’t need to burn the firmware.
The power can be supplied through USB cable, port 5V , GND(DC 5V), as well as Vin GND (DC 7-12V).


Specification

Microcontroller ATmega328P-AU
Operating Voltage 5V
Input Voltage (recommended) DC7-12V
Digital I/O Pins 14 (D0-D13) (of which 6 provide PWM output)
PWM Digital I/O Pins 6 (D3, D5, D6, D9, D10, D11)
Analog Input Pins 8 (A0-A7)
DC Current per I/O Pin 40 mA
Flash Memory 32 KB of which 2 KB used by bootloader
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz
LED_BUILTIN D13


Element and Interfaces

Here is an explanation of what every element and interface of the board does:
Ks0173 pinout.jpg

0173=图片3.png

1 ICSP Header ICSP (In-Circuit Serial Programming) Header

ICSP is the AVR, an micro-program header consisting of MOSI, MISO, SCK, RESET, VCC, and GND. It is often called the SPI (serial peripheral interface) and can be considered an "extension" of output. In fact, slave the output devices under the SPI bus host.
When connecting to PC, program the firmware to ATMEGA328P-AU.

2 LED indicator(RX) Onboard you can find the label: RX(receive )

When control board communicates via serial port, receive the message, RX led flashes.

3 LED indicator(TX) Onboard you can find the label: TX (transmit)

When control board communicates via serial port, send the message, TX led flashes.

4 LED indicator(POW) Power up the control board, LED on, otherwise LED off.
5 LED indicator(L) There is a built-in LED driven by digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
6 RX0(D0)TX1(D1)D2-D13
It has 14 digital input/output pins D0-D13 (of which 6 can be used as PWM outputs). These pins can be configured as digital input pin to read the logic value (0 or 1). Or used as digital output pin to drive different modules like LED, relay, etc.
7 RST Reset pin: connect external button. The function is the same as RESET button.
8 MEGA 328P Each board has its own microcontroller. You can regard it as the brain of your board.

Microcontrollers are usually from ATMEL. Before you load a new program on the Arduino IDE, you must know what IC is on your board. This information can be checked at the top surface of IC.
The board’s microcontroller is ATMEGA328P-AU.
More info. see the datasheet

9 MINI USB The board can be powered via Mini-B USB connection. Also upload the program to the board via USB port.
10 3V3 pin rovides 3.3V voltage output
11 REF Reference external voltage (0-5 volts) for the analog input pins. Used with analogReference().
12 A0-A7 The Nano has 8 Analog Pins, labeled A0 through A7.
13 5V pin Provides 5V voltage output
14 GND Ground pin
15 VIN Input an external voltage DC7-12V to power the board.
16 Reset Button Used to reset the control board
17 CH340G USB-to-serial port chip, converting the USB signal into Serial port signal.
18 AMS1117 Convert the external voltage input DC7-12V into DC5V, then transfer it to the processor and other elements.


Specialized Functions of Some Pins

  • Serial communication: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
  • PWM (Pulse-Width Modulation): D3, D5, D6, D9, D10, D11
  • External Interrupts: D2 (interrupt 0) and D3 (interrupt 1). These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details.
  • SPI communication: D10 (SS), D11 (MOSI), D12 (MISO), D13 (SCK).
  • IIC communication: A4 (SDA); A5(SCL)



Windows System

Download the Arduino IDE

When getting this control board, we need to install Arduino IDE.

Enter the website https://www.arduino.cc/,click0173--1.png and 0173--2.png
0173--3.png

Select versions you want to download, the latest version could be downloaded.
0173--4.png

Alternatively, you could select previous release.
In this project, we use 1.8.12 version.
0173--5.png


ClickKS0173----13.png to view the below page
KS0173----14.png


Click 0173--6.pngto download an installer of Arduino 1.8.12 version,which needs to be installed manually. When you tap 0173--7.pnga zip file of Arduino 1.8.12 version will be directly downloaded, and you only need to unzip it to finish installation.
0173--8.png

Click icon0173--9.pngto download Arduino IDE.

Download Driver of CH340

https://fs.keyestudio.com/CH340-WIN

Installing the Driver

The driver will be installed after downloading Arduino IDE.

If your system is Windows 10, the computer will automatically install driver.
For other systems, like Windows7, we need to install driver manually.
The USB to serial chip of control board is CH340G, therefore, we will install the driver(usb_ch341_3.1.2009.06) for it.
Connect control board to computer with USB cable.
Click Computer----- Properties----- Device Manager, as shown below:


Ks0354 driver 1.png

Then right-click on the device and select the top menu option (Update Driver Software...) shown as the figure below.
Ks0354 driver 2.png

Then it will be prompted to either “Search Automatically forupdated driversoftware” or “Browse my computer for driver software”. Shown as below. In this page, select “Browse my computer for driver software”.
Ks0354 driver 3.png

After that, select the option to browseand navigate to the “drivers” folder of usb-ch341 installation.
Ks0354 driver 4.png

Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.
Ks0354 driver 5.png

Up to now, the driver is installed well. Then you can right click “Computer” —>“Properties”—>“Device manager”, you should see the device as the figure shown below.
KS0173----1.png


Select the Arduino Board

ClickKs0313图片1.png icon to pen Arduino IDE.


Open the Arduino IDE, you’ll need to click the “Tools”, then select the Board that corresponds to your Arduino.


0085=14.png

When downloading the sketch to the board, you must select the correct name of Arduino board that matches the board connected to your computer. As shown below;


KS0173----2.png

Then select the correct COM port (you can see the corresponding COM port after the driver is successfully installed).


0173-----2.png

0173-----3.png

0173-----4.png

  • A- Used to verify whether there is any compiling mistakes or not.
  • B- Used to upload the sketch to your Arduino board.
  • C- Used to create shortcut window of a new sketch.
  • D- Used to directly open an example sketch.
  • E- Used to save the sketch.
  • F- Used to send the serial data received from board to the serial monitor.


Setting IDE for new bootloader

Arduino Nano board could burn new and old bootloader. New bootloader is only compatible with 1.8.9 IDE and above. Yet the old one is compatible with all versions.


KS0173----3.png

Select your serial port

Select the serial device of the Arduino board from the Tools | Serial Port menu.
Note: to avoid errors, the COM Port should keep the same as the Ports shown on Device Manager.
KS0173----1.png

KS0173----5.png


Hello World!

Copy the following code in the Arduino IDE.

int val; 
int ledpin=13; 
void setup()
{
Serial.begin(9600); 
pinMode(ledpin,OUTPUT);
}
void loop()
{
val=Serial.read();
if(val=='R')
{
digitalWrite(ledpin,HIGH);
delay(500);
digitalWrite(ledpin,LOW);
delay(500);
Serial.println("Hello World!");
}
}


KS0173----6.png

Then click verify button to check the errors. If compiling successfully, the message "Done compiling." will appear in the status bar.
KS0173----7.png

KS0173----8.png

After that, click the “Upload” button to upload the code. If the upload is successful, the message "Done uploading." will appear in the status bar.
KS0173----9.png

KS0173----10.png

Then click 0486-26.png to open serial monitor and set the baud rate to 9600, enter an “R” and click Send, that is, the computer will send the character R. When NANO board receives it, you should see the RX led on the board flash once, and then D13 led flash once; when keyestudio NANO board sends "Hello World!" to the computer, finally you should see the "Hello World!" is showed on the monitor, and TX led on the board flash once.


KS0173----12.png



MAC System

Install Arduino IDE on MAC System

The installation instruction is as same as the chapter 5.1, as shown below:


图片8883.png

Download the Driver of CH340

https://fs.keyestudio.com/CH340-MAC

How to Install teh Driver of CH340

Please refer to the following link: https://wiki.keyestudio.com/Download_CH340_Driver_on_MAC_System

Setting Arduino IDE

The setting method is as same as the chapter 5.6 except from COM port, as shown below:


0173+图20.png

Package Included

  • Keyestudio NANO ch340 * 1pcs
  • 30cm mini USB cable * 1pcs


KS0173-4.jpg


Resource Links

https://fs.keyestudio.com/KS0173



Troubleshooting

If you have problems, please see the troubleshooting suggestions.



Get One Now