<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "https://jats.nlm.nih.gov/publishing/1.3/JATS-journalpublishing1-3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.3" xml:lang="en" article-type="research-article"><front><journal-meta><journal-id journal-id-type="publisher-id">jcse</journal-id><journal-title-group><journal-title>Journal of Computational Science and Engineering</journal-title></journal-title-group><issn>1710-4068</issn><publisher><publisher-name>Advancersin</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="publisher-id">jcse-v57-a05</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group></article-categories><title-group><article-title>Hardware design of packing machine system based on AT89C51 SCM</article-title></title-group><contrib-group><contrib contrib-type="author"><name name-style="western"><surname>Yuan</surname><given-names>Qinghui</given-names></name><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author"><name name-style="western"><surname>Shan</surname><given-names>Lianmeng</given-names></name><xref ref-type="aff" rid="aff-2"/></contrib><contrib contrib-type="author"><name name-style="western"><surname>Gu</surname><given-names>Baoquan</given-names></name><xref ref-type="aff" rid="aff-1"/></contrib></contrib-group><aff id="aff-1">Binzhou Polytechnic, Binzhou, Shandong Province 256603,China</aff><aff id="aff-2">Shandong Mingquan New Material Technology Co. LTD, Jinan, Shandong Province, China</aff><pub-date publication-format="electronic" date-type="pub" iso-8601-date="2022-08-30"><day>30</day><month>08</month><year>2022</year></pub-date><volume>57</volume><fpage>22</fpage><lpage>26</lpage><permissions><copyright-statement>2022@ The American Computational Science Society.</copyright-statement><license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/"><ali:license_ref xmlns:ali="http://www.niso.org/schemas/ali/1.0/">https://creativecommons.org/licenses/by/4.0/</ali:license_ref><license-p>This article is licensed under the Creative Commons Attribution 4.0 International license (CC BY 4.0), which permits sharing and adaptation, including commercial reuse, subject to attribution, a link to the license and an indication of changes. Third-party material separately credited with different terms is governed by the license or rights notice stated for that material.</license-p></license></permissions><self-uri content-type="fulltext" xlink:href="https://www.advancersin.org/jcse/articles/jcse-v57-a05/index.html"/><self-uri content-type="pdf" xlink:href="https://www.advancersin.org/jcse/articles/jcse-v57-a05/jcse-v57-a05.pdf"/><abstract><p>In this paper, a packing machine system is designed, which uses AT89C51 as the data processing master chip, serial shift register 74HC164, seven-segment LED digital tube as the display module, ISD2560 voice chip and power amplifier CHIP LM386 to form the voice broadcast module. Additional 4 x 4 matrix keyboard and other auxiliary circuits together constitute.</p></abstract><kwd-group><kwd>SCM</kwd><kwd>Packing machine</kwd><kwd>Voice chip</kwd></kwd-group></article-meta></front><body>
    <sec>
      <title>1.Introduction</title>
      <p>With the progress of society and the development of industry, automated production line is more and more widely used in various manufacturers. The emergence of packing machine to better adapt to the development of society, not only make products contain higher technology content, but also improve the production efficiency of products. The so-called packing machine, refers to a certain specification and quantity of finished products through the product conveyor belt into the packaging box, and sent away through the box conveyor belt, through the use of such a device, can greatly improve the production efficiency of enterprises, reduce the labor cost of enterprises.</p>
    </sec>
    <sec>
      <title>2. Introduction to packing machine system</title>
      <sec>
        <title>2.1. The concept of a packing machine</title>
        <p>Packing machine is a kind of equipment that can semi-automatically or automatically load unpacked products or small packed products into transport packaging. Its working principle is to load the products into boxes (corrugated boxes, plastic boxes, trays) in a certain arrangement and quantity, and close or seal the opening part of the box.</p>
        <p>According to the requirements of the packing machine, it should have the function of carton forming (or opening the carton), measuring and packing, and some are also equipped with sealing or strapping function.</p>
      </sec>
      <sec>
        <title>2.2. The form and basic requirements of the packing machine</title>
        <p>The main form of packing machine is horizontal, vertical falling, clamping, wrapping and tray forming automatic and semi-automatic packing machine, transmission and control to mechanical, pneumatic, photoelectric integration based. At present, domestic packing machine can operate small boxes (such as food and drug boxes), glass bottles, plastic bottles, plastic buckets, metal cans, flexible packaging bags and other forms of packaging, its basic requirements are able to achieve the process of picking up box plate → box forming → bottom folding → box transmission → product collection and packing.</p>
      </sec>
    </sec>
    <sec>
      <title>3. The design of packing machine system</title>
      <p>The design of the packing machine system is based on single-chip microcomputer. Firstly, the hardware circuit diagram was designed in Protues hardware simulation software environment, and then the system software was programmed in Keil software environment, and the source program was compiled and debugged, and the HEX file was generated. This HEX file is the source code for the hardware circuit implementation. Load the generated HEX file into the AT89C51 microcontroller chip, and then run the hardware circuit in the software environment, then the packing machine system can run normally. The packing machine system designed in this paper is mainly composed of the following modules: (1) Data processing and control module AT89C51 microcontroller. (2) 4*4 matrix keyboard input module. (3) ISD2560 voice chip module (including microphone and speaker). (4) digital tube display module, (5) sensor induction module.</p>
      <p>(6) Other accessory module 2 (including buzzer, status indicator, reset circuit, etc.). Its composition schematic diagram is shown in Figure 1. First of all, the staff will need the number of boxes and the number of products in each box through the coding keyboard input system, and then open the system will automatically open the conveyor belt, and through the cooperation with the sensor to achieve the parameter requirements, when the system is running, the parameters can be modified. And when error occurs in modifying parameters, audible and visual alarm will be issued. When the system runs, all the data can be displayed through the digital tube, and the number of boxes can be broadcast by voice. When the requirements of setting parameters are met, the system will automatically stop and remind the staff, so as to enter the state 1 waiting for the new command.</p>
    </sec>
    <sec>
      <title>4. Hardware design of packing machine system</title>
      <sec>
        <title>4.1 Introduction to protues software environment</title>
        <p>The hardware design of this paper is implemented in protues software environment. Protues software is the British Labcenter Electronics published EDA tool software, it not only has the simulation function of other EDA tool software, but also can simulate the MCU and peripheral device circuit, is the best simulation MCU and peripheral device tool. It can simulate 51 series, AVR, PIC and other commonly used MCU and its peripheral circuit 6 (such as LCD, RAM, ROM, keyboard, motor, LED, AD/DA, part of SPI device, part of IIC device, etc.).</p>
      </sec>
      <sec>
        <title>4.2 Circuit of each part of system hardware</title>
        <p>The design of the packing machine system is mainly composed of four parts: 4*4 matrix keyboard interface circuit, data processing and motor control circuit with AT89C51 chip as the core, ISD4004 voice chip that can broadcast voice and its peripheral control circuit, and output seven-section display circuit. In addition, there are LED prompt light, alarm buzzer, MCU reset circuit, etc. 3.</p>
      </sec>
      <sec>
        <title>4.2.1. Data processing and control module</title>
        <p>In this design, Ateml company 51 series MCU AT89C51 chip as the data processing and operation control chip of Figure 1 Schematic diagram of hardware composition</p>
        <p>the packing machine system. Only the single-chip chip can not complete the data processing and control function, there must be additional circuit, so that the single-chip chip can form a running system to achieve its function. In this design, by AT89C51 chip together with additional circuit constitute the microcontroller minimum system as data processing and control module 4. Its circuit connection diagram is shown in Figure 2.</p>
      </sec>
      <sec>
        <title>4.2.2. Keyboard input module</title>
        <p>This design requires keys in addition to 0-9 numeric keys, there are left move, right move and other functional keys, so the number of keys is too large, not suitable for the use of independent keyboard, that is, the matrix keyboard using coding keyboard input module of this design.</p>
        <p>Its connection circuit is shown in Figure 3. As shown in Figure 3, a single key is combined into a keyboard in 4X4 format. Four “row” selection lines are connected to four I/O port lines P2.4 ~ P2.7 of the microcontroller, and four “column” selection lines are connected to four I/O port lines P2.0 ~ P2.3 of the microcontroller chip. When the system is running, the level changes of the “column” line and “row” line are checked. You can judge what information the staff is inputting.</p>
        <p>In Figure 3, the single chip microcomputer controls the high and low levels of P2 port, and then judges according Figure 2 Microcontroller minimum system Figure 3 Schematic diagram of determinant keyboard connection Figure 4 A LED nixie tube drive circuit connection diagram</p>
        <p>to the detected results. Firstly, the microcontroller sets all P2 ports as high level, and then sets P2.4 ~ P2.7 ports as low level in turn, and only one port is low level each time. Then check the level of P2.0 ~ P2.3. When a key is pressed, one port in P2.0 ~ P2.3 will become low level. A combination of “column” and “row” lines determines which key the worker is pressing.</p>
      </sec>
      <sec>
        <title>4.2.3. Display module</title>
        <p>In the packing machine system, less information needs to be displayed, so seven LED digital tubes are used as a display. Data transmission in serial mode, sent by the serial data port P3.0(RXD) MCU, through 74HC164 serial shift register to convert serial data into 8-bit parallel data, used to drive the seven-section LED digital display tube 5.</p>
        <p>The connection diagram of one-bit LED display circuit is shown in Figure 4:</p>
      </sec>
      <sec>
        <title>4.2.4. Voice broadcast module</title>
        <p>In this design, the voice chip is needed to broadcast the number of boxes. In the packing machine system, ISD2560 voice chip is used to connect with single chip microcomputer to realize voice storage and playback, and realize the segmented recording and playback of voice. Voice signal has strong anti-interference ability, convenient storage, simple debugging, and can also be used as a subsystem of voice service.</p>
      </sec>
      <sec>
        <title>4.2.5. Other modules</title>
        <p>The parameter setting is the default of the system, and the operator can modify the above parameters according to the actual situation and work experience.</p>
      </sec>
    </sec>
    <sec>
      <title>5. Packing machine system software design</title>
      <sec>
        <title>5.1 Introduction to Keil uVision2 software environment</title>
        <p>SCM development in addition to the necessary hardware, also inseparable from the software, software programming and design of the system is completed in the Keil software environment. Keil C51 software provides rich library functions and powerful integrated development debugging tools, full Windows interface. Another important point is that if you look at the compiled assembly code, you can see that the object code generated by Keil C51 is very efficient. The assembly code generated by most statements is compact and easy to understand.</p>
      </sec>
      <sec>
        <title>5.2 System software design</title>
        <p>The software program design of the packing machine system mainly includes: initialization program, key detection program, key processing subroutine, external detection program, voice broadcast program.</p>
      </sec>
    </sec>
    <sec>
      <title>6.Conclusion</title>
      <p>This paper designs a packing machine system, which uses AT89C51 as the data processing master chip, 74HC164 serial register, seven LED digital tube as the reality module, ISD2560 voice chip and POWER amplifier CHIP LM386 to form the voice broadcast module. Additional 4 x 4 matrix keyboard and other auxiliary circuits together constitute the entire system. The staff can input data, modify data and perform other functions through the keyboard.</p>
      <p>The whole system is relatively complete in man-machine exchange, including voice, sound and light, etc., which can make the staff operate the whole system better.</p>
    </sec>
    <sec>
      <title>Acknowledgments</title>
      <p>The research was supported by the Science and Technology Development Program of Binzhou Polytechnic. The topic of this paper is based on AT89C51 SCM packing machine system design(Project Number: 2021yjkt16).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref-001">
        <mixed-citation>[1]Li Nian-qiang. Principle and Application of SINGLE chip Microcomputer [M]. Beijing: China Machine Press, 2007, 93-102</mixed-citation>
      </ref>
      <ref id="ref-002">
        <mixed-citation>[2]Sun Yucai, McS-51 Series Single Chip Microcomputer and its Application [M]. 4th edition. Nanjing: Southeast University Press, 1997, 1-19</mixed-citation>
      </ref>
      <ref id="ref-003">
        <mixed-citation>[3]Gong Ya-mei. Single-chip course Design based on Proteus and Keil [J]. Journal of Jinan Vocational Col- lege.2008(5) : 32-35</mixed-citation>
      </ref>
      <ref id="ref-004">
        <mixed-citation>[4]Yan Shi. Foundation of Digital Electronic Technology [M]. Beijing: Higher Education Press,1997,161-178</mixed-citation>
      </ref>
      <ref id="ref-005">
        <mixed-citation>[5]Liu lian-ji. Design of ISD speech chip recording/playback device and circuit [J]. Journal of ocean university of Qingdao, 1997,27 (3) :291-299</mixed-citation>
      </ref>
      <ref id="ref-006">
        <mixed-citation>[6]Hailong Xiao, Fengying Wang, Jinqing Yang, et al., Design of video recording system based on AT89C2051 and ISD2560 [J]. Microcomputer Information, 2004 (1) : 63-64</mixed-citation>
      </ref>
    </ref-list>
  </back>
  <floats-group>
    <fig id="fig-001" position="float">
      <graphic xlink:href="figures/fig-001.png"/>
    </fig>
    <fig id="fig-002" position="float">
      <graphic xlink:href="figures/fig-002.png"/>
    </fig>
    <fig id="fig-003" position="float">
      <graphic xlink:href="figures/fig-003.png"/>
    </fig>
    <fig id="fig-004" position="float">
      <graphic xlink:href="figures/fig-004.png"/>
    </fig>
  </floats-group>
</article>
