Intelligent Shopping Trolley (IST) - a social distancing device during pandemic shopping

Intelligent Shopping Trolley (IST) is a device that was built to help in fighting the Covid-19 pandemic. This Intelligent Shopping Trolley is equipped with a RFID and timer system, Indoor Positioning System (IPS) and Microwave Sensor Detection system to determine the distance and to alert customers as they shop in a supermarket. This Intelligent Shopping Trolley will also utilise the Internet of Things (IoT) to manage its functionality. The Intelligent Shopping Trolley will help customers to determine the distance between other customers while implementing social distancing measures that is recommended by the Ministry of Health Malaysia and manage their shopping time as well. Besides that, it helps supermarkets to track their customers after the time limit given to the customers ends. This paper explains the details on this Intelligent Shopping Trolley project. This project helps in making the community aware of the importance of social distancing.


Introduction
More vaccinations, procedures, and pharmaceutical therapies have been produced in the last century to cure more plagues, save more lives, and heal more blights than ever before. This is significant because excellent health is the foundation of human happiness and well-being [1]. It also contributes significantly to global growth. Humans and their healthcare services, however, were pushed to the limit at the start of the new decade with the appearance of a highly infectious novel virus originated from Wuhan, China in December 2019 [2]. It then started to spread worldwide in the early months of 2020, at which point it was declared a "pandemic". The pandemic COVID-19 has wreaked havoc on the world's political, social, economic, religious and financial systems [3].
Many countries now enforce a state of lockdown or a controlled movement order on their residents to prevent the disease from spreading. As there has been no definitive treatment, reported for this disease, the only way to control the spread is to break the chain of infection [4]. To control the spread of this disease, Malaysia has imposed the Movement Control Order (MCO) on its residents, allowing only critical services to continue to operate. Many businesses were impacted, but many more adapted to the new standard by innovating. Strict standard operating procedures (SOP) were also enforced throughout the country.
Places like shopping malls had undergone regulations and basic preventive measures where only a handful of people may enter at any given time for a fixed amount of time. Preparation of hand sanitizers and recording of body temperature was also included. To break the chain of transmission of the pandemic new coronavirus, social distancing has proven to be essential [5]. With all preventative measures above, there is still a lack of effective devices to really ensure that the public practices social distancing. Thus, a smart system such as the Intelligent Shopping Trolley is proposed in this paper. This project could be implemented in society to encourage the public to adhere to the rules and regulations. With multiple safety features and sensors equipped on the trolley, many benefits can be brought alike to the people and shopping malls in charge.
The Intelligent Shopping Trolley is a combination of three systems which is RFID and Timer System, Microwave Detection System, and Indoor Positioning System. The microwave sensors detect human presence with by a doppler radar technology. RFID and timer system acts as a master system to activate the timer countdown while Wi-Fi based Indoor Positioning System is used to locate the position of the trolley with high accuracy indoors. This allows staff members to monitor the product in real-time.
The main objective of this device is to determine a safer way to do grocery shopping during the Covid-19 pandemic while adhering to social distancing measures. Lastly, the IST is hoped to promote awareness on pandemic shopping and help people to avoid overcrowding in malls by managing their time on buying groceries.

Methodology
This project utilises an Arduino UNO microcontroller to run the application system. The key attributes of this project consist of a Wi-Fi based Indoor Positioning System (IPS) to determine customer location, Radio Frequency Identification (RFID) for timer activation and microwave sensor to enforce socialdistancing.

The Wi-Fi-Base Indoor Positioning System
The project utilises an open-source Indoor positioning system to replace the Global Positioning System as it is more reliable and accurate indoors [6]. Using an ESP32-CAM WIFI Bluetooth OV2640 Camera Module, an indoor positioning system will be able to detect the position of the trolley in supermarkets [7]. A FTDI USB to TTL Serial Adapter Module and FT232R USB to Serial/TTL Converter Module was used to program the ESP 32 microcontroller [8]. The positioning system relies on the number of Wi-Fi points that are available in the location. Figure 1 portrays a sample of Wi-Fi signal strength gathered. The strength of Wi-Fi signals measured in dBm will display as negative numbers. The dBm scale ranges from -30 to -90 and '0' in this case means no signal is perceived.

