development of - ministry of public healthdmsic.moph.go.th/.../admin/...raspberrypi_tassanai.pdf ·...

Post on 07-Mar-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Tassanai Wongjaroenchai Pharm.D.Department of Pharmacy, Pathum Thani Hospital.

Development of a Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

รวบรวมข้อมูลที่เกี่ยวกับโครงงาน

ได้แก่ การติดตั้ง การตั้งค่า การ

ปรับแต่งแก้ไข ราคาอุปกรณ์ และ

ตัวอย่างโครงการ

USER MANUAL

2

GETTING STARTED

เป้าหมายพัฒนาระบบบันทึกข้อมูลและแจ้งเตือน อุณหภูมิ

ตู้เย็นเก็บรักษายาที่มีต้นทุนที่เหมาะสม อุปกรณ์

หาซื้อได้ในท้องตลาด ขยายระบบได้ง่าย และ

พัฒนาเป็นซอฟท์แวร์ที่สามารถแจกจ่ายได้

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Conceptual Framework

A Raspberry Pi is a credit card-sized computer originally designed for education. The Raspberry Pi is slower than a modern laptop or desktop but is still a complete Linux computer and can provide all the expected

abilities that implies, at a low-power consumption level. The Raspberry Pi was designed for the Linux operating system, and many Linux distributions now have a version optimized for the Raspberry Pi.

ส่วนเชื่อมตอ่อุปกรณ์ภายนอก

GPIO PORT

USB PORT

MICRO SD CARD SLOT

ใช้ระบบปฏิบัติการ RASBIAN

จ านวน 4 ช่อง

ราคา 1,850 บาท

ETHERNET

WIFI READY

รุ่น RPi 3 B+

VERSION 1

ใช้ Raspberry Pi

แบบ standalone

ใช้กับตู้เย็น 3 ตู้

2015JANUARY

2018FEBRUARY

Project Development TimelineTemperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

VERSION 2

ใช้ Raspberry Pi

แบบ client - server

ใช้กับตู้เย็น 12 ตู้ และห้องคลังพัสดุ

๑ ๒

VERSION I

TEMPERATURE SENSOR

UNINTERUPTABLE

POWER SUPPLY

GPIO

CELLULAR

BUILD IN RPI

CELLULAR PATHWAY

TELEGRAM

BROWSER

INTERNET

INTERNET PATHWAY

Raspberry Pi is a trademark of the Raspberry Pi Foundation, UK.

Gmail™ webmail service, Chrome™ browser and Google Docs™ program is a trademark of Google Inc.

Project Development | Phase I

Parts and hardware **

• RASPBERRY PI 2 MODEL B ขึ้นไป

• POWER ADAPTOR 5V 2A

• MICRO SD CARD 16 GB CLASS 10

• JUMPER WIRE

• DS18B20 TEMPERATURE SENSOR OR

• DHT22 HUMIDITY AND TEMPERATURE SENSOR

• RESISTER 4.7 K Ohm 1/4 W (For DS18B20)

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | hardware assembly

** REFER PRICE LIST FROM APPENDIX-I IN OPERATION MANUAL

Software

• บันทึกข้อมูลใน MySQL Database บน RPi

• ส่งข้อมูลค่าอุณหภูมิด้วย python script บน RPi

• ส่ง SMS และ dial voice ด้วย Gammu

• ส่งอีเมล์ด้วย SMTP

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Conceptual Framework

สาย VCC เข้ากับพอร์ต 3.3V

สาย DATA เข้ากับพอร์ต GPIO4

สาย GND เข้ากับ GND

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | hardware assembly

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | hardware assembly

RPiVersion 1

Refrigerator # 1Refrigerator # 2

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | phase I raspberry pi network diagram

temperature data and notification services

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase I Limitation

Limitation of the 2015 projectระบบบันทึกและแจ้งเตือนอุณหภูมิตู้เย็น ปี 2558

