Difference between revisions of "S14: E-Ink Display for Shopping Tags"

From Embedded Systems Learning Academy
Jump to: navigation, search
m (Acknowledgement)
m (References Used)
Line 172: Line 172:
  
 
=== References Used ===
 
=== References Used ===
List any references used in project.
+
=== References Used ===
 +
# Preetpal Kang, Lecture notes of CMPE 244, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Feb-May 2014.
 +
# http://repaper.org/doc/extension_board.html
 +
# https://github.com/repaper/gratis/blob/master/Sketches/demo/demo.ino
 +
# https://learn.adafruit.com/repaper-eink-development-board?view=all
 +
# http://mbed.org/cookbook/Wireless-Debugging-with-Bluetooth-Bee
 +
# http://www.seeedstudio.com/wiki/Bluetooth_Bee
 +
# http://www.socialledge.com/sjsu/index.php?title=Main_Page
 +
# en.wikipedia.org/
  
 
=== Appendix ===
 
=== Appendix ===

Revision as of 06:07, 22 May 2014

Grading Criteria

  • How well is Software & Hardware Design described?
  • How well can this report be used to reproduce this project?
  • Code Quality
  • Overall Report Quality:
    • Software Block Diagrams
    • Hardware Block Diagrams
      Schematic Quality
    • Quality of technical challenges and solutions adopted.

Project Title

E-Ink Display for Shopping Stores

Abstract

This project aims to replace the stickers being placed to show prices and specials for shelf items in stores like Target, Walmart, etc with E-Ink displays. The E-ink panels retain their display even after being powered off making them a much better alternative to LCD's and other related display's due to the savings in cost because of their low power consumption. Using such automated displays reduces the error in pricing displays, reduces the need for manpower and provides a centralized place to manage inventory prices.

Objectives & Introduction

This project intends to have a user interface to manage the sale prices of items in the store inventory. The user should be able to add an item description, item price, sale percentage, time of sale start and sale end in the GUI, and the system should be able to automate the task of updating the display associated with the shelves to reflect the prices and description according to the sale timings. The project would use an E-ink panel, an extension board to interface between the E-ink panel and the SJOne board. Bluetooth bee on the bard side and bluetooth dongle on the PC side serve as communication channels.

Team Members & Responsibilities

  • Rishabh Sareen
    • Front-end and back-end for user interface
    • Driver for interfacing E-ink panel and SJOne Board
  • Harsh Lavingia
    • Wireless communication
    • Order parts and assemble system
    • Write report and prepare video

Schedule

Week# Date Task Actual
1 3/06 Order Parts and E-Ink Display Completed. Waiting for parts
2 3/13 Interface E-Ink Display with Packaged Sample Kit Received Parts, Working on sample code
3 3/20 Interface E-Ink Display with LPC1758 board Completed on 3/27
4 3/27 E-Ink display driver Completed on 4/03
5 4/03 Implement wireless communication between boards Completed on 4/10, not used in final demo
6 4/10 Bluetooth communication between PC and board Completed on 4/17
7 4/17 Set up windows app framework using Python Completed on 4/24
8 4/24 Add SQLite for back-end database inventory management Completed on 5/01
9 5/01 Received price information from Window App to board Completed on 5/10
10 5/08 Test hardware and software design, bug fixes Completed on 5/15
11 5/15 Wiki Report, Project Video Completed on 5/20

Parts List & Cost

Part Number Description Qty Unit Cost Total Cost Purchase Link
SJ One Board SJSU development board, LPC1758 1 $80.00 $80.00 SJSU SCE Store
SM027AS0T1-ND E-Ink display 1 $43.26 $43.26 Pervasive Displays
- Bluetooth Bee 1 $28.00 $28.00 dfrobot
- Bluetooth Dongle 1 $7.00 $7.00 Fry's Store
- Mini USB Cable for Power Supply 1 $8.00 $8.00 Fry's Store
- AA Battery Pack 1 $7.00 $7.00 Jameco
Project Total $173.26

Design & Implementation

The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here.

Hardware Interface