Figure 1. Sample of Data Gathering
After the signal data is gathered, a converter code will be generated, and it then converts a Wi-Fi scan result into a feature vector for classification [10]. Python programming language will be used to convert the data into a C++ class which will be used in Arduino for processing [7]. The feature vector will need to be classified into one of the recorded locations. The 'Decision tree' classifier code was updated into the Python code. The code will be able to run scans and informs the user on the location that the trolley is in. For example, when a user receives the Wi-Fi signal of 'Area A' from the range -30 to -90, the ESP32 module will transmit the location 'Area A' to user. When the user fully exits 'Area A', the signal received is represented with '0' and the module now receives new Wi-Fi signal from another Wi-Fi point.

The RFID and Timer System
In this project, a MF RC522 RFID Kit was used to start the entire system. A power-bank powers an Arduino Uno microcontroller which operates the other features of the trolley. The system starts when a passive RFID card is scanned on the RFID card reader. This then starts a timer which has been preprogrammed with a fix amount of time for each customer. The RFID and timer system implements an Arduino coding and is co-dependent. Figure 2 portrays the connections between the RFID, timer, and buzzer with a schematic diagram. The RCLW-0516 microwave sensor generates an electro-magnetic radiation to detect human motion with a 360-degree sensing field [11]. PIR sensors relies on temperature difference to detect human motion [12] while Ultrasonic sensors determine the distance of a target object by emitting ultrasonic sound waves. An experiment was set up to compare the performance of two sets of sensors. The RCLW-0516 Microwave doppler radar motion sensor is a set on its own while HC-SR04 Ultrasonic Sensor and HC-SR501 PIR motion sensor is another set of sensors which were used together. The sensors were compared in a few aspects such as motion detection range and motion detection ability. The results of the experiment were recorded. The process was repeated with the PIR sensor, and the Ultrasonic sensor and data was recorded. The collected data was converted into bode plot to compare the two sets of sensors. Figure 3 shows the connection of the RWLC-0516 microwave sensor with Arduino Uno for the experiment.

Result
The section of the paper will provide an insight into the workings of the WIFI-base indoor positioning system and its data gathering capabilities, RFID and timer, and performance of microwave sensor detection against PIR and ultrasonic sensor.

The Wi-Fi base Indoor Positioning System
The project incorporates an ESP32-CAM WIFI Bluetooth OV2640 Camera Module to develop an Indoor Positioning System that detects trolley's position in supermarket. A FTDI USB to TTL Serial Adapter Module and FT232R USB to Serial/TTL Converter Module was used to program the ESP 32 microcontroller. As the number of Wi-Fi points increased, the accuracy of the location relayed by ESP32 receiver increases [9]. These are based on the RSSI (Received Signal Strength Indication) of the Wi-Fi networks. Figure 4 portrays the ESP32-CAM scanning visible networks at a regular interval and prints the Wi-Fi networks' RSSI encoded in JSON format. This project utilises three Wi-Fi points.  From the signal data gathered, a converter code was generated, and it then converts a Wi-Fi scan result into a feature vector for classification. Python programming language was used to convert data into a C++ class which was used in Arduino for processing. The feature vector was classified into one of the three recorded locations. A 'Decision tree's classifier code was updated into the Python code. The code will be able to run scans and informs the user on the location of trolley. Figure 5 depicts the results of testing the IPS system, location database acquired based on the Wi-Fi signal area on the website with the IP address of ESP 32.

The RFID and Timer
The MF RC522 RFID Kit is connected to an Arduino Uno through an external casing and then linked with TM1637 LCD display and buzzer together. The power-bank powers an Arduino Uno microcontroller which operates the other features of the trolley. The system starts when a passive RFID card is scanned on the RFID card reader. This starts a timer which has been pre-programmed with a fix amount of time for each customer and the TM1637 LCD displays the pre-programmed time. Figure 6 portrays the IST with a timer and RFID system together.

