Overview
The traditional paper price tag in grocery stores is on the verge of becoming a relic of the past. This innovative switch to e-ink displays offers a multitude of benefits for both stores and customers. Firstly, it promotes sustainability by eliminating the need for constantly printing and discarding paper tags. Secondly, the system utilizes Xiao's USB for serial communication, allowing for quick and efficient updates to prices and other label information, eliminating time-consuming task of manually changing paper tags. Finally, e-ink displays offer superior readability compared to paper. Their clear and high-contrast text ensures that customers can easily see prices and other relevant information, even under bright store lighting.
Hardware Used
Software Used
- Arduino IDE
Application Discussion
The XIAO SAMD21, a tiny but mighty board from Seeed Studio, is the first in a line of powerful Arduino-compatible development boards. Despite its small size, it packs a punch with a low-power processor that excels at processing tasks. This makes it perfect for wearable devices and other projects where space is limited and battery life is important.
The XIAO SAMD21 is packed with features, offering 14 pins for connecting various components like sensors and lights. It also includes a built-in LED for debugging and a modern USB-C port for both power and uploading code. With its versatility and compact design, the XIAO SAMD21 is a great tool for creating all sorts of electronic projects.
The ePaper Breakout Board is an extension board, built with 24-pin FPC connector, designed for SeeedStudio XIAO series boards, for allowing you driving ePaper display seamlessly. It also comes with a 8-pin 2.54 header, letting you connect to any microcontroller like Arduino UNO or Rasbperry Pi. It is suitable for a wide range of ePaper displays, from small to large sizes. Supporting by different functional SeeedStudio XIAO boards and without any soldering, this extension board can be easily deployed in various scenarios.
This 2.13-inch e-paper display offers a high-quality, low-power option for various uses. It's clear, readable in sunlight, and uses minimal energy, making it ideal for e-readers, shelf labels, and more.
Hardware Setup
- Step 1: Prepare the material
- Step 2: Insert the XIAO into the XIAO Socket: Align the pins and gently insert your XIAO into the XIAO socket on the board.
- Step 3: Insert the eInk into the FPC Connector: Carefully slide your E-paper into the 24-pin FPC connector on the ePaper Breakout Board.
Software Setup
The recommended programming tool is the Arduino IDE, and you need to configure the Arduino environment for the XIAO and add the on-board package.
- Step 1: Launch the Arduino application.
- Step 2: Select your development board model and add it to the Arduino IDE.
- Step 3: Enter Bootloader Mode to avoid the port disappearing when the program fails
- Connect the Seeed Studio SAMD21 to your computer.
- Use tweezers or short lines to short the RST pins in the diagram twice.
- The orange LED lights flicker on and light up.
- Step 4: Go to Tools > Board Manager > then search for SEEEDUINO SAMD Boards then click install
- Step 5: Please click the Board selection dropdown menu, and then click on "Select other board and port..."
- Step 6: Select the communication port for your XIAO, then search and select "COM7 Serial Port(USB)" or whatever is it that appears on your side.
- Step 7: Go to File > Examples > Basics > Blink for the testing
- Step 8: Change all the LED_BUILTIN to 10
- Step 9: Connect the LED to GND and A10 D10 MOSI for checking
Function Overview
Before we get started developing a sketch, let's look at the available functions
- void EPD_HW_Init()—— Full screen refresh initialization.
- void EPD_HW_Init_180() ——Display rotation 180 degrees initialization.
- void EPD_WhiteScreen_ALL(const unsigned char *datas) —— Full screen refresh display function.
Input Parameters:
datas: The image data that needs to be refreshed.
- void EPD_WhiteScreen_White() —— Clear screen display.
- void EPD_WhiteScreen_Black() —— Display all black.
- void EPD_DeepSleep() —— Deep sleep function, enter the sleep mode and please do not delete it, otherwise it will reduce the lifespan of the screen.
- void EPD_Init_Part() —— Partial refresh display.
- void EPD_SetRAMValue_BaseMap(const unsigned char * datas) —— Partial refresh of background display.
Input Parameters:
datas: The image data that needs to be refreshed.
- void EPD_Dis_PartAll(const unsigned char *datas)—— Full screen partial refresh display.
- void EPD_Dis_Part(unsigned int x_start,unsigned int y_start,const unsigned char * datas,unsigned int PART_COLUMN,unsigned int PART_LINE) —— Partial refresh display.
Input Parameters:
- unsigned int x_start: The x value of the starting point.
- unsigned int y_start: The y value of the starting point
- const unsigned char * datas: Data that needs to be changed
- unsigned int PART_COLUMN: The length of the area to be changed
- unsigned int PART_LINE: The width of the area to be changed
- void EPD_HW_Init_Fast() —— Fast refresh display.
- void EPD_WhiteScreen_ALL_Fast(const unsigned char *datas) —— Fast refresh display function.
Input Parameters:
datas: The image data that needs to be refreshed.
- void EPD_HW_Init_Fast2() —— Fast refresh display function.
Use of the Image2lcd software
How to make a picture
Use the build-in software Paint in Windows to create a picture with the same resolution as the screen you are using, and save it as BMP or JPG file.
Note: Your picture resolution must be the same as the screen you are using, for this tutorial, 2.13-inch E-paper is 128 x 250 pixels, then you can not use the size of 250 x 128, it will cause the image2lcd output .h
file with an extra bytes which will lead to distortion of the image.
The colors of the picture should be consistent with the standard colors of the drawing board that come with Windows. The color of the 2.13-inch Monochrome ePaper in this tutorial should only be pure black and white.
Bitmap Conversion
-
Step 1: Open Image2lcd.7z, extract it and open the application.
-
Step 2: Open the picture, select the "Output file type" as the "C array (*.c)", select the "Scan mode" as the "Horizon Scan", the other parameters setting in a 2.13-inch Monochrome Epaper are the following: BitPixl: Monochrome, Max Width and Height: 128x250, Reverse Color, Display Mode: Normal. Take note to don't check the include head data box.
-
Step 3: Click "Save" to save the the lcd output array as a file of
.h.
Downloading and Setting up the Code
- Step 1: Download the demo code for the 2.13-inch E-paper - monocolor 122 x 250.
- Step 2: Take a example of using 2.13-inch E-paper - monocolor 122 x 250, once you have downloaded and extract the demo code, please navigate and open the "2.13-inch E-paper - monocolor 122 x 250" folder. Move the files to this folder. Then open the "example" folder, use Arduino to open the "example.ino" file:
- Step 3: Delete the demo.h file and replace it with the .h file you outputted from the image2lcd. Then include it in the code:
- Step 4: Please click the Board selection dropdown menu, and then click on "Select other board and port..."
- Step 5: Select the communication port for your XIAO, then search and select "COM7 Serial Port(USB)" or whatever is it that appears on your side.
- Step 6: Don't forget to include your outputted .h file from image2lcd in this following line of code:
- Step 7: Please click "upload" to flash the firmware on to XIAO
- Step 8: You should see the ePaper display refreshing the image as shown below:
Updating the Price
- Step 1: Go to Canva or to where you did your ePaper image design
- Step 2: Change it to your desired price
- Step 3: Repeat the instructions above and then you are good to go!
As you can see, the price changed from PHP 500 to PHP 1000.
Video Demonstration
Conclusion
Tired of endless paper price tags? This video explores a revolutionary idea: using e-ink displays in grocery stores! We'll show you how these low-power, easy-to-read screens can replace paper tags, saving money and reducing waste. Plus, we'll dive into the SEEEDUINO XIAO, a tiny powerhouse that allows for wireless price updates via USB. Join us as we explore the future of grocery store labeling and see how e-ink technology can create a smoother and more sustainable shopping experience!
References
https://wiki.seeedstudio.com/XIAO-eInk-Expansion-Board/
https://wiki.seeedstudio.com/Seeeduino-XIAO/
https://github.com/Allen-Kuang/e-ink_Demo