You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/356668049

Smart Modular Parcel Locker System using Internet of Things (IoT)

Conference Paper · November 2021


DOI: 10.1109/ICSET53708.2021.9612542

CITATIONS READS

4 2,772

2 authors, including:

Tan Chye Cheah


University of Nottingham, Malaysia Campus
4 PUBLICATIONS 8 CITATIONS

SEE PROFILE

All content following this page was uploaded by Tan Chye Cheah on 21 February 2022.

The user has requested enhancement of the downloaded file.


Smart Modular Parcel Locker System using Internet
of Things (IoT)
Jing Zhi Ooi Dr. Chye Cheah Tan
School of Computing Faculty of Computing, Engineering, and Technology
Asia Pacific University of Technology and Innovation Asia Pacific University of Technology and Innovation
Bukit Jalil, Malaysia Bukit Jalil, Malaysia
tp046375@mail.apu.edu.my chyecheah.t@staffemail.apu.edu.my

Abstract— The increase in use cases of last mile delivery is a mile delivery solutions, such as attended deliveries and
by-product from the increase in efficiency of globalized goods controlled access system, as part of their attempt to find out
transportation, to the point that it is applicable for non- the effectiveness of parcel lockers as a solution of the last mile
commercial endpoints, e.g., personal accommodation. With the delivery industry in Poland.
surge in use cases, there is an amplified cost in financial and time
resources from both logistic companies and the recipients as the According to Zeng, et al. [6], last mile delivery refers to
amount of endpoints rise. This paper details the development of the transportation of objects from a source location to their
a proposed system aimed to alleviate the effect by offering final destinations. The leaders of the logistic industry are
concentrated stopping locations to accommodate for different particularly interested in last mile delivery optimization,
logistic companies to deposit multiple parcels into while the which, when completed, brings both tangible and intangible
recipients collect them as needed through the implementation of benefits to the table in terms of efficiency and effectiveness in
contactless deposit and withdrawal, as well as a modular style of the deliveries. However, there are no definitive answers to the
locker unit deployment in a scalable manner. question, as the the factors to be taken into consideration
changes with the location, making the process of looking for
Keywords— Internet of Things (IoT), Modular, Parcel Locker, a solution either a case-by-case basis, or a generalized
Last Mile Delivery, Dimension Scanning
scenario that doesn’t address a specific problem. Zeng, et al.
[6] suggested that the scheduling of delivery routes
I. INTRODUCTION (determining the order of delivery stops according to the
The operation mode of parcel lockers suits the lifestyles service point and destination) to be one of the fundamental
led by the modern man, for them being always available in a issues to work with in context of last mile delivery. This
constant location in a publicly accessible location is a key problem can be seen in papers using the heuristic approach.
point for someone who is not available in their homes during The significance of optimizing last mile delivery increases
working hours – the period when delivery companies schedule exponentially with the increase of e-commerce, which led to
their delivery attempts. These characteristics allow them to be more delivery vehicles on the road, as mentioned in the
known as part of the Collection Delivery Points (CDPs) opening paragraphs of [5]. According to the results of [7], the
family. Shinto, et al. [1] has found out that this issue allows a key factors that affects delivery durations include:
variety of impacts on the societal level – the extra workload Cooperation on the receiving end (long duration of time spent
for deliveries that results in a failure causes resources to be waiting for receiver to accept), driver knowledge and
spent making the delivery attempt multiple times, be it human, experience (driver pre-emptively knowing where to stop and
economic, environmental, or financial-wise. Additionally, unload shortens the time taken in stops), etc.
there is a significant tilt in deliveries being made to residential Janjavic and Winkenbach [8], on the other hand,
areas than to office buildings – an estimation done by IMRG approached the issue by categorizing the last mile delivery
[2] where the figure of 540 million was found out as the optimization models currently available in the academia
number of deliveries taken up by users of online shopping society into the following:
platforms. As part of the online shopping experience, which
allows the consumer to receive a product without taking a • Placement of logistic facilities
single step out of the comfort of their own home, consumers • Reducing time spent while delivering
are also to be in within the premises of the destination location
while the delivery attempt is being made (since mailboxes The proposed system aligns with the latter – by reducing
aren’t the most parcel-friendly), and there is a need for a proof the number of stops being made during the delivery process,
of delivery to be issued by someone in the premise for and reducing the time spent in each stop, it is expected to be
accountability. How CDPs come in to provide relief for this able to shorten the overall delivery duration on a single route.
situation is through reducing the number of failed deliveries Under this system, delivery employees are able to fulfil a large
being made. Weltevreden [3], for one, suggested that through number of deliveries in a single stop, and eliminating the need
reducing the overall number of delivery attempts, no for the employee to operate the system manually (or even
additional resources need to be exhausted for more attempts learning how to operate it on the spot) serves to reduce the
to be made – with CDPs, attempts are successful from the first time spent in the stop. These gains become significant after
try. Weltevreden [3] classifies parcel lockers as unattended being accumulated throughout the day.
CDPs, with the attended category making up the rest of the This paper aims to develop a parcel locker system that is
category slots. Parcel lockers as described in the paper utilizes easily modular and scalable, and at the same time offers high
PIN codes to allow delivery by the carrier and collection by learnability for user groups – delivery employees and
the receiver. Mangiaracina, et al. [4] praised the parcel locker recipients – so that the time spent interacting with the system
as innovative and viable as a solution to the last mile delivery to deposit and withdraw parcels can be reduced. The rest of
industry. Iwan, et al. [5] compared parcel lockers to other last
the paper is organized as follows: Section 2 highlights other of the device, the lockers of the box can be attached to or
systems that is available to the public with similar detached from the device securely. The number of lockers that
functionalities, followed by the system architecture in Section a device has can be suited to the demand in the area, which
3. Section 4 showcases the features in the implementation that can be gauged by the data being sent to a server. The modular
was chosen to be moved forward by the authors, and Section design also helps to keep costs low as the lockers can be
5 discusses the limitations that can be noticed in the current manufactured individually and be installed, in addition to
version of the system. The concluding remarks are given in being easy to be moved one by one, as opposed to moving the
Section 5. entire box if not modular. The contactless withdrawal feature
refers to if the user needs to operate a panel or buttons in order
II. SIMILAR SYSTEMS to perform the withdrawal process. The similar systems use a
numpad or touchscreen for user authentication. By using a QR
The similar systems that will be used are Parcel Locker code scanned by the device, the proposed system is able to
developed by Australia Post (PL), and PopBox developed by reduce threats that may cause by contacting objects in public
PopBox Asia Services (PB), based in Indonesia. area, while providing a fast and safe method of withdrawing
an object at the same time. Having to operate the device can
also be a time-consuming process, especially for a parcel
locker which is designed to reduce delivery time by reducing
travel time. Observations done on currently available PopBox
devices shows that a set of instructions on how to operate are
attached with the locker set for the delivery employees to
follow, and if the employee is not familiar with the device or
encountered with such problems, some will contact the
recipient to take the parcel in person, or return the parcel to
the delivery outpost. Given that these employees are from
different companies, they are not required by the company to
learn how to operate these devices, and often consumes more
time in their already tight schedule to operate them. Thus, the
proposed device will be developed with the idea of providing
a streamlined deposit process in mind through minimizing the
Fig. 1: The AusPost Parcel Locker in use. [9] amount of interactions that the employee will have with the
device, subsequently reducing the delivery time.
Feature/System PL PB PS
Targeted package √ √ √
deposit
Targeted package √ √ √
withdrawal
Delivery √ √ √
notification
Deliverer × √ ×
authentication
Withdrawal √ √ √
authentication
Contactless × × √
withdrawal
Fig. 2: A PopBox located in Bandar Sunway, Selangor, Malaysia Automatic × × √
[10] dimension
screening
The Table 1 highlights the main functions that is
available/not available in the systems. From the table, it can Modular locker × × √
be seen that the proposed system shares a few functionalities
with the similar systems. The special features that set the Table 1: Comparison of the main features between Parcel Locker
proposed system aside from the others are the automatic (PL), PopBox (PB), and the proposed system (PS).
dimension screening and the modular locker features. When a
parcel is delivered to the locker, it is placed in a space built in III. SYSTEM ARCHITECTURE
with the device, which contains various necessary sensors.
The dimensions (weight, height, width, length) of the parcel is The proposed system is composed of three main
then taken, and the locker that can fit a parcel of said size is components: the locker base, the locker unit, and the web
then made available to the deliverer. This allows optimization application. The components are connected to each other as
to be made and to minimize insufficient lockers due to parcels shown in Fig. 3.
taking up lockers of the wrong optimal sizing. Another
feature, the modular lockers feature, is to allow for scalability.
Since different areas might have different demands for usage
1) Dimension Scanning
The method proposed initially was the pixel-per-unit
system, where the ratio of the measured pixel length to the
known real length of an object is compared to the measured
pixel length of another object to obtain the unknown real
length of said other object:

