NVIDIA Jetson Nano

Introduction

The Jetson Nano developer kit from NVIDIA features a small, powerful computer which enables users to test and develop IoT applications, and advanced AI programs, such as machine learning. The Nano is also quite capable of running 3D applications well, making it a good choice for game console emulators.

Made available in June 2019, and with an expected 5 year life support, the Nano retails for around £95 (~$99) and is part of the Jetson family of boards with the others being Jetson AGX Xavier, Jetson TX2, and Jetson TX1. Here is a comparison of the various Jetson boards:

https://developer.nvidia.com/embedded/develop/hardware

However, as a cheaper Jetson board it can rival other low cost single board computers, such as the Raspberry Pi, if you take into account the extra power and features that the Nano provides for the additional cost.

For the official Jetson Nano page please follow this link:

https://developer.nvidia.com/embedded/jetson-nano-developer-kit

Useful links on the page include technical spec, getting started, FAQ and a link to buy the Nano.

For the user guide please see:

https://developer.nvidia.com/embedded/dlc/jetson-nano-dev-kit-user-guide

Overview

The Jetson Nano features a System on a module (SOM) fitted to a carrier board via a 260 pin edge connector, the same as used for DDR4 SODIMM memory modules. The carrier board dimensions are 100 x 80 x 30 mm (about double the size of a full-size Raspberry Pi) and the SOM measures 70 x 45 x 20 mm. The SOM features a Quad core 1.43GHz 64-bit A57 ARM CPU and a 128 CUDA core NVIDIA maxwell GPU (472 GFLOPS performance). The GPU is capable of decoding H.264 & H.265 @ 4K 60fps maximum and can encode H.264 & H.265 @ 4K 30fps maximum. Comparing to the Raspberry Pi 4, the Rasp has a better CPU but worse GPU so the Nano will certainly outperform the Rasp when it comes to graphically demanding applications.

Additionally, there is 4GB 64-bit LPDDR4 RAM on the SOM and a micro SD card spring loaded holder (16GB minimum, UHS-1 recommended for the standard Linux install). Note: there is also a 'non-developer' version featuring on-board 16GB flash memory but only available for mass order.

To keep the system cool the SOM features a heat sink for passive cooling but for intense applications a fan is recommended which can be attached using the heat sink's mounting holes and the carrier board has a 4-pin connection (J15) for a temperature controlled fan. Two suitable fans are the NF-A4x20 5V PWM and NF-A4x10 5V PWM from noctua with the NF-A4x20 being recommended by nvidia.

In the box (see below) you get the board (SOM already in place on the carrier board), a getting started guide and a cardboard stand to go under the board to help with airflow.

You will need at minimum to use the Nano a keyboard and mouse, some form of display (TV/monitor), a power supply and a micro SD card (at least 16GB) in which to hold the O/S.

In the photo that follows a top-down view of the Nano shows the prominent SOM and the various ports around the edges of the board which we will look into more closely shortly. Even in 'normal' use the heat sink can get very hot, hence the warning sticker, so it's best not to touch it.

The front view in the photo below shows a number of ports; starting from the left is a barrel jack socket (2.1×5.5×9.5 mm) which allows one way to power the board with up to 4A @ 5V but in order for the Nano to take the power a jumper shunt must be fitted on J48 (see the yellow shunt in the photo). The barrel jack socket is centre pin positive and has over voltage protection but not reverse polarity protection.

Moving to the right is a Type A eDP (Embedded DisplayPort) 1.4 socket (top) and a Type A HDMI 2.0 connector(bottom) which can be used to run two 4K displays if used simultaneously. In the middle are x4 USB 3 Type A connectors, to the right of them a Gigabit ethernet connector (RJ45), and at the far right is a micro USB Type B socket which is an alternative means to power the board (J48 must not have a shunt fitted) with up to 2A @ 5V (decent mobile phone chargers will work). Notice how there is an alternative footprint around the micro USB connector which was possibly for USB-C since underneath on the back of the board is a marking for USB-C.

Slightly to the right and above the micro USB socket is the power LED.

Next up you can see at the bottom of the photo below a number of connectors with J44 being the serial port connector (6-way), J40 the button header (8-way), and J13, the camera connector, which supports MIPI CSI-2, meaning that it can, for e.g., use the Raspberry Pi camera (V2 only).

J40 pinout:

1 & 2 BUTTON_PWR_ON. Turn the system on if auto-power on is disabled.

3 & 4 FORCE_RECOVERY. Put the board into force recovery mode.

5 & 6 PMIC_SYS_RST. Reset the system.

7 & 8 LATCH_SET_BUT. Disable auto power on.

Not only is the Nano compatible with the Raspberry Pi camera but as can be seen near the bottom in the next photo the Nano has a Raspberry Pi compatible 40-pin header (note: the connections are labelled on the board, which is helpful) so as well as GPIO, special protocols can also be used such as SPI and I2C. Behind the ethernet socket is J15 which is the fan header. Also visible, to the right, is the 4-pin PoE connector J38, which is designed to be used with an add-on board to convert the power from the ethernet port (typically 48V) into 5V to power the Nano when using PoE.

