Arduino Yun SBC adds Wifi and Linux to Leonardo features

Arduino Yun SBC adds Wifi and Linux to Leonardo features

[Updated Sep 30] — Arduino announced the first open source Arduino hacker board with built-in WiFi, and also the first to run Linux. The $69 Arduino Yun integrates the functions of an Arduino Leonardo, featuring an Atmel ATmega32U4 microcontroller and 14 GPIO pins, with an Atheros AR9331 WiFi SOC running OpenWRT embedded Linux on a 400MHz MIPS processor.

Arduino, the Italian-based project that designs the official line of Arduino boards, announced the Arduino Yun last weekend at the Maker Faire Bay Area along with a non-Linux “Arduino Robot” kit billed as “the first official Arduino on wheels.” The Arduino Yun, which was developed with Boston-based Dog Hunter, has applications far beyond robotics, supporting any device that requires WiFi.Arduino Yun SBC adds Wifi and Linux to Leonardo features

The Yun single-board computer (SBC) is expected to ship in late June for $69. It’s built around a $25 “classic” Arduino Leonardo design, complete with an 8-bit Atmel ATmega32U4 microcontroller, 16MHz crystal oscillator, and 14 GPIO pins. Up to seven of the pins can be used for PWM outputs, and up to 12 for analog inputs.

On top of the Leonardo features, the Yun (“cloud” in Mandarin) adds Qualcomm’s Atheros AR9331 WiFi system-on-chip (SOC), which is based on a 400MHz MIPS 24k processor. The Yun uses the MIPS chip to run Linino, a custom version of the lightweight OpenWRT embedded Linux distribution.

The AR9331 is used in devices such as TP-Link’s TL-WR703N portable 3G/WiFi router. Arduino developer Ian Sexton has hacked the TL-WR703N router with OpenWRT to integrate it with an Arduino-compatible Teensy board to provide a WiFi connection. A separate project called LinkDuino also aims to link the router with Arduino via OpenWRT.

The Yun seems more similar to these hacks than to full-fledged Linux SBCs like the Raspberry Pi or BeagleBone. Here, Linux is essentially the networking-focused slave of the ATmega32U4 microcontroller. Indeed, the Arduino Yun SBC architecture diagram above shows the MIPs-based Linino side controlling WiFi, Ethernet, and USB Host ports, while the Arduino side adds its own micro-USB port for communication with a host development PC. A microSD slot is also available.

But what’s not clear, is whether Arduino made use of any of the AR9331 SOC’s other capabilities in this new design. As indicated by the SOC’s block diagram (above), the Atheros chip provides a total of five Ethernet ports, an unspecified number of programmable GPIO lines, and a UART that’s described as “high speed” on its data sheet. Collectively, these features hint at possibilities beyond what’s revealed by the Yun’s over-simplified block diagram. We’ll know more when full details of the new board’s design, connectors, and configuration options become available.

Arduino has developed a new Bridge library that delegates network connections and processing of HTTP transactions to the Linino-controlled Atheros AR9331. The device can be programmed via WiFi or USB.

The Arduino Yun automatically appears to a networked PC as a WiFi access point. Developers can use Linux to launch applications and scripts, and pass parameters such as sensor readings to Linux for processing. The device supports Python and Shell scripts and can use SSH sessions for customization. Other open source Linux tools and apps can also be loaded, says Arduino.

Arduino has also partnered with Temboo to provide access to its collection of more than 100 cloud-based APIs and databases. With the Temboo APIs, developers can integrate inputs from multiple sources, including Twitter, Facebook, and PayPal.

Linux training wheels?

The fact that Arduino’s first WiFi board is also its first to run Linux is no coincidence. The need to provide WiFi services is one of the main reasons developers switch from microcontroller platforms and real-time operating systems (RTOSes) to Linux. It’s also why many of the hardware hackers in the Arduino open source community have been integrating Arduino with the $25-$35 Raspberry Pi, especially in robotics applications. Others are leaving Arduino behind entirely to move to the Pi or other more I/O-rich open source Linux boards like the BeagleBone Black.

One can purchase a WiFi shield add-on for an Arduino board, but it’s expensive and difficult to integrate. As Arduino concedes in its Yun announcement, the Arduino architecture lacks the memory to properly parse XML. It also lacks an advanced operating system to design effective web services. With web connections increasingly seen as a requirement for Arduino staples like educational robots, home automation devices, and kitchen appliances, Linux is increasingly seen as a necessity.

Arduino developers are often reluctant to move to Linux, which is more difficult to learn and use, especially with the sort of real-time, mechanical applications that Arduino excels at. And the Pi in particular lacks the extensive GPIO of the Arduino used for motor and sensor controls.Arduino Yun SBC adds Wifi and Linux to Leonardo features Schematic1

It’s not surprising, then, that Arduino made the choices it did with the hybrid design and selection of MIPS. Arduino could have added a more sophisticated Raspberry Pi-like ARM11 processor or even a Cortex-A7 SOC, but at the cost of a much higher learning curve for its users, not to mention a higher price and higher memory requirements. The Yun is, in a sense, a set of Linux training wheels for Arduino.

As Arduino embraces Linux — albeit at arm’s length — robot projects are increasingly combining the two platforms, typically using the Raspberry Pi as the Linux computer. Hybrid Pi/Arduino robot projects include the Ardux Robot, the Arduino/Pi Robot, and the Telemus.


Read more: Arduino Yun SBC adds Wifi and Linux to Leonardo features

Leave a Comment

Your email address will not be published. Required fields are marked *