Fig. 3. Infrastructure Design. Fig. 6: Wireframe of the layout of the scanning platform during the
dimension scanning process.
A. Locker Base 𝑝0 𝑤0
The hardware of the locker base consists of a Raspberry Pi = (1)
𝑝1 𝑤1
3B+, a camera module, an ultrasonic sensor, a light tube, and
an enclosure. A fiducial is permanently fixated at the bottom
of the enclosure, and the components are assembled as follows 𝑝0 = the number of pixels taken up by the fiducial on the
(the parcel is included for referencing purposes): width side,
𝑝1 = the number of pixels taken up by the object on the
width side,
𝑤0 = the actual width of the fiducial,
𝑤1 = the actual width of the object.
Considering Fig. 6 and the formula that immediately
follows, 𝑤1 , being the metric to be measured, is unknown;
while the other values are either obtained through image
processing or initially known by the system. The same logic
Fig. 4: Design Plans of the Locker Base. applies to the length of the object. However, this working
concept assumes that the pixel-per-unit ratio of the fiducial is
the same as the pixel-per-unit ratio of the parcel, which is
almost never the case for an object with a non-zero height.
Consider Fig. 7.

Fig. 5: Design Plans of the Locker Base (Bottom View) Fig. 7 Two objects of identical height, ℎ1 and ℎ2
Software-wise, Python was chosen to be used to write the Two objects of identical height, ℎ1 and ℎ2 is placed side
script for the main process. The script is continuous once run. by side. From the perspective of the camera (the reader), they
The locker base is designed to have little interaction with the are identical in height, as is the case. However, this is not true
user groups to enforce learnability and affordance, and thus, is from the perspective of an observer having the objects aligned
devoid of a feedback system such as a screen or buttons to be at the z-axis (depicted as the circle in the figure shown). From
pressed. Git is built into the Raspberry Pi OS and will be used the perspective, the respective heights of the two objects are
as the main tool for deploying and updating the script remotely. observed as such, with the concealed object outlined in dotted
The locker base plays an integral role in enforcing lines:
contactless deposit and withdrawal of parcels. The next
subsection discusses the thought process behind the selected
dimension scanning feature – the function that allows parcels
of different sizes to be determined to be deposited into locker
units of suitable sizes in the system.
That concludes the proposed solution to the measurement
discrepancy issue caused by the natural phenomenon that is
the depth of view, as a side effect of determining the length
and width of a parcel from the top. Through experimentation,
the new algorithm shows a 30% increase in accuracy, and has
about 7% maximum offset in the tests occurred. Fig. 10 shows
the cross-section view of the locker base. The height of the
Fig. 8: ℎ1 and ℎ2 , as seen from the perspective of the observer. parcel is calculated through the difference between a known
full distance, ℎ0 , and the distance between the sensor and the
The z-axis is introduced to the proposed system with a parcel (taken live), ℎ1 .
layout as shown in Fig. 9 – 𝑤1 is viewed by the camera as
being a different value from 𝑤2 , which is never captured. 𝑤1 ,
when used in a pixel-per-ratio comparison with 𝑤0 as per the
initial method, shows up to 40% discrepancy which value
increases with the height of the object.

