Power & Source of Big Ideas

Connect arduino UNO to nanopi NEO

Moderators: chensy, FATechsupport

Hi!
I would like to know how can I connect arduino UNO to nanopi NEO using RX and TX pins on ARMBIAN Ubuntu 16.04.1 LTS 3.4.112-sun8i. It is possible? I have installed nodejs with jonny five and firmata to connect with arduino. Thanks for helping ;)
Hi,

Yes, it is possible to make an Arduino Uno and a NanoPi NEO talk to each other thru their RX and TX pins.

However you have to face few problems.

First of all, the NanoPi NEO provides and reads 3.3V digital signals while the Arduino Uno provides and reads 5V digital signals. A 5V RX input could read a 3.3V TX output, but a 3.3V RX input cannot stand high levels from a 5V output.

On the other hand, the RX and TX pins on Arduino Uno are already connected to the internal USB interface thru 1kΩ resistors -- on genuine Unos and 100% compatible clones.
If the USB interface is idle, the RX input is pulled-up to 5V when no external device is connected to the pin. As a result, an external device has to sink 5 mA to pull this input down to GND -- 5 mA is the maximum output current on the NanoPi NEO.
If the USB interface is active, the RX could sometimes be pulled-down to GND when no external device is connected to the pin. As a result, an external 5V device may have to source 5 mA to pull this input up to 5V, and an external 3.3V device may have to source 3.3 mA to pull this input up to 3.3V.
Moreover, the signal received on the RX pin from an external device is transmitted to the PC the USB interface is connected to.

To make the serial communication possible, you have to insert a level translation circuit between the Arduino Uno and the NanoPi NEO. However, most of the bi-directional translator circuits (such as the 1-mosfet common-gate translators) are not appropriate because of the USB interface connection. Instead, you should use uni-directional translators such as 74LVC1G125 or 74LVC2G125 logic gates supplied with a 3.3V Vcc.

ArduinoUno2NanoPiNEO.png
ArduinoUno2NanoPiNEO.png (10.08 KiB) Viewed 5582 times
Note that the most natural way to make the Arduino Uno communicate with the NanoPi Neo is to use the USB interface. By plugging the Arduino on the NanoPi's USB port, you do not need any additionnal circuit.

Since the USB port controls the reset pin of the ATmega328P, you could even upload programs to it with the relevant software (such as avrdude).

When you want to open a serial monitor on the NanoPi to communicate with the Arduino at 115200 bauds, you just have to enter the command:

screen /dev/ttyACM0 115200,cs8

You can quit this monitor by typing Ctrl+A and k. The Arduino is reset each time the communication port is re-opened -- i.e. each time the serial monitor is launched.

Who is online

In total there are 39 users online :: 0 registered, 0 hidden and 39 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 39 guests