ปัญหาการขยายระบบเมื่อเพ่ิม Raspberry Pi ในระบบ จะมีจ ำนวนฐำนข้อมูลเพ่ิมตำมจ ำนวนของ Raspberry Pi ต้องมี 3G aircard และซิมกำรด์โทรศพัทม์ือถือติดตัง้ให้ Raspberry Pi ทุกตวั

ปัญหาการควบคุมระบบกำรก ำหนดผู้รบักำรแจ้งเตือน ต้องเข้ำไปแก้ท่ี Raspberry Pi แต่ละตวั ตลอดจนไม่มีระบบท่ีช่วยติดตำมสถำนะออนไลน์ของ Raspberry Pi ท ำให้ขำดควำมคล่องตวัในกำรเฝ้ำระวงั

๒ค่าใช้จ่ายสูงขึ้นเมื่อ Raspberry Pi แต่ละตวัมีซิมกำรด์ส ำหรบัโทรออก ท ำให้ต้องเติมเงินเพื่อให้ได้วันใช้งำนในกำรโทรออก ท ำให้มีค่ำใช้จ่ำยสูงขึน้และไม่ทรำบวนัท่ีต้องเติมให้ซิมกำรด์

VERSION II

การปรับปรุง ประสิทธิภาพการท างานของระบบ รุ่นที่ 2

• ควบคุม Raspberry Pi ด้วยระบบ remote desktop connection ด้วยโปรแกรม TeamViewer Host

• การแจ้งเตือน สามารถก าหนดให้แจ้งเตือนไปยังผู้เกี่ยวข้องได้ แยกเป็นตู้เย็นแต่ละเครื่องได้

• ก าหนด ให้ Raspberry Pi ทุกตัวในเครือข่าย ส่งข้อมูลมาที่ฐานข้อมูลเดียวกัน

• ระบบ ติดตามความผิดปกติและแจ้งเตือน ย้ายมาไว้ที่เครื่องแม่ข่าย เพ่ือประหยัดค่าใช้จ่ายในระบบแจ้งเตือน และเพิ่มเสถียรภาพของระบบ

R1 R2 R3 R4 R5 R6

R7 R8 R9 R10 R11 R12

Project Development | phase II raspberry pi network diagram

Server Parts and hardware

• MySQL Server โดยรันบน virtual machine หรือ

database server หรือ NAS หรือ LattePanda

(Windows10 Developer board) ก็ได้

• คอมพิวเตอร์ระบบปฏิบัติการ Windows เพื่อใช้รัน

โปรแกรม ตรวจสอบความผิดปกติและรันระบบแจ้ง

เตือน (สามารถใช้ร่วมกับ MySQL Server ได้)

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | phase II network diagram

Project Development | phase II network diagram

Raspberry Pi # GROUP 1

Raspberry Pi # GROUP 2

Notification Services

Smartphone Widget

Report Viewer Application

Monitoring Application

Server Site

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | database server device

LattePandaWindows 10

Board

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | database server device

Network Attached Storage

When using virtualized desktop features

Software• บันทึกข้อมูลใน MySQL Database

• ส่งข้อมูลค่าอุณหภูมิด้วย python script บน RPi

• ส่ง sms และ dial voice ด้วย Gammu

• ส่งอีเมล์ด้วย SMTP

• ส่งข้อความไปยัง LINE ด้วยบริการ LINE Notify

• เชื่อมต่อระยะไกลด้วยโปรแกรม TeamViewer

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Conceptual Framework

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II

VERSION 2DEC.RELEASED

2017

Header One

Lorem Ipsum is simply

dummy text of the printing

and typesetting industry.

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II

assembly instructionsวางเซนเซอร์ไว้ใน

ไซริงค์บรรจุกลีเซอรีน

เพื่อป้องกัน

FALSE ALARM

จากการเปิดประตูตูเ้ย็น

5V 2.5A

POWER ADAPTOR

DS18B20 TEMPERATURE SENSOR

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II

LAN PORT

POWER ADAPTOR

TEMPERATURE SENSOR

TEMPERATURE SENSOR

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II

ควบคุมระยะไกลด้วย TeamViewer

NOTIFICATION SYSTEM

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II notification system

