I recently decided to start playing with Arduino embedded computers. On May 9th 2012 I purchased an Arduino Compatible “Nano V3.0 AVR” from DX.com (DealExtreme). It arrived June 4th 2012. Here are my initial thoughts.
See my previous post regarding the Arduino project. Their Nano 3.0 is based on the ATmega328 microcontroller (datasheet) with a range of analog and digital I/O pins for controlling and sensing their environment. As with the Uno, the price (with free shipping) of buying a clone from overseas was too good to pass up even with the long shipping time.
My Nano arrived in an anti-static plastic bag, wrapped in bubble-wrap inside a marginally padded envelope. It came complete a USB cable (for comms and power) and a few bent pins. Fortunately, the pins were easily set right.
Curiously, although the Nano is ostensibly designed with pins that can plug it directly into a breadboard, I could not plug it easily into either of the breadboards I recently bought from DealExtreme. Almost felt like the Nano’s pins were a tad too large to fit easily into the breadboard’s spring loaded contact holes. For my experiments so far I used wires with in-line single-pin sockets.
Plugging the Nano into FreeBSD 8.3-PRELEASE
I’ve previously described using the Arduino IDE 1.0.1 under Windows XP guest VM under VirtualBox 4.1.8 on a FreeBSD 8.3-PRELEASE host (gjabkup2) to program an Arduino Uno. The same basic steps also worked fine for the Nano. Here’s I will note only the differences.
The Nano utilises its USB connection as a serial-over-USB communications link (programming and I/O) and for power (drawing power from the host PC). An FTDI FT232RL chip provides the on-board USB-to-serial converter.
With WinXP already running under VirtualBox, I plugged my Nano into gjabkup2′s USB port and saw the following on console:
Jun 6 18:43:02 gjabkup2 kernel: ugen6.4: <FTDI> at usbus6 Jun 6 18:43:02 gjabkup2 kernel: uftdi0: <FT232R USB UART> on usbus6
The Nano’s power LED immediately lit up (a distractingly bright blue), and a white on-board LED began flashing (as with my clone Uno, I suspect the Nano came with the example Blink program pre-installed).
It appears the FreeBSD kernel has recognised this as a serial device, and created a new tty:
firstname.lastname@example.org :lat /dev/tty* crw------- 1 root wheel 1, 109 Jun 6 18:43 /dev/ttyU0 crw------- 1 root wheel 1, 110 Jun 6 18:43 /dev/ttyU0.init crw------- 1 root wheel 1, 111 Jun 6 18:43 /dev/ttyU0.lock [..] email@example.com :
My VirtualBox instance was not yet configured to pass through the Nano’s USB device to the WindowsXP guest VM, so nothing happened inside the WinXP VM at this point.
Installing the necessary driver under WinXP guest
The VBox GUI allowed me to add the Nano as a recognised USB device (“FTDI FT232R USB UART”) in the USB filter list for the running WinXP VM. Having done this, I unplugged and replugged in the Uno and WinXP immediately recognised it as new hardware, an “FT232R UART”.
Following the Windows installation instructions for the Nano, I directed the New Hardware dialog to search the “
..\arduino1.0.1\drivers\FTDI USB Drivers” folder. WinXP then detected and installed “USB Serial Converter”.
Almost immediately, more New Hardware was detected. Went through the same steps again, and this time WinXP detected and installed a “USB Serial Port”, which came up as COM4 (as COM3 had previously been taken by the USB driver for the Arduino Uno, which uses a different driver architecture.)
I first configured the IDE to use COM4 as the port (“
Tools->SerialPort->COM4“) then told it that we were programming a Nano with ATmega 328 chip (“
Tools->Board->Nano w/ATmega 328“). After that, I ran through the same example programs as documented here for my Uno.