Smart bookcase based on image recognition

: With the improvement of people's living standards, the demand for books and the efficiency and accuracy of accessing books are also increasing. Because the information displayed to readers on the library management system is the position of the book when it is neatly arranged, sometimes the position of the book is inconsistent with the actual position of the book, which increases the difficulty for readers to find the target book. The traditional bookcase has a simple structure, and it takes a certain amount of time to search for books on weekdays. In view of the time-consuming situation of borrowing books, and in order to make it convenient for borrowers to find books, it is extremely important to develop a new type of networkable smart bookcase for libraries.


Introduction
my country is a populous country with a huge book consumption market. According to the National Reading Survey in recent years, my country's per capita reading volume is rising, and paper books account for a large proportion of the total reading volume. Traditional libraries use barcode technology to achieve book management, but the library has a huge collection of books, and the retrieval effect is very unsatisfactory [1] . Many borrowers are not familiar with the management of bookshelves in the library, and it is difficult to find the books they want without the help of the administrator. In this Internet + era, the organic combination of the Internet and the bookcase itself to achieve diversified retrieval is more conducive to the management of books. At the time when the era of intelligence and interconnection of things is coming, better integrate the Internet of Things technology, intelligent technology, and big data technology to realize the digital management and handheld regulation of books. The smart bookcase, through the cooperation between its own hardware and programs, better solves the problems of time-consuming, labor-intensive, and inefficient manual picking and placing of books. The machine has simple structure, ingenious design, low manufacturing cost, and convenient and intelligent services. At the same time, the machine implements the high-efficiency, convenient and personalized mechatronics design concept, and has good economic benefits and market prospects.

Research significance
Traditional bookcases have disadvantages such as high time-consuming and poor maintenance, so it is necessary to design a smart bookcase. To provide humanized services to borrowers, it is necessary to break the tradition and realize the function of human-computer interaction. Therefore, this work has a certain experimental significance. The purpose of designing this work is to allow people to make full use of the resources of the library, so that the library can provide satisfactory services to borrowers, and bring a good reading experience to borrowers, so that people love to read and go to the library more book. The library will serve as a sacred place for collecting, sorting, preserving and disseminating knowledge, providing people with a learning environment and is an indispensable part of society. Establishing a networked intelligent bookcase for the library is a good way to upgrade and transform the traditional library, and create a trend environment where all people love to read.

Research route
(1)In the early stage, after market surveys, existing problems were discovered and the market needs were clarified. Then the design difficulties of existing equipment were understood to determine the development position of the product.
(2)After the investigation is completed, relevant papers, patents and other documents can be consulted. Then the preliminary design plan can be determined, and preliminary experiments can be conducted.
(3)With the preliminary plan, a virtual model of the whole machine can be established, the selection of various parts can be determined, and the preliminary design of the parts can be processed by oneself. Then the related debugging can be performed after assembly to avoid interference. The preliminary design of the whole machine will be completed soon.
(4)Then the relevant dynamic analysis can be carried on to the motion module, and the relevant statics analysis can be carried on to each force connecting rod. (5)Then the program algorithm can be designed to combine multiple components.
After that, relevant adjustments can be made to debug the program between the module systems.
(6)At the same time, according to relevant experiments, suitable materials can be selected, and the virtual model can be refined. After that, the processing drawings can be drawn. Then the related parts can be processed and assembled. Finally, the whole machine was assembled and debugged, and the smart bookcase was tested.
The overall flow chart is shown in Figure 1. 3 Introduction of the whole machine and each module

Overall organization
In order to realize all the functions of the whole machine, according to the modular design idea, the institutions in the works are designed to be functionally modular to ensure that each institution can realize its individual function, and then the designed modules are organically arranged through a reasonable layout. Combination and debugging control are used to ensure that the functions of the entire machine can finally be realized completely and smoothly. The overall structure of the system is shown in Figure 2.

Introduction of each module
The detailed composition of the functional modules of this work is shown in Table 1.

Control module
The control module and power detection module in the control system design are the focus of this smart bookcase.
For the performance of the smart bookcase, this system selects the Stm32vet6 single-chip microcomputer which has the advantages of strong function, high cost performance and convenient use according to the requirements of use.

Mobile module
The mobile module consists of four brushless DC motor screw rods. This module is driven by a brushless DC motor, because the brushless DC motor (BLDC) can obtain better torque and speed characteristics, and it can get a timely response at high speed, and it runs smoothly.

Identification module
The recognition module uses the GM67 scanning recognition module. The GM67 scanning recognition module is small in size, supports TTL232 and USB (Chinese free drive) interfaces, and can recognize the onedimensional bar codes of books in the library. The module is equipped with a barcode recognition system, which can identify the information about books contained in the barcode. The composition of the book barcode is shown in Figure 3 below.

