0% found this document useful (0 votes)
360 views

Internet of Things Based Pet Feeder Automation Using Raspberry Pi

Uploaded by

Rizyn Shrestha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
360 views

Internet of Things Based Pet Feeder Automation Using Raspberry Pi

Uploaded by

Rizyn Shrestha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

International Journal of Scientific & Engineering Research Volume 11, Issue 8, August-2020 23

ISSN 2229-5518

Internet of Things based Pet Feeder Automation


using Raspberry Pi
Adetokunbo A. Adenowo , Jonathan C. Anyi, James A. Akobada

Abstract— Household pets need special treatment and care. They need to be attended to as at when due with food, drinks, and
medication. Due to busy life style of most owners, this task may not be as simple as expected. Lack of adequate attention to pets’ needs
might have great consequential effects, such as starvation, ill health, among others. In view of the foregoing, this work proposes an Internet
of Things based automated feeder system that uses Raspberry pi to drive its remote control, scheduling and intelligence. Its design and
subsequent implementation is expected to, at least, take care of the nutritional aspects of pets by providing as either scheduled or
intelligently the food, drinks and medication of pets as at when due in the absence of the owner. Thus, this work aims to automate the
monitoring and feeding process that is usually done manually by pet owners. To achieve the foregoing, the proposed system uses a food
dispenser that is connected to a microcomputer which is programmed to control the feeder as scheduled, remotely or intelligently. Thus,
allowing the user to have full control over the time a pet is fed and the amount of food consumed by the pet. The feeder can be controlled
through a secure web application hosted on a local server and through advance scheduling. The results of the evaluation show that the
design is viable and that the prototype automatic feeder system worked as designed.

Index Terms— Automation, Automated Feeder, Internet of Things, Pet Feeder, Raspberry Pi, Remote Control, Secure Web Application.

——————————  ——————————

1 INTRODUCTION

IJSER
Household pets need special treatment and care. Owners need et al. [3] presented a speech-enabled technology using virtual
to ensure food, drinks, and medication are served as at when assistant that accepts speech as input to control electronic de-
due. Lack of adequate attention to pets’ needs might have vices in remote location. The virtual assistant has natural lan-
great consequential effects, such as starvation, ill health, guage processing capability. Thus, via speech, devices within
among others. Due to concurrent tasks demanding owners’ the technology network can be remotely controlled.
attention, couple with busy life style, management of these According to Singh et al. [4], automation based Internet of
pets may not be as simple as expected. Hence, the need to mi- Things (IoT) is becoming versatile and popular. The technolo-
grate from manual to technology-based management of pets’ gy enhances human life due to its capability to provide smart
daily needs. An Internet of Things (IoT) based automatic feed- management of appliances at target locations. In view of this,
er system comes handy to assist in the management of pets the latter developed a prototype that controls home appliances
needs. The latter technology will enable pet owners to remote- such as light, fan, energy consumption, level of Gas cylinder,
ly manage critical needs that are automatable while engaged among others, using sensor and Arduino device. With the so-
in other time and attention demanding tasks. lution, they were able to detect the presence or absence of hu-
In the literature, several works have been done in attempt man object in the target location, manage energy consumption
to automate diverse human activities. For instance, Asadullah and check gas level.
et al. [1] deployed a home automation system to remotely con- In the same light, an IoT-based feeder system should be
trol up to eighteen (18) home appliances using Arduino board, able to automate feeding and other related provisions or needs
Bluetooth, Smartphone, ultrasonic sensor and moisture sensor. of pets. Such IoT-based feeder system can be designed in a
The technology can also detect water level and soil moisture if way that it dispenses precise amount of food or other provi-
deployed as plant irrigation system. Ricci [2] proposed meth- sions at specific time intervals, reduce the amount of time
ods and systems for home automation that determines state of owners spend on feeding and monitoring of household pets
and/or activities within a household and provide information [5]. In addition to the relief the automated feeder system gives
to remotely located owner. Thus, the house owner can remote- to pet owners, it can be programmed in such a way that it can
ly identify occupants and monitor their activities. Orr be controlled with the push of a button or remotely through
voice commands (as in [3]) and via a web application with a
good user friendly interface.
———————————————— Asides the benefits automatic pet feeders give its users, it
 Adetokunbo A. Adenowo is a lecturer in the dept of Electronic & Computer can also regulates the amount of food given to pets since it can
