YUN SHIELD

From Geeetech Wiki
Revision as of 07:10, 11 November 2014 by Admin (talk | contribs) (Upload Sketch)

Jump to: navigation, search

Introduction

YUN SHIELD.jpg

Yun Shield, designed by Dragino, is one of the most powerful shields for Arduino Board on the present market. One of the main calls for the design of Yun Shield is to make up for the insufficient Internet connectivity and the storage issue for Arduino Board

Yun Shield runs Open Source OpenWrt system (Same system as runs in Arduino Yun) and it is fully compatible with Arduino IDE v1.5.4 or later versions. Yun Shield is the ideal choice for Arduino Projects which require various internet connections and more storage.

Basically, Yun Shield + Leonardo is equal to the official Arduino Yun, but Yun Shield is more flexible because it can work with other Arduino board such as Uno, Duemilanove, Mega etc. And Yun Shield uses external wifi antenna which provides stability and possibility for various environments.


Features

•Open source Linux (OpenWrt) inside •Low power consumption •Compatible with Arduino IDE 1.5.4 or later, user can program, debug or upload sketch to Arduino board via Arduino IDE. •Managed by Web GUI, SSH via LAN or WiFi •Software upgradable via network •Built-in web server •Support internet connection via LAN port, WiFi or 3G dongle. •Support USB flash to provide storage for Arduino projects. •Failsafe design provides robustly system. •Compatible with Arduino Leonardo, Uno , Duemilanove, Diecimila, Mega,etc.

Specifications

Processor: 400MHz, 24K MIPS Flash: 16MBytes RAM: 64MBytes Power Input: 4.75v ~ 23v via Arduino VIN pin 1 x 10M/100M RJ45 connector 150M WiFi 802.11 b/g/n External Antenna via I-Pex connector 1 x USB 2.0 host connector, used for USB storage or 3G connection 1 x Reset button Compatible with 3.3v or 5v I/O Arduino.


POWER

The Dragino HE is the core module of Yun Shield. The HE module requires around 200ma current when in full load, so it is powered by the Arduino VIN pins to avoid overheated in the Arduino onboard 5v LDO. So when Yun shield is in used, the Arduino board should be powered by DC port instead of USB port. The DC input can be 7v -15v.

The USB Host of Yun Shield gets power from the Arduino +5vpin, since the +5v from Arduino comes from the +5V LDO, to avoid overheated on the Arduino Board, when the USB host is in used, it is recommended to use +7v DC.


Interface

The RJ45, WiFi, USB Host and Failsafe are connected to the Dragino HE module directly. Andthe Dragino HE module use SPI and UART to communicate with Arduino Board. Yun Shield is compatible with 3.3v and 5v Arduino board. The on board jumper SV1is used to set the SPI and UART to 3.3v or 5v level.

The SPI interface is used to upload the sketches comes from the Arduino IDE. SPI interface only connects to Dragino HE during uploading so the ArduinoSPI can still be used to connect to other SPI slave devices.

The UART interface is used for the Bridge class in Arduino, there are lots of examples explain how to use the bridge class in the Arduino IDE. It is the core of Yun solution. We must make sure the serial Interface of Arduino is not used by other hardware.

LEDs

There are four LEDs on the Yun Shield. The functions of these LEDs are:

PWR: Power Indicate LED. Turn on once there is power.

LAN: Indicate there is LAN connection when it is on or blinking.

WLAN: Indicate WiFi status.

SYS: LED for USB storage. It is on if the USB flash is linked to Arduino Yun default SD directory /mnt/sd and /www/sd

Set up and use Yun Shield

Connect to Leonardoand power

Simply put the Yun Shield on the top of Arduino Leonardo and Power the Leonardo via the DC Jack.

Connect to Yun Shield

At the first boot of Yun Shield, it will auto generate an unsecure WiFi network call Dragino2-xxxxxx User can use their laptop to connectto this WiFi network. The laptop will get an IP 192.168.240.xxx andthe Yun Shield has the default IP 192.168.240.1

Yun shield 1.jpg

Once user joinsthe network, they can use web browser (recommend Firefoxand Chrome) and enter 192.168.240.1 to enter the Yun Shield setting page.

Yun shield 2.jpg

Default Password for Yun Shield is dragino.


Set Up Yun Shield to access internet

After log in,the GUI will show the WIFI / ETH interface status. Click the Configure button and now user canconfigure Yun Shield to access internet via your WiFi router.

Yun shield 3.jpg

Detect Yun Shield

Assume your laptop and Yun Shield are in the same network. The Yun Shieldwill broadcastdata in thisnetworkand Arduino IDE will receive this data and show the Yun Shield in Tools>Port.

Yun shield 4.jpg

Upload Sketch

1) In the Arduino IDE, choose the Arduino Yun board type for Leonardo.

2) In Arduino IDE port, choose the correctport. (should be ArduinoYun port with an ip address)

3) In the Yun Shield GUI Sensor page, choose the Board Type: Leonardo.


4) Compile the sketch and upload it to the Arduino Board. During upload, The Yun Shield will ask you to key in the password, by default, the passwordis dragino.

Yun shield 5.jpg

Bridge Library

The Bridge Library simplifies the communication between the Arduino Board and Yun Shield.

Bridge commands from the AVR(ArduinoBoard)are interpreted by Python on theYun Shield. Its role is to execute programs on the GNU/Linux side when asked by Arduino, provide a shared storage space for sharing data like sensor readings between the Arduino and the Internet, and receiving commands from the Internet and passing them directly to the Arduino.

There are detail explain and lots of example to show how to use Bridge in the Arduino Official Website. Reference link is: http://arduino.cc/en/Reference/YunBridgeLibrary.