34
이 이이이 이이이이이 이이이이이이이 . 이이이이 W7500 과 WizFi250 과과 IoT 과과 과과 이 이 이

W7500과 wiz fi250활용 iot 구현실습

  • Upload
    -

  • View
    22

  • Download
    1

Embed Size (px)

Citation preview

Page 1: W7500과 wiz fi250활용 iot 구현실습

이 문서는 나눔글꼴로 작성되었습니다 . 설치하기

W7500 과 WizFi250 활용 IoT 구현 실습

곽 동 은

Page 2: W7500과 wiz fi250활용 iot 구현실습

목차• 실습환경

– ARMmbed– Web-IDE– ARMmbed platform, WIZwiki_W7500– WizFi250Interface : WizFi250 Library for ARMmbed

• Demo– WizFi250 Hello World Demo– WizFi250 Oil Monitoring System– WizFi250 Geo-location Watch

Page 3: W7500과 wiz fi250활용 iot 구현실습

실습환경

- ARMmbed- Web-IDE- ARMmbed platform, WIZwiki_W7500- WizFi250Interface : WizFi250 Library

for ARMmbed

Page 4: W7500과 wiz fi250활용 iot 구현실습

ARMmbed(1/3)• IoT Device Platform 을 위해 구성되는 Sillicon, Cloud, Device Partner 들의

Community 를 표방한다 .

참고 자료 : http://embeddist.blogspot.kr/2015/07/armmbed.html

Page 5: W7500과 wiz fi250활용 iot 구현실습

ARMmbed(2/3)• mbed.org 로 커뮤니티 구성• Platform / Components / Handbook / Cookbook 으로 분류

Platform - ARM mbed community 에 공식적으로 등록된 Platform 을 소개하는 페이지 - 각각의 platform 을 클릭하면 , Pin map,Schematic, HelloWorld Code(예제코드 ) 등을 확인 할 수 있음

Components - mbed platform 에 적용 가능한 Actuators, Sensor, Communication 등의 module 을 소개하는 페이지 - 각각의 Components 를 클릭해서 들어가면 Pin map, schematic 등의 Com-ponents 를 위한 정보를 포함하고 있음 .

Page 6: W7500과 wiz fi250활용 iot 구현실습

ARMmbed(3/3)

Handbook - Team mbed 에서 officia 적으로 공개하는 Code 및 Tutorial 정보 포함

Cookbook - mbed platform 을 이용하는 User 가 공개하는 Code 및 Tutorial 이 담겨진 페이지

Page 7: W7500과 wiz fi250활용 iot 구현실습

Web-IDE(1/3)• 프로젝트 생성 및 Compile

1. mbed.org 로그인 후 , Developer Site Compiler Site 클릭

2. Compiler Site 의 Web-IDE 의 메뉴 바에서 왼쪽 상단의 New 를 클릭하고 New program 선택

3. Create new program wizard 에서 각자 환경에 맞는 설정 선택

- Platform : WIZwiki-W7500 이외의 보드를 이용할 경우 해당 Platform 을 선택- Template : 각각 platform 마다 제공하는 Template 예제 선택 가능- Program Name : 원하는 Program Name 을 입력 할 수 있음- Update check box : Default 로 체크 되어 있음 , import 할 때 최신 Library 를 적용하여 import 한다는 의미- 모든 설정을 마친 후 , OK 버튼을 클릭하면 Compiler Site 로 변경되며 import 를 수행

Page 8: W7500과 wiz fi250활용 iot 구현실습

Web-IDE(2/3)• 프로젝트 생성 및 Compile

4. Project 가 정상적으로 만들어지면 아래와 같은 화면을 볼 수 있음

5. Compile 버튼 클릭 Web Compiler 는 Compile 후 Bin 파일을 다운로드 함

6. 생성된 Bin 파일을 mbed Platform 에 파일 복사를 하면 다운로드 완료

Drag & Drop

Page 9: W7500과 wiz fi250활용 iot 구현실습