Fig. 10: Cross-section view of the locker base.

2) Activity Reporting
The locker base is designed to report every locker and
parcel activity to the web application for logging purposes.
The parcel activity reporting takes advantage of the QR code,
usually attached on the outside of the parcel that contains the
Fig. 9: Rough layout of the scanning area of the locker base. The tracking number of the parcel. The value of the QR code is
position of the circle indicates the position of the camera. always assumed to be unique is used to identify parcels when
placed. Fig. 11 shows the processed image of a parcel having
To combat this issue, the general formula to calculate the its dimensions scanned – the value used to identify the parcel
focal length of a camera is used as a constant point of reference. internally is CJMY214001535545R. The script running on the
[11] locker base identifies the endpoint to report to depending on
𝑝ℎ the exclusion of a certain known format of the withdrawal QR
𝐹= (2) that is internally generated. Since the QR code obtained from
𝑙 Fig. 11 does not match for format, the locker base reaches for
the /parcel API endpoint.
𝐹 = focal length of the camera;
𝑝 = length of on an object to measure in terms of
pixels;
ℎ = distance from the camera to the object to measure;
𝑙 = actual length of the object to measure.
Through F being constant, simple algebra was used to
allow for a new algorithm to be used for the use case:
𝑝0 ℎ0 𝑙0
= (3)
𝑝1 ℎ1 𝑙1
𝑝0 = length of the fiducial in pixels; Fig. 11: Processed image of a parcel having its dimensions
𝑝1 = length of the parcel in pixels; scanned.
ℎ0 = distance between the camera and the scanning
platform; B. Locker Unit
ℎ1 = distance between the camera and the top of the The locker unit is a physical component that serves the
parcel; purpose of holding parcels. It receives commands to lock or
𝑙0 = actual length of the fiducial; unlock from the locker base through wireless MQTT
𝑙1 = actual length of the parcel. connection. This ensures that the connection will not be
Of all the 6 values involved in the formula, only 𝑙1 is not limited by hardware configurations (e.g., lack of sockets/ports,
initially known or obtained from processing the image taken, serial disruption) and can be scaled horizontally easily,
and thus can be obtained through calculation. enhancing the modularity of the system. The units are also not
tied down to a particular locker base, which allows the units
to be assigned to a different area as required, depending on the
demand in a specific area. The current implementation utilizes the locker base itself and the parcels. All activities taken by
a simple motor lock that cycles between two modes to impede the locker base and the parcels are separated by type in their
the door from being opened. The hardware involved includes respective tables, and can be optionally associated with each
a chassis, an ESP8266 microcontroller, a DC motor, a DC other. The web application abstracts the addition of the locker
motor bridge, a push button, and two 18650 battery cells and parcel activities depending on the endpoint called and
connected in series. They are physically connected as shown parameters supplied.
in Fig. 12.
The lifecycle of the parcel within the system is shown in
Fig. 13. This shows the registration, deposit, and withdrawal
processes, combining the functionalities of all three
components of the system.

