Blog Home

Let's explore Arduino Yún’s unique features – Hardware review

Federico VanzatiSeptember 2nd, 2013

Arduino Yún

As announced a few days ago, the newest addition to the Arduino family, the Arduino Yún, will be available starting September 10. This is the first in a series of posts that will describe some of the Yún’s unique features. Today, we’ll focus on the hardware.

———————–

The Yún is unique in the Arduino lineup, as it has a lightweight Linux distribution to complement the traditional microcontroller interface. It also has WiFi and Ethernet connections on board, enabling it to communicate with networks out of the box. The Yún’s Linux and Arduino processors communicate through the Bridge library, allowing Arduino sketches to send commands to the command line interface of Linux.

Introduction
The Arduino Yún has the same footprint as an Arduino Uno but combines an ATmega32U4 microcontroller (the same as the Leonardo) and a Linux system based on the Atheros AR9331 chipset. Additionally, there are built-in Ethernet and WiFi capabilities. The combination of the classic Arduino programming experience and advanced internet capabilities afforded by a Linux system make the Yún a powerful tool for communicating with the internet of things.

The Yún’s layout keeps the I/O pins the same as the Arduino Leonardo. As such, the Yún is compatible with the most shields designed for Arduino.

With the Yún’s auto-discovery system, your computer can recognize boards connected to the same network. This enables you to upload sketches wirelessly to the Yún. You can still upload sketches to the Yún through the micro-USB connector just as you would with the Leonardo.

Connectivity
The Yún has two separate network interfaces, a 10/100 Mbit/s Fast Ethernet port and a IEEE 802.11 b/g/n standard compliant 2.4GHz WiFi interface, supporting WEP, WPA and WPA2 encryption. The WiFi interface can also operate as an access point (AP). In AP mode any WiFi enabled device can connect directly to the network created on the Yún. While a Yún in this mode can’t connect to the internet, it could act as a hub for a group of WiFi enabled sensors.

Historically, interfacing Arduino with web services has been challenging due to memory restrictions. The Yun’s Linux environment simplifies the means to access internet services by using many if the same tools you would use on your computer. You can run several applications as complex as you need, without stressing the ATmega microcontroller.

To help you develop applications that can connect to popular web services, we have partnered with Temboo, a service that simplifies accessing hundreds of the web’s most popular APIs. A Temboo library comes with the Yún, making it easy to connect to a large variety of online tools. Check out their website for the full list of services they offer.

Connection between the two processors
The Yún’s Bridge library enables communication between the two processors, connecting the hardware serial port of the AR9331 to Serial1 on the 32U4 (digital pins 0 & 1). Another post will describe the library in greater depth. The serial port of the AR9331 exposes the Linux console (aka, the command line interface, or CLI) for communication with the 32U4. The console is a means for the Linux kernel and other processes to output messages to the user and receive input from the user. File and system management tools are installed by default. It’s also possible to install and run your own applications using Bridge.

The ATmega32U4 can be programmed from the AR9331 by uploading a sketch through the Yún’s WiFi interface. When connected to the same WiFi network as your computer, the board will appear under the “Port” menu of the Arduino IDE. The sketch will be transferred to the AR9331, and the Linux distribution will program the ATmega32U4 through the SPI bus, emulating an AVR ISP programmer.

Power consideration
The Yún can be powered through the micro-USB connector, the Vin pin, or the optional Power Over Ethernet (POE) module. When powering the board though the Vin pin, you must supply a regulated 5VDC. There is no on-board voltage regulator for higher voltages.

Linux OS specifications
The Yún runs a version of the OpenWRT Linux distribution called Linino. The on-board 16MB flash memory that contains the Linux image has a full python installation and package manager you can use to install additional software.
The AR9331 has 64 MB of DDR2 RAM available, providing the resources to perform complex tasks like running a web server or streaming video from a webcam.
You can expand the storage memory by adding a micro-SD card or a USB pen drive. By including a directory named “arduino” at the root level of the storage device, it will be automatically recognized by the Yún.

USB Host
The Yún has a USB host port connected to the AR9331. You can connect USB peripherals like webcams, memory sticks, or joypads to this input. Generally, Linux has drivers included for the more common devices like mass storage or mice and keyboards. For more specific devices like webcams, you will need to refer to the device specifications to find the appropriate driver. As the USB port is connected to the Linux processor, it’s not directly accessible from sketches on the 32U4.

—————-

The next post about the Yún will focus on the Bridge library, describing how it facilitates communication between the two processors. Stay tuned!

Boards:Yún
Categories:ArduinoHardware