PiStation Monitoring โปรแกรมตรวจสอบข้อมูลอุณหภูมิ

ล่าสุดที่บันทึกในฐานข้อมูล และจะท า

การแจ้งเตือนเมื่อเกิดความผิดปกติ

ได้แก่ อุณหภูมิที่ตรวจวัดได้ผิดปกติ

และ Raspberry Pi ไม่ส่งข้อมูลนาน

ผิดปกติ (offline)

สถานการณ์ SMS Dial Voice Email Line Notify

อุณหภูมิตู้เย็นผิดปกติ ✓ ✓ ✓ ✓

อุณหภูมิและความชื้นผิดปกติ ✓ ✓

Raspberry Pi ไม่ส่งข้อมูลเกิน 180 นาที ✓

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II notification system

T E M P E R A T U R E A L E R T I N G S Y S T E M

R A S P B E R R Y P I C O N N E C T I O N L O S T

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II notification system

ตัวอย่างการแจ้งเตือนผ่าน

อีเมล์

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II notification system

ตัวอย่างการแจ้งเตือนผา่น

SMS

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II notification system

RealtimeTemperature Monitors on Smartphone

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II info widget for smartphone

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II info widget for smartphone

WIDGET แสดงข้อมูล

• ต าแหน่งที่ติดต้ังเซนเซอร์

• ค่าอุณหภูมิล่าสุดที่บันทึกได้

• ผลต่างอุณหภูมิเมื่อเปรียบเทียบกับ

ข้อมูลที่วัดได้ก่อนหน้า

• วั น แ ล ะ เ ว ล า ข อ ง ข้ อ มู ล ที่ ก า ลั ง

แสดงผลบน widget

• เฉพาะระบบปฏิบัติการ andriod

RealtimeTemperature Monitors onSmartphone

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | Phase II limitation

Limitation of the 2018 projectระบบบันทึกและแจ้งเตือนอุณหภูมิตู้เย็น ปี 2561

สัญญาณอินเตอร์เน็ต๑

ปัญหา FALSE ALARM

Raspberry Pi ไม่สำมำรถส่งข้อมลูมำยงัฐำนข้อมูลได้ ถ้ำอินเตอรเ์น็ตขดัข้อง

กำรแจ้งเตือนท่ีบำงครัง้ ไม่ใช่ควำมผิดปกติของตู้เยน็ แต่เป็นกำรสญูเสียอณุหภมิูชัว่ครำว จำกกำรเปิดประตตูู้เยน็

APPENDIX

FTP Username: pi

FTP Password: raspberry

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | PiStation Cloud

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | PiStation Cloud

SOFTWARE DISTRIBUTION

ดาวน์โหลดไปใช้งานได้ฟรีอนุญาตให้ผู้ใช้สามารถดาวน์โหลดไปใช้งานได้ฟรี ทั้งน้ี ต้องไม่เป็นไปเพื่อการจ าหน่าย

ส าเนาไปเผยแพร่ แจกจ่ายได้ แก้ไข ดัดแปลงได้ อนุญาตให้ผู้ใช้สามารถส าเนาไปเผยแพร่ แจกจ่าย ดัดแปลงได้ ทั้งน้ี ต้องไม่เป็นไปเพื่อการจ าหน่าย

ผู้ใช้เป็นผู้รับผิดชอบต่อผลที่เกิดขึ้นจากการน าไปใช้

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | software distribution

Tassanai WongjaroenchaiDepartment of Pharmacy, Pathum Thani Hospital

acebook.com/tassanai.Wongjaroenchainongjiew@hotmail.com

CONTACT QR CODE

Temperature Monitoring and Alerting System for a Pharmaceutical Refrigerator using Raspberry Pi

Project Development | contact information

Raspberry Pi and Raspberry Pi logo is the registered trademark of the Raspberry Pi Foundation. LATTEPANDA is a trademark of Zhiwei Robotics Corp. LINE is a registered trade name or trademark of LINE Corporation. Other company names and

product or service names mentioned are registered trade names or trademarks of various other companies.

THANKS FOR LISTENING

top related