Engineering,Faculty of Engineering,Lagos State University,Lagos, Nigeria.
E-mail: [email protected].
be programmed to dispense specific amount of food, thereby
 Jonathan C. Anyi is a student in the dept of Electronic & Computer Engi- ensuring pets are not malnourished or overfed which may
neering,Faculty of Engineering,Lagos State University,Lagos, Nigeria. lead to obesity especially when the pets are still very young. In
E-mail: [email protected]
 James A. Akobada is a student in the dept of Electronic & Computer Engi-
view of the aforementioned benefits, Ibrahim et al. [5] devel-
neering,Faculty of Engineering,Lagos State University,Lagos, Nigeria. oped an Arduino microcontroller based mechanism. The mi-
E-mail: [email protected], crocontroller is used to control a pet feeder. In determining the
IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 8, August-2020 24
ISSN 2229-5518

maximum stress the mechanism can withstand, the latter au- friendly interface and the integration of IoT into pet feeder
thors applied finite element analysis; they achieved apprecia- device, would allow users / owners control the pet feeder re-
ble success that provides insight into how to improve the motely. Also, it will enable owners monitor the pet to ensure
mechanism. Jadhav et al. [6] used an existing Smartphone ap- that proper feeding is always carried out. The proposed design
plication (i.e. Blynk) to automate the feeding of fish. They ar- would give pet owners the freedom to travel knowing that
gued that keeping and viewing fish at home can reduce stress with the automatic pet feeder, the pet would be well taken
when treated as pet like cats, dogs, cows, etc. Unlike other care of.
domestic animals or pets, fish requires extra care, thus the au-
tomation will minimized human effort in managing its needs. 1.1 Theoretical background
In line with existing literatures, a typical pet feeder should Part of objectives of this work is to enable remote access to the
have a dispenser that releases dry pet feeds; the amount of automatic pet feeder in order to feed a pet from any part of the
food dispensed can be regulated by a motor. The number of world. For that to be possible access to a network is needed;
revolutions the motor makes usually determines the quantity this can be achieved via an Internet protocol (IP) address.
of dry pet feeds dispensed. Part of the first automated pet 1.1.1 IP Address:
feeder systems designed is the Gravity Feeder [7]; it has a
An IP address is a unique numerical label assigned to devices
hopper full of pet food which is dispensed evenly through its
connected to a network. For the automatic pet feeder to be
ports to a bowl. The feeder keeps filling up same bowl as dis-
accessed remotely, an IP Address would have to be assigned to
pensed food are consumed by the pet. Thus, the continuous
the pet feeder through the network interface of the Raspberry
filling of the bowl can be said to be the down side of this basic
pi. There are two types of IP address that are indicative of lo-
pet feeder. This implies that a pet owner would be unable to
cations of a network, namely:
control the amount of food consumed by the pet. Similarly,

