Beruflich Dokumente
Kultur Dokumente
net/publication/314105271
Smart dog feeder design using wireless communication, MQTT and Android
client
CITATIONS READS
2 1,534
3 authors, including:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Hargyo Nugroho on 10 January 2018.
Abstract— Regular feeding is one of the problems in dog’s author wants to make feeding process more efficient for the
maintenance. Owners often forget to feed their pets because of user.
their work. Smart Dog Feeder is the answer to these problems.
This device can provide regular feeding without disrupting The Internet of Things concept has given ideas for the
owner’s work. Owners can monitor feeding process with their author [2]. Internet era can help every work to be eassier than
Android smartphone virtually. Smart Dog Feeder can give it should. Making a dog feeder to be smart can be done by
authentication with RFID, set feeding time and portion per adding the Internet of Things concept. Dog feeder can be
serving through Android smartphone, send feeding report (eaten smart with adding some new technologies and makes it able to
or partially eaten), and dog arrival when the feeding time has interacts with other devices. Therefore, the authors wants to
arrived. Every setting about feeding time, portion, stock and make a smart dog feeder to solve this problem.
waiting time will be set on Android with minimum requirement
of Jelly Bean version, SDK 18 and has been installed with Smart Dog Feeder is designed with RFID to authenticate
Appliance Hub application. Smart Dog Feeder has stock dog’s tag, so that any other dog cannot access the device. It
information, feed schedule, waiting time and owner’s name from can set feeding time and portion per serving through Android
server uses MQTT protocol. All information will be sent in JSON smartphone, send feeding report (eaten or partially eaten), and
format and will be processed by Smart Dog Feeder, Android and dog arrival when the feeding time has arrived. Smart Dog
server. Smart Dog Feeder will save the schedule and set RTC Feeder has stock information, feed schedule, waiting time and
alarm which will interrupt when the feed time has arrived. owner’s name from server uses MQTT protocol. All
Authentication process is done by checking RFID tag which is information will be sent in JSON format and will be processed
attached on dog collar. Food will be served based on user’s by Smart Dog Feeder, Android and server. Smart Dog Feeder
setting and be measured by load cell. Experiment is done by will save the schedule and set an alarm which will interrupt
seeing punctuality, portion congruence, delivery of settings and when the feed time has arrived. It also has a load cell sensor to
notification within devices. The result of experiment is Smart Dog measure serving size based on user’s setting.
Feeder can receive messages from server and do feeding at the
right time. Next development can be done by adding other This Smart Dog Feeder will be very useful for dog owners
devices in Appliance Hub system. who have a busy schedule and often leaves home. The owners
do not have to worry about leaving their dogs at home and can
Keywords— Android; Appliance Hub; Arduino UNO; monitor their diets through his smartphone.
Internet of Things; JSON; MQTT; NodeMCU; Smart Dog
Feeder; A. Previous Related Researches
There are few previous researches that have been done
I. INTRODUCTION about automatic feeder, such as Programmable Pet Feeder [3]
Dog is the most common pet that people owned. and Smart Pet Care System [4]. They are not exactly
Nowadays dog is also one of family member to the owner. So, addressed to feed dog but pet in general. Programmable Pet
dog’s healthiness is important. Regular feeding is the most Feeder is feeding automatically using microchip PIC18F4520
important thing, but it also one of the problems in dog’s microcontroller. A stepper motor is used to control the speed
maintenance. Owners often forget to feed their pets because of and positioning and a DC motor to dispense food. The food
their work. A dog feeder can be the answer to these problems. dispenser is named Turn-Table which divides into 4 sections
and can dispense different kind of foods. Buzzer is used to
Now there are some dog feeder that are created. But the alert when feeding time was arrived and the meal is served.
author sees that there are some features that still can be added User can set the schedule for each section using the LCD and
to the feeder tools. One of the feeders the author found still input their desired timing.
has to be set manually [1]. It also has an alarm system, but
users also have to set manually on the devices. Therefore, the Smart Pet Care System consists of an automatic feeder, an
automatic pooping pad, a camera with Raspberry Pi, and an
application for smartphone. Automatic feeder has 3 layers to
978-1-5090-2323-3/16/$31.00 2016
c IEEE 191
dispense and distribute the food. It uses Arduino to control the III. MECHANISM DESIGN
feeding mechanism and a weight sensor to measure serving
size. A Raspberry Pi camera is used to monitor automatic A. Smart Dog Feeder
feeder and pooping pad. The Raspberry Pi also acts as server. Fig. 3 shows the block diagram of Smart Dog Feeder.
In the application, user can choose serving size and the Smart Dog Feeder is designated with Arduino Uno
schedule for 3 times feeds. Unfortunately, the application is microcontroller at its core. It is responsible for controlling the
made in Korean language. flow of main program, as well as controlling all the sensors
and the actuators used. The microcontroller is also responsible
for all data exchange (in this case JSON objects) between
Smart Dog Feeder and User’s Smartphone through ESP8266
WiFi module.
ESP8266 WiFi module with NodeMCU firmware
programmed in lua language. NodeMCU does initialization to
get owner, dog food stock, and feeding schedule from the
server [6]. As the feeding time has been scheduled at RTC,
NodeMCU sends report command to the server. Report also
includes feeding process status.
192
Generally Appliance Hub application consists of 8
activities, which are Sign In Activity, Sign Up Activity, Main
Setting Activity, Appliance Activity, Setting Activity,
Account Setting Activity, Change Password Activity and Edit
Profile Activity. In Appliance Activity, there is one other
activity which is called Add Appliance Activity. In Setting
Activity, there are five activities, which is Feed and Feed
Time Activity, Log Activity, Update Stock Activity and
Unregister Activity. Fig. 5 is the main flow of the application.
193
status (eaten or partially eaten). After that, the user will be servo motor when the serving size has been reached. However,
taken to Feed Time Activity to set feeding schedule based on from the measurement results that have been obtained, it’s
how many time they want to feeding their dog. Server will be revealed that the food often exceeds the desired portion. This
receive the command after user press “Submit” button and will is due to mechanical limitation of the propeller blades. One
forward it to Smar Dog Feeder to be processed. side of the propeller blades, in an ideal situation, can contain
approximately 20 grams. Consequently, to reach a serving size
IV. IMPLEMENTATION
that is not multiples of 20, it will always exceed the desired
A. Measuring Implementation portion.
The first trial was done to ensure the accuracy of the load C. Hardware Implementation
cell. In this research, the author compared the measurement
The implementation of Smart Dog Feeder is shown in Fig.
between load cell and reference scale when used to measure a
7. Fig. 7 shows the schematic of Smart Dog Feeder and Fig. 8
100 grams weight. The load cell read 78 gram and the is the prototype of Smart Dog Feeder. RTC DS3231 SDA pin
reference scale read 100 grams. There was a deviation is located at A4 pin and SCL pin is located at A5 pin because
between them in the amount of 22 grams. they communicate with I2C. ESP8266 board communicates
To perform a calibration, the author compared three other through serial communication. Therefore, ESP8266 TX pin is
amounts in different weight, such as 200 grams, 300 grams, located at RX pin on Arduino and RX pin is located at TX pin.
and 400 grams. The result (as seen in Fig. 6) can be calibrated The MFRC522 RFID pin also has spesific pin location to
with curve fitting process on Matlab. Therefore, the support SPI communication. The servo motor is also located at
measurement of the load cell has to be calculated according to one of the PWM pins on Arduino. Other components can be
formula 4.1. located anywhere. Buzzer is located at digital pin 2, magnetic
sensor is located at pin digital pin 4, and HX711 weighing
(4.1) module is located at A2 (DT) and A3 (SCK). Pin E+ on
Where: HX711 is connected to red wire on loadcell, pin A+ on HX711
x = load cell measurement in gram is connected to white wire on loadcell, pin A- is connected to
green wire on loadcell, and pin E- is connected to black wire
on loadcell.
194
application, server, and Smart Dog Feeder cannot be read by
other part.
D. System Implementation
Fig. 10 Communication is encrypted
System implementation consists of application
implementation with responses from the server. All
communication is also listened by Wireshark application to Android application can communicate through MQTT
check the security aspect. Fig. 9 is the main page of feeding protocol by using service provided by Paho Android Service.
setting. Fig. 10 shows that the communication process in the With the service, Appliance Hub application can establish a
application is encrypted and cannot be read. The complete connection to the server with "connect" function. However,
implementation can be seen at author’s report [9]. SSL protocol is used for the communication between server
and client to ensure good security. For that purpose, a
certificate is needed when the Android application is trying to
establish a connection with the server. The certificate cannot
be used directly by the Android because the nature of Java
language, which typically does not support .pem file that is
used by the server. Because of this, the certificate has to be
converted into .bks file, which is provided by BountyCastle.
Conversion process is done with keytool command that runs in
terminal. Certificate with .bks format can be used directly in
the application and communicate with the server with SSL.
Smart Dog Feeder is connected to the server with ESP8266
WiFi module. The module comes with NodeMCU
development kit. NodeMCU will run and maintain the
connection with MQTT protocol. This WiFi module also
supports communication with encryption by changing the
mode from mode 0 (which establishes communication without
encryption) to mode 1 (secured communication). NodeMCU
receives message from server and forwards it to Arduino UNO
by serial communication. This message is then processed by
Arduino UNO so that it can run the appropriate function.
In feeding process, load cell measurement test is done to
ensure that the measurement can be used. The result of the test
Fig. 9 Feed Page shows that load cell measurement is inaccurate. However, in a
comparison test between the load cell and a trusted accurate
scale, the difference can be determined so that the
V. CONCLUSION measurements of the load cell can be calibrated to a near
Automatic feeding can be done by connecting Android accurate result
application with server and Smart Dog Feeder through WiFi The portion that is served in the feeding process tends to
communication, and they exchange messages with MQTT exceed the user-inputted number because of a mechanic
protocol. To enforce communication security, TLS/SSL limitation, which is the maximum amount of pet food the
protocol is used so that the communication between Android propeller blade can release per turn (20 gram). There is also a
195
probabilty of food being stuck between the blades, making the [2] Luigi Atzori, Antonio Iera, Giacomo Morabito, “The Internet of Things:
feeding process somewhat inconsistent. In addition to that, the A Survey”, Elsevier, May 2010.
servo sometimes can stop when the blade is in partially [3] Tessema Gelila Berhan, Worku Toyiba Ahemed, Tessema Zelalem
Birhan, “Programmable Pet Feeder”, International Journal of Scientific
opened position. Engineering and Research (IJSER), Nov. 2015.
For future development, Smart Dog Feeder can be made [4] Seungcheon Kim, “Smart Pet Care System Using Internet of Things”,
larger using larger dispenser to store the dog food. The International Journal of Smart Home, 2016.
application can be improved with some new features, such as [5] Michael Aditya Sutiono, “Rancang Bangun Smart Rice Cooker
Menggunakan Protokol Komunikasi Wi-Fi dan Protokol Pertukaran
adding gestures, changing activity into fragment, or adding Pesan MQTT,” Unicersitas Multimedia Nusantara, Tangerang, Skripsi
some new functions for new devices. 2016.
[6] Christian Orvin, “Perancangan Smart Medicine Dispenser Menggunakan
ACKNOWLEDGMENT Komunikasi WiFi dan Client Berbasis Android,” Universitas
The author would like to thank Kanisius Karyono and Multimedia Nusantara, Tangerang, Skripsi 2016.
Hargyo Tri Nugroho for their help and support for this final [7] Even Yehudah Ofer Landau, "Dry Food Dispensing System," US
project, and also Handrey Alex and Michael Sutiono for their 6,964,355 B2, Nov. 15, 2005.
comments and suggestions for this work. [8] NXP Semiconductors N.V, “MFRC522 Standard performance MIFARE
and NTAG frontend”, Apr 2016
REFERENCES [9] Vania, “Perancangan Smart Dog Feeder Menggunakan Protokol
Komunikasi WiFidan MQTT Serta Client Berbasis Android,”
Universitas Multimedia Nusantara, Tangerang, Skripsi 2016.
[1] Radio System Corporation. Healthy Pet Simply Feed Automatic Feeder.
[Online]. http://store.petsafe.net/healthy-pet-simply-feed-automatic-
feeder
196
View publication stats