The hardware consists of one SJOne board connected to the extension board interfaced with the Eink panel and a bluetooth dongle connected to the PC. The PC sends data wirelessly to the SJOne board(connected to bluetooth bee) using a bluetooth dongle . The SJOne board receives data from the PC over Uart2 port based on the selection in the GUI. It then transmits this data to the Eink panel and the extension board which then displays the required content.

The extension board and the Eink panel communicate among themselves using SPI bus running at 4- 12 MHz. The detailed SPI specs can be seen from the file attached in the appendix section. The flow charts in the software section show the working of SPI format for the system.

Software Design

We have two main tasks, the terminal task and the eink panel task. The terminal task sets the bluetooth uart port as the standard input to receive data from the PC via bluetooth dongle. The eink panel task waits to receive the specified number of bytes that form the image string. After receiving those bytes, the einkpaneltask sends these bytes to the eink panel.

On the GUI side, we read the values from the fields of the row that the user selects. We use the python imaging libraries, ImageOps and ImageDraw to from the item description and price into a 1-bit grayscale image and send it over to the SJOne board using the bluetooth dongle. After the time of the sale has elapsed, we send the new image string again with the item description and after-sale price, which is reflected in the panel display after ending of the sale.

See screenshots below for more detail.

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

Testing & Technical Challenges

Three major chunks of the project were testing in phases :-

1. Board-to-board communication - Wireless bluetooth was used for communication between the boards. A program to send a sample string continuously at 5 second interval was loaded into the transmitter SJOne board and a program to receive data by polling continuously was loaded into the receiver board. We opened the terminal window on the receiver board and reset the transmitter board and see the sample string come up on the terminal window after the specified interval. This validated that our communication was working correctly.

2. GUI-to-board communication - We ran a sample python script which opened the serial port to the SJOne board and sent sample data string continuously to the receiver board programmed with the program from the previous step. The terminal output matched the data we were sending which validated that GUI to board serial communication worked fine.

3. Board-to-Eink panel communication - Sample text image string converted to a 1-bit grayscale image was sent from the SJOne board to the interfaced Eink panel and extension board. The panel displayed the provided image which verified that out driver was working correctly.

My Issue #1

The first major challenge was understanding the intricacies involved in the SPI bus driver for the E-ink panel. We were initially focusing our debugging efforts above the driver layer at least in our program logic or communication errors. The SPI for the charge on glass (COG driver) required SPI mode to be such that CPOH and CPOL values were different than the values programmed in our driver. This required modifying the driver. This issue could have been mitigated by a more through reading and understanding of the datasheet.

My Issue #2

The second major problem was understanding the image conversion principles to create an image supported by the Eink panel. The Eink panel only supported 1-bit grayscale images. We were initially trying to send over a standard JPG image converted to grayscale to test the panel. Ultimately, we converted text to 1-bit grayscale image string for testing and debugging purposes.

Conclusion

We were able to properly interface a Eink panel with our SJOne board over SPI and use it to display the selected item and price from the GUI. The system took the time of sale into account and updated the values on the display when the sale time ended. We also implemented error conditions for cases where the time difference was not enough to update the values or if the time of sale end was prior to sale start time.

We learnt a lot by means of this project including serial communication between the board and PC, wireless communication for communication between boards, user-interface design and more-over thinking from a system level perspective to integrate all the individual pieces together using FreeRTOS's capabilities.

Project Video

Youtube Video Link

Project Source Code

Send me your zipped source code and I will upload this to SourceForge and link it for you.

References

Acknowledgement

We would like to acknowledge our instructor Preet Kang for teaching this class and supporting, guiding and inspiring us with our coursework and project.

References Used

References Used

  1. Preetpal Kang, Lecture notes of CMPE 244, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Feb-May 2014.
  2. http://repaper.org/doc/extension_board.html
  3. https://github.com/repaper/gratis/blob/master/Sketches/demo/demo.ino
  4. https://learn.adafruit.com/repaper-eink-development-board?view=all
  5. http://mbed.org/cookbook/Wireless-Debugging-with-Bluetooth-Bee
  6. http://www.seeedstudio.com/wiki/Bluetooth_Bee
  7. http://www.socialledge.com/sjsu/index.php?title=Main_Page
  8. en.wikipedia.org/

Appendix