• Abstract
  • Executive Summary
  • Table of Contents
  • List of Figures and Tables
  • Introduction
  • 2.0 Mechanical Description
  • Acknowledgements




    Download 3,42 Mb.
    bet1/9
    Sana02.01.2020
    Hajmi3,42 Mb.
    #8209
      1   2   3   4   5   6   7   8   9

    WI-FI THERMAL PRINTER

    BY: Scott Clandinin

    ELECTRONIC SYSTEMS ENGINEERING TECHNOLOGY

    SASKATCHEWAN POLYTECHNIC MAY 2016

    Acknowledgements


    Firstly, I would like to thank the project managers Anthony Voykin, Larry Cruse, and Michael Lastante for their help and advice on the project through the design process. After completing this project, I have a greater understanding of why they continually reminded the class to “keep it simple” when choosing our projects.

    I’d also like to express my appreciation for the help of Jerome Wagner for his great help in troubleshooting issues with my printed circuit board. Finally, I’d like to thank my other instructors at Saskatchewan Polytechnic for their direct or indirect impact on the process.


    Abstract


    There is a growing trend towards integrating devices with wireless internet to allow information to be easily and instantly be sent and received. This project attempts the receiving of data through communication with the internet by Wi-Fi to retrieve data and print the data out on a receipt printer. At the touch of a button a user can have the current weather conditions in Saskatoon and the word-of-the day printed off for them. As Wi-Fi technology and accessibility increases, the use of it will massively expand in the field of electronics.

    Executive Summary


    Transmitting and receiving information over long distances is nothing new in today’s world, and it is often crucial for one to be able to instantly send and receive data. However, communication to remote areas can be expensive, and sometimes not economically feasible. At times, it is even necessary for a person to physically travel to remote locations just to retrieve data of interest. Not only is this necessary for businesses, but the average consumer is also interested in instant communication.

    This project investigates the benefits of using Wi-Fi to instantly retrieve information from an online source. The Wi-Fi Thermal Printer allows a person to get the current weather conditions and the word-of-the day at the touch of a button. This is ideal for consumers as it allows them to easily and quickly get the information they want without having to search and sort through unimportant details. It will be beneficial to embrace the use of Wi-Fi in business and everyday life, as it will only become more prominent in how we communicate with the world around us.


    Table of Contents



    Acknowledgements 1

    Abstract 2

    Executive Summary 3

    Table of Contents 5

    List of Figures and Tables 8

    1.0Introduction 9

    2.0 Mechanical Description 10

    2.1 Paper Feeder 12

    2.1.1 Roller 12

    2.1.2 Gear 12

    2.2 Opening Mechanism 13

    2.2.1 Latch 13

    2.2.2 Rod 13

    2.2.3 Flip Opener 14

    3.0 Process Description 14

    3.1 Background 14

    3.2 API Configuration 15

    3.2.1 Weather API 15

    3.2.2 Word-of-the-Day API 16

    3.3 HTTP Communication 17

    3.4 Data Parsing 18

    3.4.1 JavaScript Object Notation 18

    3.4.2 Parsing JSON 19

    4.0 Instructions for Operation 21

    4.1 Parts Included 21

    4.2 Getting Started 22

    4.2.1 Installing the Paper 22

    4.2.2 Powering the Weather Station 23

    4.3 Operation 23

    4.3.1 Testing Paper Feed 23

    4.3.2 Printing Current Weather Data 24

    4.4 Troubleshooting 24

    5.0 Theory of Operation 26

    5.1 Wireless Internet 26

    5.2 Application Program Interface (API) 27

    5.2.1 World Weather Online 28

    5.2.2 Open Weather Map 29

    5.3 HTTP Requests 30

    5.4 Receipt Printer Commands 31

    6.0 Component Selection 32

    6.1 Microcontroller 32

    6.2 Wi-Fi Module 33

    6.3 Thermal Receipt Printer 35

    6.4 Power Supply 36

    6.4 3.3V Voltage Regulator 37

    6.5 LCD 37

    6.6 Momentary Push Button 38

    6.7 Notification LED 39

    6.8 Power Switch 39

    6.9 Case 39

    7.0 Conclusion 41

    8.0 Recommendations 43

    References 45

    Glossary of Abbreviations 47

    Appendices 48

    A. Block Diagram 48

    B. Circuit Schematic 49

    C. Printed Circuit Board – Top and Bottom 50

    D. Bill of Materials 51

    E. Gantt Chart 52

    F. Software 53

    F.1 Main Code 53

    F.2 Port Initialization 57

    F.3 Defines 58

    F.4 Function Prototypes 60

    F.5 Wi-Fi 61

    F.6 LCD 67

    F.7 Thermal Printer 69

    F.8 Weather Parsing 71

    F.9 Delay Functions 73

    F.10 USART 2 Enable 74

    List of Figures and Tables




    Figure 1 - Printer Dimensions 12

    Figure 2 - JSON Format Example 20

    Figure 3 - Weather Station Top View 22

    Figure 4 - Correct Paper Orientation 22

    Figure 5 - BT-2727 Enclosure 40

    Figure 6 - Block Diagram 48

    Figure 7 - Circuit Diagram 49

    1. Introduction


    This report outlines the features and design process of my technical thesis project, the Wi-Fi Thermal Printer. This project is a program requirement of the second year of Electronic Systems Engineering Technology at Saskatchewan Polytechnic. The goal of this project was to combine the use of wireless internet and a thermal receipt printer to allow a user to retrieve specific information from an online source at the push of a button. The success of the project was mainly based on how the specification requirements set by the project managers were met.

    This project is required to find current weather information for Saskatoon through wireless internet, and print off the results onto receipt paper. The device is also required to indicate when the printer is out of paper. In addition to this, the device will also print off the “word of the day” including a description of the word. This report will detail descriptions of what the device is and how it works, as well as describe part the design process and the decisions that lead to the final product. Finally, I will conclude with how the project turned out and the challenges that were faced, and recommend potential improvements.


    2.0 Mechanical Description


    This section is a mechanical description of the thermal receipt printer I am using for my technical thesis design. The printer is the only part of the project with any mechanical motion besides the button and power switch. I’m using the CSN-A2 printer to display current weather data to the user. It is a small rectangular unit with a width of 111mm, a length of 65mm, and a height of 57mm. The top of the printer has a façade that extends 7mm above the main rectangle body, and 4mm out over the sides in each direction. The outer shell of the unit is mainly smooth, black plastic.

    The main moving part of the printer that the user interacts with is the lid, with a surface area of 65mm by 54mm. This can be opened to change the paper roll. There is a small slit under the front of the lid where the paper is fed through. At the edge of the lid is the paper feeder, consisting of a free spinning roller with a gear at the end. Below that, and on the side of the lid is the opening mechanism. The mechanism consists of a latch and a small oval connected on either side of a rod attached to the roof of the lid.



    Figure 1 from the CSN-A2 User Manual details the dimensions and appearance of the printer. From top-to-bottom, and left-to-right, the figure shows the 3-dimensional view, top view, side view, bottom view, and main body dimensions. All values are in millimetres.




    Figure 1 - Printer Dimensions




    Download 3,42 Mb.
      1   2   3   4   5   6   7   8   9




    Download 3,42 Mb.