If we take a look at the rear end of the Nano you can just about make out the micro SD card sticking out under the heat sink:

Unfortunately the Nano doesn't have built-in Wi-Fi or Bluetooth, which is a shame considering the cost of the developer kit. You can add wireless via a USB adapter or via the M.2 slot (E-keyed) located under the SOM. To remove the SOM, first take out the 2 screws, then push slightly on the clips either side of the SOM slot and carefully lift the SOM up and out. Here is the board without the SOM (the M.2 slot is top right):

The M.2 slot supports PCIe, USB 2, UART, I2S and I2C but because it is E-keyed, which is designed mainly for wireless cards; using an M.2 SSD is an unlikely possibility, another annoying oversight.

Linux

It's a good idea to follow the getting started guide at:

https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit

It will guide you through setting up and running the Nano for the first time including writing a Linux image to SD card. The version of Linux is Ubuntu 18.04 (at the time of writing this article) and it includes samples to show off the Nano's capabilities but they aren't pre-built to save disk memory. This video serves as a good guide for building the samples (applicable also to the other Jetsons):

https://youtu.be/KROP46Wte4Q

It will take about 20 minutes for the building to complete. Note that the video goes through the samples in the Visionwork folder which is not in the Linux install available currently.

I timed the booting process of the Nano using the supplied version of Linux and found that when power is first applied (the system boots as soon as it receives power) it took 5 seconds for the nvidia logo to appear, about 20 seconds total for boot text to appear then 33 seconds total to reach the login screen. It takes about 10 seconds to shutdown the system and restart takes 42 seconds to reach the login screen from when restart was selected.

The Nano has two power profiles, called modes, which are Mode 0 for 10W (a.k.a. MAXN) and Mode 1 for 5W. If you are running the Nano off micro USB then the Nano should be set to 5W but the default in Linux is 10W.

When using Linux, to set the mode to 5 Watt mode using the terminal enter:

sudo nvpmodel -m 1

Similar, for 10 Watt mode:

sudo nvpmodel -m 0

If you want to know the current power mode:

sudo nvpmodel -q

Also indicated next to the nvidia logo at the top-right of the screen.

If you would rather not use the terminal you can also change the power mode by selecting in the top-right of the screen nvidia logo->Power mode->0: MAXN for 10W, 1: 5W for 5W.

Whichever way you change the power mode, the setting will persist after boot.

It's a good idea to run the tegrastats utility which gives information about memory, processor usage and CPU and GPU temperature. You can run it in Linux either by clicking on the nvidia logo at the top-right of the screen and selecting Run tegrastats, or from the terminal use:

sudo tegrastats

The advantage of running from the terminal is that you can press Ctrl+C to stop the output and you can also run tegrastats with options. Please see the official documentation for more information:

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/AppendixTegraStats.html

Camera

As previously mentioned, a camera can be connected to J13, with the Raspberry Pi camera (V2 only) being a good choice due to its low cost and being readily available. To fit the camera, make sure the board is powered off, lift up the clip on connector J13, insert the camera flex cable with the pins facing inward until it stops and then push clip back down and then power up the board. Unfortunately the built-in program Cheese Webcam Booth available in Ubuntu doesn't work with the Rasp Pi camera, possibly because it doesn't support CSI cameras (uses USB camera instead). So I followed a tutorial on testing the Rasp Pi camera that you can view by following this link video for guide

https://youtu.be/dHvb225Pw1s

As covered in the video there are a number of examples included in the CSI-Camera folder: face_detect.py, simple_camera.cpp and simple_camera.py. These examples can be run from the terminal, e.g., python face_detect.py; the C++ example needs to be compiled. You can also open the examples in a Python editor so you can make changes and run them, as it's good to look over the source code and see how it works. I tried using the Python editor Thonny but whenever I tried to run face_detect.py or simple_camera.py I would get a 'No module named' error. The solution is to go to Tools->Options... and select Interpreter tab. From the drop-down choose Python (/usr/bin/python3.6). But now when I tried to run one of the example program I got a 'Unable to open camera' error. I have also tried using the IDLE editor but it reports the same error so until I can find a solution I have to run the example program from the terminal.

GPIO

For those that have used computers such as the Raspberry Pi, the GPIO (General-Purpose Input/Output) pins are a form of interface to which we can connect sensors, lights and other components, that can be controlled through programming (C++, Python, etc.). The Jetson Nano has a 40-pin Raspberry Pi compatible header (J41) but as the SOM would prevent existing Rasp Pi HATs (the add-on boards) from being attached the GPIO has been rotated on the Nano so that Rasp Pi HATs can hang off the Nano's carrier board. Like the Rasp Pi, the Nano's GPIO is 3.3V compatible so voltage levels higher than 3.3V should not be fed into the Nano GPIO pins without using voltage level conversion.