IV. SYSTEM EVALUATION


A series of testing procedures were performed by the
author and four testers on the proposed system through both
white box (unit + integration) and black box testing (user
acceptance). The unit and integration testing procedures has
involved meticulous steps for each component to ensure they
are able to satisfy the objectives listed down in earlier sections.
Fig. 12: Pinout diagram of the locker unit. These testing, paired with user acceptance testing performed
with the help of representatives of both main user groups,
The series connection of 18650 cells allows the helped the author in identifying the following limitations in
simultaneous powering of the microcontroller and motor the current implementation of the system and highlight any
bridge. Software-wise, the ESP8266 microcontroller is future improvements if required.
flashed with ESPHome, which is essentially a wrapper around
C++ that is compiled from YAML configuration files. Despite A. Implementation
being unable to carry out customized functions in an orderly The dimension scanning method proposed using the
manner unlike C++ or MicroPython, the proposed system original algorithm is highly dependent on the accuracy of the
does not require intense calculations from the unit – it only height taken to return an accurate value of the dimensions.
needs to know to reply when queried, which is perfect for Tests have shown this to be wildly inconsistent due to
ESPHome. fluctuations in electric current. The current version of
implementation finds a median between 15 height
C. Web Application measurements to overcome the difference caused by
The web application serves as a mediator from the user fluctuations, with the speed of the dimension scanning
groups and locker bases to the database – the front-end allows sacrificed in the process (additional time used to scan height
the recipients to perform user-centric functions, e.g., register additional number of times). Any limitations that come with
account, login, logout, register parcel, view parcel status, using computer vision/camera as an input also applies – edge
withdraw parcel, etc. A web application was chosen over detection and object recognition performance depends on
native mobile applications out of consideration that web environmental factors such as lighting, height of the camera,
applications have low requirements and development issues. height of the parcel (if it blocks the fiducial), colour of the
The proposed system uses the Django web framework to packaging of the parcel (if it is close to the colour of the
manage the application, and makes good use of its object- platform, then edge detection may work poorly). A suggestion
relational mapper (ORM) to handle database transactions, to be used in future renditions is to affix the fiducial in the
with the other end powered by PostgreSQL. The web middle of the platform and the pixel values be measured
application also holds the API endpoints to be contacted by during start-up and stored in memory.
the locker base, to report the activities as observed by it upon