Web-IDE(3/3)• 참고 자료 : http://embeddist.blogspot.kr/2015/07/armmbed-web-ide.html

Page 10: W7500과 wiz fi250활용 iot 구현실습

WIZwiki_W7500

주요 구성• W7500

• ARM Cotrex-M0 기반의 다수의 Periph-eral 들을 포함하고 있는 MCU

• Ethernet Stack 을 포함하고 있어 별도의 Software Stack 없이 Ethernet 을 사용 할 수 있음

• CMSIS-DAP• Debugger Interface 및 USB 저장소 기능

제공• RJ-45 + PHY

• W7500 은 PHY 를 내장하지 않기 때문에 반드시 External PHY 가 필요

• 참고 자료 :http://embeddist.blogspot.kr/2015/07/wizwikiw7500.html

Page 11: W7500과 wiz fi250활용 iot 구현실습

WizFi250Interface• WizFi250 Main Page

– https://developer.mbed.org/components/Wiznet-Wi-Fi-WizFi250/

• WizFi250Interface Library– https://developer.mbed.org/users/kaizen/code/WizFi250Interface/

• WizFi250_hello_world_demo– https://developer.mbed.org/teams/WIZnet/code/WizFi250_hello_world_demo/

Page 12: W7500과 wiz fi250활용 iot 구현실습

Demo

- WizFi250 Hello World Demo- WizFi250 Oil Monitoring System- WizFi250 Geo-location Watch

Page 13: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Hello World Demo (1/7)• 구성도

Log Message확인

참고 자료 : http://www.life4iot.com/2015/06/27/wizfi250-hello-world-demo-on-wizwiki-w7500-of-mbed-platform/

Page 14: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Hello World Demo (2/7)• 구성품

W7500 - Key Feature - WIZnet W7500 ( For more Infomation about W7500 ) - 32-bit ARM Cortex-M0 - 128KB Flash / 16KB(up to 48KB) SRAM - Hardwired TCP/IP Core - Ethernet PHY - IC+ IP101GA - CMSIS-DAP support - NXP LPC11U35FHI33/501 - USB Drag & Drop Programming - Arduino pin compatible - mbed enable - ISP, SD Card, RGB LED, SWD ConnectorWizFi250

- Key Feature - Single band 2.4GHz IEEE802.11b/g/n Wi-Fi module - Integrated RF power amplifier : Antenna calibration is not required - 1MB flash memory, 128KB SRAM, 1MB serial flash - Low power consumption & excellent power management to extend battery life - The highest compatibility with the most of APs - Compact size, suitable for mobile or hand-held devices - Host Interface : UART , SPI - Support powerful web configuration - Soft AP (Enough memory retention, L2 switching) - OTA (Over the Air F/W Upgrading) - Wi-Fi Direct

Page 15: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Hello World Demo (3/7)• Hardware 연결

WizFi250-EVB WIZwiki-W7500

RX-TX RXD D1(U_TXD0)

TX-RX TXD D0(U_RXD0)

CTS-RTS CTS D8

RTS-CTS RTS D7

WizFi250-RE-SET

JP10-2 PA12

VCC JP2-3.3V 3.3V

GND JP2-GND GND

Sensor Shield 를 사용하지 않는 경우

Sensor Shield 를 사용하는 경우

WizFi250-EVB Sensor Shield WIZwiki-W7500

RX-TX RXD TXD

TX-RX TXD RXD

CTS-RTS CTS D8

RTS-CTS RTS D7

WizFi250-RE-SET

JP10-2 PA12

Page 16: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Hello World Demo (4/7)

D8TXD

RXD

VCC

GND

GND

RTS

CTS

TXD

RXD

VCC

JP10-2 PA12

D7

Page 17: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Hello World Demo (5/7)• Example Repository

– https://developer.mbed.org/components/Wiznet-Wi-Fi-WizFi250/

Page 18: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Hello World Demo (6/7)• Source Code

WizFi250 Interface 설정( TX, RX, CTS, RTS, Reset, Alarm, Baud )

MCU 기준

WizFi250 초기화 및 AP 에 접속