Performance of Microwave sensor detection against PIR and ultrasonic sensor
Two sets of sensors were compared in this experiment. The Microwave doppler radar motion sensor is a set on its own while HC-SR04 Ultrasonic Sensor and HC-SR501 PIR motion sensor is another set of sensors which are used together. The sensors are compared in a few aspects such as motion detection range ( Figure 7) and motion detection ability. While comparing the motion detection ability of the two sets of sensors, it was found that the ultrasonic sensor combined with PIR motion sensor detects any kind of motion. The PIR motion sensor has falsely detected inanimate objects. This was caused by the moving trolley. From the graph above, the Microwave sensor and the PIR sensor was tested with 50 Ohm, 100 Ohm and 220 Ohm resistor values respectively. Each of these tests were repeated a few times to properly measure out the motion detection range of the sensors at different resistance values. The Microwave sensor was able to detect human motion within a range of 1-3 meters, 3-5 meters and 5-7 meters for 50, 100 and 220 Ohms respectively. The PIR sensor was able to detect motion within 0.5-2 meters, 2.5-4 meters and 4.5-6 meters for 50, 100 and 220 Ohms respectively. The PIR sensor had greater accuracy, smaller standard deviation and can detect motion more closely compared to the Microwave sensor. However, the PIR sensor was not able to differentiate between inanimate objects and human motion. Thus, the Microwave doppler radar motion sensor was selected for this project.

Discussion
The Covid-19 pandemic has changed the shopping practices in Malaysia as the government has implement strict SOP's and regulations to curb the spread of the virus. However, there are still members of society who lack the awareness and knowledge to properly protect themselves and their loved ones. In these arduous times, people will need to manage their time wisely during grocery shopping as they should not spend too much time in crowded areas. Thus, the Intelligent Shopping Trolley (IST) has been built with these concerns in mind to reduce the risk when shopping during pandemic. This project incorporates three systems which are the RFID system with timer, Microwave sensor detection system and Indoor Positioning System (IPS).
For this project, two Arduino UNOs are used to interface with all hardware. A power-bank was required as a power supply to these devices. Next, an RFID kit was added, and it conducts itself as the master system of the IST. A passive RFID card is needed for scanning by the kit for overall system activation. A microwave sensor was also implemented for human detection purposes. The IPS of this project had utilized a few components. These are the ESP32 module and FTDI Adapter (FT232R USB) which were linked together with Arduino UNO.
The development of IST comes with unique challenges. There are difficulties faced in hardware development and all possibilities must be considered in the project design and hardware installation stage. The RFID reader had an issue where it was found that the passive card should be attached closer to the reader as it is unable to detect the card if it is more than 4.5cm away. Some challenges were also encountered in the development of IPS where if the connection of Wi-Fi is poor, ESP32 is likely to give an inaccurate position. The sensor and devices would also need to be protected as there are risk of exposure to water that might damage the electronics.
With these existing problems, proper solutions need to be taken to ensure optimal performance and functionality of the IST. RFID tag card needs to be attached closer to the card reader and the movement must be thorough to ensure the readability of the tag card [13]. For the microwave sensor [14], a casing is essential, and it must be wrapped with aluminium foil at its rear end to reduce the detection angle. This ensures the trolley user is exempted from detection. To reduce the distance of detection, the original resistor on the microwave sensor was removed and replaced with lower resistance resistors. Indoor Positioning System (IPS) also requires a strong Wi-Fi connection to generate features and allow accurate location detection. Finally, casing construction for the electronics using waterproof material such as acrylic sheets and silicon was made to prevent exposure to water.

Conclusion
The Intelligent Shopping Trolley (IST) is capable in curbing the spread of the virus by implementing social distancing measures in supermarkets to promote awareness on pandemic during shopping. The IST helps people to manage their time on buying groceries based on the recommendations of the Ministry of Health Malaysia. The equipment used in the Intelligent Shopping Trolley are reliable, user friendly and financially sustainable. This was based on the House of Quality conceptual map that has been carried out. For better innovations in the future, few improvements can be made with the current study such as implementing a real-time coordinate-based indoor position monitoring of the Intelligent Shopping Trolley. This will allow shopping mall staff members to monitor the situation in an organised manner. Next, the IST can also be improved by incorporating in a radar sensor. Sensitivity of the radar sensor can be adjusted to aid the detection of human presence in the vicinity of the trolley. This will further sustain social distancing measures in shopping complexes. Cameras could also be added to enhance its effectiveness. This will increase the reliability to measure distance to implement social distancing rules between individuals in front of trolley. Lastly, the Intelligent Shopping Trolley can be improved by developing a master system capable of monitoring all the trolleys in the shopping complex at a single location. This could ease the workload of staff and security personnel of the shopping complex to track and detect customer who are not abiding by the rules. However, the suggested improvements must be accompanied with further research, studies and experimentations. Multiple surveys must also be conducted to select the best electronics and components to achieve a balance in cost and performance. Thus, the IST is a device that is certain to ensure public safety and innovate the future of shopping environments.