IJSER
Yaomin [8] designed an automatic pet feeder mechanism that Private IP address - A private address is an address
has a food hopper and feeds serving tray. The hopper is de- assigned to devices expected to communicate within a
signed such that its bottom is larger than its top, a cylindrical LAN only.
shaft fitted at its center, and with a tapered outer wall.  Public IP address - A public IP address is an address
Vittuari et al. [9] designed an automatic distribution appa- that uniquely identifies devices over the Internet.
ratus that can supply consumables to pets, particularly dogs Seems the automatic pet feeder is expected to com-
and cats which are fed even when the owner is not around. It municate with the pet owner over the Internet, a pub-
makes use of card programmed according to the users control lic IP address would have to be assigned to it by a
panel. The apparatus makes use of mechanical operations service provider. Current study, the automatic pet
through the use of a volumetric screw feeder which ensures feeder is expected to be connected to a trusted home
precise feeding operation even when varying size of pellets is network.
used. Furthermore, Krishnamurthy [10] developed a pet feed-
1.1.2 Routing protocol:
er that consists of a base, feeding bowl, a timer module and a
lock which holds the entire unit in place. This invention can For devices on different network to communicate, a routing
also serve as a playmate when the pet owner is not around; protocol must be setup. This would ensure the pet owner’s
this was achieved by connecting a toy holder which when ac- network would communicate effectively with the home net-
tuated by an ejector throws off the toy at specified distance, work where the pet feeder is located. Internet service provid-
the toy holder is also actuated by a string connected to a motor ers make use of border gate protocol (BGP) to route or send
which is programmed by microprocessors. data over different networks [11]. BGP is a path vector proto-
Currently, there are lots of pet feeding devices in the mar- col that is designed to exchange routing and reach-ability in-
ket, aimed at ensuring that pets get a healthy amount of feeds formation among various autonomous systems on the Inter-
even when the pet owner is away. The major difference in the net. With a BGP routing protocol setup, a home network
various pet feeding devices is the degree of control that these should be able to effectively communicate with the pet own-
devices could give to pet owners and the methodology used to ers’ network. Fig 1 below illustrates a home network topology
achieve it.. Hence, this study proposes a pet feeder system that that connects the pet feeder.
is IoT driven. The proposed solution, with the aid of a user

IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 8, August-2020 25
ISSN 2229-5518

Fig 1: A network that connects the feeder to the Internet


B+ is the Cortex-A53. The processor is mostly 64bit mak-
ing it a very fast processor. The Cortex-A53 processor has
2 MATERIALS & METHODS
up to four cores, each of the cores has an L1 memory system
This section explains the materials, as well as the methods and a single shared L2 cache. The most advantageous feature

IJSER
adopted in this study. The section discusses the components of the Cortex-A53 processor is its performance and high level
used and concepts that relate to this work. In addition, the of power efficiency [13].
process of choosing individual material and procedure for
fabrication and assembly of the proposed automated pet feed- 2.1.3 Pi Camera module
er is explained. The Raspberry Pi Camera Module is a high quality 8 megapix-
el Sony IMX219 image sensor designed for Raspberry Pi, fea-
2.1 Components turing a fixed focus lens. The Raspberry Pi module became
The materials that would be needed for the fabrication of the prominent from the release of Raspberry Pi Zero [14]. The Pi
automated pet feeder consists a Raspberry pi, a shaft, stepper camera supports up to 1080p30, 720p60 and 640x480p90 video
motor, relay and food container. making it a valuable piece for implementing a monitoring sys-
2.1.1 Raspberry pi tem for the study.
Raspberry pi is a series of micro-computers developed in the 2.1.4 Stepper motor
United Kingdom by the Raspberry Pi Foundation. The major A stepper motor is a brushless DC motor that converts electri-
reason for the development of Raspberry Pi is to promote cal power to mechanical power [15]. A stepper motor also
basic computer skills in schools and developing countries called stepping motor divides full rotation into equal steps
around the world. According to Raspberry Pi Foundation, an therefore, and the motor’s position can be programmed to
approximate of 5 million or more Raspberry Pi units were sold start of stop at specific steps. Stepper motors use the theory of
in the year 2015 and by early 2018, the total sale reached over operation for magnet to make its shaft turn in a particular dis-
19 million. Raspberry pi gradually became the world third tance. A stepper motor consists of stator and rotor with eight
best-selling general purpose computer due to its use of Python and six poles respectively. The rotor moves exactly 15 degrees
as a major programming language [12]. for each pulse of electricity received.
Raspberry pi has several release models such as Raspber- Operationally, stepper motors mode of operation is very
ry Pi 1, 2, zero, 3 models B and B+, among others. Raspberry Pi differently from DC brush motor. A stepper motor consists of
model B is one of the latest; it was released in the year 2016. It multiple toothed electromagnets around a central gear. The
comprises of a 1.2GHz 64-bit quad core processor, with on electromagnets are controlled and energized by external mi-
board 802.11n Wi-Fi and USB boot capability. Two years after, crocontroller. For the stepper motor to turn, the electromagnet
the Raspberry pi model B plus (+) was released. It has a faster would be energized which in turn makes the gear’s teeth at-
processor (1.4GHz), Power over Ethernet (PoE), USB boot ca- tracted to the electromagnet’s teeth. When the gear’s teeth are
pability and a network Boot which makes model B + a perfect aligned with the first electromagnet, it’s slightly offset from
microcomputer for this study due to its processor speed and the next electromagnet, therefore, when the next electromag-
its ability to connect to a home network for remote access [12]. net is turned on and the first electromagnet turned off, the
2.1.2 Cortex-A53 gear then rotates slightly which completes one full step (see
[16] for detail description).
The power engine behind the operation of Raspberry Pi
IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 8, August-2020 26
ISSN 2229-5518

