-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This wiki summarises the development of a Cloud-connected QR Code Scanning Kiosk suitable for use in Retail Customer Loyalty Programmes and other applications. An Arduino MKR WiFi 1010 microcontroller was paired with a SparkFun QR Code Reader module scans barcodes and QR codes and uploads the scanned data to AWS IoT Core.
Use cases and applications of the proposed QR Code Scanning Kiosk and potential variants include:
- Customer loyalty programmes
- Identity verification and access control
- Retail payment and promotion services
The purpose of this project was to build prototype versions of an electronic device designed for use by vendors in restaurants, cafés and the wider hospitality industry to connect customers' loyalty cards and/or mobile apps with the digital infrastructure of the vendor. Use cases may extend to include many types of retail stores in general.
Devices that scan barcodes, QR codes and/or NFC tags have been found during research activities. Some devices enable the user to use their smartphone to scan barcodes, QR codes or NFC tags. Mobile apps are available that add this functionality to the smartphone in a user-centric and vendor controlled way.
Rapid prototyping and incremental development with an Agile approach.
While Prototype V5 has not been fully implemented, some planning and preparation has already taken place.
Prototype V2 introduced a PCB Breakout Board (BOB) for modules to interface with and components to be soldered to. The LCD module was connected and tested via programmatically writing some very simple output to the display via the serial data link from the Arduino MKR WiFi 1010 microcontroller. However, a Graphical User Interface (GUI) is still undeveloped.
Primary objectives for Prototype V5 include:
- Produce a revised design iteration of the component adapter board (PCB V3) to include circuit design optimisation and repositioning of components and headers for more efficient use of available space on the PCB and future enclosure.
- Display custom status messages on the LCD display triggered by PIR motion sensor activation and QR code scanning.
Further stretch goals include:
- Design, implement and test an interactive touchscreen GUI for the LCD. This can be for the user to customise options for collecting their loyalty reward.
- Design and 3D print an enclosure to protect and house the assembled device.
- Larger PCB surface area.
- Larger battery storage surface area enables larger capacity LiPo battery.
- DC-IN 5.5mm Barrel connector
- DC-DC buck voltage regulator (up to 30V IN, regulated 5V @ <3A OUT)
- In-line self resetting power supply fuse on voltage regulator output (6V/3A)
- Remove redundant micro-USB power cable.
- Remove cabling for connecting RGB LED and PIR motion sensor as they now instead interface directly with SMD female pin headers.
- Add to PCB a DHT-12 Thermistor (Temperature and Humidity Sensor) for the purpose of proactively monitoring the internal environment of the enclosure.
- Add to PCB a 9-pin female header for interfacing an NFC read/write module.
"AWS IoT is a managed cloud platform that lets connected devices - cars, light bulbs, sensor grids, and more - easily and securely interact with cloud applications and other devices." - AWS
To implement RTC, NTP & MQTT messaging between the MCU and AWS IoT:
- Generate a Certificate Signing Request (CSR) on MCU using a configuration script.
- Upload the CSR to AWS IoT Core to generate a certificate.
- Save the certificate to disk and insert into the MCU configuration firmware.
- Save the AWS certificate to disk and insert into the MCU configuration firmware.
- For encryption certificates to work the device needs to keep accurate time and date. Code the firmware sketch to synchronise the DS3231 RTC with a reliable and accurate NTP server at boot time and again periodically to minimise drift effects and maintain high accuracy. The server chosen for this project was a Google public NTP server.
- The ArduinoBearSSL library is required to be configured in the device firmware.
- In AWS IoT Core a “Thing” representing the device is required to be configured and with the appropriate certificate and configured access policy attached.
- AWS DynamoDB is a highly scalable and robust NoSQL database. For Prototype V4 a database table was created in AWS DynamoDB and designed to accept the name/value data pairs uploaded by the device to AWS IoT Core. AWS IoT Core does not store messages historically and so DynamoDB takes on the role of enabling highly robust persistent message storage in the AWS Cloud.
**Connectivity with Cloud Services including:
- Microsoft Azure
- Google Cloud
- AWS Cloud
- Arduino Cloud**
N/A
**Potential options for improvement:
- Upgrade Touchscreen
- Add NFC Tag Scanning Module
- Improve Battery Heat Dissipation
- Additional Connectivity Options
- Single Board PCB
- Suitable Enclosure**
Before starting, read the original Project Report to access more complete documentation than this Wiki otherwise provides.
Functional testing of messaging between the device and AWS IoT Core was mostly successful. However, it was discovered that when two successive message events occur very close together occasionally the latter message would arrive at the server before the earlier message. This advocates a resolution by time stamping messages at the device rather than after they are received at the server so as to enable correct time sorted ordering of messages when they are to be inserted into a database table.
The purpose of this project was to build prototype versions of an electronic device designed for use by vendors in the restaurants, cafés and hospitality industry to connect customers’ loyalty cards and/or mobile apps with the digital infrastructure of the vendor. Use cases may extend to include many types of retail stores.
The focus of this project has been on developing device hardware and firmware while leaving the development of software applications outside of the project scope. The exceptions to this were the configuration of Cloud server infrastructure and security features to enable the device to exchange message traffic with an AWS IoT Core secure server. This successfully completes the work in developing multiple proof-of-concept prototype devices that demonstrate the potential of investing in building solutions with these kinds of technologies.
https://www.sparkfun.com/products/18088
https://learn.sparkfun.com/tutorials/2d-barcode-scanner-breakout-hookup-guide/all
https://github.com/sparkfun/2D_Barcode_Scanner_Breakout
All photographs, diagrams and screenshots are by the author unless otherwise indicated.
This project was originally completed by Stephen Julian in November 2021 as the capstone project of his Bachelor of Engineering Technology (Electrical) degree. This GitHub repository delivers on the intention to publish the project work under the MIT Licence. While this wiki provides a project summary, the complete original documentation is available in Adobe PDF format below:
Julian, Stephen (Nov 2021). QR Code Scanning Kiosk - MG7101 Project Slideshow. (Google Slides, 25 pages, 1 video)
Julian, Stephen (Nov 2021). QR Code Scanning Kiosk - MG7101 Project Presentation. (~10MB PDF, 25 pages)
Julian, Stephen (Nov 2021). QR Code Scanning Kiosk - MG7101 Project Final Report. (~110MB PDF, 118 pages)
Julian, Stephen (Nov 2021). QR Code Scanning Kiosk - MG7101 Project Poster. (~8MB PDF, 1 page)
Arduino Files. Retrieved from https://github.com/bizkiwi/qr-code-scanning-kiosk/tree/main/arduino-files
BOM Files. Retrieved from https://github.com/bizkiwi/qr-code-scanning-kiosk/tree/main/bom-files
Gerber Files. Retrieved from https://github.com/bizkiwi/qr-code-scanning-kiosk/tree/main/gerber-files
Schematic Files. Retrieved from https://github.com/bizkiwi/qr-code-scanning-kiosk/tree/main/schematic-files
Pick and Place Files. Retrieved from https://github.com/bizkiwi/qr-code-scanning-kiosk/tree/main/pickandplace-files