Elegoo Nano Pinout

Because of substantial price difference, many users are using Chinese clones of the genuine Arduino development boards. Although in most cases the functionality is similar or even identical to the original, there may be some differences. Unfortunately, quite often there is virtually no schematics, datasheets or detail description available. This is a case for a Chinese clones of the Arduino Nano R3 board as well.

After some research, measurements and detail inspection of the boards I was able to get together all circuits. Below you will find both schematics and few technical comments to the Nano CH340 R3 development board. I have purchased several Nano 3.0 CH340 clones in different orders from several Asian vendors and they are all almost identical, so it seems that this type of the Nano 3.0 board is widely used.

Nano CH340 R3 board description

The Nano CH340 R3 board is similar to the genunine Arduino Nano board, described on the original Arduino website here . The board uses same type of Mini-B USB connector, same side connectors and 6-pin SPI connector, as well as the Atmel ATmega328P microcontroller in the 32-TQFP package. There are also 4 LEDs – Power LED, LED connected to digital output pin D13, and two LEDs showing status of the RxD and TxD communication lines.

To provide +5.0 V Vcc power supply, the board uses LM1117-5.0 SOT-223 linear stabilizer 5.0 V (compared to original UA78M05), with slightly higher current (800 mA vs. 500 mA of original UA78M05) and lower drop-out voltage (typ. 1.2 V vs. 2.0 V for UA78M05).

Elegoo Nano Pinout

To facilitate the USB communication and to provide 3.3 V output, the board uses USB communication circuit CH340 in SOP-16 package (instead of FT232RL used on the genuine Nano R3 board), manufactured by several Chinese companies. The CH340 IC requires installation of driver software, which was covered and explained many times already, so I will not repeat this information. With installed driver, communication with Arduino (IDE) is clear and straightforward.

  1. The article isn’t about saving money in mass production by using a Nano. It’s about saving money in mass producing the (new) Nano itself. The Arduino Nano is an extremely handy component for.
  2. ATmega2560-Arduino Pin Mapping. Below is the pin mapping for the Atmega2560. The chip used in Arduino 2560. There are pin mappings to Atmega8 and Atmega 168/328 as.

To switch between VIN power supply (6-12 V) and USB power supply, the board includes a Schottky diode with low forward voltage. Most of the boards I got seems to be using the Vishay Semi SD101CWS diode (Vf 0.6 – 0.8 V at 20 mA, S4 SMD marking code).

Differences to the genuine Arduino Nano R3 board

Component Required: (1) x Elegoo Mega2560 R3 (1) x DHT11 Temperature and Humidity module (3) x F-M wires (Female to Male DuPont wires) Page 92 excellent long-term stability. The sensor includes a resistive sense of wet components and a NTC temperature measurement devices, and connects with a high-performance 8-bit microcontroller. How to use the photo resistor sensor module from the 37 in 1 sensor kit for Arduino from Geekcreit, Elegoo, Elektor and others. In some kits the module may be called an LDR (Light Dependent Resistor), photocell, or be written 'photoresistor'. This tutorial shows the basic use and testing of the photo resistor sensor module with Arduino.

  • For both ATmega328P and CH340, the board uses 3-pin SMD ceramic resonators with internal load capacitors, so no external capacitors for oscilating circuit are needed not they are used (although there are soldering pads provided next to the CH340 resonator).
  • Rx and Tx LEDs are connected directly to the ATmega328P outputs PD0 and PD1, so keep that in mind in case those two pins will be used for something else than USB communication (on genuine Nano R3 board the Rx and Tx LEDs are driven by additional outputs on the FT232RL chip).
  • The CH340 chip includes the 3.3 V LDO voltage regulator, which can supply up to 25 mA. There is no refence in the original CH340 datasheet or elswhere on the internet, so I measured the supplied 3V3 voltage directly.
    With no load, the 3V3 pin voltage was 3.28 V. With load up to 25 mA the voltage dropped to 3.18-3.22 V (on different boards); however at 30 mA load the voltage dropped to 3.10 V and further to 2.85 V at 40 mA.

Schematics

Finally, below is a link to schematics of the Nano CH340 R3 board in pdf. Feel to copy and share as you like, providing you will attach the copyright info “copyright actrl.cz”. Please note that previously there was an error in connection of pins 2&3 on CH340 – on rev. 1 of the file this is corrected (CH340 (3) Rx pin is connected to Tx LED and (31) Tx pin of ATMega 328P, while CH340 (2) Tx pin is connected to Rx LED and (30) Rx pin of ATMega 328P – thanks Jindra Fučík to pointing this out).

A few months ago I documented the process for creating a large 7-segment LED display. After figuring out the pin locations, the wiring, and the code, I attached an Arduino Nano to a daughter board to create a beautiful self-contained 4-digit display.

Adding a Real-Time Clock (RTC)

When co-blogger, Allan, saw my setup he insisted on attaching a Real-Time Clock (RTC) and buttons so that the unit could be used for timekeeping and as a programmable counter.

We set about making a new daughter board to replace the one I'd made to connect the Arduino to the chips I was using to control the LEDs.

The new board would incorporate the original Arduino Nano and an RTC3231. We decided to use an existing RTC board that we had lying around, instead of recreating its circuitry on our own. All we’d do is plug the board into our new PCB.