2.1.5 Relay Step1: Download the Raspbian


Relays are electrically operated switch. Relays are mostly used Turn on a PC that is contented to the Internet and then down-
when a circuit is to be controlled by an independent low pow- load the Raspbian disc image. Note that the most recent vari-
er signal or where multiple circuits are to be controlled by just ant of Raspbian can be found on the Raspberry Pi Founda-
one signal. A simple electromagnetic relay would have a coil tion's site.
wrapped around a soft iron core, otherwise known as a sole-
Step2: Unzip Raspbian File
noid, an iron York which is to provide low reluctance for
The Raspbian disc image is compressed, so it should be un-
magnetic flux and a movable iron armature [17].
zipped. The file uses the ZIP64 format, so depending on how
When electrical current is passed through the coil, it
current built-in utilities are, one needs to use certain programs
would then generate a magnetic field which would then acti-
to unzip it. For instance, Unzip is used by Linux users.
vate the armature. The movement of the movable contacts
makes or breaks connection with the fixed contact. Contacts Step3: Write the disc image to microSD card
used in relays vary depending on the application of the relay. Insert the microSD card into a computer and write the disc
image to it. The process of actually writing the image will be
2.2 The Automation Process slightly different across programs. Each of these programs will
The process towards automating the proposed feeder system require selecting the destination and the disc image (the un-
is depicted by the block diagram in Fig 2 below. Each aspect of zipped Raspbian file). Choose, double-check, and then click on
the design is important for the system to be fully functional.
the write button (See fig. 3 below).
The proposed system is designed to use Raspbian (a Linux
based operating system − due to its compatibility with
Raspberry pi) and powered by Cortex a-53 processor. Also, a
local server (Apache) is installed to enable easy control of the

IJSER
entire system. In implementing the automation process as
depicted in the fig. 2 below, Raspbian OS is installed first. This
is followed by programming the Cortex A53 microprocessor
which regulates the entire automated system.

Fig 3: Installing Raspbian OS on Raspberry pi [18]


Step 4: Put the microSD card in the Raspberry Pi and boot up
After storing the disc image in the microSD card, put the mi-
croSD into the Raspberry Pi, plug in the peripherals and pow-
er source. The Raspbian will boot straightforwardly to the
desktop. The following username: pi and password: raspberry
can be used as default credentials. For further guide on how to
install Raspbian OS, see online content [18].

2.2.2 Programming and Setup of Raspberry Pi


