Arduino Yún Rev2: Bridging Microcontrollers and Linux
A powerful Arduino board featuring a microcontroller and a Linux-based system on a single board for connected projects.
The Arduino Yún Rev2 is a unique and powerful board that merges the simplicity of the Arduino microcontroller ecosystem with the flexibility of a Linux computer. Released as an evolution of the original Yún, it's designed for makers who need more processing power, network connectivity, and software capabilities than a standard Arduino can offer. This board is ideal for projects requiring web interaction, data logging, or running more complex applications.
At its heart, the Yún Rev2 is powered by two distinct processors. The first is an ATmega32U4 microcontroller, familiar to Arduino users, handling real-time control, sensor readings, and low-level I/O. The second is a more powerful Atheros AR9331 System-on-Chip (SoC) running a custom Linux distribution (Linino OS, based on OpenWrt). This Linux environment provides Wi-Fi, Ethernet, and significant processing capabilities, allowing for tasks like running web servers, managing files, and communicating with cloud services.
The Yún Rev2 sits in a special category within the Arduino family, often referred to as a "connected board" or "IoT board." It builds upon the legacy of the original Yún and the Arduino Leonardo (which also uses the ATmega32U4) by integrating a full Linux environment. This makes it suitable for advanced hobbyists, students learning about embedded Linux and IoT, and professional engineers prototyping connected devices. Its dual-processor architecture allows for a division of labor: the microcontroller handles time-critical tasks, while the Linux system manages networking and complex computations.
This board is particularly well-suited for projects that require a robust internet connection, data processing, or the ability to run custom software packages. Examples include home automation hubs, data loggers that upload to cloud platforms, networked sensor arrays, or even simple web servers hosted directly on the device. The Yún Rev2 offers a compelling platform for those looking to bridge the gap between simple microcontroller projects and more sophisticated embedded Linux applications.
Watch
Related video, embedded from YouTube.
Specifications
| Microcontroller / SoC | ATmega32U4 and Atheros AR9331 |
| Architecture | AVR (ATmega32U4) and MIPS (AR9331) |
| Clock speed | 16 MHz (ATmega32U4), 400 MHz (AR9331) |
| Flash / Storage | 32 KB (ATmega32U4) + 16 MB Flash (AR9331) |
| RAM / SRAM | 2.5 KB SRAM (ATmega32U4) + 64 MB DDR2 RAM (AR9331) |
| Operating voltage | 5V |
| Digital I/O pins | 14 (of which 7 can be used as PWM outputs) |
| Analog / ADC | 6 (10-bit resolution) |
| PWM | 7 pins (on ATmega32U4) |
| Connectivity | Wi-Fi 802.11 b/g/n, Ethernet 10/100 Mbps |
| USB | 1x Micro-USB (for programming/power), 1x USB-A (host) |
| Power input | 7-12V via DC barrel jack, or 5V via Micro-USB |
| Dimensions | 73 mm x 53 mm |
Pinout & pin functions
| Pin | Function |
|---|---|
| GND | Ground |
| 3.3V | 3.3V Power Output |
| 5V | 5V Power Output (regulated) |
| IOREF | I/O Reference Voltage |
| RESET | System Reset |
| D0 (RX) | Serial communication receive |
| D1 (TX) | Serial communication transmit |
| D2 | Digital I/O |
| D3 (PWM) | Digital I/O, PWM output |
| D4 | Digital I/O |
| D5 (PWM) | Digital I/O, PWM output |
| D6 (PWM) | Digital I/O, PWM output |
| D7 | Digital I/O |
| D8 | Digital I/O |
| D9 (PWM) | Digital I/O, PWM output |
| D10 (PWM, SS) | Digital I/O, PWM output, SPI Slave Select |
| D11 (PWM, MOSI) | Digital I/O, PWM output, SPI Master Out Slave In |
| D12 (MISO) | Digital I/O, SPI Master In Slave Out |
| D13 (SCK) | Digital I/O, SPI Serial Clock |
| A0 | Analog Input, Digital I/O |
| A1 | Analog Input, Digital I/O |
| A2 | Analog Input, Digital I/O |
| A3 | Analog Input, Digital I/O |
| A4 (SDA) | Analog Input, Digital I/O, I2C Serial Data |
| A5 (SCL) | Analog Input, Digital I/O, I2C Serial Clock |
| A6 | Analog Input, Digital I/O |
| A7 | Analog Input, Digital I/O |
| LED_BUILTIN | Onboard LED (connected to D13) |
Wiring & circuit basics
Powering the Arduino Yún Rev2 can be done via its 5V Micro-USB port or a 7-12V DC barrel jack. When using the barrel jack, an onboard voltage regulator supplies the necessary 5V to the board. Ensure your power supply can provide at least 1A, especially if using Wi-Fi or Ethernet, to prevent brownouts or instability. Avoid powering the board through the 5V pin unless you have a stable, regulated 5V source capable of supplying sufficient current, as this bypasses the onboard regulator.
The Yún Rev2 operates at a logic level of 5V, meaning its digital pins HIGH state is 5V and LOW is 0V. When interfacing with sensors or modules that operate at 3.3V, it is crucial to use a level shifter to prevent damage to the 3.3V device. Connecting a 5V output directly to a 3.3V input can cause permanent damage. Conversely, 3.3V outputs from a sensor can generally be read by the Yún Rev2's 5V inputs without issue, though it's always good practice to check the specific sensor's specifications.
For a simple LED project, connect the anode (longer leg) of an LED to a digital pin (e.g., D13, which also controls the onboard LED) through a current-limiting resistor (typically 220-330 ohms). Connect the cathode (shorter leg) of the LED to a GND pin. This setup ensures the LED receives the correct voltage and current, preventing it from burning out. For an I2C sensor, connect its VCC to the 3.3V or 5V pin (depending on the sensor's requirements), its GND to a GND pin, its SDA pin to the Yún Rev2's SDA pin (A4), and its SCL pin to the Yún Rev2's SCL pin (A5).
Programming & getting started
The Arduino Yún Rev2 can be programmed using the standard Arduino IDE (version 1.5.4 or later recommended). The ATmega32U4 microcontroller is programmed like any other Arduino board. For the Linux side, you can access it via SSH over Wi-Fi or Ethernet, or use specific libraries within the Arduino sketch to interact with the Linux system (e.g., running shell commands, managing files). The IDE handles uploading sketches to the ATmega32U4, and you can then use the Arduino IDE's built-in Bridge library or SSH to communicate with the Linux environment.
To upload your first sketch, connect the Yún Rev2 to your computer via the Micro-USB port. Select the correct board (Arduino Yún Rev2) and COM port in the Arduino IDE. Write a simple sketch, such as the Blink example, and click the Upload button. Once uploaded, you should see the onboard LED blink. To interact with the Linux side, you can enable SSH and log in to the board to explore its file system and run commands.