Getting Your Camera Working on the Nvidia Nano

Image for post
Image for post
The Nvidia Jetson Nano is a new single board computer that sells for $100. It has 128 GPU cores and could be an alternative for the Raspberry Pi for the Donkey Car

I have been working on upping the game for the DonkeyCar and make AI more accessible to high-school students. The Raspberry Pi 3+ is just barely powerful enough to drive around a track and requires ideal lighting for training and driving. It is also not powerful enough to do training. It can only gather test data and run inference. Training must currently be done on other servers which is complex, time consuming and expensive.

My colleagues at the Optum Advanced Technology Collaborative have been looking into the Nvidia Jetson family of edge computers. Although the Xavier is a very powerful system, at $1,200 it is a bit too expensive for my CoderDojo students. Nvidia just release a much lower cost single-board computer (SBC) where the software developer kit (SDK) is priced at $100. That is a price that is much more realistic for an all-volunteer AI classroom.

I attempted to hook up my Raspberry Pi camera to it but it did not work. After posting a question on the Nvidia developer forum for the Nano, I got response that indicated I was using an incompatible camera. It turns out that the Nano only supports Camera Module V2. So I purchased a new camera on Amazon for $30 and it worked great. Here are the steps I took to get it working.

The photo below shows the package and the very clear labeling that this one is indeed the Module V2.

Image for post
Image for post
Packaging for the Raspberry Pi Camera Module V2

The next step is to hook the camera’s ribbon connector up correctly. Make sure the board is shutdown and the the power is disconnected. The CCD cameras are also very sensitive to static so use appropriate caution. The key is to know that the silver side of the connector is on the inside and the blue side is on the outside as shown in the photo below.

Image for post
Image for post
Make sure the silver side of the ribbon connector is on the inside and the blue backing is on the outside.

Once you press the connector down you should be able to pull gently on the ribbon to confirm the connector is gripping the end of the ribbon. Jim on the JetsonHacks channel has a nice video of connecting it here.

Now you should be able to power up the Nano and then type:

$ ls /dev/video0

Image for post
Image for post
Results of running ls /dev/video0 shows a video device is now present.

If you don’t see the device file something must be wrong. Check to make sure you have the ribbon oriented correctly and that you have a Version 2 Pi camera. Version 1 will not work.

You can also test the video stream by downloading the CSI Camera code here:

The file has the “G-streamer” shell command that you run:

$ gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=0 ! 'video/x-raw,width=960, height=616' ! nvvidconv ! nvegltransform ! nveglglessink -e

That program immediately streams the camera output to the monitor:

Image for post
Image for post
The camera image is continuously streaming to the monitor while the command is running.

Proof that it works!

The Jetson Hacks has a more detailed page here:

Thanks to Tommy Gilchrist for answering my question on the Forum.

I have been warned by several people that the Nvidia Jetson systems are not really designed for rookies like me. They really require quite a bit of UNIX background and deep knowledge of python container management. My hope is that the Nano is so low-cost that there will be a large community of support people like Tommy around to answer questions from newbies like me. Perhaps together we can make AI more accessible to high-school students in our CoderDojo programs.

Written by

Distinguished Engineer with an interest in knowledge graphs, AI and complex systems. Big fan of STEM, Arduino, robotics, DonkeyCars and the AI Racing League.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store