Python is an interpreter-based high-level computer program-
ming language. Python’s design philosophy lays emphasis
Fig 2: Block diagram of the proposed automated pet feeder code simplicity and readability. Python happens to be the ma-
system jor programming language used on all Raspberry Pi models.
Thus, the Raspberry pi is purposely programmed for the pet
2.2.1 Installing Raspbian OS feeder system in order to automate it. Thereafter, the Raspber-
Raspbian is a Linux distribution operating system that is com- ry pi is setup using appropriate commands as stated in its
patibility with Raspberry Pi models. The operating system technical documentation. For detail setup information, see
supports python programming language which is required to Raspberry Pi user’s guide [19].
write programs / scripts that run in microprocessor to achieve
the automation objective. To install Raspbian, the following 2.2.3 Setup Electrical Components
items are required: a microSD card (with no less than 8 GB), a After the Rasbian OS is setup, the next step is to wire-up the
PC with a space for it, and, obviously, a Raspberry Pi and oth- components that will be attached to the Pi’s GPIO pins. There-
after, a functionality test is undertaken by connecting the
er fundamental peripherals (such as a mouse, console, screen,
wired components to the Pi. Fig. 4 below is the schematic dia-
and power source); and the following steps can be taken:
gram of the proposed system showing the wired components

IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 8, August-2020 27
ISSN 2229-5518

as connected to the pi. iv. Connect and test wired components to Pi – the but-
ton, motor and LCD screen components are all con-
nected to pi. Thereafter, a test is conducted to ensure
everything is working correctly. See fig. 7 below.

Fig. 7: Testing of the system before assembly


Fig. 4: Schematic diagram of the automated pet feeder system v. Construction of Box - Once it is verified that every-
thing (i.e. step iv above) is working well, the Raspber-
ry pi is shut down. This is followed by building the
The components wiring steps are presented below thus:
system box that will house all the components as

IJSER
i. Wire button shown in fig. 8 below.
ii. Wire and setup the stepper motor as in fig. 5.

Fig. 8: Initial assembly stage of the feeder system box


Fig. 5: Stepper motor setup vi. Finally, assemble all the components and connect to
have a complete working system. See Fig. 9 below.
iii. Wire the LCD screen as shown in fig. 6.

Fig. 6: Wiring of the LCD screen


Fig. 9: Advance assembly stage of the feeder system

IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 8, August-2020 28
ISSN 2229-5518

3 TESTING AND RESULTS ACKNOWLEDGMENT


In line with the main objective of this work, to design a system The authors wish to thank colleagues that provided comments
that automates the feeding process of common household pets and helped improve this work.
with easy remote operation and user friendly interface, a pro- REFERENCES
totype system was designed and evaluated. The critical aspect
[1] M. Asadullah and K. Ullah, “Smart home automation system using
of this work is the human surveillance and controlled pet feed-
Bluetooth technology,” In 2017 International Conference on Innova-
ing. The foregoing is important due to the security issues of
tions in Electrical Engineering and Computational Technologies
smart applications and obesity experienced by young house-
(ICIEECT), April, 2017, pp. 1-6, IEEE.
hold pets at early age. [2] C.P. Ricci, “Providing home automation information via communica-
Thus, for surveillance and in line with design methodolo- tion with a vehicle,” U.S. Patent No. 9,378,601, issued June 28, 2016.
gy, motion detection Raspberry Pi camera was used along with [3] R.M. Orr, G.R. Nell and B.L. Brumbaugh, “Intelligent assistant for
OpenCV (an open source computer vision library). Python home automation,” U.S. Patent No. 10,170,123, 2019.
language acts as the main programming platform to program [4] H. Singh, V. Pallagani, V. Khandelwal and U. Venkanna, “IoT based
the raspberry device in order to achieve the desired automa-
smart home automation system using sensor node,” In 2018 4th In-
tion.
ternational Conference on Recent Advances in Information Technol-
Table 1: Results of evaluation of prototype
ogy (RAIT), March, 2018, pp. 1-5, IEEE.
Testing Operation Response Stepper Size of Remark
Mode Time Motor Feeds [5] M. Ibrahim, H. Zakaria, and E.W. Xian, “Pet food autofeeder by us-
(Sec) (Rev/Sec) Dispensed ing Arduino,” In IOP Conference Series: Materials Science and Engi-
(in gram) neering, Vol. 670, No. 1, November, 2019, p. 012069, IOP Publishing.
1 BUTTON 1 3 50 GOOD [6] K. Jadhav, G. Vaidya, A. Mali, V. Bankar, M. Mhetre and J. Gaikwad,
INTERNET NIL NIL NIL BAD

