The Arduino Y?n is a microcontroller board based on the?ATmega32u4?(datasheet) and the Atheros?AR9331. The Atheros processor supports a Linux distribution based on?OpenWRT?named Linino. The board has built-in Ethernet and?WiFisupport, a USB-A port, micro-SD card slot, 20 digital input/output pins (of which 7 can be used as PWM outputs and 12 as analog inputs), a 16?MHz?crystal oscillator, a micro USB connection, an ICSP header, and a 3 reset buttons.
The Y?n distinguishes itself from other Arduino boards in that it can communicate with the Linux distribution onboard, offering a powerful networked computer with the ease of Arduino. In addition to Linux commands like cURL, you can write your own shell and python scripts for robust interactions.
The Y?n is similar to the Leonardo in that the?ATmega32u4?has built-in USB communication, eliminating the need for a secondary processor. This allows the Y?n to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.
The Bridge library facilitates communication between the two processors, giving Arduino sketches the ability to run shell scripts, communicate with network interfaces, and receive information from the?AR9331?processor. The USB host, network interfaces and SD card are not connected to the 32U4, but the?AR9331, and the Bridge library also enables the Arduino to interface with those peripherals.
Because the Y?n has two processors, the summary section shows the characteristics of each one in two separate tables.
Schematic & Reference Design
It is recommended to power the board via the micro-USB connection with 5VDC.
If you are powering the board though the Vin pin, you must supply a regulated 5VDC. There is no on-board voltage regulator for higher voltages, which will damage the board.
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 one.
The power pins are as follows:
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).
The memory on the?AR9331?is not embedded inside the processor. The RAM and the storage memory are externally connected. The Y?n has 64 MB of?DDR2?RAM and 16 MB of flash memory. The flash memory is preloaded in factory with a Linux distribution based on?OpenWRT?called Linino. You can change the content of the factory image, such as when you install a program or when you change a configuration file. You can return to the factory configuration by pressing the "WLAN RST" button for 30 seconds.
Input and Output
It is not possible to access the I/O pins of the Atheros?AR9331. All I/O lines are tied to the 32U4.
Each of the 20 digital i/o pins on the Y?n can be used as an input or output, using?pinMode(),?digitalWrite(), anddigitalRead()?functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:
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.
There are 3 reset buttons with different functions on the board:
See also the?mapping between Arduino pins and ATmega32u4 ports.
The Y?n has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. TheATmega32U4?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.
Digital pins 0 and 1 are used for serial communication between the 32U4 and the?AR9331. Communication between the processors is handled by the?Bridge library.
A?SoftwareSerial library?allows for serial communication on any of the Y?n's digital pins except for pins 0 and 1.
The?ATmega32U4?also supports?I2C?(TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the?I2C?bus; see the?documentation?for details. For SPI communication, use the?SPI library.
The Y?n appears as a generic keyboard and mouse, and can be programmed to control these input devices using theKeyboard and Mouse?classes.
The onboard Ethernet and?WiFi?interfaces are exposed directly to the?AR9331?processor. To send and receive data through them, use the?Bridge library. To configure the interfaces, you can access the network control panel as described in the?getting started page.
The Y?n also has USB host capabilities through Linino. You can connect peripherals like USB flash devices for additional storage, keyboards, or webcams. You may need to download and install additional software for these devices to work. For information on adding software to the?AR9331, refer to the notes on?using the package manager.
The Y?n can be programmed with the Arduino software (download). Select "Arduino Y?n from the?Tools > Board?menu (according to the microcontroller on your board). For details, see the?reference?and?tutorials.
The?ATmega32U4?on the Arduino Y?n comes preburned with a?bootloader?that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the?AVR109?protocol.
You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header; see?these instructions?for details.
Automatic (Software) Reset and Bootloader Initiation
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.
Because of the way the Y?n handles reset it's best to let the Arduino software try to initiate the reset before uploading, especially if you are in the habit of pressing the reset button before uploading on other boards. If the software can't reset the board you can always start the bootloader by pressing the reset button on the board.
USB Overcurrent Protection
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 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.
Using your Yun
Customers Also Bought These Best Sellers