MakerLab
ArduinoArduino Yún Mini

Arduino Yún Mini: Bridging Microcontrollers and Linux

A compact Arduino board featuring a microcontroller and a Linux-powered processor for advanced IoT projects.

Arduino Yún Mini

The Arduino Yún Mini is a specialized board designed to bridge the gap between traditional microcontrollers and full-fledged Linux systems. It integrates two distinct processing units: an Atheros AR9331 System-on-Chip (SoC) running a Linux distribution, and an Atmel ATmega32U4 microcontroller. This dual-processor architecture allows for powerful networked applications while retaining the ease of use and real-time control capabilities of the Arduino ecosystem. It was released as a more compact and cost-effective version of the original Arduino Yún.

At its heart, the Atheros AR9331 SoC is a MIPS-based processor commonly found in Wi-Fi routers. On the Yún Mini, it runs OpenWrt, a highly customizable Linux distribution. This Linux environment provides capabilities like Wi-Fi connectivity, Ethernet, a web server, and the ability to run standard Linux applications. This makes the Yún Mini ideal for projects requiring network access, data logging, or complex processing that would overwhelm a typical microcontroller.

The Atmel ATmega32U4, a familiar chip in the Arduino family (also found on the Leonardo and Micro), handles the real-time I/O tasks. It communicates with the Linux processor via a bridge, allowing sketches to interact with Linux processes and vice-versa. This hybrid approach is perfect for makers who need the direct hardware control of an Arduino for sensors and actuators, combined with the networking and processing power of a Linux computer for tasks like web interfaces, cloud connectivity, or running Python scripts.

Released around 2016, the Yún Mini was aimed at makers and developers looking to build sophisticated Internet of Things (IoT) devices, home automation systems, and connected projects without the need for a separate Raspberry Pi or computer. Its integrated Wi-Fi and Ethernet, along with its dual-processor nature, make it a versatile platform for both learning and advanced development.

Watch

Related video, embedded from YouTube.

Specifications

Microcontroller / SoCAtmel ATmega32U4 (for microcontroller tasks) and Atheros AR9331 (for Linux/Wi-Fi)
ArchitectureAVR (ATmega32U4) and MIPS (Atheros AR9331)
Clock speed16 MHz (ATmega32U4) and 400 MHz (Atheros AR9331)
Flash / Storage32 KB (ATmega32U4) with 4 KB bootloader; 16 MB SPI Flash (Atheros AR9331) for Linux OS
RAM / SRAM2.5 KB SRAM (ATmega32U4); 64 MB DDR2 RAM (Atheros AR9331)
Operating voltage3.3V
Digital I/O pins20 (ATmega32U4), of which 7 can be used as PWM outputs
Analog / ADC12 (ATmega32U4)
PWM7 (ATmega32U4)
ConnectivityBuilt-in Wi-Fi (802.11 b/g/n), Ethernet port
USB1x Micro-USB for power and programming (ATmega32U4), 1x USB-A host port (Atheros AR9331)
Power input5V via Micro-USB or DC barrel jack (7-12V recommended, regulated down to 5V)
Dimensions49.5mm x 20.3mm

Pinout & pin functions

PinFunction
5VPower output (regulated)
3.3VPower output (regulated)
GNDGround
GNDGround
IOREFVoltage Reference (3.3V)
RESETSystem Reset pin
D0 (RX)Digital I/O, UART receive (ATmega32U4)
D1 (TX)Digital I/O, UART transmit (ATmega32U4)
D2Digital I/O (ATmega32U4)
D3Digital I/O, PWM (ATmega32U4)
D4Digital I/O (ATmega32U4)
D5Digital I/O, PWM (ATmega32U4)
D6Digital I/O, PWM (ATmega32U4)
D7Digital I/O (ATmega32U4)
D8Digital I/O (ATmega32U4)
D9Digital I/O, PWM (ATmega32U4)
D10 (SS)Digital I/O, SPI Slave Select (ATmega32U4)
D11 (MOSI)Digital I/O, SPI Master Out Slave In (ATmega32U4)
D12 (MISO)Digital I/O, SPI Master In Slave Out (ATmega32U4)
D13 (SCK)Digital I/O, SPI Clock (ATmega32U4)
A0Analog Input, Digital I/O (ATmega32U4)
A1Analog Input, Digital I/O (ATmega32U4)
A2Analog Input, Digital I/O (ATmega32U4)
A3Analog Input, Digital I/O (ATmega32U4)
A4 (SDA)Analog Input, Digital I/O, I2C Data (ATmega32U4)
A5 (SCL)Analog Input, Digital I/O, I2C Clock (ATmega32U4)
D14Digital I/O (ATmega32U4)
D15Digital I/O (ATmega32U4)
D16Digital I/O (ATmega32U4)
D17Digital I/O (ATmega32U4)
D18Digital I/O (ATmega32U4)
D19Digital I/O (ATmega32U4)
LEDOnboard LED connected to D13
Wi-Fi AntennaOnboard Wi-Fi antenna
Ethernet PortRJ45 Ethernet connector
Micro-USB PortFor power and programming the ATmega32U4
USB-A Host PortFor connecting USB devices to the Linux system

