Arduino YÚN is the perfect board to use when designing connected devices and, more in general, Internet of Things projects. It combines the power of Linux with the ease of use of Arduino.
Overview
Technical specs
AVR Arduino microcontroller
Microcontroller | ATmega32U4 |
Operating Voltage | 5V |
Input Voltage | 5 |
Digital I/O Pins | 20 |
PWM Channels | 7 |
Analog Input Pins | 12 |
DC Current per I/O Pin | 40 mA |
DC Current for 3.3V Pin | 50 mA |
Flash Memory | 32 KB (of which 4 KB used by bootloader) |
SRAM | 2.5 KB |
EEPROM | 1 KB |
Clock Speed | 16 MHz |
Linux Microprocessor
Processor | Atheros AR9331 |
Architecture | MIPS @400MHz |
Operating Voltage | 3.3V |
Ethernet | IEEE 802.3 10/100Mbit/s |
WiFi | IEEE 802.11b/g/n |
USB Type-A | 2.0 Host |
Card Reader | Micro-SD only |
RAM | 64 MB DDR2 |
Flash Memory | 16 MB |
SRAM | 2.5 KB |
EEPROM | 1 KB |
Clock Speed | 16 MHz |
PoE compatible 802.3af card support | See Power |
Documentation
It is recommended to power the board via the micro-USB connection with 5VDC.
The Yún is also compatible with PoE power supply but in order to use this feature you need to mount a PoE module on the board or buy a preassembled board.
- Vin. The input voltage to the Arduino board. Unlike other Arduino boards, if you are going to provide power to the board through this pin, you must provide a regulated 5V.
- 5V.The power supply used to power the microcontrollers and other components on the board. This can come either from VIN or be supplied by USB.
- 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
- GND. Ground pins.
- IOREF. The voltage at which the i/o pins of the board are operating (i.e. VCC for the board). This is 5V on the Yún.
The ATmega32u4 has 32 KB (with 4 KB used for the bootloader). It also has 2.5 KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).
It is not possible to access the I/O pins of the Atheros AR9331. All I/O lines are tied to the 32U4.
- Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data using the ATmega32U4 hardware serial capability. Note that on the Yún, the Serial class refers to USB (CDC) communication; for TTL serial on pins 0 and 1, use the Serial1 class. The hardware serials of the ATmega32U4 and the AR9331 on the Yún are connected together and are used to communicate between the two processors. As is common in Linux systems, on the serial port of the AR9331 is exposed the console for access to the system, this means that you can access to the programs and tools offered by Linux from your sketch.
- TWI: 2 (SDA) and 3 (SCL). Support TWI communication using the Wire library.
- External Interrupts: 3 (interrupt 0), 2 (interrupt 1), 0 (interrupt 2), 1 (interrupt 3) and 7 (interrupt 4). These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details. Is not recommended to use pins 0 and 1 as interrupts because they are the also the hardware serial port used to talk with the Linux processor. Pin 7 is connected to the AR9331 processor and it may be used as handshake signal in future. Is recommended to be careful of possible conflicts if you intend to use it as interrupt.
- PWM: 3, 5, 6, 9, 10, 11, and 13. Provide 8-bit PWM output with the analogWrite() function.
- SPI: on the ICSP header. These pins support SPI communication using the SPI library. Note that the SPI pins are not connected to any of the digital I/O pins as they are on the Uno, They are only available on the ICSP connector. This means that if you have a shield that uses SPI, but does NOT have a 6-pin ICSP connector that connects to the Yún’s 6-pin ICSP header, the shield will not work. The SPI pins are also connected to the AR9331 gpio pins, where it has been implemented in software the SPI interface. This means that the ATMega32u4 and the AR9331 can also communicate using the SPI protocol.
- LED: 13. There is a built-in LED driven by digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it’s off.
- There are several other status LEDs on the Yún, indicating power, WLAN connection, WAN connection and USB.
- Analog Inputs: A0 – A5, A6 – A11 (on digital pins 4, 6, 8, 9, 10, and 12). The Yún has 12 analog inputs, labeled A0 through A11, all of which can also be used as digital i/o. Pins A0-A5 appear in the same locations as on the Uno; inputs A6-A11 are on digital i/o pins 4, 6, 8, 9, 10, and 12 respectively. Each analog input provide 10 bits of resolution (i.e. 1024 different values). By default the analog inputs measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and the analogReference() function.
- AREF. Reference voltage for the analog inputs. Used with analogReference().
- Yún RST. Bring this line LOW to reset the AR9331 microprocessor. Resetting the AR9331 will cause the reboot of the linux system. All the data stored in RAM will be lost and all the programs that are running will be terminated.
- 32U4 RST. Bring this line LOW to reset the ATmega32U4 microcontroller. Typically used to add a reset button to shields which block the one on the board.
- WLAN RST. This button has a double feature. Primarly serves to restore the WiFi to the factory configuration. The factory configuration consist to put the WiFi of the Yún in access point mode (AP) and assign to it the default IP address that is 192.168.240.1, in this condition you can connect with your computer to the a WiFi network that appear with the SSID name “Arduino Yun-XXXXXXXXXXXX”, where the twelve ‘X’ are the MAC address of your Yún. Once connected you can reach the web panel of the Yún with a browser at the 192.168.240.1 or “https://arduino.local” address. Note that restoring the WiFi configuration will cause the reboot of the linux environment. To restore your WiFi configuration you have to press and hold the WLAN RST button for 5 seconds. When you press the button the WLAN blue LED will start to blink and will keep still blinking when you release the button after 5 seconds indicating that the WiFi restore procedure has been recorded. The second function of the WLAN RST button is to restore the linux image to the default factory image. To restore the linux environment you must press the button for 30 seconds. Note that restoring the factory image make you lose all the files saved and softwares installed on the on-board flash memory connected to the AR9331.
Communication
The Yún has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega32U4 provides a dedicated UART TTL (5V) serial communication. The 32U4 also allows for serial (CDC) communication over USB and appears as a virtual com port to software on the computer. The chip also acts as a full speed USB 2.0 device, using standard USB COM drivers. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB connection to the computer.
The Yún can be programmed with the Arduino Arduino Software (IDE). Select “Arduino Yún from the Tools > Board menu (according to the microcontroller on your board). For details, see thereference and tutorials.
Rather than requiring a physical press of the reset button before an upload, the Yún is designed in a way that allows it to be reset by software running on a connected computer. The reset is triggered when the Yún’s virtual (CDC) serial / COM port is opened at 1200 baud and then closed. When this happens, the processor will reset, breaking the USB connection to the computer (meaning that the virtual serial / COM port will disappear). After the processor resets, the bootloader starts, remaining active for about 8 seconds. The bootloader can also be initiated by pressing the reset button on the Yún. Note that when the board first powers up, it will jump straight to the user sketch, if present, rather than initiating the bootloader.
The Yún has a resettable polyfuse that protects your computer’s USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed.
The maximum length and width of the Yún PCB are 2.7 and 2.1 inches (73mm and 53mm) respectively, with the USB connector extending beyond the former dimension. Four screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16″), not an even multiple of the 100 mil spacing of the other pins.
The weight of the board is 32g.
OpenWrt-Yun (the GNU/Linux side of the Yún) is frequently updated. The one installed on your Yún may be out of date. Please check the upgrade tutorial and be sure you’re running the latest version available.
Learn how to install additional software on your Yún reading our Yún package manager tutorial. Should you need additional disk space on your Yún, learn how to expand it using an external pen drive or SD card with Expanding Yún Disk Space tutorial.
Advanced instructions about reflashing OpenWrt-Yun are available at our UBoot reflash tutorial.
Should you need to download a web page, learn how to do it using the command line for communication with SSH and cURL.