A printer with a battery and a printing control method, device, and storage medium thereof
By calculating the maximum number of heating points on the portable printer's heating head and discarding some heating points, the problem of printer power-off protection under low power or low temperature conditions was solved, thereby improving printing speed and quality while ensuring basic printing functions.
Patent Information
- Application Number
- CN202311454445.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-11-03
AI Technical Summary
Portable printers are prone to triggering power-off protection when printing at high power under low battery or low temperature conditions. Existing segmented printing methods reduce printing speed and quality.
By calculating the maximum number of heatable points on the heating head and discarding some heating points when the power is insufficient, an actual set of heating points is formed to ensure printing quality and speed.
In environments with low battery power or low temperatures, the printer maintains its basic printing function by discarding some heating points, thereby increasing printing speed while slightly reducing print quality.
Smart Images

Figure CN117360098B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printer technology, and more particularly to a battery-powered printer and its printing control method, apparatus, and storage medium. Background Technology
[0002] Printers, as a common computer output device, are widely used in people's work, study, and daily life. With the development of technology and changes in work and lifestyle, small, portable printers are becoming increasingly popular. Portable printers allow people to carry them with them for printing anytime, anywhere.
[0003] Portable printers often require battery power for printing. In some printing scenarios, such as printing express waybills, it is often necessary to print entire horizontal lines. This results in a large power consumption when printing such lines, which may exceed the battery's power supply range and trigger the printer's power-off protection, especially when the battery is low or the temperature is low.
[0004] To ensure the printer functions properly, current technology generally employs segmented printing, which divides the dotted line into multiple segments for printing. However, segmented printing reduces printing speed, and because there is still relative movement between the printing medium and the print head during segmented printing, height differences between different segments can occur, reducing print quality. Summary of the Invention
[0005] In view of this, the object of the present invention is to provide a battery-powered printer and its printing control method, apparatus, and storage medium to improve the above-mentioned problems.
[0006] This invention provides a printing control method for a battery-powered printer, comprising:
[0007] Based on the current battery voltage and the heating parameters of the heating head, calculate the maximum number of heating points n that the heating head can currently heat.
[0008] Get the number of heated points Nd in the current row;
[0009] When the number of heating points Nd is greater than the maximum number of heatable points n, at least one heating point in the current row is discarded based on the number of heating points Nd and the maximum number of heatable points n, to obtain the actual set of heating points;
[0010] Print the current row of points based on the actual set of heated points.
[0011] Preferably, the maximum number of heatable points n = Isrc / Iavg = (Isrc*U*Tstd*Tf) / (R*(Tstd*Tf+Toff)); where U is the current voltage of the battery, Ton is the heating time of the heating head, and Ton = Tstd*Tf, Tstd is the theoretical heating time of the heating head at the preset ambient temperature, Tf is the heating compensation coefficient obtained according to the current ambient temperature T, Isrc is the average current provided by the battery at the current ambient temperature T; the instantaneous current of a single heating element on the heating head I = U / R, R is the resistance of the heating element, the average current Iavg = I*Ton / (Ton+Toff) = U*Tstd*Tf / R*(Tstd*Tf+Toff), and Toff is the rest time.
[0012] Preferably, when the number of heating points Nd is greater than the maximum number of heatable points n, at least one heating point in the current row is discarded to obtain the actual set of heating points, specifically:
[0013] When the number of heating points Nd is greater than the maximum number of heating points n, at least one heating point of the current row is discarded, so as to reduce the number of segments to be printed in the current row while meeting the set printing rate; where printing rate = (Nd-Nq) / Nd, and Nq is the number of heating points discarded.
[0014] Preferably, when the number of heating points Nd is greater than the maximum number of heatable points n, at least one heating point in the current row is discarded to obtain the actual set of heating points, specifically including:
[0015] When the number of heating points Nd is greater than the maximum number of heating points n, the minimum number of printing points Nmin for the current row is obtained based on the number of heating points Nd and the preset printing rate.
[0016] Determine whether the maximum number of heatable points n is greater than the minimum number of printable points Nmin;
[0017] If it is greater than that, then the number of points to be discarded is Nd-n;
[0018] If the number of points is not greater than the specified value, then the number of points to be discarded is Nd-T*n, where T is the number of segments to be printed, obtained by rounding up Nmin / n.
[0019] Preferably, the discarding of heating points is carried out in an intermittent manner, that is, the discarded heating points are not continuous on the current point row.
[0020] Preferably, the discarded heating points are spaced equally on the current row.
[0021] Preferably, it further includes:
[0022] When it is determined that two consecutive rows of dots both need to discard heated points, the heated points of the two rows to be discarded are staggered in the printing direction so that the heated points discarded in the two consecutive rows are not continuous in the printing direction.
[0023] This invention also provides a printing control device for a battery-powered printer, comprising:
[0024] The maximum number of heatable points calculation unit is used to calculate the current maximum number of heatable points n of the heating head based on the current voltage of the battery and the heating parameters of the heating head;
[0025] The heating point acquisition unit is used to acquire the number of heating points Nd in the current row;
[0026] The discard unit is used to discard at least one heating point in the current row when the number of heating points Nd is greater than the maximum number of heatable points n, based on the number of heating points Nd and the maximum number of heatable points n, to obtain the actual set of heating points;
[0027] A print control unit is used to print the current row of dots based on the actual set of heating dots.
[0028] This invention also provides a battery-powered printer, which includes a heating head, a battery, and a controller. The controller is electrically connected to both the heating head and the battery. The controller includes a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the printing control method described above.
[0029] This invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the printing control method described above.
[0030] In summary, this embodiment, when the battery is low or in a low-temperature environment, reducing output capacity, maintains the printer's basic printing functions while eliminating some heating points, thus slightly reducing print quality and ensuring printing speed. This invention is particularly suitable for printing content with many long solid lines, such as express delivery waybills. Attached Figure Description
[0031] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1This is a flowchart illustrating the printing control method provided in the first embodiment of the present invention.
[0033] Figure 2 This is a schematic diagram of printed content including a long solid line provided in an embodiment of the present invention.
[0034] Figure 3 yes Figure 2 The printed result of the content.
[0035] Figure 4 This is a schematic diagram of printed content containing two long solid lines provided in an embodiment of the present invention.
[0036] Figure 5 yes Figure 4 The printed result of the content.
[0037] Figure 6 This is a schematic diagram of the printing connection device provided in the second embodiment of the present invention. Detailed Implementation
[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0040] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0041] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0042] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0043] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0044] The terms "first" and "second" used in the embodiments are merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" can be interchanged in a specific order or sequence where permissible. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein.
[0045] Please see Figure 1 The first embodiment of the present invention provides a printing control method, which is applied to a battery-powered printer and includes the following steps:
[0046] S101, calculate the maximum number of heatable points n of the heating head based on the current voltage of the battery and the heating parameters of the heating head.
[0047] In this embodiment, the battery's output capacity is limited under low voltage or low temperature conditions, especially for a 4.2V battery. When the printer is working, the current can reach several amperes. Combined with the line resistance, this can lead to excessively low voltage supplied to the printer and its mainboard, causing malfunctions. Therefore, under low voltage or low temperature conditions, it is necessary to ensure that the printing current does not exceed a certain value, i.e., it is necessary to limit the maximum number of heated points that can be printed each time.
[0048] In this embodiment, assuming the current battery voltage is U, the current ambient temperature is T, and the heating time of the heating head is Ton = Tstd * Tf, where Tstd is the theoretical heating time of the print head at the preset ambient temperature, preferably 25 degrees Celsius, and Tf is the heating compensation coefficient obtained based on the current ambient temperature T. More specifically, Tf is the heating compensation coefficient obtained based on the difference between the current ambient temperature T and the preset ambient temperature Tstd. The instantaneous current of a single heating element on the heating head is I = U / R, and the rest time is Toff. Then, the average current of a single heating element is Iavg = I * Ton / (Ton + Toff) = U * Tstd * Tf / R * (Tstd * Tf + Toff).
[0049] Assuming that the battery can provide an average current of Isrc at the current ambient temperature T, then the maximum number of heatable points n = Isrc / Iavg = (Isrc*U*Tstd*Tf) / (R*(Tstd*Tf+Toff)).
[0050] S102, get the number of heating points Nd in the current row.
[0051] In this embodiment, the number of heating points Nd in the current row is determined based on the number of points to be printed in the current row.
[0052] S103, when the number of heating points Nd is greater than the maximum number of heatable points n, according to the number of heating points Nd and the maximum number of heatable points n, discard at least one heating point of the current point row to obtain the actual set of heating points.
[0053] In this embodiment, when the number of heating points Nd is greater than the maximum number of heating points n, it means that the number of heating points Nd cannot be printed out at the same time. Therefore, this embodiment can achieve one-time printing or reduce the number of segments by discarding at least one heating point of the current row.
[0054] In this embodiment, the number of discarded heating points can achieve optimal print quality at a certain printing speed or the fastest printing speed at a certain print quality.
[0055] The printing speed here is determined by the number of segments; the fewer the segments, the faster the printing speed. Print quality is determined by the number of discarded heating elements; the fewer discarded heating elements, the higher the print quality.
[0056] However, regardless of the method, this embodiment requires reducing the number of segments. For example, if a certain line originally needs to be printed in 3 segments, then to achieve a faster printing speed, more heating points can be discarded to reduce the number of segments to 1. Alternatively, a preset printing rate can be set to meet the printing quality requirements, thereby limiting the number of heating points discarded. In this case, to ensure the printing command is executed, the number of segments may have to be reduced to 2.
[0057] Taking the latter as an example, specifically:
[0058] When the number of heating points Nd is greater than the maximum number of heating points n, the minimum number of printing points Nmin for the current row is obtained based on the number of heating points Nd and the preset printing rate a.
[0059] Wherein, the minimum number of print points Nmin = Nd * a.
[0060] The print rate 'a' here is to ensure print quality and prevent the print quality from being severely affected by discarding too many heating points. For example, the print rate can be set to 75%, but it is not limited to this.
[0061] Determine whether the maximum number of heatable points n is greater than the minimum number of printable points Nmin;
[0062] If the value is greater than Nd, then the number of points discarded is Nd-n.
[0063] That is, the number of points discarded is the difference between the number of heating points Nd and the maximum number of heating points n.
[0064] If the number of points is not greater than the specified value, then the number of points to be discarded is Nd-T*n, where T is the number of segments to be printed, obtained by rounding up Nmin / n.
[0065] S104, Print the heating point row according to the actual heating point set.
[0066] To facilitate understanding of the present invention, some practical examples are given below to illustrate its application.
[0067] Please see Figure 2 , Figure 2 The content to be printed includes the current horizontal row, and assuming that the number of heated points of the current row is Nd = 240, and the preset printing rate is 75%, then the minimum number of printed points is Nmin = 180.
[0068] In one embodiment, assuming the maximum number of heatable points n = 200, then without discarding any heatable points, it is necessary to print in two segments.
[0069] In the case of discarding heating points, since the maximum number of heatable points n is greater than the minimum number of printable points Nmin, the number of discarded points is 40.
[0070] In particular, to ensure the printing effect, the heating points are discarded in an intermittent manner, that is, the discarded heating points are not continuous on the heating point row.
[0071] Furthermore, the intervals between discarded heating points are equal, with a spacing of 240 / 40 = 6, meaning one point is discarded every 6 points. The interval between two adjacent discarded heating points is 5. The final printing effect is as follows. Figure 3 As shown, a straight line can be printed as a dashed line in one go, avoiding segmented printing and thus improving printing speed.
[0072] In another embodiment, assuming the maximum number of heatable points n = 100, then without discarding any heatable points, it is necessary to print in 3 segments.
[0073] In the case of discarding heating points, since the maximum number of heatable points n is less than the minimum number of printing points Nmin, the number of segments to be printed is obtained by rounding up Nmin / n, which is 2, and the number of discarded points is 240-2*100=40.
[0074] Similarly, to ensure printing quality, heating points are discarded intermittently, meaning the discarded heating points are not continuous on the heating point row. Specifically, the intervals between discarded heating points are equal, with a spacing of 240 / 40 = 6, meaning one point is discarded every 6 points. The interval between two adjacent discarded heating points is 5. The final printing effect is as follows: Figure 3 As shown. Compared to three-segment printing that does not discard heating points, this embodiment prints in two segments, thus improving printing speed.
[0075] In summary, this embodiment, when the battery is low or in a low-temperature environment, reducing output capacity, maintains the printer's basic printing functions while eliminating some heating points, thus slightly reducing print quality and ensuring printing speed. This invention is particularly suitable for printing content with many long solid lines, such as express delivery waybills.
[0076] The following is a further description of some preferred embodiments of the present invention.
[0077] Based on the above embodiments, in a preferred embodiment of the present invention, it further includes:
[0078] When it is determined that two consecutive rows of heating points need to be discarded, the heating points to be discarded in the two rows of heating points are staggered in the printing direction so that the heating points to be discarded in the two consecutive rows of heating points are not continuous in the printing direction.
[0079] In this embodiment, as Figure 4 As shown, if two consecutive identical long solid lines appear in the printed content, a certain amount of heat points needs to be discarded for each. According to the general method of discarding heat points, if each line discards a corresponding number of heat points, a long white line will appear along the printing direction, thus affecting the printing quality.
[0080] Therefore, in this embodiment, the heating points to be discarded in two rows of heating points are staggered in the printing direction, so that the heating points to be discarded in two consecutive rows of heating points are discontinuous in the printing direction.
[0081] For example, both the first and second long solid lines discard one point every 6 points. The points discarded by the first long solid line are numbered (6, 12, 18, ...), while the points discarded by the second long solid line can be numbered (5, 11, 17, ...) or (4, 10, 16, ...).
[0082] Taking the discarded points of the second long solid line as an example (4, 10, 16, ...), since the fourth heating element was in a heated state when printing the first long solid line, when it moves to the second long solid line, although the fourth heating element is not powered, it still has residual heat. This residual heat can diffuse the fourth heated point, such as... Figure 5 As shown, this can improve the printing quality to some extent.
[0083] Please see Figure 6 The second embodiment of the present invention also provides a printing control device for a battery-powered printer, comprising:
[0084] The maximum number of heatable points calculation unit 210 is used to calculate the current maximum number of heatable points n of the heating head based on the current voltage of the battery and the heating parameters of the heating head.
[0085] The heating point acquisition unit 220 is used to acquire the heating point count Nd of the current row;
[0086] The discard unit 230 is used to discard at least one heating point in the current row when the number of heating points Nd is greater than the maximum number of heatable points n, based on the number of heating points Nd and the maximum number of heatable points n, to obtain the actual set of heating points;
[0087] The printing control unit 240 is used to print the current row of dots according to the actual set of heating dots.
[0088] This invention also provides a battery-powered printer, which includes a heating head, a battery, and a controller. The controller is electrically connected to both the heating head and the battery. The controller includes a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the printing control method described above.
[0089] This invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the printing control method described above.
[0090] For example, the various devices and process steps described above can be implemented by a computer program, which can be divided into one or more units, which are stored in the memory and executed by the processor to complete the present invention.
[0091] The processor referred to can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0092] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the present invention by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0093] If the unit integrated into the electronic device or printer is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0094] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0095] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A print control method applied to a printer with a battery, characterized by, The method comprises the following steps: calculating the maximum number of heatable points n of the heating head at present according to the current voltage of the battery and the heating parameter of the heating head; obtaining the number of heatable points Nd of the current dot row; when the number of heatable points Nd is greater than the maximum number of heatable points n, discarding at least one heatable point of the current dot row according to the number of heatable points Nd and the maximum number of heatable points n to obtain an actual heatable point set; wherein, when the number of heatable points Nd is greater than the maximum number of heatable points n, at least one heatable point of the current dot row is discarded to reduce the number of segmented prints required by the current dot row under the condition that a set printing rate is met; wherein, the printing rate = (Nd- Nq) / Nd, and Nq is the number of discarded heatable points; printing the current dot row according to the actual heatable point set.
2. The print control method according to claim 1, characterized by, maximum number of heatable points wherein U is the current voltage of the battery, Ton is the heating time of the heating head, and satisfies Tstd is the theoretical heating time of the heating head at a preset ambient temperature, Tf is a heating compensation coefficient obtained according to the current ambient temperature T, Isrc is the average current provided by the battery at the current ambient temperature T; the instantaneous current I of a single heating element on the heating head is I = U / R, R is the resistance of the heating element, and the average current: Toff is the rest time.
3. The print control method according to claim 1, characterized by, When the number of heatable points Nd is greater than the maximum number of heatable points n, at least one heatable point of the current dot row is discarded to obtain an actual heatable point set, and the method specifically comprises the following steps: when the number of heatable points Nd is greater than the maximum number of heatable points n, obtaining the minimum number of prints Nmin of the current dot row according to the number of heatable points Nd and a preset printing rate; judging whether the maximum number of heatable points n is greater than the minimum number of prints Nmin; if yes, the number of discarded points is Nd-n; If not greater than, the discarded points are T is the number of segments for the segmented printing, obtained by rounding up Nmin / n.
4. The print control method according to claim 1, characterized by, When the heatable points are discarded, the discarded heatable points are discarded in an interval discarding manner, i.e., the discarded heatable points are discontinuous on the current dot row.
5. The print control method according to claim 4, characterized by, The intervals of the discarded heatable points on the current dot row are equal.
6. The print control method according to claim 5, characterized by, The method further comprises the following steps: when it is judged that the heatable points need to be discarded in both of the two continuous dot rows, staggering the heatable points to be discarded in the two dot rows in the printing direction, so that the heatable points to be discarded in the two continuous dot rows are discontinuous in the printing direction.
7. A print control device applied to a printer with a battery, characterized by The method comprises the following steps: a maximum number of heatable points calculation unit, configured to calculate the maximum number of heatable points n of the heating head at present according to the current voltage of the battery and the heating parameter of the heating head; a number of heatable points obtaining unit, configured to obtain the number of heatable points Nd of the current dot row; a discarding unit, configured to discard at least one heatable point of the current dot row according to the number of heatable points Nd and the maximum number of heatable points n when the number of heatable points Nd is greater than the maximum number of heatable points n to obtain an actual heatable point set; wherein, the discarding unit is specifically configured to discard at least one heatable point of the current dot row when the number of heatable points Nd is greater than the maximum number of heatable points n to reduce the number of segmented prints required by the current dot row under the condition that a set printing rate is met; wherein, the printing rate = (Nd- Nq) / Nd, and Nq is the number of discarded heatable points; a printing control unit, configured to print the current dot row according to the actual heatable point set.
8. A printer with a battery, characterized by The method comprises the following steps: a heating head, a battery and a controller, the controller is electrically connected with the heating head and the battery, the controller comprises a memory and a processor, the memory stores a computer program, the computer program can be executed by the processor to realize the printing control method in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium, and can be executed by a processor of a device where the computer readable storage medium is located to realize the printing control method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Printing control method and system for thermal printer and electronic payment terminal
CN105082795A