Wiring & circuit basics

Powering the Arduino Yún Mini requires careful consideration due to its dual-processor nature. The board operates at a 3.3V logic level, which is important when connecting external components. For powering the board, you can use the Micro-USB port (which supplies 5V) or the DC barrel jack (which accepts 7-12V). The board contains onboard voltage regulators to step down the input power to the required 5V and 3.3V for the components. Avoid applying more than 12V to the barrel jack, as this can overheat the regulator. Ensure your power supply can provide at least 1A, especially when using Wi-Fi or the USB host port.

When connecting sensors or actuators, always respect the 3.3V logic level of the Yún Mini. Connecting 5V devices directly to its digital pins can damage the ATmega32U4 microcontroller. If you need to interface with 5V components, use a logic level shifter. For example, to connect a simple LED, use a digital I/O pin (like D2) and connect it in series with a current-limiting resistor (typically 220-330 ohms) to GND. The resistor prevents the LED from drawing too much current and damaging the pin.

For I2C communication, the Yún Mini uses pins A4 (SDA) and A5 (SCL). These pins are also digital I/O pins. When connecting an I2C sensor, ensure it is a 3.3V compatible device or use a logic level shifter. Connect the sensor's VCC to the 3.3V pin on the Yún Mini, its GND to a GND pin, its SDA to A4, and its SCL to A5. The ATmega32U4 microcontroller on the Yún Mini handles the I2C communication, but the Linux side can also interact with it through the bridge.

Programming & getting started

The Arduino Yún Mini can be programmed using the standard Arduino IDE, which is the most common method for interacting with the ATmega32U4 microcontroller. You will need to select the 'Arduino Leonardo' board from the IDE's board manager, as the Yún Mini shares the same microcontroller. To upload sketches, connect the board via its Micro-USB port and select the correct COM port. For more advanced networking and Linux-side programming, you can access the Linux environment via SSH and use tools like Python, Node.js, or shell scripting. The bridge allows sketches to execute Linux commands and vice-versa, enabling powerful hybrid applications.

Project ideas

Wi-Fi Connected Weather StationMonitor temperature, humidity, and pressure using sensors connected to the ATmega32U4 and send data wirelessly via Wi-Fi to a web server running on the Yún Mini's Linux side, which can then be accessed from any device on your network.
Smart Home HubUse the Ethernet or Wi-Fi to connect to your home network and control smart devices (like lights or relays) connected to the Yún Mini's GPIO pins, with a web interface hosted on the board for control.
Networked Data LoggerCollect sensor readings at regular intervals and log them to a file on the Linux system's flash storage, accessible remotely via SSH or a web interface.
Remote Control RobotBuild a simple robot with motors and sensors controlled by the ATmega32U4, and steer it remotely using a web interface hosted on the Linux processor, accessible over Wi-Fi.
IoT Security Camera StreamerConnect a compatible USB webcam to the USB-A host port and use the Linux system to stream video over the network, while the ATmega32U4 could potentially trigger recording based on sensor input.
Personal Cloud ServerUtilize the Linux environment to run a lightweight web server, file server, or even a VPN, making the Yún Mini a small, low-power server for your home network.

Buying tips & gotchas

When purchasing an Arduino Yún Mini, be aware that it's a more specialized board than a standard Uno or Leonardo. Ensure your project genuinely benefits from the dual-processor Linux/microcontroller architecture; otherwise, a simpler Arduino might suffice. Watch out for unofficial clones, which may have less reliable Wi-Fi or Linux performance. Accessories that are particularly useful include a 3.3V compatible sensor array, a suitable 5V or 7-12V power supply, and potentially a USB keyboard and mouse for easier interaction with the Linux side during development. Due to its age, firmware updates for the Linux side might be less frequent, so consider this for long-term deployments.