gripping the module
The clamping module is composed of scissor mechanism, slide rail, screw rod, and other components. Its model is shown in Figure 4.

perception module
The so-called perception module is the "eyes" of the smart bookcase. The ultrasonic module is a simple, easy-to-use, low-cost, and highly accurate ranging sensor. The principle of ultrasonic ranging is shown in Figure 5. d is the ultrasonic transmitter and receiver. The distance between the probes, T is the ambient temperature in degrees Celsius, by measuring the echo time t of ultrasonic propagation. The distance S between the ultrasonic probe and the obstacle can be calculated as: The ultrasonic module is installed at the front end of the mechanical clamping device, which can judge the status of the front book and provide information data of the book position for the clamping book. At the same time, a camera OV7670 is installed in front of the mechanical gripping device, because when accessing books, it is inevitable that the books will be placed incorrectly and the books or bookcases will be damaged. The OV7670 has a high integration level and is compared with other image acquisition devices. Thinner, stronger image acquisition capability, shorter delay.
The image data output format of the OV7670 camera acquisition module is QVGA, RGB565. The camera is directly connected to stm32, digital zoom and image recognition can be achieved through the program, and can output high-quality data. The VGA image of this product can reach up to 30 frames/s [3] . With the help of the camera, the mechanical gripping device can intelligently complete the action.

networking module
Considering cost and actual demand analysis, this module uses ATK-ESP8266 to complete networking applications. The wireless device has low cost and is suitable for TCP, IP, and microcontrollers. Its working voltage ranges from 3V to 3.6V, with effective speed processing and storage capabilities. The device supports LVTTL serial port, is compatible with 3.5V and 5V single-chip systems, can be easily connected to the equipment, and this device takes up very little space. The built-in high-speed buffer memory on an effective PCB board is beneficial to improve system performance and reduce memory requirements [4] . ESP8266 is highly integrated on-chip and small in size, which can reduce the size of the entire networking module.

Book grabbing folder
Because the books on the bookshelf are arranged tightly, the inner and outer layers are cleverly designed. The outer layer is used to push open the books on both sides, and the inner layer is used to place and clamp the books. Put and take. The layered design of the mechanical clamping device can better realize the book clamping function. Its

Mobile mechanical frame
Based on the mechanical design of other mechanical products such as 3D printers, the mechanical gripping device can move three-dimensionally in X, Y, and Z axes, and the mechanical gripping device itself can achieve free rotation and expansion. The design of multiple degrees of freedom enables the mechanical gripping device to Easily change the position and posture, so as to achieve the task of grasping and placing the mechanical gripping device [5] . The reasonable design of the mechanical frame can realize the free movement of the mechanical clamping device. The model is shown in Figure 7.

Flow of work
This smart bookcase is composed of six modules: control module, identification module, clamping module, mobile module, perception module, and networking module. The user s work only needs to have the bar code side up and place the book bar in the book storage area. The camera above the book storage area will start to recognize the book back barcode, automatically classify the books, and classify the books according to online data, and then move the blessed books to Corresponding to the partition, the outer layer of the mechanical clamping device is transferred to the front end of the mechanical clamping device. The mechanical clamping device advances forward. The outer layer pushes open the books on both sides, and then slightly lifts it upwards to leave a certain space. The inner layer clamps the books. Enter the bookshelf to complete a book deposit action. When picking up the book, the steps are the same. According to the book retrieval request, the mechanical clamping device moves to the corresponding area to clamp the book, and then places the book in the retrieval area. In order to accurately place the books in the corresponding area of the bookshelf, the mechanical gripping device is equipped with an infrared sensor and a camera for distance sensing and fine adjustment. The book deposit process is as follows: (1) Place the barcode of the book to be deposited upward in the book deposit area; (2) The camera scans the barcode to classify the books; (3) The mechanical clamping device supports books; (4) Move the book to the corresponding book storage unit; (5) Use the inner and outer layers of the mechanical clamping device to store books in the bookcase;

Concluding
This smart bookcase includes a grasping and placing module, a mobile module and a networking module. It presents a brand new and fresh image to people and can effectively realize the intelligent management of a large number of books. At the same time, through the cooperation between its own hardware and programs, it better realizes human-computer interaction, and solves the problems of time-consuming and labor-consuming manual picking and placing of books and low efficiency. The machine is small in size and responsive, and can reflect good automation characteristics when serving borrowers. This product can help the library discover user needs in time, improve the subscription information of related books, and bring great convenience to borrowers. Moreover, it implements the high-efficiency, convenient and personalized mechatronics design concept, which has good economic benefits and market prospects.