IJSER
“IOT based Automated Fish Feeder,” In 2020 International Confer-
(WAN)
2 BUTTON 1 3 50 GOOD ence on Industry 4.0 Technology (I4Tech), February, 2020, pp. 90-93,
INTERNET NIL NIL NIL BAD IEEE.
(WAN) [7] A.R. Page, “Gravity feed dog feeder,” U.S. Patent No. 4,538,548, 1985.
INTERNET NIL NIL NIL BAD [8] M.A. Yaomin, “Automatic pet feeder having rotating food hopper
(WAN)
and food leaking plate,” U.S. Patent No. 9,560,834, 2017.
INTERNET NIL NIL NIL BAD
(WAN) [9] E. Vittuari, G. Vittuari, M. Vittuari and M.R., “Automatic feed distri-
3 LOCAL 3 3 50 GOOD bution apparatus for animals,” U.S. Patent No. 6,145,472, 2000.
AREA [10] S. Krishnamurthy, “Automatic pet feeder,” U.S. Patent No. 7,650,855,
NETWORK 2010.
4 LOCAL 3 3 50 GOOD
[11] K. Weitz, D. Woos, E. Torlak, M.D. Ernst, A. Krishnamurthy and Z.
AREA
NETWORK Tatlock, “Scalable verification of border gateway protocol configura-
tions with an SMT solver,” In Proceedings of the 2016 ACM SIG-
Table above shows a detailed result of the testing done af- PLAN International Conference on Object-Oriented Programming,
ter the prototype automatic feeder system was completed and Systems, Languages, and Applications, October, 2016, pp. 765-780.
evaluated. From table 1 above, both the button and operation
[12] https://en.wikipedia.org/wiki/Raspberry_Pi
via local area network showed good feeding operations from
[13] J. Ivković and B. Radulović, “The advantages of using Raspberry Pi 3
the pet feeder. An increase in the duration of the stepper mo-
tor gives an increase in the amount of feeds dispensed. compared to Raspberry Pi 2 SoC computers for sensor system sup-
port,” In proceedings of the 6th International Conference on applied
4 CONCLUSION internet and information technologies, Bitola, 3-4 June, 2016, 88-94.
[14] https://projects.raspberrypi.org/en/projects/getting-started-with-
This design of an IoT based automatic pet feeder system was
picamera.
done in consideration of some factors such as: economic appli-
cation, user convenience, availability of components and re- [15] I. Ionică, M. Modreanu, A. Morega and C. Boboc, “Design and mod-

search materials, efficiency, compatibility, portability and du- eling of a hybrid stepper motor,” In 2017 10th International Sympo-
rability. As earlier stated, this work aims to enhance the man- sium on Advanced Topics in Electrical Engineering (ATEE), March,
agement of pets, giving their owners greater flexibility in the 2017, pp. 192-195, IEEE.
provision of essential care and nutritional and medical needs, [16] D.M. Considine and G.D. Considine, “Stepper Motors and Con-
despite their multiple time and attention demanding tasks and trols,” In: Considine D.M., Considine G.D. (eds) Standard Hand-
busy schedules. The prototype and subsequent evaluation, book of Industrial Automation. Chapman and Hall Advanced In-
however, indicates that the research goal is feasible and dustrial Technology Series, 1986, Springer, Boston, MA.
achievable. Thus, current work extends previous efforts in the [17] V. Gurevich, Electric Relays: Principles and Applications. Taylor &
management of household pets and can also be extended to Francis, 2016.
cater or manage commercial farm birds. [18] https://dronee.aero/blogs/lychee/how-to-install-raspbian-on-lychee

IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 8, August-2020 29
ISSN 2229-5518

[19] G. Halfacree and E. Upton, Raspberry Pi User Guide. 1st Edition.


Wiley Publishing, 2012.

IJSER

IJSER © 2020
http://www.ijser.org

You might also like