Page 19: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Hello World Demo (7/7)• Result

Page 20: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Oil Monitoring System(1/7)• 구성도

참고자료 : http://www.life4iot.com/2015/06/27/wizfi250-axeda-example-on-wizwiki-w7500-of-mbed-platform/

Page 21: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Oil Monitoring System(2/7)• Demo Video

– https://youtu.be/7a8-8GxANBI

Page 22: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Oil Monitoring System(3/7)• 구성품

– WizFi250 Hello World 와 동일• Axeda 가입 및 Application 등록

– https://toolbox.axeda.com/

Page 23: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Oil Monitoring System(4/7)

1

3

2

Page 24: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Oil Monitoring System(5/7)• Code Compile & Download

– Link for AxedaGo-WizFi250 Example• https://developer.mbed.org/teams/WIZnet/code/AxedaGo-WizFi250/

– AxedaGo-WizFi250 Example 을 컴파일 하기 전 , Axeda Tool box 에서 얻은 Serial Number 를

아래 코드에 추가 한다 .

Page 25: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Oil Monitoring System(6/7)• Source Code

WizFi250 Interface 설정( TX, RX, CTS, RTS, Reset, Alarm, Baud )

Axeda Tool Box Serial Number 입력 필요

AP 에 WizFi250 접속

Page 26: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Oil Monitoring System(7/7)

Read ADC Value

POST /ammp/data/1/%s!%s HTTP/1.1\r\nContent-Type: application/json\r\nContent-Length: 65\r\n\r\n{\"data\":[{\"di\":{\"oil_level\":%.2f}}]}\r\n\r\n

Connect to Axeda Server

Create Packet Mes-sage & Send Mes-sageReceived Packet from Axeda Server

Page 27: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Geo-location Watch(1/7)• 구성도

참고자료 : http://www.life4iot.com/2015/06/28/wizfi250-geolocation-and-ntp-example-on-wizwiki-w7500-of-mbed-platform/

Page 28: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Geo-location Watch(2/7)• Demo Video

– https://youtu.be/WMxY5jiABho

Page 29: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Geo-location Watch(3/7)• Hardware 연결

WizFi250-EVB

Sensor Shield

WIZwiki-W7500

SSD1306

RX-TX RXD TXD

TX-RX TXD RXD

CTS-RTS CTS D8

RTS-CTS RTS D7

WizFi250-RE-SET

JP10-2 PA12

I2C SCL SCL PA9 SCL

I2C SDA SDA PA10 SDA

VCC VCC VCC

GND GND

Page 30: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Geo-location Watch(4/7)• Link for WizFi250 Geo-location_NTP Example

• https://developer.mbed.org/teams/WIZnet/code/WizFi250-Geolocation_NTP/

• SSD1306 Library• https://developer.mbed.org/users/kaizen/code/Adafruit_GFX/

• HTTP Client• https://developer.mbed.org/users/donatien/code/HTTPClient/

• NTP Client• https://developer.mbed.org/users/donatien/code/NTPClient/

Page 31: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Geo-location Watch(5/7)• Source Code

WIZwiki-W7500 I2C 초기화

SSD1306, NTPClient, HTTPClient 초기화

Page 32: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Geo-location Watch(6/7)• Source Code

CSV 포맷의 데이터를 Split 하는 함수

WizFi250 초기화 및 AP 에 접속

Geo-location Server 에 접속 후 , Data 를 csv 포맷으로 받아오는 코드

Page 33: W7500과 wiz fi250활용 iot 구현실습

WizFi250 Geo-location Watch(7/7)• Source Code

NTP Server 로 부터 UTC( 협정 세계 시간 ) 을 얻어오는 코드 수행

OLED 에 시간 출력

1 초에 한번씩 시간을 갱신 한 후 , OLED 에 출력이 때 , 시간은 W7500 RTC 로 부터 얻어 옴 ( NTP Server로 부터는 1 번만 얻어 오면 됨 )

Page 34: W7500과 wiz fi250활용 iot 구현실습

Q&A 감사합니다