Messing with Pins

This is the board that Allan created.
With both top and bottom layers, it's a bit hard to view, but essentially, the new board incorporates the original Nano, an RTC3231, and a couple of buttons.

To make the PCB traces neat, Allan exchanged a couple of my original digital pins with analog pins A6 and A7 instead. (Note these numbers because they become critical later).

PCBs

When the PCBs arrived, I got to work soldering the parts in place. Because of the new pin allocations, we’d need to re-program the Arduino sketch - but that’s for later.

After soldering everything, I carefully checked the new pin numbering and made my adjustments to the sketch. Once I was happy everything was in order, I powered up.

As Usual, Something’s Wrong

For some reason, my display wasn’t working properly; digits jumped around seemingly at random. I assumed a wrong connection or a poor solder joint, so I went around everything again, checking and re-checking.

An hour later I was no further on. Everything seemed properly connected, but no matter what I did, I couldn’t stop the jumping numbers.

“I think you need pullup resistors,” advised Allan by VoIP from the other side of the world. “Use your oscilloscope to see what’s coming out of the pins.”

Like the engineer that he is, he went on to describe at great length how the oscilloscope could be used to identify the problem. I’ve written about this little oscilloscope before. It’s made just for this type of amateur troubleshooting. But as I listened patiently to Allan's instructions, I found my mind wandered looking for an easier way.

Going Back to Binary

I had a brainstorm; while I was constructing this project I’d side-tracked into making a simple binary counter.

By controlling four binary inputs, I could get up to 16 outputs - and that’s how I controlled all four 7-segment LEDs on a single Arduino Nano. Sixteen pins of the Nano fed into four SN74LS47N chips - which then controlled the output to the 7-segment display.

If I could 'see' the output from the pins, I could find out which weren't working.

That's when I hit on using four regular LEDs.

This is the pinout to the Nano I am using.

As you can see, the digital pins run from 2-13 (leaving 0 and 1 for RX and TX), and the analog pins are A0 - A7. As most of us know, the analog pins can also be used as digital pins, but not vice-versa.

For our new display we needed:

Elegoo Nano Pinout Software

  • For input pins to each of four SN74LS47N chips - 4 x 4 = 16 pins
  • Two pins for the RTC - I2C pins A4 and A5
  • Two analog pins for the buttons.

Elegoo Nano Pinout Diagram

There are only 12 digital pins, so on my original board, I used four analog pins (A0 to A3) making up 16 for the SN74LS47N chips.

On Allan’s new board, he needed an extra 4 pins - two for the buttons, and two for the RTC. He took them by using all the digital pins and all the analog pins too. These extra pins were somehow causing a problem.

To pinpoint the issue, all I needed to do was isolate the pins that were giving problematic output. I did this by recreating my simple binary counter with four regular LEDs. If the four pins being tested were functioning properly, I’d get a regular binary count. If they weren’t, my display would not work.

As illustrated in this video, when using pins A6 and A7 I’d get erratic output. All four LEDs are supposed to light as the counter gets to 16 - but only one of them worked. One flickered uncontrollably and the other two did nothing.

So I’d isolated the problematic pins to A6 and A7. At Allan’s suggestion, I put a pull-up resistor on each - but it didn’t help.

By now I’d been troubleshooting for a couple of hours and still hadn’t solved the problem. In frustration, I turned to Google. That’s when I came across this.

So here was the answer. Analog pins A6 and A7 are “only inputs with no digital hardware behind them”. This meant that our custom-made PCB was wrong. Pins A6 and A7 could not be used to feed the SN74LS47N and without re-tracing our board, it would never work.

Hacking the PCB

Studying the PCB I saw I’d need to exchange digital pins D2 and D3 (currently attached to the buttons) with the problematic pins A6 and A7. (My PCB push-buttons are analog input, so there would be no problem using A6 and A7.)

Using a box cutter, I severed the traces to the buttons, then ran wires from pins A6 and A7 to D2 and D3 for the buttons. I then had to connect pins D2 and D3 to the SN74LS47N. Finally, I put a pull-up resistor on each of A6 and A7. My soldering isn't impressive, but with this little bit of hacking, and reprogramming a couple of lines of code, at last, everything started to work.

The photo is a close-up of A6 & A7. I used an SMD resistor to connect A7 to 5v, and a through-hole for A6. It's very, very ugly, but it did the trick!

Ordering from PCBWay

Fortunately the good people of PCBWay are readers of this blog and they made us an offer we couldn't refuse. They'd give us a couple of free boards if we gave them credit in our post. This was a perfect opportunity to get a new board, this time with the traces in the proper place.

We sat down and re-traced our board on Fritzing. If you study it carefully, you'll see that we've exchanged D2 and D3 with A6 and A7. We also added a couple of surface-mounting pull-up resistors for the buttons.

The boards came out great. All components were properly positioned and soldering went well.

Elegoo Nano V3 Pinout

The display now shows three options: time, date, or one-second counter. It can be adjusted by the buttons on the PCB.

Arduino Nano Pinout Explained

The Code

Elegoo Nano Datasheet

Co-blogger, Allan Schwartz wrote the code that you can view or download here. It's a great example of well-documented, clear but efficient and concise Arduino code.

All project files, including Fritzing files, and schematic are on github here.