Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
What to Upload to SlideShare
What to Upload to SlideShare
Loading in …3
×
1 of 29

More Related Content

You Might Also Like

Related Books

Free with a 30 day trial from Scribd

See all

Agrino 應用於農業感測的開源專案

  1. 1. Agrino 應用於農業感測的開源專案 Kobe Yu
  2. 2. 授權聲明 投影片內容採 創用 CC BY (姓名標示) 3.0 台灣。 完整授權內容 : https://creativecommons.org/licenses/by/3.0/tw/
  3. 3. Kobe Yu (kobeyu@agrino.cc) 軟體工程師 ~8y 目前是清華大學資工系博士班學生不務正業的博士班學生 研究主題 從系統軟體提升深度網路與電腦視覺的運算效能(NNEF/OpenVX/NNAPI ) 興趣是參與開源農業專案
  4. 4. 專案起源 “大家都知道,農業是看天吃飯,這個『天』包括陽光、空氣、水,所以日照、溫、濕度、 雨量土壤酸鹼度,這氣候氣象因素都會影響植物生長,而我們的農友可以透過獲得這 些資訊,來創造適合生長的環境,以得到更好的收穫與農作品質。” Since 2016 Source:http://lass-net.org/2016/06/sensors-for-farm/
  5. 5. Agriculture Environment Sensing ● 陽光 ○ 光強度、太陽輻射、UV ● 空氣 ○ 風速、風向、CO2 ● 水 ○ 降雨量、水位高度 ● 土壤 ○ 溫度、溼度、EC、PH ● 大氣 ○ 溫度、溼度、氣壓 ● 影像
  6. 6. Why Agrino ● Commercial product is too expensive ● Sensor components for maker is too short life cycle ● We can do it by ourselves!
  7. 7. Project Positioning Arduino Agrino Commercial Function Yes Yes Yes Durability L M H Development resource H H L Accuracy L M H Manitain and calibration No DIY Yes Cost L M H Open source Yes Yes No
  8. 8. Agrino An open source project designed for agricultural sensing,Based on the Arduino source code。 Hardware customize hardware Software Arduino core Sensor library
  9. 9. Software Architecture ● Arduino samd core ● Sensor library Hardware (ARM Samd21 (ARM M0+)) Arduino library (adding agrino build-in functions) Sensor library Application
  10. 10. Arduino Samd Core ● Pin define ○ Sensor ○ Power gate (ldo enable) ● Buildin functions ○ Device manager ■ LPWAN management (Lora/Sigfox) ■ RTC management ■ Power management ■ Storage management
  11. 11. Sensor Library ● HAL ○ Arduino ○ Atmel studio ● Modulize ● Reusable
  12. 12. Micro Weather Station
  13. 13. Sensor Library Interaction Diagram
  14. 14. More... ● validation ● calibration
  15. 15. Hardware Design ● Power ○ Solar battery charger ○ Power gate ■ weather board ■ LPWAN ■ External sensor(soild sensor or others). ● Storage ○ SD Card ● Sensors ○ onboard sensor ○ External sensor. ● RTC ○ timestamp ○ System deep sleep
  16. 16. Agrino Hardware(EVB) Weather Board Main Board LPWAN Module External Sensors
  17. 17. Agrino Main Board Main Chip ● MTDuino ● MT7688 ● Arduino Nano Power: ● Li-Polymer charger ● LDO(PG) RTC SD Card
  18. 18. Weather Board ● Sunshine duration ○ BH1603 upto 100000lux ● Solar radiation ○ BPW21 ● Temperature and Humidity ○ SHT31 ● APRS ○ Wind and ranin
  19. 19. Target: Field Sensor Station ● Sensor module ○ Micro weather station ○ Soil sensor ● LPWAN ● Power system ○ Solar Power Supply ○ Powergate ● Local storage ● RTC
  20. 20. Fieldsensor : MTDuino(sigfox) and Sensor Library. https://thingspeak.com/channels/550467 https://thingspeak.com/channels/548078
  21. 21. MTDuino The MTDuino-SigFox is powered by Atmel’s SAMD21 MCU, featuring a 32-bit ARM Cortex® M0 core. With the addition of the M0 board, the Arduino family becomes larger with a new member providing increased performance.
  22. 22. LPWAN - Sigfox ● 12Byte data ● 140 message/day Sigfox backend OHF Server FieldSensor
  23. 23. Soil Sensor - MEC10
  24. 24. Soil Sensor and Sensor Library 1. Define sensor 2. Define data package (12byte) 3. Get sensor data to data package 4. Packet data to hex string 5. Send data by sigfox module
  25. 25. Example typedef struct _mec10_data { int temp:13; //value range maxiumu: 8000 unsigned int vwc:14; //value range maximum: 10000 unsigned int ec:15; //value range maximum: 20000 unsigned int salinity:15; //value range maximum:20000 unsigned int tds:15; //value range maximum: 20000 unsigned int epsilon:13; //value range maximum: 8200 unsigned int batvol:10;//value range maximum: 1024 bool avaliable:1; }MEC10Data ; const int sigfoxPayloadSize = 12; //in byte. typedef union _sigfox_data_pack { MEC10Data mecData; byte dataArray[sigfoxPayloadSize]; } SigfoxDataPacket; void encodeMEC10Data(SigfoxDataPacket &data,char* payload) { array_to_string(data.dataArray,sigfoxPayloadSize,payload); } void array_to_string(byte array[], unsigned int len, char buffer[]) { for (unsigned int i = 0; i < len; i++) { byte nib1 = (array[i] >> 4) & 0x0F; byte nib2 = (array[i] >> 0) & 0x0F; buffer[i*2+0] = nib1 < 0xA ? '0' + nib1 : 'A' + nib1 - 0xA; buffer[i*2+1] = nib2 < 0xA ? '0' + nib2 : 'A' + nib2 - 0xA; } buffer[len*2] = '0'; } void loop() { SigfoxDataPacket data; if(readMEC10Data(data) == 0x00/*ModbusMaster.ku8MBSuccess*/) { char sigfoxpayload[sigfoxPayloadSize*2]; encodeMEC10Data(data,sigfoxpayload); sigfox_atcommand_tx("AT$SF=" + String(sigfoxpayload)+"r"); } }
  26. 26. Sigfox Data Field ● How to parse raw data on server like… ○ 1cadcee80040001c0075c3bc ● What if difference device type ○ Field sensor ○ Micro weather station ○ ...more ● Solutions: ○ Parser rule by configuration with device id, but should be setting before device online. ○ message type in data filed like Unabiz Message class ■ but payload only 12byte! source:https://unabiz.github.io/unashield/
  27. 27. Dashboard Base on InfluxDB
  28. 28. Q & A
  29. 29. 感謝 陳幸延 - Open Hack Farm Victor Sue - Pegatron YK - NTHU 王祥恒 – NTU Ray Tai– Might Antony – LaBest Owen – LaBest Jimmy - LaBest 王英傑 - 公信電子 哈爸 - LASS Owen - MakerPRO 沒有人 - g0v

×