One way to interface with the GPIO is through using Python and the Jetson.GPIO Python library, which you can find at:

https://github.com/NVIDIA/jetson-gpio

The link details how to install the library but after I installed the library I couldn't find the samples that were supposed to be installed (perhaps because I installed via the terminal and got a different version). I also couldn't get the permissions to work as described on the page so I have to run my GPIO Python programs from the terminal using sudo.

For testing the GPIO I wrote a simple program to blink an LED which is as follows:


import Jetson.GPIO as GPIO

import time


GPIO.setmode(GPIO.BCM)

GPIO.setup(4,GPIO.OUT)


while True:

GPIO.output(4,GPIO.HIGH)

time.sleep(1)

GPIO.output(4,GPIO.LOW)

time.sleep(1)

Connect an LED with limiting resistor to GND and pin 7 (as labelled on the board) of the GPIO header. Save the program and run it from the terminal using sudo to see the LED flash; press Ctrl+C to exit the program and stop the LED flashing.

At the start of the program we bring in the libraries we need, Jetson.GPIO (renamed as GPIO) and time, and set the pin numbering mode to BCM. Unlike the Raspberry Pi which has just GPIO.BOARD and GPIO.BCM as options for GPIO.setmode, the Jetson.GPIO library additionally accepts GPIO.CVM (CVM/CVB connector) and GPIO.TEGRA_SOC (Tegra SoC).

We then put GPIO pin number 4 into output mode and then enter an infinite loop (which we can leave by terminating the program) and then turn GPIO pin 4 on (and thus the LED too) wait a second, turn pin 4 off (LED goes off), wait a second and then repeat.

I went a step further and removed the two sleep statements and then ran the program once more but with an oscilloscope connected to the GPIO and GND which indicated a 4KHz signal which is a lot slower than what a Raspberry Pi can do even when using Python. The slowness is possibly due to the Jetson GPIO library not being optimised enough but for greater speed the Nano's built-in hardware protocols on the dedicated J41 'GPIO' pins can be used.

Power

Powering the Nano from my bench power supply through the barrel jack connector I was surprised to see that the board was drawing only 0.25A even though people claimed 2A minimum was needed (these tests were done in 10W mode). When using the board, the only time I saw the current draw go above 1A was when playing a YouTube video using Firefox which caused 1.3A to be drawn at peak and of course, more current would be drawn depending on what other peripherals are attached to the USB ports. In standby, that is after the board has been shut down, I found that the current being drawn went down to just 0.02A.

Wi-Fi and Bluetooth

As previously mentioned the Nano doesn't feature integrated wireless connectivity of any kind and one solution is to use a USB dongle or if you only need an Internet connection rather than Bluetooth also, then you could take advantage of the Ethernet port instead. Another option is to install a wireless M.2 card, such as the Intel 3165 which features dual-band 802.11ac Wi-Fi and Bluetooth 4.2, which is what I opted for (model number 3165NGW). The reason why I had chosen that particular wireless card was because I had taken it from a Dell Inspiron 22-3264 AIO desktop that I had scrapped for parts and it seemed a likely candidate.

You will need to remove the SOM from the Nano to be able to fit the wireless card into the M.2 slot and be sure to remember to have the antennas attached to the wireless card if not already (I used the ones that I had taken from the previously mentioned Dell desktop). After fitting the wireless card, fix the SOM back in place and when you boot the Nano you will likely notice that although Bluetooth works there is no Wi-Fi functionality.

After looking online I found a useful guide that helped me get the Wi-Fi working:

https://www.sfxrescue.com/tutorials/intel-pcie-wifi-with-nvidia-jetson/

Some notes:

For some reason nano wasn't installed in my Linux distro and if that is also the case for you then you can either use a different editor or install nano:

sudo apt-get update

sudo apt-get install nano

When the tutorial says to reboot after editing the config file, don’t forget to save your edit. If using nano, you can use Ctrl + X, and when it prompts you to save, type Y and then enter.

Now I have working Wi-Fi and Bluetooth on my Nano by following the tutorial.

Troubleshooting

No sound through HDMI

When using Linux, if you get no sound when using HDMI then left-click on the speaker icon at the top-right of the screen and select Sound Settings... On the Output tab click HDMI / DisplayPort. You can click the Test Sound button and then click either of the 2 Test buttons to test the audio. Click the close button when finished.

Screen suddenly blanks

If you find the screen suddenly blanks and doesn't return when you press a key on your keyboard or move your mouse it could be a power issue. For me, whenever I clicked on the settings icon in Linux the screen blanked and the computer became unresponsive. I was using a 3A USB phone plug so that shouldn't have been the problem but after changing the micro USB cable I didn't get the problem again, or so I thought. However, when using a bench power supply to power the Nano through its barrel jack connector the screen would blank when I opened Firefox. It turns out Linux was having issues with my USB Wi-Fi dongle; the standard version of Linux for the Nano does not support Wi-Fi adapters.

All content of this and related pages is copyright (c) James S. 2019-2021