1. Project Summary:

QR Codes are everywhere now, it appears on business cards, commodity packaging, electronic label, mobile payments, and so on.

The goal of this project is developing an electronic label wireless transmission system by using the QR code. It use Python and Pyside to generate GUI frame, which responsible for encoding text strings into QR code, and sending the QR code image to cloud server, such as Amazon. A Python script application running on the cloud server, monitoring net port, once it receive QR code image, it will distribute the QR code image to EFM32GG11+WGM110. Running Micrium OS in EFM32GG11, control WGM110 via EXP interface, it will display the QR code image once receive it, also the decoded QR code text string will be displayed.


2. Project Description:

The figure below shows the target overview of the project.

The GUI tool on the PC generates QR code image and sends the image to cloud server, the remote server receives and distribute QR code image, EFM32GG11 running Micrium OS can decode the QR code and show the content on the LCD. Also the EFM32GG11 can encode information string to QR code, and transfer the QR code image to cloud server, GUI will fetch the image from cloud server and decode the QR code.

2.1 QR Code Introduction:

QR code (Quick Response Code) is the trademark for a type of matrix barcode (or two-dimensional barcode) first designed for the automotive industry in Japan. It uses four standardized encoding modes (numeric, alphanumeric, byte/binary, and kanji) to efficiently store data; extensions may also be used.
The symbol versions of QR Code range from Version 1 to Version 40. Each version has a different module configuration or number of modules. (The module refers to the black and white dots that make up QR Code.)
"Module configuration" refers to the number of modules contained in a symbol, commencing with Version 1 (21 × 21 modules) up to Version 40 (177 × 177 modules). Each higher version number comprises 4 additional modules per side. 

The resolution of the build-in LCD-TFT in the EFM32GG11 STK board is 128*128, and considering the pixel size is very small in the LCD, so will use each 4 pixels as 1 bit QR code to enhance the identification probability, and adopt Version 3 as the QR Code version for the project. The amount of data that can be stored in the QR code symbol be figured out below. For example, the version 3 (29*29) QR code can store total 77 alphanumeric character with L level ECC.


2.2 QR Code Generator/Decoder GUI

The GUI tool below which be developed with Python and Pyside, PyQRCode module be used for QR code encoder, and qrtools module be used for decoder.

The tool can finish the encoding to convert URL/text into a QR Code image, and connect to remote cloud server for sending QR code image, also it has the ability to decode the QR code image fetched from the remote server.

Below is the screenshot of the GUI tool. After inputting the text in the edit box and encoding it to QR code image, press "Upload" button will send the encoded QR code image to remote server.

Also after receiving the QR code image from remote server, push "Decode" button will decode the image and show the decoded string.


2.3 QR Code decode in MCU

We use the EFM32GG11 STK and WGM110 Wi-Fi Expansion Kit for receiving QR code image, decoding QR code image, displaying QR code image and decoded text string.

Some of the 3rd libraries are available on git for QR code image decoding, such as quirc (licensed under ISC) and qsantos (licensed under the GPL V3.0). What the library be used in the project is qsantos.

Please refer to the figure below for the detailed flow chart of the QR code receiving and decoding on MCU.


3. Demonstration

The figures below demonstrate the project. The on board LED will blink during the QR code image receiving, after receiving done, it will display the QR code image immediately, and push Button 0/1 can switch the display mode.

4. What we done in the project.

The block diagram be illustrated in the section of "Project Description" is the finial target of the project, however, for the first step, we implemented the project followed the diagram below.
The GUI tool is able to generate a QR code from a string, decode a QR code PNG file and show the content on PC. The EFM32GG11 STK and WIFI module act as an access port which can be connected by PC GUI tool. After creating the connection between PC GUI tool and EFM32GG11/WIFI module, GUI tool can send the encoded QR code image to the EFM32GG11, after receiving the QR code image, EFM32GG11 will decode the QR code and show the text string on the LCD screen.


5. Lessons learned

  • QR code encoding/decoding in Python.
  • GUI Design with Python and Pyside.
  • Python Network communication.
  • Wi-Fi module transmission.
  • Micrium OS + Network.


6. Next Steps

The next steps for this project is involving the remote server into the project for QR code image distribution, and the electronic label wireless transmission system will become more flexibility.


7. Source code

The source code of the GUI tool and firmware be attached for reference.

  • Projects