Fig. 13: Flowchart of the parcel lifecycle as dictated by the proposed system.
That way, the fiducial can be blocked during the REFERENCES
measuring process, eliminating a factor that may cause
inaccurate object recognition. Future renditions may need to
take extra care to enforce a method to physically secure the [1] H. Shinto, P.-D. Tuan and O. Yukihiko,
locker base and units together in a way that doesn’t affect the "Queueing Analysis of Home Delivery Services
modularity critically – too little physical security may lead to with Parcel Lockers," Ghent, 2019.
the locker unit itself be taken away with the parcel inside,
while too much may cause the changing of locations of [2] IMRG, "Valuing Home Delivery; A Cost -
singular units to be difficult, decreasing the modularity. Benefit Analysis," 2006. [Online]. Available:
www.imrg.org. [Accessed 7 4 2020].
In trying to reduce interactions between the users and the
locker base, there are no feedback systems being implemented [3] J. W. Weltevreden, "B2c e‐commerce logistics:
– this may cause the user experience to take a hit because the rise of collection‐and‐delivery points in The
failures are processed silently and are not presented to the user Netherlands," International Journal of Retail &
to suggest other actions that can be taken. Distribution Management, vol. 36, no. 8, pp. 638-
660, 2008.
B. Concept
The limitations in the concept itself is critical to the [4] R. Mangiaracina, A. Perego, A. Seghezzi and A.
feasibility of the proposed system. One such criticality is that Tumino, "Innovative solutions to increase last-mile
the proposed system is designed to be independent from the delivery efficiency in B2C e-commerce: a literature
logistic companies that deliver said parcels, which inspired the review," International Journal of Physical
lack of need of interaction between the delivery employee and Distribution & Logistics Management, vol. 49, no.
the locker base – they do not need to learn to operate the locker 9, pp. 901-920, 2019.
base which they may or may not be unfamiliar with. The
[5] S. Iwan, K. Kijewska and J. Lemke, "Analysis of
registration of the parcel is also separate from the creation of
parcel lockers’ efficiency as the last mile delivery
the parcel itself, where the user registers the parcel into the
solution –the results of the research in Poland,"
system after the parcel is confirmed to being transported. This
Canary Islands, 2015.
characteristic may lead to unwanted use cases – the current
implementation, theoretically, will allow for any user to [6] Y. Zeng, Y. Tong and L. Chen, "Last-mile
register a parcel with a custom QR code attached, and the delivery made practical: an efficient route planning
value of the QR code set as the tracking number when framework with theoretical guarantees,"
registering the parcel into the system. This could lead to the Proceedings of the VLDB Endowment, vol. 13, no.
lockers being used to host unwanted or illegal transactions. 3, pp. 320-333, 2019.
Additionally, recalling the limitations in the
implementation, it is unthinkable for logistics companies to [7] O. Bates, A. Friday, J. Allen, T. Cherrett, F.
not own data about the dimensions of the parcel themselves. McLeod, T. Bektas, T. Nguyen, M. Piecyk, M.
Hence, it is reasonable to propose that collaborations or Piotrowska, S. Wise and N. Davies, "Transforming
support of major logistics companies should be a significant Last-mile Logistics: Opportunities for more
improvement to the concept in terms of financial and Sustainable Deliveries," Montreal, 2018.
performance – the information of the parcel can be submitted [8] M. Janjevic and M. Winkenbach,
by the logistics company into the system once the order is "Characterizing urban last-mile distribution
being made and the internal system detects that it is the strategies in mature and emerging e-commerce
proposed system that was set as the destination, thus markets," Transportation Research Part A: Policy
eliminating the need for users to register for an account or and Practice, vol. 133, no. 2020, pp. 164-196, 2020.
register the parcels themselves. The dimensions of the parcel
can also be directly associated with the information of the [9] Australia Postal Corporation, "Use a 24/7 Parcel
parcel itself, reducing the time needed to scan dimensions Locker," 2020. [Online]. Available:
even more, allowing for a streamlined operation where data is https://auspost.com.au/receiving/alternative-
exchanged behind the scenes. delivery-addresses/use-a-247-parcel-locker.
[Accessed 15 4 2020].
V. CONCLUSION
[10] Popbox Asia Services, "Popbox - Parcel Locker
In this paper, a modular parcel locker system is proposed Indonesia," 2020. [Online]. Available:
to allow for unmanned parcel deposit and withdrawal in a https://www.popbox.asia/. [Accessed 15 4 2020].
scalable and sustainable fashion through the use of IoT, with
an original take on the measurement of dimension of objects [11] A. Rosebrock, "Find distance from camera to
from a mono-directional setup being developed for the user object/marker using Python and OpenCV," 2015.
case. The proposed system provides a baseline for future [Online]. Available:
attempts to improve the last mile delivery process to work https://www.pyimagesearch.com/2015/01/19/find-
upon. distance-camera-objectmarker-using-python-
opencv/. [Accessed 21 3 2021].

View publication stats

You might also like