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!

15 Responses to “Let’s explore Arduino Yún’s unique features – Hardware review”

  1. trustnoone Says:

    I so want this, can’t wait until it comes out, great work!!

  2. wiesson Says:

    How much energy does it need or how long can it operate with enabled wifi with a 9V primary battery? :)

  3. DidierDeluxe Says:

    @ wiesson: I think you can’t power it with a 9V battery, the review states that: “When powering the board though the Vin pin, you must supply a regulated 5VDC. There is no on-board voltage regulator for higher voltages.”

  4. fulvioz Says:

    Two questions:
    It will be possible to connect a usb modem?
    The device is equipped with a “real time clock” working without power?

    Thanks!

  5. Federico Vanzati Says:

    Hi fulvioz,

    the Yún doesn’t have a real time clock IC on board, so it can’t keep time when is powered off. Instead, it synchronizes with time servers automatically when it powers up and connects to a network using NTP. Do you consider it an useful feature to have on the Yún? For what application you need it?

    Support for usb modems is theoretically possible. It depends on which modems are supported by OpenWRT. For example there are several 3G/UMTS usb dongles that are compatible after installing their drivers, as is explained in this page: http://wiki.openwrt.org/doc/recipes/3gdongle
    what type of usb modem do you want to connect?

    regards,
    federico

  6. Denbo Says:

    @DidierDeluxe

    I think what @wiesson meant to ask was running it with a 9v through a voltage regulator. Normally to get regulated 5v power you need something like a 7805 voltage regulator and some capacitors. To provide power through a 7805 you normally use a 9v battery (or at least I do).

  7. fulvioz Says:

    Thanks for the answers, federico! I would like to use “arduino” as a data logger for environmental sensors in situations where the power supply is not always 100% insured, powered by solar panels and backup battery eg., However, The NTP solution combined with a 3g modem might be useful!

  8. kerimil Says:

    Page on arduino Yun states that input voltage is 6-20V. Somebody must have copy pasted that into it.

    Overall arduino team is moving in the right direction – I am tired of all those projects that use Raspberry PI solely to get wifi conectivity. I hope the price will be right

  9. tochinet Says:

    @Denbo, @wiesson, using a 9V battery through a 7805 for a WiFi Arduino is like carrying a A4 envelope in a car. Incredibly inefficient usage of power. Expect to change the battery every few hours.

    Yun as data logger is a serious overkill. Of course, adding a Pi just to get Ethernet (WiFi is non-standard on Pi) is an overkill as well, and not even powerable with a 9V battery, but since none of this is low power at all …

    If you are serious about wireless data logging, get a decent low-power variation of Arduino, using only 3V (two AA for example), power off routines, and some low power RF interface etc. Look at Jeenodes or Panstamps for example, or nanodeRF. There have been also several kickstarters on that field recently, such as RFduino (unlicensed use of the suffix!), but AFAIK none is available right now.

    The Yun is a completely other beast, but it fills a nice gap in the “Gateway” space, because getting started with RPi, olinuxino or other beaglebones is much more complex than the Arduino principles. Good work guys. I hope the price tag won’t be discouraging.

  10. brunialti Says:

    Just a question: can linino host a mysql client? Or, even better, has it as stock feature?

  11. tochinet Says:

    @bruniati, I’m not an expert, but it says linino will host temboo, and mySql is one of the APIs it supports apparently. But the site also talks about strange things like JSON2DB, so … more info available next week I presume.

  12. federicofissore Says:

    @brunialti: yes, there are several options for connecting to a mysql server: you’ll have to choose the right package for your language of choice (for example there is a package “python-mysql”)
    @tochinet: the temboo mysql api works with both amazon and locally hosted mysql instances. While setting up amazon is documented on the api page*, setting up the right local environment (public ip address, firewalls, permissions…) may be tricky
    * https://temboo.com/library/Library/MySQL/

  13. brunialti Says:

    The temboo libs seems quite powerful. Unfortunately it seems that they are not available in c language.

  14. saj816 Says:

    Are any of the pins Digital Pins reserved for the Yun Ethernet/Linux comm and functionality.

  15. spimusic Says:

    Has anyone tried getting a USB webcam to work with this? I have been trying but I get gray or green images when snapping a pic… please help!

Leave a Reply

You must be logged in with your Arduino account to post a comment.

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy