Self-checking method and device of thermal printer and thermal printer

By printing test images in a thermal printer, extracting density feature signals, and switching heating modes, the problem of unclear printing caused by thermal paper quality and temperature is solved. Adaptive printing density adjustment and ambient temperature control are achieved to ensure print quality.

CN121448022APending Publication Date: 2026-02-03广州市大枣信息科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411040387.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

During use, thermal printers may experience issues such as unclear printed patterns due to variations in the quality of the thermal paper and the temperature at which it is heated.

Method used

By printing test images, density feature signals are extracted to determine whether the printing density is abnormal. The heating mode is switched according to the type of abnormality and the ambient temperature, including shortening or increasing the printhead heating time mode and the paper tray heating mode, to adjust the printing density.

Benefits of technology

It effectively solves the problem of inconsistent printing density caused by different qualities and types of thermal paper, ensures printing clarity, and prevents the adhesive surface of thermal paper from hardening in low-temperature environments, thus improving the intelligent adaptive capability of thermal printers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121448022A_ABST
    Figure CN121448022A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of printer equipment, and particularly relates to a self-checking method and device of a thermal printer and the thermal printer. According to the method, a test image is printed, concentration characteristic signals are extracted, the abnormal type of printing concentration is determined, and whether the content currently printed by the thermal printer is clear or not is recognized; according to the abnormal type of the printing concentration and the working environment temperature of the thermal printer, the thermal printer is driven to heat in different heating modes, so that the printing concentration of the thermal printer tends to be normal, and the problem that the printing concentration is not uniform due to different quality and different types of thermal paper is solved; the thermal printer can adapt to the environment temperature to control heating of the paper bin, and the problem that when the temperature is too low, heat energy generated by heating of a printing head is not enough to enable color change of a thermosensitive coating of paper is solved; and by opening the paper bin for heating, the inconvenience in use caused by the fact that the adhesive surface of the thermo-sensitive paper is hardened at low temperature and the thermo-sensitive paper is easily separated from the release paper during bill printing can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of printer technology, and in particular to a self-testing method and apparatus for a thermal printer, and a thermal printer. Background Technology

[0002] A thermal printer is a type of printer that uses thermal technology to print. Its working principle involves a semiconductor heating element mounted on the print head heating specific thermal paper, causing a chemical reaction in the thermal coating on the paper, thereby forming a visible pattern on the paper.

[0003] During use, thermal printers are prone to issues where the quality of the thermal paper and the temperature at which it is heated can cause the printed image to be unclear. Summary of the Invention

[0004] Therefore, it is necessary to provide a self-testing method and device for thermal printers, as well as a thermal printer, to address the problem that the images on thermal paper are easily unclear due to the quality of the thermal paper and the temperature of the heat source.

[0005] In a first aspect, this application provides a self-testing method for a thermal printer, comprising the following steps:

[0006] Step S1: Print the test image;

[0007] Step S2: Extract the concentration feature signal from the test image, and determine whether the printing concentration of the thermal printer is abnormal and the type of abnormality based on the concentration feature signal;

[0008] Step S3: Switch the heating mode of the thermal printer according to the abnormal type of print density and the ambient temperature of the thermal printer; wherein, the abnormal type includes a state of excessively high density and a state of excessively low density, and the heating mode includes a mode of shortening the print head heating time, a mode of increasing the print head heating time, and a mode of heating the paper tray.

[0009] In one embodiment, the method for switching the heating mode of the thermal printer based on the type of abnormal print density and the ambient temperature of the thermal paper includes:

[0010] If the thermal printer is in the aforementioned heavy concentration state, control the thermal printer to operate in the shortened printhead heating mode;

[0011] If the thermal printer is in a slightly low concentration state, the ambient temperature at which it operates is obtained and compared with the preset operating temperature of the paper tray. Based on the comparison result, the thermal printer is determined to operate in either the mode of increasing printhead heating time or the mode of paper tray heating.

[0012] In one embodiment, the operating mode of the shortened printhead heating time mode is as follows:

[0013] The printhead is set to heat for a first heating duration; the first heating duration is the difference between the current heating duration and the preset reduction duration.

[0014] Determine whether the first heating duration is equal to the first set duration of the print head;

[0015] If the first heating duration is longer than the first set duration, return to step S1;

[0016] If the first heating time is equal to the first set time, exit the self-test.

[0017] In one embodiment, if the thermal printer is in a slightly lower density state, the ambient temperature at which it operates is obtained and compared with the preset operating temperature of the paper tray. Based on the comparison result, it is determined whether the thermal printer will operate in the mode of increasing printhead heating time or the mode of paper tray heating. The specific method includes:

[0018] Obtain the ambient temperature at which the thermal printer is operating;

[0019] Determine whether the ambient temperature at which the thermal printer operates is lower than the preset operating temperature;

[0020] If the ambient temperature at which the thermal printer operates is lower than the preset operating temperature, the thermal printer will be driven to operate in the paper tray heating mode.

[0021] If the ambient temperature at which the thermal printer operates is greater than or equal to the preset operating temperature, the thermal printer is driven to operate in the mode of increasing printhead heating time.

[0022] In one embodiment, the working mode of the paper tray heating mode is as follows: start paper tray heating until the current working temperature of the paper tray is equal to the preset working temperature, stop paper tray heating and return to step S1.

[0023] In one embodiment, the operating mode of the increased printhead heating time mode is as follows:

[0024] The printhead is set to heat for a second heating duration; the second heating duration is the sum of the current heating duration and the preset increase duration.

[0025] Determine whether the second heating time is equal to the second set time;

[0026] If the second heating time is less than the second set time, return to step S1;

[0027] If the second heating time is equal to the second set time, determine whether the thermal paper is installed backwards.

[0028] If the thermal paper is in the aforementioned low concentration state, it is determined that the thermal paper is reversed and the self-test is terminated.

[0029] If the concentration is not in the aforementioned low concentration state, exit the self-test directly.

[0030] In one embodiment, the specific method for determining whether the thermal paper is installed backwards includes:

[0031] Print the test image again, and determine whether the thermal printer's print density is abnormal and the type of abnormality based on the test image.

[0032] If the thermal paper is in the aforementioned low concentration state, it is determined that the thermal paper is reversed and the self-test is terminated.

[0033] If the concentration is not in the aforementioned low concentration state, exit the self-test directly.

[0034] In one embodiment, the method for extracting a concentration feature signal from the test image and determining whether the printing density of the thermal printer is abnormal and the type of abnormality based on the concentration feature signal includes:

[0035] Extract the concentration feature signal from the test image; the concentration feature signal is the ratio of the line width to the width of the printed area in the test image.

[0036] The concentration feature signal is compared with a preset percentage range;

[0037] If the concentration characteristic signal is within the preset ratio range, the printing density of the thermal printer is normal.

[0038] If the concentration characteristic signal is greater than the preset proportion range, the thermal printer's printing concentration is abnormal and it is in the state of excessive concentration.

[0039] If the concentration characteristic signal is less than the preset percentage range, the thermal printer's printing concentration is abnormal and is in a state of being too light.

[0040] Secondly, this application provides a self-testing device for a thermal printer, comprising:

[0041] The print head is used to print survey images;

[0042] Temperature sensor is used to obtain the ambient temperature at which the thermal printer operates;

[0043] Infrared sensors are used to extract concentration feature signals from test images;

[0044] The first judgment module is used to determine the abnormal type of the thermal printer's printing density based on the test image; the abnormal type includes a state of excessive density and a state of excessive light density.

[0045] The control module is used to switch the heating mode of the thermal printer according to the type of abnormality and the ambient temperature at which the thermal printer operates; the heating modes include a mode to shorten the printhead heating time, a mode to increase the printhead heating time, and a paper tray heating mode;

[0046] A first heating element is used to heat the paper tray when the thermal printer is operating in the paper tray heating mode.

[0047] In one embodiment, the first heating element includes a diaphragm and a heating wire, with the heating wire disposed on one side of the diaphragm and the other side of the diaphragm disposed on the paper tray.

[0048] Thirdly, this application provides a thermal printer, including a processor and a memory storing program instructions, wherein the processor is configured to execute a self-test method for a thermal printer as described in any of the preceding claims when the program instructions are executed.

[0049] One of the above technical solutions has the following advantages and beneficial effects:

[0050] In the above-mentioned self-test method for thermal printers, a test image is printed, and the density feature signal in the test image is extracted. Based on the density feature signal, it is determined whether the printing density of the thermal printer is abnormal and the type of abnormality. Based on the type of abnormality and the ambient temperature of the thermal printer, the heating mode of the thermal printer is determined. The abnormality types include a state of excessive density and a state of excessive light density. The heating modes include a mode of shortening the printhead heating time, a mode of increasing the printhead heating time, and a paper tray heating mode. This application identifies the type of printing density anomaly by printing test images and extracting density feature signals, thereby determining whether the content currently printed by the thermal printer is clear. Based on the type of printing density anomaly and the ambient temperature of the thermal printer, it drives the printer to heat in different modes to normalize the printing density, thus solving the problem of inconsistent printing density caused by different qualities and types of thermal paper. Simultaneously, the thermal printer can adaptively control the paper tray heating according to the ambient temperature, preventing the problem that the heat generated by the print head alone is insufficient to discolor the thermal coating of the paper when the ambient temperature is too low. Furthermore, by activating the paper tray heating, it prevents the adhesive surface of the thermal paper from hardening in low-temperature environments, which could lead to separation from the release liner when printing documents, causing inconvenience. Attached Figure Description

[0051] Figure 1 This is a diagram illustrating the application environment of the self-testing method for a thermal printer in this embodiment of the application.

[0052] Figure 2 This is a flowchart illustrating the self-test method of the thermal printer in the embodiments of this application;

[0053] Figure 3 This is one of the structural schematic diagrams of the self-test device of the thermal printer in the embodiments of this application;

[0054] Figure 4 This is a second schematic diagram of the self-testing device of the thermal printer in the embodiments of this application;

[0055] Figure 5 This is the third schematic diagram of the self-testing device of the thermal printer in the embodiments of this application;

[0056] Figure 6 This is a schematic diagram of the structure of the first heating element in an embodiment of this application;

[0057] Figure 7 This is a schematic diagram illustrating the determination of abnormal printing concentration types in an embodiment of this application. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0059] In one embodiment, such as Figure 2 As shown, a self-test method for a thermal printer is provided, including the following steps:

[0060] Step S1: Print the test image;

[0061] The specific content of the test image can be the default setting when the device is shipped from the factory, or it can be customized by the user later. For example, the test image can be a line graphic with multiple intervals.

[0062] It should be noted that the thermal printer can automatically perform step S1 of the self-test method after the device is powered on, or perform step S1 of the self-test method according to the user input command.

[0063] Step S2: Extract the concentration feature signal from the test image, and determine whether the printing density of the thermal printer is abnormal and the type of abnormality based on the concentration feature signal; among which, the abnormality types include excessively high density and excessively low density.

[0064] The density feature signal can be used to evaluate the clarity of the current test image, thereby determining whether the thermal printer's print density is abnormal and the type of abnormality. For example, the density feature signal can be obtained by extracting the line width signal from the test image and converting it into an electrical signal. By comparing the density feature signal with a pre-set evaluation standard, it can be determined whether the thermal printer's print density is abnormal and the type of abnormality, without the need for precise calculation of the density value.

[0065] Step S3: Switch the heating mode of the thermal printer according to the abnormal type of print density and the ambient temperature of the thermal printer. The heating modes include shortening the print head heating time, increasing the print head heating time, and paper tray heating mode.

[0066] The ambient temperature at which the thermal printer operates can be the temperature inside or near the paper tray 50 before the first test image is printed and before the print head 10 has preheated; that is, the air temperature of the environment in which the thermal printer is located. Alternatively, the ambient temperature inside or near the paper tray 50 can be the temperature after the test image has been printed. For example, if the ambient air temperature is too low, the heating effect of the print head 10 will be insufficient to change the color of the thermal coating on the paper, resulting in unclear printing.

[0067] It should be noted that a "high density" state refers to an over-reaction of chemicals on the thermal paper 70 due to excessively high heating temperature, resulting in overly dark or yellowed prints and unclear test images; a "low density" state refers to an incomplete reaction of chemicals on the thermal paper 70 due to excessively low heating temperature, resulting in unclear test images.

[0068] In addition, the shortened printhead heating time mode refers to shortening the heating time of the printhead 10 before printing the test image, so as to reduce the heating temperature of the thermal paper 70; the increased printhead heating time mode refers to increasing the heating time of the printhead 10 before printing the test image, so as to increase the heating temperature of the thermal paper 70; the paper tray heating mode refers to turning on the heating of the paper tray 50 in the thermal printer, so that the thermal paper 70 contained in the paper tray 50 is subjected to a heating effect different from that of the printhead 10, thereby ensuring that the thermal paper 70 has enough heat energy to change the color of the thermal coating.

[0069] In the above embodiments, by printing test images and extracting density feature signals, the abnormal type of printing density is determined, thereby identifying whether the content currently printed by the thermal printer is clear. Based on the abnormal type of printing density and the ambient temperature of the thermal printer, the thermal printer is driven to heat in different modes to normalize the printing density, thus solving the problem of inconsistent printing density that may occur due to different qualities and types of thermal paper 70. Simultaneously, the thermal printer can adaptively control the heating of the paper tray 50 according to the ambient temperature, avoiding the problem that the heat energy from the print head 10 alone is insufficient to discolor the thermal coating of the paper when the ambient temperature is too low. Furthermore, by activating the heating of the paper tray 50, the adhesive surface of the thermal paper 70 can be prevented from hardening in low-temperature environments, making it prone to separating from the release paper when printing documents, causing inconvenience in use.

[0070] In one embodiment, the heating mode of the thermal printer is switched according to the type of abnormal print density and the ambient temperature at which the thermal paper 70 operates. The specific method includes:

[0071] If the thermal printer is in a state of high concentration, control the thermal printer to operate in a shorter printhead heating mode.

[0072] If the thermal printer is in a low-concentration state, the ambient temperature at which it operates is obtained and compared with the preset operating temperature of the paper tray 50. Based on the comparison result, the thermal printer is determined to operate in either the mode of increasing printhead heating time or the mode of paper tray heating.

[0073] Specifically, if the print density is too high, the thermal printer will operate in a mode that shortens the printhead heating time. If the print density is too low, the ambient temperature of the thermal printer will be obtained and compared with the preset operating temperature of the paper tray 50. Based on the comparison result, the thermal printer will be operated in either a mode that increases the printhead heating time or a mode that increases the paper tray heating time. It should be noted that if the print density of the thermal printer is not abnormal, the self-test will be exited.

[0074] The preset operating temperature is the optimal ambient temperature inside or near the periphery of the paper tray 50 when the thermal printer's paper tray 50 heating function is activated in a low-temperature environment, and the thermal coating on the paper changes color clearly under the heating effect of the heating head. It should be noted that the preset operating temperature can be a range or a precise value.

[0075] In one embodiment, the working mode of the shortened printhead heating time mode is as follows:

[0076] The print head 10 is set to heat for a first heating duration; the first heating duration is the difference between the current heating duration and the preset reduction duration.

[0077] Determine whether the first heating duration is equal to the first set duration of the print head 10;

[0078] If the first heating time is longer than the first set time, return to step S1;

[0079] If the first heating time is equal to the first set time, exit the self-test.

[0080] The first heating time can be determined by the following formula:

[0081] T1 = P0 - ΔP1

[0082] Where T1 is the first heating duration, P0 is the current heating duration, and ΔP1 is the preset reduction duration.

[0083] It should be noted that the preset reduction time can be the factory default setting or a user-defined setting. The first set time can be the minimum heating time of the printhead 10 as set by the factory default, or it can be a user-defined setting.

[0084] Specifically, when the first heating time is longer than the first set time, return to step S1, and repeat step S1 and step S2 in sequence until the printing density of the thermal printer is normal or until the first heating time is equal to the first set time, then exit the self-test and troubleshoot the thermal printer.

[0085] In the above embodiments, by gradually reducing the heating time of the print head 10, the heating time of the heating head corresponding to the normal printing density is found, and the heating temperature of the thermal paper 70 is reduced. This allows the thermal printer to adaptively adjust the printing density when the printing density is too high, without manual intervention, thus improving the intelligence of the thermal printer.

[0086] In one embodiment, if the thermal printer is in a light-density state, the ambient temperature at which the thermal printer operates is obtained and compared with the preset operating temperature of the paper tray 50. Based on the comparison result, it is determined whether the thermal printer should operate in a mode that increases printhead heating time or in a mode that heats the paper tray. Specific methods include:

[0087] Obtain the ambient temperature at which the thermal printer is operating;

[0088] Determine if the ambient temperature at which the thermal printer is operating is lower than the preset operating temperature;

[0089] If the ambient temperature at which the thermal printer operates is lower than the preset operating temperature, the thermal printer will be driven to operate in paper tray heating mode.

[0090] If the ambient temperature at which the thermal printer operates is greater than or equal to the preset operating temperature, the thermal printer will be driven to operate in a mode that increases the printhead heating time.

[0091] Specifically, when the ambient temperature of the thermal printer is lower than the preset operating temperature, even if the printhead 10 heats for a second set duration, the heat provided by the printhead 10 is still insufficient to make the thermal coating change color clearly. At this time, it is necessary to drive the thermal printer to operate in the paper tray heating mode. By directly heating the paper tray 50, the thermal paper 70 in the paper tray 50 is heated to a certain temperature, reducing the heating burden on the printhead 10. At the same time, since the thermal paper 70 is heated to a certain temperature, the adhesive surface of the thermal paper 70 is prevented from hardening in the low temperature environment, which would cause inconvenience in use.

[0092] Furthermore, when the ambient temperature of the thermal printer is greater than or equal to the preset operating temperature, the thermal paper 70 does not need to rely on a heat source other than the printhead 10 to provide heat. The heat provided by the printhead 10 alone is sufficient to make the thermal paper 70 print clearly. By driving the thermal printer to operate in a mode that increases the printhead heating time, the output temperature of the printhead 10 to the thermal paper 70 is increased.

[0093] In one embodiment, the working mode of the paper tray heating mode is as follows: start heating of paper tray 50 until the current working temperature of paper tray 50 is equal to the preset working temperature, stop heating of paper tray 50 and return to step S1.

[0094] Specifically, when the ambient temperature of the thermal printer is lower than the preset operating temperature, the thermal printer turns on the heating function of the paper tray 50 until the temperature inside or near the periphery of the paper tray 50 is heated to the preset operating temperature. Then, the heating stops and steps S1 and S2 are repeated in sequence until the printing density of the thermal printer is normal or the self-test is exited and the thermal printer is troubleshooted.

[0095] For example, the preset operating temperature of the paper tray 50 is 25°C, and the ambient temperature of the thermal printer is -10°C. When the ambient temperature of the thermal printer is lower than the preset operating temperature, the thermal printer operates in paper tray heating mode until the current operating temperature of the paper tray 50 equals the preset operating temperature, and then stops heating. When the current operating temperature of the paper tray 50 is at the preset operating temperature, a test image is printed again, and the self-test method is repeated until the printing density of the thermal printer is normal or the self-test is exited and the thermal printer is troubleshooted.

[0096] In one example, the working mode for increasing printhead heating duration is as follows:

[0097] The print head 10 is set to heat for a second heating duration; the second heating duration is the sum of the current heating duration and the preset increase duration.

[0098] Determine whether the second heating duration is equal to the second set duration;

[0099] If the second heating time is less than the second set time, return to step S1;

[0100] If the second heating time is equal to the second set time, determine whether the thermal paper 70 is installed backwards.

[0101] The second heating time can be determined by the following formula:

[0102] T2=P0-ΔP

[0103] Where T2 is the second heating duration, P0 is the current heating duration, and ΔP2 is the preset increase duration.

[0104] It should be noted that the preset extension duration can be the factory default setting or a user-defined setting. The second set duration can be the maximum heating duration of the printhead 10 as set by default, or a user-defined setting.

[0105] Specifically, when the second heating time is less than the second set time, return to step S1, and repeat steps S1 and S2 sequentially until the print density of the thermal printer is normal or until the second heating time equals the second set time. Then, determine whether the thermal paper 70 is installed backwards and exit the self-test. It should be noted that when the thermal paper 70 is installed backwards, even if the print head 10 heats it for the second set time, the thermal coating on the thermal paper 70 will not change color.

[0106] In the above embodiments, when the print density of the thermal printer is too light, the heating time of the print head 10 is gradually increased to find the heating time of the heating head corresponding to the normal print density, thereby increasing the heating temperature of the thermal paper 70. This allows the thermal printer to adaptively adjust the print density when the print density is too light, without manual intervention, thus improving the intelligence of the thermal printer.

[0107] In one example, the specific method for determining whether the thermal paper 70 is installed backwards includes:

[0108] Print the test image again and determine whether the thermal printer's print density is abnormal and the type of abnormality based on the test image.

[0109] If the concentration is too low, the thermal paper 70 is determined to be installed backwards and the self-test will be terminated.

[0110] If the concentration is not low, exit the self-test directly.

[0111] Specifically, when the ambient temperature of the thermal printer is lower than the preset operating temperature and the heating time of the print head 10 reaches the second preset time, a test image is printed again, and the density characteristic signal of the test image is extracted to determine whether the printing density is abnormal. If the printing density is abnormal and the abnormality type is a light density state, it is determined that the thermal paper 70 is installed backwards, and the self-test is exited. It should be noted that in some embodiments, after determining that the thermal paper 70 is installed backwards and exiting the self-test, the thermal printer can issue a notification signal. For example, the notification signal can be a light prompt, an sound prompt, or a message notification received by a network terminal such as a mobile phone APP.

[0112] In the above embodiments, by adding a function to determine if the thermal paper 70 is installed backwards, it is possible to avoid the failure to detect if the thermal paper 70 is installed backwards in time, which would result in the printed order not displaying the printed content, making it difficult to know which order started the invalid printing and affecting normal business operations.

[0113] In one example, a density feature signal is extracted from the test image, and the density feature signal is used to determine whether the printing density of the thermal printer is abnormal and the type of abnormality. Specific methods include:

[0114] Extract the concentration feature signal from the test image; the concentration feature signal is the ratio of the line width to the width of the printed area in the test image.

[0115] Compare the concentration characteristic signal with the preset percentage range;

[0116] If the concentration characteristic signal is within the preset ratio range, the printing density of the thermal printer is normal.

[0117] If the concentration characteristic signal is greater than the preset percentage range, the thermal printer's printing concentration is abnormal and it is in a state of excessive concentration.

[0118] If the concentration characteristic signal is less than the preset percentage range, the thermal printer will print with abnormal density and be in a state of light density.

[0119] Among them, such as Figure 7 As shown, the preset ratio range is the ratio range between the line width in the test image and the width of the printed area when the lines in the test image are clearly displayed. The density feature signal is the ratio between the line width in the test image and the width of the printed area. For example, the preset ratio range is set to 0.004 to 0.007, the width of the printed area is 4cm, the line width in the test image is 0.2cm, and the value of the feature density signal is 0.005, which means that the printing density of the thermal printer is normal.

[0120] In addition, such as Figures 3 to 5As shown, the infrared sensor 40 can emit infrared signals towards the test image on the thermal paper 70. The receiving end converts the received signals to obtain a signal showing the ratio of the line width to the printed area width in the test image. This signal is then converted into an electrical signal to obtain a concentration characteristic signal.

[0121] In the above embodiments, the ratio of line width to printing area width in the test image is extracted as an evaluation of the clarity of the current test image. The density feature signal is compared with a preset ratio range to determine whether the printing density of the thermal printer is abnormal and the type of abnormality. There is no need to accurately calculate the density, and the structure is simple and low cost.

[0122] In one embodiment, such as Figures 3 to 5 As shown, a self-testing device for a thermal printer is provided, comprising:

[0123] Print head 10 is used to print survey images;

[0124] Temperature sensor 30 is used to obtain the ambient temperature during the operation of the thermal printer;

[0125] Infrared sensor 40 is used to extract concentration feature signals from the test image;

[0126] The first judgment module is used to determine the abnormal type of the thermal printer's printing density based on the test image; the abnormal types include excessive density and excessive light density.

[0127] The control module 60 is used to switch the heating mode of the thermal printer according to the type of abnormality and the ambient temperature at which the thermal printer operates; the heating modes include shortening the printhead heating time mode, increasing the printhead heating time mode, and paper tray heating mode.

[0128] The first heating element 20 is used to heat the paper tray 50 when the thermal printer is running in paper tray heating mode.

[0129] For specific limitations on the self-test device of thermal printers, please refer to the limitations on the self-test method of thermal printers mentioned above, which will not be repeated here.

[0130] like Figure 5 and Figure 6 As shown, in one example, the first heating element 20 includes a diaphragm 21 and a heating wire 22. The heating wire 22 is disposed on one side of the diaphragm 21, and the other side of the diaphragm is disposed on the paper tray 50.

[0131] The heating wire 22 can be fixed to one side of the diaphragm 21 by adhesive, and the other side of the diaphragm 21 can be glued to the surface of the paper tray 50 with adhesive tape.

[0132] In one embodiment, such as Figure 1 As shown, a thermal printer is provided, including a processor 102 and a memory 104 storing program instructions. The processor 102 is configured to execute the steps of the self-test method for the thermal printer described above when running the program instructions.

[0133] In one example, when processor 102 executes computer program 106, it may perform the following steps:

[0134] Step S1: Print the test image;

[0135] Step S2: Extract the concentration feature signal from the test image, and determine whether the printing concentration of the thermal printer is abnormal and the type of abnormality based on the concentration feature signal; among which, the abnormality type includes a state of excessively high concentration and a state of excessively low concentration.

[0136] Step S3: Switch the heating mode of the thermal printer according to the abnormal type of print density and the ambient temperature of the thermal printer. The heating modes include shortening the print head heating time mode, increasing the print head heating time mode, and paper tray heating mode.

[0137] In one example, when processor 102 executes computer program 106, it may also perform the following steps:

[0138] If the thermal printer is in a state of high concentration, control the thermal printer to operate in a shorter printhead heating mode.

[0139] If the thermal printer is in a low-concentration state, the ambient temperature at which it operates is obtained and compared with the preset operating temperature of the paper tray 50. Based on the comparison result, the thermal printer is determined to operate in either the mode of increasing printhead heating time or the mode of paper tray heating.

[0140] In one example, when processor 102 executes computer program 106, it may also perform the following steps:

[0141] The print head 10 is set to heat for a first heating duration; the first heating duration is the difference between the current heating duration and the preset reduction duration.

[0142] Determine whether the first heating duration is equal to the first set duration of the print head 10;

[0143] If the first heating time is longer than the first set time, return to step S1;

[0144] If the first heating time is equal to the first set time, exit the self-test.

[0145] In one example, when processor 102 executes computer program 106, it may also perform the following steps:

[0146] Obtain the ambient temperature at which the thermal printer is operating;

[0147] Determine if the ambient temperature at which the thermal printer is operating is lower than the preset operating temperature;

[0148] If the ambient temperature at which the thermal printer operates is lower than the preset operating temperature, the thermal printer will be driven to operate in paper tray heating mode.

[0149] If the ambient temperature at which the thermal printer operates is greater than or equal to the preset operating temperature, the thermal printer will be driven to operate in a mode that increases the printhead heating time.

[0150] In one example, when processor 102 executes computer program 106, it may also perform the following steps: start heating of paper tray 50 until the current operating temperature of paper tray 50 is equal to the preset operating temperature, stop heating of paper tray 50 and return to step S1.

[0151] In one example, when processor 102 executes computer program 106, it may also perform the following steps:

[0152] The print head 10 is set to heat for a second heating duration; the second heating duration is the sum of the current heating duration and the preset increase duration.

[0153] Determine whether the second heating duration is equal to the second set duration;

[0154] If the second heating time is less than the second set time, return to step S1;

[0155] If the second heating time is equal to the second set time, determine whether the thermal paper 70 is installed backwards.

[0156] In one example, when processor 102 executes computer program 106, it may also perform the following steps:

[0157] Print the test image again and determine whether the thermal printer's print density is abnormal and the type of abnormality based on the test image.

[0158] If the concentration is too low, the thermal paper 70 is determined to be installed backwards and the self-test will be terminated.

[0159] If the concentration is not low, exit the self-test directly.

[0160] In one example, when processor 102 executes computer program 106, it may also perform the following steps:

[0161] Extract the concentration feature signal from the test image; the concentration feature signal is the ratio of the line width to the width of the printed area in the test image.

[0162] Compare the concentration characteristic signal with the preset percentage range;

[0163] If the concentration characteristic signal is within the preset ratio range, the printing density of the thermal printer is normal.

[0164] If the concentration characteristic signal is greater than the preset percentage range, the thermal printer's printing concentration is abnormal and it is in a state of excessive concentration.

[0165] If the concentration characteristic signal is less than the preset percentage range, the thermal printer will print with abnormal density and be in a state of light density.

[0166] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0167] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0168] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A self-test method for a thermal printer, characterized in that, Includes the following steps: Step S1: Print the test image; Step S2: Extract the concentration feature signal from the test image, and determine whether the printing concentration of the thermal printer is abnormal and the type of abnormality based on the concentration feature signal; Step S3: Switch the heating mode of the thermal printer according to the abnormal type of print density and the ambient temperature of the thermal printer; wherein, the abnormal type includes a state of excessively high density and a state of excessively low density, and the heating mode includes a mode of shortening the print head heating time, a mode of increasing the print head heating time, and a mode of heating the paper tray.

2. The self-test method for a thermal printer according to claim 1, characterized in that, The method for switching the heating mode of the thermal printer based on the type of abnormal printing density and the ambient temperature of the thermal paper includes: If the thermal printer is in the aforementioned heavy concentration state, control the thermal printer to operate in the shortened printhead heating mode; If the thermal printer is in a slightly low concentration state, the ambient temperature at which it operates is obtained and compared with the preset operating temperature of the paper tray. Based on the comparison result, the thermal printer is determined to operate in either the mode of increasing printhead heating time or the mode of paper tray heating.

3. The self-test method for a thermal printer according to claim 2, characterized in that, The working mode of the shortened printhead heating time mode is as follows: The printhead is set to heat for a first heating duration; the first heating duration is the difference between the current heating duration and the preset reduction duration. Determine whether the first heating duration is equal to the first set duration of the print head; If the first heating duration is longer than the first set duration, return to step S1; If the first heating time is equal to the first set time, exit the self-test.

4. The self-test method for a thermal printer according to claim 2, characterized in that, If the thermal printer is in a slightly low heat density state, the ambient temperature at which it operates is obtained and compared with the preset operating temperature of the paper tray. Based on the comparison result, the thermal printer is determined to operate in either the increased printhead heating time mode or the paper tray heating mode. Specific methods include: Obtain the ambient temperature at which the thermal printer is operating; Determine whether the ambient temperature at which the thermal printer operates is lower than the preset operating temperature; If the ambient temperature at which the thermal printer operates is lower than the preset operating temperature, the thermal printer will be driven to operate in the paper tray heating mode. If the ambient temperature at which the thermal printer operates is greater than or equal to the preset operating temperature, the thermal printer is driven to operate in the mode of increasing printhead heating time.

5. The self-test method for a thermal printer according to claim 2, characterized in that, The operating mode of the paper tank heating mode is as follows: Start the paper tray heating until the current working temperature of the paper tray equals the preset working temperature, then stop the paper tray heating and return to step S1.

6. The self-test method for a thermal printer according to claim 2, characterized in that, The working mode of the mode that increases printhead heating time is as follows: The printhead is set to heat for a second heating duration; the second heating duration is the sum of the current heating duration and the preset increase duration. Determine whether the second heating time is equal to the second set time; If the second heating time is less than the second set time, return to step S1; If the second heating time is equal to the second set time, determine whether the thermal paper is installed backwards.

7. The self-test method for a thermal printer according to claim 6, characterized in that, The specific methods for determining whether the thermal paper is installed backwards include: Print the test image again and determine whether the thermal printer's print density is abnormal based on the test image; If the thermal paper is in the aforementioned low concentration state, it is determined that the thermal paper is reversed and the self-test is terminated. If the concentration is not in the aforementioned low concentration state, exit the self-test directly.

8. The self-test method for a thermal printer according to claim 1, characterized in that, The method for extracting concentration feature signals from the test image and determining whether the printing density of the thermal printer is abnormal and the type of abnormality based on the concentration feature signals includes: Extract the concentration feature signal from the test image; the concentration feature signal is the ratio of the line width to the width of the printed area in the test image. The concentration feature signal is compared with a preset percentage range; If the concentration characteristic signal is within the preset ratio range, the printing density of the thermal printer is normal. If the concentration characteristic signal is greater than the preset proportion range, the thermal printer's printing concentration is abnormal and it is in the state of excessive concentration. If the concentration characteristic signal is less than the preset percentage range, the thermal printer's printing concentration is abnormal and is in a state of being too light.

9. A self-testing device for a thermal printer, characterized in that, include: The print head is used to print survey images; Temperature sensor is used to obtain the ambient temperature at which the thermal printer operates; Infrared sensors are used to extract concentration feature signals from test images; The first judgment module is used to determine the abnormal type of the thermal printer's printing density based on the test image; the abnormal type includes a state of excessive density and a state of excessive light density. The control module is used to switch the heating mode of the thermal printer according to the type of abnormality and the ambient temperature at which the thermal printer operates; the heating modes include a mode to shorten the printhead heating time, a mode to increase the printhead heating time, and a paper tray heating mode; A first heating element is used to heat the paper tray when the thermal printer is operating in the paper tray heating mode.

10. The self-test device for a thermal printer according to claim 9, characterized in that, The first heating element includes a diaphragm and a heating wire, with the heating wire disposed on one side of the diaphragm and the other side of the diaphragm disposed on the paper tray.

11. A thermal printer, characterized in that, It includes a processor and a memory storing program instructions, the processor being configured to perform a self-test method for a thermal printer as described in any one of claims 1 to 8 when the program instructions are executed.